コリドー サーフェスの境界を定義するには、境界とマスクという 2 種類のオブジェクトを使用します。境界は、サーフェスの外側の端またはサーフェス内にある穴の内側の縁を表すポリゴンです。マスクは、サーフェスの表示可能な部分を表すポリゴンです。サーフェスのすべての境界のコレクションは AeccCorridorSurface.Boundaries プロパティに格納され、すべてのマスクのコレクションは AeccCorridorSurface.Masks プロパティに格納されます。
境界(AeccCorridorSurfaceBoundary 型)とマスク(AeccCorridorSurfaceMask 型)は、どちらも同じ基本インタフェース(IAeccCorridorSurfaceBaseMask)から派生し、どちらもほぼ同じメソッドとプロパティを備えています。 境界のポリゴンを構成するポイント配列は、GetPolygonPoints メソッドを呼び出すことによって取得できます。 計画線のセグメントを選択することで境界が定義された場合、そのような計画線コンポーネントのコレクションは FeatureLineComponents プロパティに含まれます。
Autodesk Civil 3D API には、コリドーの境界とマスクを作成および変更するメソッドは含まれていません。
次の例では、コリドー サーフェスのすべての境界を調べ、各サーフェスに関する情報を表示します。
Dim oCSBoundary As AeccCorridorSurfaceBoundary For Each oCSBoundary In oCorridorSurface.Boundaries ' Get the type of boundary. Dim sBoundaryTitle As String If (oCSBoundary.Type = aeccCorridorSurfaceInsideBoundary) Then sBoundaryTitle = " Inner Boundary: " Else sBoundaryTitle = " Outer Boundary: " End If Debug.Print sBoundaryTitle & oCSBoundary.Name ' Get the points of the boundary polygon. Dim vPoints As Variant vPoints = oCSBoundary.GetPolygonPoints() Debug.Print " " & UBound(vPoints) & " points" ' Print the location of the first point. Usually corridors ' have a large number of boundary points, so we will not ' bother printing all of them. X = vPoints(1)(0) Y = vPoints(1)(1) Z = vPoints(1)(2) Debug.Print "Point 1: "; X; ", "; Y; ", "; Z ' Display information about each feature ' line component in this surface boundary. Debug.Print Debug.Print "Feature line components" Debug.Print " Count: "; Debug.Print oCSBoundary.FeatureLineComponents.Count Dim oFeatureLineComponent As AeccFeatureLineComponent For Each oFLineComponent In oCSBoundary.FeatureLineComponents Debug.Print "Code:" & oFLineComponent.FeatureLine.CodeName Debug.Print "Start station:" & oFLineComponent.StartStation Debug.Print "End station:" & oFLineComponent.EndStation Debug.Print: Debug.Print Next ' Feature line components Next ' Corridor surface boundaries