Returns an Array of indices (Integers) of the 0D neighborhood of a given 2D geometry within a given distance.
Parameter | Type | Description | ||||
---|---|---|---|---|---|---|
compIdx | Integer |
Index of the component
|
||||
distance | Integer | Distance to take into account |
'Create a cube CreatePrim "Cube", "MeshSurface" set oSelList = GetValue("SelectionList") set oItem = oSelList(0) set oGeometry = oItem.obj oNb2D = oGeometry.Nb2D set o2DComponent = oGeometry.Geometry2D ' Loop on all the 2D Component for i = 0 to oNb2D - 1 o0DNeighborhood = o2DComponent.Neighborhood0D( i, 1 ) for j = LBound( o0DNeighborhood, 1 ) to UBound( o0DNeighborhood, 1 ) LogMessage "Component [" & i & "] 0D neighbor : " & o0DNeighborhood(j) next next |