BrepFaceList

References
Provides access to all the Faces in a Brep object.

Properties

Count

#Since v5.0
Gets the number of brep faces.
public int Count { get; }

HasPerFaceColors

#Since v8.18
True if one or more faces on the active level have per face color overrides.
public bool HasPerFaceColors { get; }
Remarks: Per face colors are a mutable property on BrepFace and are set with BrepFace.PerFaceColor.

Indexers

this[]

#
Gets the BrepFace at the given index. The index must be valid or an IndexOutOfRangeException will be thrown.
public BrepFace this[
index
Index of BrepFace to access.
] { get; }
The BrepFace at [index].
IndexOutOfRangeExceptionThrown when the index is invalid.

Methods

Add

#Since v5.4
Create and add a new face to this list. An incomplete face is added. The caller must create and fill in the loops used by the face.
public BrepFace Add(
surfaceIndex
index of surface in brep's Surfaces list
)

Add

#Since v5.4
Add a new face to a brep. This creates a complete face with new vertices at the surface corners, new edges along the surface boundary, etc. The loop of the returned face has four trims that correspond to the south, east, north, and west side of the surface in that order. If you use this version of Add to add an exiting brep, then you are responsible for using a tool like JoinEdges() to hook the new face to its neighbors.
public BrepFace Add(
surface
surface is copied
)

AddConeFace

#Since v5.4
Add a new face to the brep whose surface geometry is a ruled cone with the edge as the base and the vertex as the apex point.
public BrepFace AddConeFace(
vertex,
The apex of the cone will be at this vertex. The north side of the surface's parameter space will be a singular point at the vertex.
edge,
The south side of the face's surface will run along this edge.
revEdge
true if the new face's outer boundary orientation along the edge is opposite the orientation of edge.
)

AddRuledFace

#Since v5.4
Add a new face to the brep whose surface geometry is a ruled surface between two edges.
public BrepFace AddRuledFace(
edgeA,
The south side of the face's surface will run along edgeA.
revEdgeA,
true if the new face's outer boundary orientation along edgeA is opposite the orientation of edgeA.
edgeB,
The north side of the face's surface will run along edgeA
revEdgeB
true if the new face's outer boundary orientation along edgeB is opposite the orientation of edgeB
)

ClearPerFaceColors

#Since v8.18
Removes all per face color overrides on the active level.
[CLSCompliant(false)] public uint ClearPerFaceColors()
Remarks: Per face colors are a mutable property on BrepFace and are set with BrepFace.PerFaceColor.
Number of changed faces.

ExtractFace

#Since v5.0
Extracts a face from a Brep.
public Brep ExtractFace(
faceIndex
A face index
)
A brep. This can be null.

Flip

#Since v5.0
Flips the orientation of faces.
public void Flip(
onlyReversedFaces
If true, clears all BrepFace.OrientationIsReversed flags by calling BrepFace.Transpose() on each face with a true OrientationIsReversed setting. If false, all of the faces are flipped regardless of their orientation.
)

GetEnumerator

#Since v5.0
Gets an enumerators that yields BrepFace objects.
public IEnumerator<BrepFace> GetEnumerator()
The enumerator.

RemoveAt

#Since v5.0
Deletes a face at a specified index.
public void RemoveAt(
faceIndex
The index of the mesh face.
)

RemoveSlits

#Since v5.10
Remove slit trims and slit boundaries from each face.
public bool RemoveSlits()
true if any slits were removed

ShrinkFaces

#Since v5.0
Shrinks all the underlying surfaces in this Brep. Sometimes the surfaces extend far beyond the trimming boundaries of the Brep Face. This function will remove those portions of the surfaces that are not used.
public bool ShrinkFaces()
true on success, false on failure.

SplitBipolarFaces

#Since v5.0
Splits surfaces with two singularities, like spheres, so the results have at most one singularity.
public bool SplitBipolarFaces()
true if successful.

SplitClosedFaces

#Since v5.0
Splits closed surfaces so they are not closed.
public bool SplitClosedFaces(
minimumDegree
If the degree of the surface < min_degree, the surface is not split. In some cases, minimumDegree = 2 is useful to preserve piecewise linear surfaces.
)
true if successful.

SplitFaceAtTangents

#Since v6.0
Splits the face of a Brep at tangent locations. The face surface will be split at locations of curvature discontinuities with constant tangents.
public bool SplitFaceAtTangents(
faceIndex,
The index of the face to split.
aggressiveMode
If aggressive mode is true, the face surface will be split at locations of curvature discontinuities with constant tangents. If aggressive mode is false, only split when the curvature change is from no curvature to some curvature or when the curvature vector directions are opposite.
)
True if successful, false otherwise.

SplitFaceAtTangents

#Since v6.0
Splits the face of a Brep at tangent locations. The face surface will be split at locations of curvature discontinuities with constant tangents.
public bool SplitFaceAtTangents(
faceIndex
The index of the face to split.
)
True if successful, false otherwise.

SplitFacesAtTangents

#Since v6.0
Splits all of the faces of a Brep at tangent locations. The face surfaces will be split at locations of curvature discontinuities with constant tangents.
public bool SplitFacesAtTangents()
True if successful, false otherwise.

SplitFacesAtTangents

#Since v9.0
Splits all of the faces of a Brep at tangent locations.
public bool SplitFacesAtTangents(
aggressiveMode
If aggressive mode is true, the face surfaces will be split at locations of curvature discontinuities with constant tangents. If aggressive mode is false, only split when the curvature change is from no curvature to some curvature or when the curvature vector directions are opposite.
)
True if successful, false otherwise.

SplitKinkyFace

#Since v5.0
Splits a single face into G1 pieces.
public bool SplitKinkyFace(
faceIndex,
The index of the face to split.
kinkTolerance
Tolerance (in radians) to use for crease detection.
)
Remarks: This function leaves deleted stuff in the brep. Call Brep.Compact() to remove deleted stuff.
true on success, false on failure.

SplitKinkyFaces

#Since v5.0
Splits any faces with creases into G1 pieces.
public bool SplitKinkyFaces()
Remarks: If you need to detect whether splitting occurred, compare the before and after values of Faces.Count
true on success, false on failure.

SplitKinkyFaces

#Since v5.0
Splits any faces with creases into G1 pieces.
public bool SplitKinkyFaces(
kinkTolerance,
Tolerance (in radians) to use for crease detection.
compact
If true, the Brep will be compacted if possible.
)
Remarks: If you need to detect whether splitting occurred, compare the before and after values of Faces.Count
true on success, false on failure.

SplitKinkyFaces

#Since v5.0
Splits any faces with creases into G1 pieces.
public bool SplitKinkyFaces(
kinkTolerance
Tolerance (in radians) to use for crease detection.
)
Remarks: If you need to detect whether splitting occurred, compare the before and after values of Faces.Count
true on success, false on failure.

StandardizeFaceSurface

#Since v5.0
Standardizes the relationship between a BrepFace and the 3d surface it uses. When done, the face will be the only face that references its 3d surface, and the orientations of the face and 3d surface will be the same.
public bool StandardizeFaceSurface(
faceIndex
The index of the face.
)
true if successful.

StandardizeFaceSurfaces

#Since v5.0
Standardize all faces in the brep.
public void StandardizeFaceSurfaces()
Explicit

IEnumerable.GetEnumerator

#Since v5.0
Gets the same enumerator as GetEnumerator().
IEnumerator IEnumerable.GetEnumerator()
The enumerator.