BrepFaceList

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

Properties

Count

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

HasPerFaceColors

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

Indexers

this[]

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

Methods

Add

#Since v5.4
public BrepFace Add(int surfaceIndex)
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.
surfaceIndex (int)index of surface in brep's Surfaces list

Add

#Since v5.4
public BrepFace Add(Surface surface)
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.
surface (Surface)surface is copied

AddConeFace

#Since v5.4
public BrepFace AddConeFace(BrepVertex vertex, BrepEdge edge, bool revEdge)
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.
vertex (BrepVertex)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 (BrepEdge)The south side of the face's surface will run along this edge.
revEdge (bool)true if the new face's outer boundary orientation along the edge is opposite the orientation of edge.

AddRuledFace

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

ClearPerFaceColors

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

ExtractFace

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

Flip

#Since v5.0
public void Flip(bool onlyReversedFaces)
Flips the orientation of faces.
onlyReversedFaces (bool)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
public IEnumerator<BrepFace> GetEnumerator()
Gets an enumerators that yields BrepFace objects.
The enumerator.

RemoveAt

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

RemoveSlits

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

ShrinkFaces

#Since v5.0
public bool ShrinkFaces()
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.
true on success, false on failure.

SplitBipolarFaces

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

SplitClosedFaces

#Since v5.0
public bool SplitClosedFaces(int minimumDegree)
Splits closed surfaces so they are not closed.
minimumDegree (int)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
public bool SplitFaceAtTangents(int faceIndex, bool aggressiveMode)
Splits the face of a Brep at tangent locations. The face surface will be split at locations of curvature discontinuities with constant tangents.
faceIndex (int)The index of the face to split.
aggressiveMode (bool)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
public bool SplitFaceAtTangents(int faceIndex)
Splits the face of a Brep at tangent locations. The face surface will be split at locations of curvature discontinuities with constant tangents.
faceIndex (int)The index of the face to split.
True if successful, false otherwise.

SplitFacesAtTangents

#Since v6.0
public bool SplitFacesAtTangents()
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.
True if successful, false otherwise.

SplitFacesAtTangents

#Since v9.0
public bool SplitFacesAtTangents(bool aggressiveMode)
Splits all of the faces of a Brep at tangent locations.
aggressiveMode (bool)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
public bool SplitKinkyFace(int faceIndex, double kinkTolerance)
Splits a single face into G1 pieces.
Remarks: This function leaves deleted stuff in the brep. Call Brep.Compact() to remove deleted stuff.
faceIndex (int)The index of the face to split.
kinkTolerance (double)Tolerance (in radians) to use for crease detection.
true on success, false on failure.

SplitKinkyFaces

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

SplitKinkyFaces

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

StandardizeFaceSurface

#Since v5.0
public bool StandardizeFaceSurface(int faceIndex)
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.
faceIndex (int)The index of the face.
true if successful.

StandardizeFaceSurfaces

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

IEnumerable.GetEnumerator

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