Edge.IsBoundary operator

導入

v4.2

詳細

Edge が境界であるか(true)ないか(false)を示すBoolean値を戻します。

1. VBScript の例

' 
'       This example demonstrates how to use the Edge.IsBoundary property. It also 
'       demonstrates how to work with the Selection object to get a collection of
'       the actual components that are selected.
'
NewScene , false 
CreatePrim "Grid", "MeshSurface" 
ActivateEdgeSelTool 
SelectGeometryComponents "grid.edge[4,5]" 
' Because edge components were selected, the Selection object actually contains 
' only one object which is a CollectionItem. In order to get at the edges
' themselves, we need to call the CollectionItem.ComponentCollection
set oSelectedEdges = Selection(0).SubComponent.ComponentCollection
logmessage "is edge 4 a boundary ? " & oSelectedEdges(0).IsBoundary 
logmessage "is edge 5 a boundary ? " & oSelectedEdges(1).IsBoundary
' Output of above script:
'INFO : is edge 4 a boundary ? True
'INFO : is edge 5 a boundary ? False

2. JScript の例

/* 
        This example demonstrates how to use the Edge.IsBoundary property. It also 
        demonstrates how to work with the Selection object to get a collection of
        the actual components that are selected.
*/
NewScene( null, false );
CreatePrim( "Grid", "MeshSurface" );
ActivateEdgeSelTool();
SelectGeometryComponents( "grid.edge[4,5]" );
// Because edge components were selected, the Selection object actually contains 
// only one object which is a CollectionItem. In order to get at the edges
// themselves, we need to call the CollectionItem.ComponentCollection
var oSelectedEdges = Selection(0).SubComponent.ComponentCollection;
logmessage( "is edge 4 a boundary ? " + oSelectedEdges(0).IsBoundary );
logmessage( "is edge 5 a boundary ? " + oSelectedEdges(1).IsBoundary );
// Output of above script:
//INFO : is edge 4 a boundary ? true
//INFO : is edge 5 a boundary ? false