FacetedBrepFace Class |
The FacetedBrepFace class defines a face of a faceted BREP.
A FacetedBrepFace cannot be instantiated directly. They are managed internally by a FacetedBrep.
Inheritance Hierarchy
Namespace: Tekla.Structures.Geometry3d
Assembly: Tekla.Structures (in Tekla.Structures.dll) Version: 2023.0.3
Syntax
The FacetedBrepFace type exposes the following members.
Properties
Name | Description | |
---|---|---|
HasHoles |
Gets a value indicating whether this instance has holes.
| |
Holes |
Gets the holes.
| |
IsReadOnly |
Gets a value indicating whether this instance is read only.
| |
VerticeIndexes |
Gets the vertex indexes.
| |
Vertices |
Gets the vertices.
|
Examples
using System.Linq; using Tekla.Structures.Geometry3d; public class Example { public void PrintHoleVerticesFromCubeFace() { var cubeWithHoleVertices = new[] { new Vector( 0.0, 0.0, 0.0), // 0 new Vector( 500.0, 0.0, 0.0), // 1 new Vector( 500.0, 500.0, 0.0), // 2 new Vector( 0.0, 500.0, 0.0), // 3 new Vector( 0.0, 0.0, 500.0), // 4 new Vector( 500.0, 0.0, 500.0), // 5 new Vector( 500.0, 500.0, 500.0), // 6 new Vector( 0.0, 500.0, 500.0), // 7 new Vector( 100.0, 100.0, 0.0), // 8 new Vector( 300.0, 100.0, 0.0), // 9 new Vector( 300.0, 300.0, 0.0), // 10 new Vector( 100.0, 300.0, 0.0), // 11 new Vector( 100.0, 100.0, 500.0), // 12 new Vector( 300.0, 100.0, 500.0), // 13 new Vector( 300.0, 300.0, 500.0), // 14 new Vector( 100.0, 300.0, 500.0), // 15 }; var outloops = new[] { new[] { 0, 3, 2, 1 }, new[] { 0, 1, 5, 4 }, new[] { 1, 2, 6, 5 }, new[] { 2, 3, 7, 6 }, new[] { 3, 0, 4, 7 }, new[] { 4, 5, 6, 7 }, new[] { 15, 12, 8, 11 }, new[] { 14, 15, 11, 10 }, new[] { 13, 14, 10, 9 }, new[] { 12, 13, 9, 8 } }; var innerLoops = new Dictionary{int, int[][]} { { 0, new[] { new[] { 8, 9, 10, 11 } } }, // this innerloop is on face 0 { 5, new[] { new[] { 12, 15, 14, 13 } } }, // this innerloop is on face 5 }; var brep = new FacetedBrep(cubeWithHoleVertices, outloops, innerLoops); foreach (FacetedBrepFace face in brep.Faces.Where(x => x.HasHoles)) { foreach (FacetedBrepFaceHole hole in face.Holes) { foreach (Vector vertex in hole.Vertices) { Console.WriteLine("Hole point x:{0} y:{1} z:{2}", vertex.X, vertex.Y, vertex.Z); } } } } // QueryHoleFromCubeFace } // Example
See Also