指定された 2D コンポーネントの指定の距離内にある 2D 隣接物(Geometry2D.Neighborhood2D を参照)のインデックスの Array(Integer)を戻します。指定された距離内にある指定された 2D コンポーネントの指定されたセーフ配列です。
| パラメータ | タイプ | 説明 | ||||||
|---|---|---|---|---|---|---|---|---|
| compIdx / compIdxArray | Variant |
コンポーネントのインデックス/コンポーネントインデックスの Array
|
||||||
| siNeighborType | siNeighborType |
近接のタイプ
|
||||||
| distance | Integer | 考慮に入れる距離 |
set oCube = Application.ActiveProject.ActiveScene.Root.AddGeometry("Cube", "MeshSurface")
set oGeometry = oCube.obj
set o2DGeometry = oGeometry.Geometry2D
'Get the array of indices from that item
set oSubComponent = getvalue(oCube.FullName & ".poly[1]")
aIndices = oSubComponent.SubElements
a2DNeighbors = o2DGeometry.Neighbors2D( aIndices, siAdjacent , 1 )
for j = LBound( a2DNeighbors, 1 ) to UBound( a2DNeighbors, 1 )
LogMessage "Component [" & j & "] 2D neighbor : " & a2DNeighbors(j)
next |