[Serializable] public class Brep : GeometryBase
/// Boundary Representation. A surface or polysurface along with trim curve information.

Constructors

Brep

#Since v5.4
public Brep()
Initializes a new empty brep

Brep

#
protected Brep(SerializationInfo info, StreamingContext context)
Protected constructor used in serialization.
info (SerializationInfo)
context (StreamingContext)

Properties

Curves2D

#Since v5.6
public BrepCurveList Curves2D { get; }
Parameter space trimming curves (used by trims)

Curves3D

#Since v5.6
public BrepCurveList Curves3D { get; }
Pointers to 3d curves (used by edges)

Disposed

public bool Disposed { get; }
Indicates if this object has been disposed or the document it originally belonged to has been disposed.
inherited fromCommonObject

Edges

#Since v5.0
public BrepEdgeList Edges { get; }
Gets the brep edges list accessor.

Faces

#Since v5.0
public BrepFaceList Faces { get; }
Gets the brep faces list accessor.

HasBrepForm

public bool HasBrepForm { get; }
Returns true if the Brep.TryConvertBrep function will be successful for this object
inherited fromGeometryBase

HasRegionTopology

#Since v7.13
public bool HasRegionTopology { get; }
Returns true if the Brep has region topology information, false otherwise.

HasUserData

public bool HasUserData { get; }
Gets true if this class has any custom information attached to it through UserData.
inherited fromCommonObject

IsDeformable

public bool IsDeformable { get; }
true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
inherited fromGeometryBase

IsDocumentControlled

public sealed override bool IsDocumentControlled { get; }
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
inherited fromGeometryBase

IsManifold

#Since v5.0
public bool IsManifold { get; }
Gets a value indicating whether or not the Brep is manifold. Non manifold breps have at least one edge that is shared among three or more faces.

IsShallowDuplicate

public bool IsShallowDuplicate { get; }
Is this instance a 'shallow copy'. Shallow copies are no different than regular instances with the exception that they will convert to complete independent 'deep' copies if a non const operation is perform on the instance (something that mutates the internal data)
inherited fromGeometryBase

IsSolid

#ExampleSince v5.0
public bool IsSolid { get; }
Determines whether this brep is a solid, or a closed oriented manifold.

IsSurface

#Since v5.0
public bool IsSurface { get; }
Returns true if the Brep has a single face and that face is geometrically the same as the underlying surface. I.e., the face has trivial trimming.

In this case, the surface is the first face surface. The flag Brep.Faces[0].OrientationIsReversed records the correspondence between the surface's natural parametric orientation and the orientation of the Brep.

trivial trimming here means that there is only one loop curve in the brep and that loop curve is the same as the underlying surface boundary.

IsValid

public virtual bool IsValid { get; }
Tests an object to see if it is valid.
inherited fromCommonObject

Loops

#Since v5.0
public BrepLoopList Loops { get; }
Gets the brep loop list accessor.

ObjectType

[CLSCompliant(false)] public ObjectType ObjectType { get; }
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
inherited fromGeometryBase

SolidOrientation

#Since v5.0
public BrepSolidOrientation SolidOrientation { get; }
Gets the solid orientation state of this Brep.

Surfaces

#Since v5.4
public BrepSurfaceList Surfaces { get; }
Parametric surfaces used by faces

Trims

#Since v5.1
public BrepTrimList Trims { get; }
Gets the brep trims list accessor.

UserData

public UserDataList UserData { get; }
List of custom information that is attached to this class.
inherited fromCommonObject

UserDictionary

public ArchivableDictionary UserDictionary { get; }
Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.
inherited fromCommonObject

UserStringCount

public int UserStringCount { get; }
Gets the amount of user strings.
inherited fromGeometryBase

Vertices

#Since v5.5
public BrepVertexList Vertices { get; }
Gets the brep vertices list accessor.

Methods

AddEdgeCurve

#Since v5.4
public int AddEdgeCurve(Curve curve)
Add a 3d curve used by the brep edges
curve (Curve)
Index used to reference this geometry in the edge curve list

AddSurface

#Since v5.0
public int AddSurface(Surface surface)
Adds a 3D surface used by BrepFace.
surface (Surface)A copy of the surface is added to this brep.
Index that should be used to reference the geometry.

-1 is returned if the input is not acceptable.

AddTrimCurve

#Since v5.4
public int AddTrimCurve(Curve curve)
Add a 2d curve used by the brep trims
curve (Curve)
Index used to reference this geometry in the trimming curve list

Append

#Since v5.4
public void Append(Brep other)
Appends a copy of another brep to this and updates indices of appended brep parts. Duplicates are not removed
other (Brep)

CapPlanarHoles

#Since v5.0
[ConstOperation] public Brep CapPlanarHoles(double tolerance)
Returns a new Brep that is equivalent to this Brep with all planar holes capped.
tolerance (double)Tolerance to use for capping.
New brep on success. null on error.

ChangeSeam

#Since v6.4
public static Brep ChangeSeam(BrepFace face, int direction, double parameter, double tolerance)
Change the seam of a closed trimmed surface.
face (BrepFace)A Brep face with a closed underlying surface.
direction (int)The parameter direction (0 = U, 1 = V). The face's underlying surface must be closed in this direction.
parameter (double)The parameter at which to place the seam.
tolerance (double)Tolerance used to cut up surface.
A new Brep that has the same geometry as the face with a relocated seam if successful, or null on failure.

ClosestPoint

#Since v5.0
[ConstOperation] public bool ClosestPoint(Point3d testPoint, out Point3d closestPoint, out ComponentIndex ci, out double s, out double t, double maximumDistance, out Vector3d normal)
Finds a point on the Brep that is closest to testPoint. The method searches all Brep faces looking for the one closest to testPoint. When found, if the closest point falls on the inactive region of the face, then the method finds the face's edge that is closest to testPoint.
testPoint (Point3d)Base point to project to surface.
closestPoint (out Point3d)Location of the closest Brep point.
ci (out ComponentIndex)Component index of the Brep component that contains the closest point. Possible component index types are ComponentIndexType.BrepEdge and ComponentIndexType.BrepFace.
s (out double)If ci.ComponentIndexType == ComponentIndexType.BrepEdge, then s is the parameter of the closest edge point.
t (out double)If ci.ComponentIndexType == ComponentIndexType.BrepFace, then (s,t) is the parameter of the closest face point.
maximumDistance (double)If maximumDistance > 0, then only points whose distance is <= maximumDistance will be returned. Using a positive value of maximumDistance can substantially speed up the search.
normal (out Vector3d)If ci.ComponentIndexType == ComponentIndexType.BrepEdge, then this is the tangent to the edge at s. If ci.ComponentIndexType == ComponentIndexType.BrepFace, then this is the normal to the face at (s,t).
true if the operation succeeded, false otherwise.

ClosestPoint

#Since v5.0
[ConstOperation] public Point3d ClosestPoint(Point3d testPoint)
Finds a point on the brep that is closest to testPoint.
testPoint (Point3d)Base point to project to brep.
The point on the Brep closest to testPoint or Point3d.Unset if the operation failed.

Compact

#Since v5.0
public void Compact()
Deletes any unreferenced objects from arrays, re-indexes as needed, and shrinks arrays to minimum required size. Uses CUllUnused* members to delete any unreferenced objects from arrays.

ComponentIndex

[ConstOperation] public ComponentIndex ComponentIndex()
If this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index.
inherited fromGeometryBase
This object's component index. If this object is not a sub-piece of a larger geometric entity, then the returned index has m_type = ComponentIndex.InvalidType and m_index = -1.

ConstructConstObject

protected void ConstructConstObject(object parentObject, int subobjectIndex)
Assigns a parent object and a sub-object index to this.
inherited fromCommonObject
parentObject (object)The parent object.
subobjectIndex (int)The sub-object index.

CopyTrimCurves

#Since v5.0
public static Brep CopyTrimCurves(BrepFace trimSource, Surface surfaceSource, double tolerance)
Copy all trims from a Brep face onto a surface.
trimSource (BrepFace)Brep face which defines the trimming curves.
surfaceSource (Surface)The surface to trim.
tolerance (double)Tolerance to use for rebuilding 3D trim curves.
A brep with the shape of surfaceSource and the trims of trimSource or null on failure.

CreateBaseballSphere

#Since v6.0
public static Brep CreateBaseballSphere(Point3d center, double radius, double tolerance)
Creates a brep representation of the sphere with two similar trimmed NURBS surfaces, and no singularities.
center (Point3d)The center of the sphere.
radius (double)The radius of the sphere.
tolerance (double)Used in computing 2d trimming curves. If >= 0.0, then the max of ON_0.0001 * radius and RhinoMath.ZeroTolerance will be used.
A new brep, or null on error.

CreateBlendShape

#Since v6.0
public static Curve CreateBlendShape(BrepFace face0, BrepEdge edge0, double t0, bool rev0, BlendContinuity continuity0, BrepFace face1, BrepEdge edge1, double t1, bool rev1, BlendContinuity continuity1)
Makes a curve blend between points on two surface edges. The blend will be tangent to the surfaces and perpendicular to the edges.
face0 (BrepFace)First face to blend from.
edge0 (BrepEdge)First edge to blend from.
t0 (double)Location on first edge for first end of blend curve.
rev0 (bool)If false, edge0 will be used in its natural direction. If true, edge0 will be used in the reversed direction.
continuity0 (BlendContinuity)Continuity for the blend at the start.
face1 (BrepFace)Second face to blend from.
edge1 (BrepEdge)Second edge to blend from.
t1 (double)Location on second edge for second end of blend curve.
rev1 (bool)If false, edge1 will be used in its natural direction. If true, edge1 will be used in the reversed direction.
continuity1 (BlendContinuity)>Continuity for the blend at the end.
The blend curve on success. null on failure

CreateBlendSurface

#Since v6.0
public static Brep[] CreateBlendSurface(BrepFace face0, BrepEdge edge0, Interval domain0, bool rev0, BlendContinuity continuity0, BrepFace face1, BrepEdge edge1, Interval domain1, bool rev1, BlendContinuity continuity1)
Makes a surface blend between two surface edges.
face0 (BrepFace)First face to blend from.
edge0 (BrepEdge)First edge to blend from.
domain0 (Interval)The domain of edge0 to use.
rev0 (bool)If false, edge0 will be used in its natural direction. If true, edge0 will be used in the reversed direction.
continuity0 (BlendContinuity)Continuity for the blend at the start.
face1 (BrepFace)Second face to blend from.
edge1 (BrepEdge)Second edge to blend from.
domain1 (Interval)The domain of edge1 to use.
rev1 (bool)If false, edge1 will be used in its natural direction. If true, edge1 will be used in the reversed direction.
continuity1 (BlendContinuity)Continuity for the blend at the end.
Array of Breps if successful.

CreateBooleanDifference

#Since v6.0
public static Brep[] CreateBooleanDifference(Brep firstBrep, Brep secondBrep, double tolerance, bool manifoldOnly)
Compute the Solid Difference of two Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstBrep (Brep)First Brep for boolean difference.
secondBrep (Brep)Second Brep for boolean difference.
tolerance (double)Tolerance to use for difference operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
An array of Brep results or null on failure.

CreateBooleanDifference

#Since v5.0
public static Brep[] CreateBooleanDifference(Brep firstBrep, Brep secondBrep, double tolerance)
Compute the Solid Difference of two Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstBrep (Brep)First Brep for boolean difference.
secondBrep (Brep)Second Brep for boolean difference.
tolerance (double)Tolerance to use for difference operation.
An array of Brep results or null on failure.

CreateBooleanDifference

#ExampleSince v6.0
public static Brep[] CreateBooleanDifference(IEnumerable<Brep> firstSet, IEnumerable<Brep> secondSet, double tolerance, bool manifoldOnly)
Compute the Solid Difference of two sets of Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstSet (IEnumerable<Brep>)First set of Breps (the set to subtract from).
secondSet (IEnumerable<Brep>)Second set of Breps (the set to subtract).
tolerance (double)Tolerance to use for difference operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
An array of Brep results or null on failure.

CreateBooleanDifference

#ExampleSince v5.0
public static Brep[] CreateBooleanDifference(IEnumerable<Brep> firstSet, IEnumerable<Brep> secondSet, double tolerance)
Compute the Solid Difference of two sets of Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstSet (IEnumerable<Brep>)First set of Breps (the set to subtract from).
secondSet (IEnumerable<Brep>)Second set of Breps (the set to subtract).
tolerance (double)Tolerance to use for difference operation.
An array of Brep results or null on failure.

CreateBooleanDifferenceWithIndexMap

#Since v8.13
public static Brep[] CreateBooleanDifferenceWithIndexMap(IEnumerable<Brep> firstSet, IEnumerable<Brep> secondSet, double tolerance, bool manifoldOnly, out int[] indexMap)
Compute the solid difference between two sets of Breps.
Remarks: Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstSet (IEnumerable<Brep>)The set to be differenced from.
secondSet (IEnumerable<Brep>)The set to difference with.
tolerance (double)Tolerance to use for the boolean operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
indexMap (out int[])results[i] is the result if subtracting something from firstSet[indexMap[i]].
An array of Brep results or null on failure. May be empty if all of the firstSet is differenced away.

CreateBooleanIntersection

#Since v6.0
public static Brep[] CreateBooleanIntersection(Brep firstBrep, Brep secondBrep, double tolerance, bool manifoldOnly)
Compute the Solid Intersection of two Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstBrep (Brep)First Brep for boolean intersection.
secondBrep (Brep)Second Brep for boolean intersection.
tolerance (double)Tolerance to use for intersection operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
An array of Brep results or null on failure.

CreateBooleanIntersection

#Since v5.0
public static Brep[] CreateBooleanIntersection(Brep firstBrep, Brep secondBrep, double tolerance)
Compute the Solid Intersection of two Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstBrep (Brep)First Brep for boolean intersection.
secondBrep (Brep)Second Brep for boolean intersection.
tolerance (double)Tolerance to use for intersection operation.
An array of Brep results or null on failure.

CreateBooleanIntersection

#Since v6.0
public static Brep[] CreateBooleanIntersection(IEnumerable<Brep> firstSet, IEnumerable<Brep> secondSet, double tolerance, bool manifoldOnly)
Compute the Solid Intersection of two sets of Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstSet (IEnumerable<Brep>)First set of Breps.
secondSet (IEnumerable<Brep>)Second set of Breps.
tolerance (double)Tolerance to use for intersection operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
An array of Brep results or null on failure.

CreateBooleanIntersection

#Since v5.0
public static Brep[] CreateBooleanIntersection(IEnumerable<Brep> firstSet, IEnumerable<Brep> secondSet, double tolerance)
Compute the Solid Intersection of two sets of Breps.
Remarks: The solid orientation of the breps make a difference when calling this function. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstSet (IEnumerable<Brep>)First set of Breps.
secondSet (IEnumerable<Brep>)Second set of Breps.
tolerance (double)Tolerance to use for intersection operation.
An array of Brep results or null on failure.

CreateBooleanSplit

#Since v6.16
public static Brep[] CreateBooleanSplit(Brep firstBrep, Brep secondBrep, double tolerance)
Splits shared areas of Breps and creates separate Breps from the shared and unshared parts.
Remarks: Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstBrep (Brep)The Brep to split.
secondBrep (Brep)The cutting Brep.
tolerance (double)Tolerance to use for splitting operation. When in doubt, use the document's model absolute tolerance.
An array of Brep if successful, an empty array on failure.

CreateBooleanSplit

#Since v6.16
public static Brep[] CreateBooleanSplit(IEnumerable<Brep> firstSet, IEnumerable<Brep> secondSet, double tolerance)
Splits shared areas of Breps and creates separate Breps from the shared and unshared parts.
Remarks: Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
firstSet (IEnumerable<Brep>)The Breps to split.
secondSet (IEnumerable<Brep>)The cutting Breps.
tolerance (double)Tolerance to use for splitting operation. When in doubt, use the document's model absolute tolerance.
An array of Brep if successful, an empty array on failure.

CreateBooleanUnion

#Since v8.0
public static Brep[] CreateBooleanUnion(IEnumerable<Brep> breps, double tolerance, bool manifoldOnly, out Point3d[] nakedEdgePoints, out Point3d[] badIntersectionPoints, out Point3d[] nonManifoldEdgePoints)
Compute the Boolean Union of a set of Breps.
Remarks: Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
breps (IEnumerable<Brep>)Breps to union.
tolerance (double)Tolerance to use for union operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
nakedEdgePoints (out Point3d[])If Boolean failed because the intersection hit a naked edge, a point will be added where the intersection hits the edge.
badIntersectionPoints (out Point3d[])If Boolean failed because an intersection ends on the interior of both surfaces, a point is added.This happens when the surface intersector fails.
nonManifoldEdgePoints (out Point3d[])If Boolean failed because the intersection hit a non-manifold edge, a point will be added where the intersection hits the edge.
An array of Brep results or null on failure.

CreateBooleanUnion

#Since v6.0
public static Brep[] CreateBooleanUnion(IEnumerable<Brep> breps, double tolerance, bool manifoldOnly)
Compute the Boolean Union of a set of Breps.
Remarks: Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
breps (IEnumerable<Brep>)Breps to union.
tolerance (double)Tolerance to use for union operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
An array of Brep results or null on failure.

CreateBooleanUnion

#Since v5.0
public static Brep[] CreateBooleanUnion(IEnumerable<Brep> breps, double tolerance)
Compute the Boolean Union of a set of Breps.
Remarks: Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
breps (IEnumerable<Brep>)Breps to union.
tolerance (double)Tolerance to use for union operation.
An array of Brep results or null on failure.

CreateBooleanUnionWithIndexMap

#
public static Brep[] CreateBooleanUnionWithIndexMap(IEnumerable<Brep> breps, double tolerance, bool manifoldOnly, out int[][] indexMap)
Compute the Boolean Union of a set of Breps, reporting which inputs produced each result.
Remarks: A union result can come from several inputs, so this reports a list per result where CreateBooleanDifferenceWithIndexMap(IEnumerable<Brep>, IEnumerable<Brep>, double, bool, int[]) reports one index. The indices name the group of inputs a result was built from, which is not always the same as the inputs its geometry reached: a result made of disconnected pieces is separated into one result per piece, and each piece names the whole group. An input absorbed by another contributes no geometry and appears in no entry of indexMap. An input the operation could not use is absent in the same way: one that is non-manifold when manifoldOnly is true, or one the Boolean kernel cannot accept. An input whose shells are disjoint produces one result per shell, and each of those names it. A null element in breps throws ArgumentException, because the reported indices are positions in that sequence. The other CreateBooleanUnion overloads drop nulls silently and renumber what follows. Breps that have never been added to a document may need preparing first, or this method can fail, or return an unexpected result. See Brep.PrepareForBooleans.
breps (IEnumerable<Brep>)Breps to union. May not contain nulls.
tolerance (double)Tolerance to use for union operation.
manifoldOnly (bool)If true, non-manifold input breps are ignored.
indexMap (out int[][])indexMap[i] holds the positions in breps of the inputs that produced result i. Null when this method returns null.
An array of Brep results or null on failure. May be empty when the union produced no geometry.

CreateChamferSurface

#Since v6.0 Obsolete v9.0
public static Brep[] CreateChamferSurface(BrepFace face0, Point2d uv0, double radius0, BrepFace face1, Point2d uv1, double radius1, bool extend, double tolerance)
obsoleteUse the CreateFilletSurface that takes settings and returns results
Creates a ruled surface as a bevel between two input surface edges.
face0 (BrepFace)First face to chamfer from.
uv0 (Point2d)A parameter face0 at the side you want to keep after chamfering.
radius0 (double)The distance from the intersection of face0 to the edge of the chamfer.
face1 (BrepFace)Second face to chamfer from.
uv1 (Point2d)A parameter face1 at the side you want to keep after chamfering.
radius1 (double)The distance from the intersection of face1 to the edge of the chamfer.
extend (bool)If true, then when one input surface is longer than the other, the chamfer surface is extended to the input surface edges.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
Array of Breps if successful.

CreateChamferSurface

#Since v6.0
public static Brep[] CreateChamferSurface(BrepFace face0, Point2d uv0, double radius0, BrepFace face1, Point2d uv1, double radius1, bool trim, bool extend, double tolerance, out Brep[] outBreps0, out Brep[] outBreps1)
obsoleteUse the CreateFilletSurface that takes settings and returns results
Creates a ruled surface as a bevel between two input surface edges.
face0 (BrepFace)First face to chamfer from.
uv0 (Point2d)A parameter face0 at the side you want to keep after chamfering.
radius0 (double)The distance from the intersection of face0 to the edge of the chamfer.
face1 (BrepFace)Second face to chamfer from.
uv1 (Point2d)A parameter face1 at the side you want to keep after chamfering.
radius1 (double)The distance from the intersection of face1 to the edge of the chamfer.
trim (bool)If true, the input faces will be trimmed, if false, the input faces will be split.
extend (bool)If true, then when one input surface is longer than the other, the chamfer surface is extended to the input surface edges.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
outBreps0 (out Brep[])The trim or split results of the Brep owned by face0.
outBreps1 (out Brep[])The trim or split results of the Brep owned by face1.
Array of Breps if successful.

CreateContourCurves

#Since v5.0
public static Curve[] CreateContourCurves(Brep brepToContour, Plane sectionPlane)
Constructs the contour curves for a brep, using a slicing plane.
brepToContour (Brep)A brep or polysurface.
sectionPlane (Plane)A plane.
An array with intersected curves. This array can be empty.

CreateContourCurves

#ExampleSince v5.0
public static Curve[] CreateContourCurves(Brep brepToContour, Point3d contourStart, Point3d contourEnd, double interval)
Constructs the contour curves for a brep at a specified interval.
brepToContour (Brep)A brep or polysurface.
contourStart (Point3d)A point to start.
contourEnd (Point3d)A point to use as the end.
interval (double)The interaxial offset in world units.
An array with intersected curves. This array can be empty.

CreateCurvatureAnalysisMesh

#Since v9.0
public static Mesh[] CreateCurvatureAnalysisMesh(Brep brep, CurvatureAnalysisSettingsState state, MeshingParameters meshingParameters)
Creates an array of analysis meshes for the brep, one per face. The meshes are not set on the brep.
Remarks: Each mesh covers the untrimmed surface under a face, so on a trimmed face the mesh extends past the trims and any statistic taken from it includes area that is not part of the brep. For statistics, mesh the brep with MeshingParameters.ComputeCurvature set and pass the result to MeshCurvatureStats; the curvature values do not depend on the style, so one mesh serves every style.
brep (Brep)The brep to mesh.
state (CurvatureAnalysisSettingsState)Supplies the curvature style and the false color ranges.
meshingParameters (MeshingParameters)The mesh density. RhinoDoc.GetAnalysisMeshingParameters returns what a document uses, and MeshingParameters.DefaultAnalysisMesh is the default.
The analysis meshes. The array is empty if no mesh could be created.

CreateCurvatureAnalysisMesh

#Since v6.0
public static Mesh[] CreateCurvatureAnalysisMesh(Brep brep, CurvatureAnalysisSettingsState state)
Create an array of analysis meshes for the brep using the specified settings. Meshes aren't set on the brep.
Remarks: The mesh density comes from the active document, and falls back to MeshingParameters.DefaultAnalysisMesh when there is no active document, as when running headless or in Compute.

Each mesh covers the untrimmed surface under a face, so on a trimmed face the mesh extends past the trims and any statistic taken from it includes area that is not part of the brep.

brep (Brep)The brep to mesh.
state (CurvatureAnalysisSettingsState)CurvatureAnalysisSettingsState
The analysis meshes. The array is empty if no mesh could be created.

CreateDevelopableLoft

#Since v6.10
public static Brep[] CreateDevelopableLoft(Curve crv0, Curve crv1, bool reverse0, bool reverse1, int density)
Creates a single developable surface between two curves.
crv0 (Curve)The first rail curve.
crv1 (Curve)The second rail curve.
reverse0 (bool)Reverse the first rail curve.
reverse1 (bool)Reverse the second rail curve
density (int)The number of rulings across the surface.
The output Breps if successful, otherwise an empty array.

CreateDevelopableLoft

#Since v6.10
public static Brep[] CreateDevelopableLoft(NurbsCurve rail0, NurbsCurve rail1, IEnumerable<Point2d> fixedRulings)
Creates a single developable surface between two curves.
rail0 (NurbsCurve)The first rail curve.
rail1 (NurbsCurve)The second rail curve.
fixedRulings (IEnumerable<Point2d>)Rulings define lines across the surface that define the straight sections on the developable surface, where rulings[i].X = parameter on first rail curve, and rulings[i].Y = parameter on second rail curve. Note, rulings will be automatically adjusted to minimum twist.
The output Breps if successful, otherwise an empty array.

CreateEdgeSurface

#ExampleSince v5.0
public static Brep CreateEdgeSurface(IEnumerable<Curve> curves)
Constructs a coons patch from 2, 3, or 4 curves.
curves (IEnumerable<Curve>)A list, an array or any enumerable set of curves.
resulting brep or null on failure.

CreateFilletEdges

#Since v8.6
public static Brep[] CreateFilletEdges(Brep brep, IEnumerable<int> edgeIndices, IEnumerable<double> startRadii, IEnumerable<double> endRadii, BlendType blendType, RailType railType, bool setbackFillets, double tolerance, double angleTolerance)
Fillets, chamfers, or blends the edges of a brep.
brep (Brep)The brep to fillet, chamfer, or blend edges.
edgeIndices (IEnumerable<int>)An array of one or more edge indices where the fillet, chamfer, or blend will occur.
startRadii (IEnumerable<double>)An array of starting fillet, chamfer, or blend radaii, one for each edge index.
endRadii (IEnumerable<double>)An array of ending fillet, chamfer, or blend radaii, one for each edge index.
blendType (BlendType)The blend type.
railType (RailType)The rail type.
setbackFillets (bool)Use setback fillets (not used with blendType=BlendType.Chamfer)
tolerance (double)The tolerance to be used to perform calculations.
angleTolerance (double)Angle tolerance to be used to perform calculations [radians]. If unsure, use Math.PI/180.0 (one degree)
Array of Breps if successful.

CreateFilletEdges

#Since v6.0 Obsolete v9.0
public static Brep[] CreateFilletEdges(Brep brep, IEnumerable<int> edgeIndices, IEnumerable<double> startRadii, IEnumerable<double> endRadii, BlendType blendType, RailType railType, double tolerance)
obsoletePrefer the version that takes setbackFillets and angleTolerance options.
Fillets, chamfers, or blends the edges of a brep.
brep (Brep)The brep to fillet, chamfer, or blend edges.
edgeIndices (IEnumerable<int>)An array of one or more edge indices where the fillet, chamfer, or blend will occur.
startRadii (IEnumerable<double>)An array of starting fillet, chamfer, or blend radaii, one for each edge index.
endRadii (IEnumerable<double>)An array of ending fillet, chamfer, or blend radaii, one for each edge index.
blendType (BlendType)The blend type.
railType (RailType)The rail type.
tolerance (double)The tolerance to be used to perform calculations.
Array of Breps if successful.

CreateFilletEdgesVariableRadius

#Since v8.6
public static Brep[] CreateFilletEdgesVariableRadius(Brep brep, IEnumerable<int> edgeIndices, IDictionary<int, IList<BrepEdgeFilletDistance>> edgeDistances, BlendType blendType, RailType railType, bool setbackFillets, double tolerance, double angleTolerance)
Fillets, chamfers, or blends the edges of a brep.
brep (Brep)The brep to fillet, chamfer, or blend edges.
edgeIndices (IEnumerable<int>)An array of one or more edge indices where the fillet, chamfer, or blend will occur.
edgeDistances (IDictionary<int, IList<BrepEdgeFilletDistance>>)A dictionary with key the edge index on the input brep, and value a list of BrepEdgeFilletDistance items to apply.
blendType (BlendType)The blend type.
railType (RailType)The rail type.
setbackFillets (bool)Use setback fillets (not used with blendType=BlendType.Chamfer)
tolerance (double)The tolerance to be used to perform calculations.
angleTolerance (double)Angle tolerance to be used to perform calculations [radians].
Array of Breps if successful.

CreateFilletSurface

#Since v9.0
public static bool CreateFilletSurface(BrepFace face0, Point2d uv0, BrepFace face1, Point2d uv1, FilletSurfaceSettings settings, out FilletSurfaceResults results)
Create a fillet (rational arcs or non-rational arc approxiation or chamfered surface
face0 (BrepFace)First face to fillet from.
uv0 (Point2d)A parameter face0 at the side you want to keep after filleting.
face1 (BrepFace)Second face to fillet from.
uv1 (Point2d)A parameter face1 at the side you want to keep after filleting.
settings (Brep.FilletSurfaceSettings)The settings to use for filleting/chamfering
results (out Brep.FilletSurfaceResults)If true is returned, this contains the fillet results.
true if successful

CreateFilletSurface

#Since v6.0 Obsolete v9.0
public static Brep[] CreateFilletSurface(BrepFace face0, Point2d uv0, BrepFace face1, Point2d uv1, double radius, bool extend, double tolerance)
obsoleteUse the CreateFilletSurface that takes settings and returns results
Creates a constant-radius round surface between two surfaces.
face0 (BrepFace)First face to fillet from.
uv0 (Point2d)A parameter face0 at the side you want to keep after filleting.
face1 (BrepFace)Second face to fillet from.
uv1 (Point2d)A parameter face1 at the side you want to keep after filleting.
radius (double)The fillet radius.
extend (bool)If true, then when one input surface is longer than the other, the fillet surface is extended to the input surface edges.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
Array of Breps if successful.

CreateFilletSurface

#Since v6.0 Obsolete v9.0
public static Brep[] CreateFilletSurface(BrepFace face0, Point2d uv0, BrepFace face1, Point2d uv1, double radius, bool trim, bool extend, double tolerance, out Brep[] outBreps0, out Brep[] outBreps1)
obsoleteUse the CreateFilletSurface that takes settings and returns results
Creates a constant-radius round surface between two surfaces.
face0 (BrepFace)First face to fillet from.
uv0 (Point2d)A parameter face0 at the side you want to keep after filleting.
face1 (BrepFace)Second face to fillet from.
uv1 (Point2d)A parameter face1 at the side you want to keep after filleting.
radius (double)The fillet radius.
trim (bool)If true, the input faces will be trimmed, if false, the input faces will be split.
extend (bool)If true, then when one input surface is longer than the other, the fillet surface is extended to the input surface edges.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
outBreps0 (out Brep[])The trim or split results of the Brep owned by face0.
outBreps1 (out Brep[])The trim or split results of the Brep owned by face1.
Array of Breps if successful.

CreateFilletSurfaceCurve

#Since v9.0
public static bool CreateFilletSurfaceCurve(BrepFace face, Point2d uv, Curve curve, double t, FilletSurfaceSettings settings, out FilletSurfaceResults results)
Create a fillet (rational arcs or non-rational arc approxiation or chamfered surface
face (BrepFace)Face to fillet from.
uv (Point2d)A parameter on the face at the side you want to keep after filleting.
curve (Curve)Curve to fillet to.
t (double)A parameter on the curve close to the point on the face.
settings (Brep.FilletSurfaceSettings)The settings to use for filleting
results (out Brep.FilletSurfaceResults)If true is returned, this contains the fillet results.
true if successful

CreateFromBox

#ExampleSince v5.0
public static Brep CreateFromBox(BoundingBox box)
Constructs new brep that matches a bounding box.
box (BoundingBox)A box to use for creation.
A new brep; or null on failure.

CreateFromBox

#Since v5.0
public static Brep CreateFromBox(Box box)
Constructs new brep that matches an aligned box.
box (Box)Box to match.
A Brep with 6 faces that is similar to the Box.

CreateFromBox

#Since v5.0
public static Brep CreateFromBox(IEnumerable<Point3d> corners)
Constructs new brep from 8 corner points.
corners (IEnumerable<Point3d>)8 points defining the box corners arranged as the vN labels indicate.
v7_______e6____v6
|\             |\
| e7           | e5
|  \ ______e4_____\
e11 v4         |   v5
|   |        e10   |
|   |          |   |
v3--|---e2----v2   e9
 \  e8          \  |
 e3 |            e1|
   \|             \|
    v0_____e0______v1
A new brep, or null on error.

CreateFromCone

#Since v5.0
public static Brep CreateFromCone(Cone cone, bool capBottom)
Constructs a Brep representation of the cone with a single face for the cone, an edge along the cone seam, and vertices at the base and apex ends of this seam edge. The optional cap is a single face with one circular edge starting and ending at the base vertex.
cone (Cone)A cone value.
capBottom (bool)if true the base of the cone should be capped.
A Brep if successful, null on error.

CreateFromCornerPoints

#Since v5.0
public static Brep CreateFromCornerPoints(Point3d corner1, Point3d corner2, Point3d corner3, double tolerance)
Makes a Brep with one face from three corner points.
corner1 (Point3d)A first corner.
corner2 (Point3d)A second corner.
corner3 (Point3d)A third corner.
tolerance (double)Minimum edge length allowed before collapsing the side into a singularity.
A boundary representation, or null on error.

CreateFromCornerPoints

#Since v5.0
public static Brep CreateFromCornerPoints(Point3d corner1, Point3d corner2, Point3d corner3, Point3d corner4, double tolerance)
Makes a Brep with one face from four corner points.
corner1 (Point3d)A first corner.
corner2 (Point3d)A second corner.
corner3 (Point3d)A third corner.
corner4 (Point3d)A fourth corner.
tolerance (double)Minimum edge length allowed before collapsing the side into a singularity.
A boundary representation, or null on error.

CreateFromCylinder

#Since v5.0
public static Brep CreateFromCylinder(Cylinder cylinder, bool capBottom, bool capTop)
Constructs a Brep definition of a cylinder.
cylinder (Cylinder)cylinder.IsFinite() must be true.
capBottom (bool)if true end at cylinder.m_height[0] should be capped.
capTop (bool)if true end at cylinder.m_height[1] should be capped.
A Brep representation of the cylinder with a single face for the cylinder, an edge along the cylinder seam, and vertices at the bottom and top ends of this seam edge. The optional bottom/top caps are single faces with one circular edge starting and ending at the bottom/top vertex.

CreateFromJoinedEdges

#Since v6.0
public static Brep CreateFromJoinedEdges(Brep brep0, int edgeIndex0, Brep brep1, int edgeIndex1, double joinTolerance)
Joins two naked edges, or edges that are coincident or close together, from two Breps.
brep0 (Brep)The first Brep.
edgeIndex0 (int)The edge index on the first Brep.
brep1 (Brep)The second Brep.
edgeIndex1 (int)The edge index on the second Brep.
joinTolerance (double)The join tolerance.
The resulting Brep if successful, null on failure.

CreateFromLoft

#Since v7.0
public static Brep[] CreateFromLoft(IEnumerable<Curve> curves, Point3d start, Point3d end, bool StartTangent, bool EndTangent, BrepTrim StartTrim, BrepTrim EndTrim, LoftType loftType, bool closed)
Constructs one or more Breps by lofting through a set of curves, optionally matching start and end tangents of surfaces when first and/or last loft curves are surface edges
curves (IEnumerable<Curve>)The curves to loft through. This function will not perform any curve sorting. You must pass in curves in the order you want them lofted. This function will not adjust the directions of open curves. Use Curve.DoDirectionsMatch and Curve.Reverse to adjust the directions of open curves. This function will not adjust the seams of closed curves. Use Curve.ChangeClosedCurveSeam to adjust the seam of closed curves.
start (Point3d)Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point. "start" and "StartTangent" cannot both be true.
end (Point3d)Optional ending point of loft. Use Point3d.Unset if you do not want to include an end point. "end and "EndTangent" cannot both be true.
StartTangent (bool)If StartTangent is true and the first loft curve is a surface edge, the loft will match the tangent of the surface behind that edge.
EndTangent (bool)If EndTangent is true and the first loft curve is a surface edge, the loft will match the tangent of the surface behind that edge.
StartTrim (BrepTrim)BrepTrim from the surface edge where start tangent is to be matched
EndTrim (BrepTrim)BrepTrim from the surface edge where end tangent is to be matched
loftType (LoftType)type of loft to perform.
closed (bool)true if the last curve in this loft should be connected back to the first one.
Constructs a closed surface, continuing the surface past the last curve around to the first curve. Available when you have selected three shape curves.

CreateFromLoft

#ExampleSince v8.21
public static Brep[] CreateFromLoft(IEnumerable<Curve> curves, Point3d start, Point3d end, LoftType loftType, bool closed, double angleTol)
Constructs one or more Breps by lofting through a set of curves.
curves (IEnumerable<Curve>)The curves to loft through. This function will not perform any curve sorting. You must pass in curves in the order you want them lofted. This function will not adjust the directions of open curves. Use Curve.DoDirectionsMatch and Curve.Reverse to adjust the directions of open curves. This function will not adjust the seams of closed curves. Use Curve.ChangeClosedCurveSeam to adjust the seam of closed curves.
start (Point3d)Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of loft. Use Point3d.Unset if you do not want to include an end point.
loftType (LoftType)type of loft to perform.
closed (bool)true if the last curve in this loft should be connected back to the first one.
angleTol (double)angle tolerance, in radians, used to perform the loft.
Constructs a closed surface, continuing the surface past the last curve around to the first curve. Available when you have selected three shape curves.

CreateFromLoft

#ExampleSince v5.0
public static Brep[] CreateFromLoft(IEnumerable<Curve> curves, Point3d start, Point3d end, LoftType loftType, bool closed)
Constructs one or more Breps by lofting through a set of curves.
curves (IEnumerable<Curve>)The curves to loft through. This function will not perform any curve sorting. You must pass in curves in the order you want them lofted. This function will not adjust the directions of open curves. Use Curve.DoDirectionsMatch and Curve.Reverse to adjust the directions of open curves. This function will not adjust the seams of closed curves. Use Curve.ChangeClosedCurveSeam to adjust the seam of closed curves.
start (Point3d)Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of loft. Use Point3d.Unset if you do not want to include an end point.
loftType (LoftType)type of loft to perform.
closed (bool)true if the last curve in this loft should be connected back to the first one.
Constructs a closed surface, continuing the surface past the last curve around to the first curve. Available when you have selected three shape curves.

CreateFromLoftRebuild

#Since v8.21
public static Brep[] CreateFromLoftRebuild(IEnumerable<Curve> curves, Point3d start, Point3d end, LoftType loftType, bool closed, double angleTol, int rebuildPointCount)
Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by rebuilding to a specified number of control points.
curves (IEnumerable<Curve>)The curves to loft through. This function will not perform any curve sorting. You must pass in curves in the order you want them lofted. This function will not adjust the directions of open curves. Use Curve.DoDirectionsMatch and Curve.Reverse to adjust the directions of open curves. This function will not adjust the seams of closed curves. Use Curve.ChangeClosedCurveSeam to adjust the seam of closed curves.
start (Point3d)Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType (LoftType)type of loft to perform.
closed (bool)true if the last curve in this loft should be connected back to the first one.
angleTol (double)angle tolerance, in radians, used to perform the loft.
rebuildPointCount (int)A number of points to use while rebuilding the curves. 0 leaves turns this parameter off.
Constructs a closed surface, continuing the surface past the last curve around to the first curve. Available when you have selected three shape curves.

CreateFromLoftRebuild

#Since v5.0
public static Brep[] CreateFromLoftRebuild(IEnumerable<Curve> curves, Point3d start, Point3d end, LoftType loftType, bool closed, int rebuildPointCount)
Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by rebuilding to a specified number of control points.
curves (IEnumerable<Curve>)The curves to loft through. This function will not perform any curve sorting. You must pass in curves in the order you want them lofted. This function will not adjust the directions of open curves. Use Curve.DoDirectionsMatch and Curve.Reverse to adjust the directions of open curves. This function will not adjust the seams of closed curves. Use Curve.ChangeClosedCurveSeam to adjust the seam of closed curves.
start (Point3d)Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType (LoftType)type of loft to perform.
closed (bool)true if the last curve in this loft should be connected back to the first one.
rebuildPointCount (int)A number of points to use while rebuilding the curves. 0 leaves turns this parameter off.
Constructs a closed surface, continuing the surface past the last curve around to the first curve. Available when you have selected three shape curves.

CreateFromLoftRefit

#Since v8.21
public static Brep[] CreateFromLoftRefit(IEnumerable<Curve> curves, Point3d start, Point3d end, LoftType loftType, bool closed, double angleTol, double refitTolerance)
Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by refitting to a specified tolerance.
curves (IEnumerable<Curve>)The curves to loft through. This function will not perform any curve sorting. You must pass in curves in the order you want them lofted. This function will not adjust the directions of open curves. Use Curve.DoDirectionsMatch and Curve.Reverse to adjust the directions of open curves. This function will not adjust the seams of closed curves. Use Curve.ChangeClosedCurveSeam to adjust the seam of closed curves.
start (Point3d)Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType (LoftType)type of loft to perform.
closed (bool)true if the last curve in this loft should be connected back to the first one.
angleTol (double)angle tolerance, in radians, used to perform the loft.
refitTolerance (double)A distance to use in refitting, or 0 if you want to turn this parameter off.
Constructs a closed surface, continuing the surface past the last curve around to the first curve. Available when you have selected three shape curves.

CreateFromLoftRefit

#Since v5.0
public static Brep[] CreateFromLoftRefit(IEnumerable<Curve> curves, Point3d start, Point3d end, LoftType loftType, bool closed, double refitTolerance)
Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by refitting to a specified tolerance.
curves (IEnumerable<Curve>)The curves to loft through. This function will not perform any curve sorting. You must pass in curves in the order you want them lofted. This function will not adjust the directions of open curves. Use Curve.DoDirectionsMatch and Curve.Reverse to adjust the directions of open curves. This function will not adjust the seams of closed curves. Use Curve.ChangeClosedCurveSeam to adjust the seam of closed curves.
start (Point3d)Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType (LoftType)type of loft to perform.
closed (bool)true if the last curve in this loft should be connected back to the first one.
refitTolerance (double)A distance to use in refitting, or 0 if you want to turn this parameter off.
Constructs a closed surface, continuing the surface past the last curve around to the first curve. Available when you have selected three shape curves.

CreateFromMatch

#Since v8.21
public static bool CreateFromMatch(BrepEdge edge, Curve targetCurve, MatchSrfSettings settings, out Brep matched, out Brep target)
Match an edge to the target curve using the settings provided
edge (BrepEdge)The edge to match. This need to be an untrimmed surface edge.
targetCurve (Curve)The curve to match to. This needs to be a BrepEdge if tangent or curvature matching is requested.
settings (MatchSrfSettings)The settings used for matching
matched (out Brep)If successful, this contains the matched brep
target (out Brep)If successful and MatchSrfSettings.Average is true, this contains the changed target brep.

CreateFromMatch

#Since v8.21
public static bool CreateFromMatch(BrepEdge edge, IEnumerable<Curve> targetCurves, MatchSrfSettings settings, out Brep matched, out Brep target)
Match an edge to the target curves using the settings provided
edge (BrepEdge)The edge to match. This need to be an untrimmed surface edge.
targetCurves (IEnumerable<Curve>)The curves to match to. These need to be BrepEdge if tangent or curvature matching is requested.
settings (MatchSrfSettings)The settings used for matching
matched (out Brep)If successful, this contains the matched brep
target (out Brep)If successful and MatchSrfSettings.Average is true, this contains the changed target brep.

CreateFromMesh

#Since v5.1
public static Brep CreateFromMesh(Mesh mesh, bool trimmedTriangles)
Create a brep representation of a mesh
mesh (Mesh)
trimmedTriangles (bool)if true, triangles in the mesh will be represented by trimmed planes in the brep. If false, triangles in the mesh will be represented by untrimmed singular bilinear NURBS surfaces in the brep.

CreateFromOffsetFace

#Since v5.0
public static Brep CreateFromOffsetFace(BrepFace face, double offsetDistance, double offsetTolerance, bool bothSides, bool createSolid)
Offsets a face including trim information to create a new brep.
face (BrepFace)the face to offset.
offsetDistance (double)An offset distance.
offsetTolerance (double)Use 0.0 to make a loose offset. Otherwise, the document's absolute tolerance is usually sufficient.
bothSides (bool)When true, offset to both sides of the input face.
createSolid (bool)When true, make a solid object.
A new brep if successful. The brep can be disjoint if bothSides is true and createSolid is false, or if createSolid is true and connecting the offsets with side surfaces fails. null if unsuccessful.

CreateFromRevSurface

#ExampleSince v5.0
public static Brep CreateFromRevSurface(RevSurface surface, bool capStart, bool capEnd)
Constructs a brep form of a surface of revolution.
surface (RevSurface)The surface of revolution.
capStart (bool)if true, the start of the revolute is not on the axis of revolution, and the surface of revolution is closed, then a circular cap will be added to close of the hole at the start of the revolute.
capEnd (bool)if true, the end of the revolute is not on the axis of revolution, and the surface of revolution is closed, then a circular cap will be added to close of the hole at the end of the revolute.
A Brep if successful, null on error.

CreateFromSphere

#Since v5.0
public static Brep CreateFromSphere(Sphere sphere)
Constructs a Brep definition of a sphere.
sphere (Sphere)The input sphere provides the orienting plane and radius.
A Brep if successful, null on error.

CreateFromSurface

#Since v5.0
public static Brep CreateFromSurface(Surface surface)
Constructs a Brep from a surface. The resulting Brep has an outer boundary made from four trims. The trims are ordered so that they run along the south, east, north, and then west side of the surface's parameter space.
surface (Surface)A surface to convert.
Resulting brep or null on failure.

CreateFromSweep

#Since v5.0
public static Brep[] CreateFromSweep(Curve rail, Curve shape, bool closed, double tolerance)
Sweep1 function that fits a surface through a profile curve that define the surface cross-sections and one curve that defines a surface edge.
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is enabled (true).
rail (Curve)Rail to sweep shapes along.
shape (Curve)Shape curve.
closed (bool)Only matters if shape is closed.
tolerance (double)Tolerance for fitting surface and rails.
Array of Brep sweep results.

CreateFromSweep

#Since v5.0
public static Brep[] CreateFromSweep(Curve rail, IEnumerable<Curve> shapes, bool closed, double tolerance)
Sweep1 function that fits a surface through profile curves that define the surface cross-sections and one curve that defines a surface edge.
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is enabled (true).
rail (Curve)Rail to sweep shapes along.
shapes (IEnumerable<Curve>)Shape curves.
closed (bool)Only matters if shapes are closed.
tolerance (double)Tolerance for fitting surface and rails.
Array of Brep sweep results.

CreateFromSweep

#Since v9.0
public static Brep[] CreateFromSweep(Curve rail, IEnumerable<Curve> shapes, Point3d startPoint, Point3d endPoint, SweepFrame frameType, Vector3d roadlikeNormal, bool closed, SweepBlend blendType, SweepMiter miterType, double tolerance, SweepRebuild rebuildType, int rebuildPointCount, double refitTolerance, bool refitRail)
Sweep1 function that fits a surface through a series of profile curves that define the surface cross-sections and one curve that defines a surface edge. Unlike other CreateFromSweep and CreateFromSweepSegmented overrides, this method: - Matches shape curve directions and (for closed shapes) seam points before sweeping, which prevents twisting. - Detects when the inputs qualify for a "simple sweep" and creates a simpler surface in this case. - Lets the caller pick between the refit - rail and segmented sweep paths. - Splits the resulting Breps at fully multiple knots.
Remarks: This version mimics what Rhino's Sweep1 command does.
rail (Curve)Rail to sweep shapes along. For SweepFrame.AlignWithSurface, pass a BrepEdge or a BrepTrim so the sweep can find the surface to align to. An interior edge belongs to two faces and a BrepEdge does not say which one, so pass the BrepTrim of the face you want; a BrepEdge uses its first trim.
shapes (IEnumerable<Curve>)Shape curves.
startPoint (Point3d)Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
endPoint (Point3d)Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
frameType (SweepFrame)The frame type.
roadlikeNormal (Vector3d)The roadlike normal directoion. Use Vector3d.Unset if the frame type is not set to roadlike.
closed (bool)Only matters if shapes are closed.
blendType (SweepBlend)The shape blending type.
miterType (SweepMiter)The mitering type.
tolerance (double)
rebuildType (SweepRebuild)The rebuild style.
rebuildPointCount (int)If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance (double)If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0.
refitRail (bool)false = segmented sweep, true = refit-rail sweep.
Array of Brep sweep results.

CreateFromSweep

#Since v7.0
public static Brep[] CreateFromSweep(Curve rail, IEnumerable<Curve> shapes, Point3d startPoint, Point3d endPoint, SweepFrame frameType, Vector3d roadlikeNormal, bool closed, SweepBlend blendType, SweepMiter miterType, double tolerance, SweepRebuild rebuildType, int rebuildPointCount, double refitTolerance)
Sweep1 function that fits a surface through a series of profile curves that define the surface cross-sections and one curve that defines a surface edge.
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is enabled (true).
rail (Curve)Rail to sweep shapes along.
shapes (IEnumerable<Curve>)Shape curves.
startPoint (Point3d)Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
endPoint (Point3d)Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
frameType (SweepFrame)The frame type.
roadlikeNormal (Vector3d)The roadlike normal directoion. Use Vector3d.Unset if the frame type is not set to roadlike.
closed (bool)Only matters if shapes are closed.
blendType (SweepBlend)The shape blending type.
miterType (SweepMiter)The mitering type.
tolerance (double)
rebuildType (SweepRebuild)The rebuild style.
rebuildPointCount (int)If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance (double)If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0
Array of Brep sweep results.

CreateFromSweep

#Since v5.0
public static Brep[] CreateFromSweep(Curve rail1, Curve rail2, Curve shape, bool closed, double tolerance)
General 2 rail sweep. If you are not producing the sweep results that you are after, then use the SweepTwoRail class with options to generate the swept geometry.
rail1 (Curve)Rail to sweep shapes along
rail2 (Curve)Rail to sweep shapes along
shape (Curve)Shape curve
closed (bool)Only matters if shape is closed
tolerance (double)Tolerance for fitting surface and rails
Array of Brep sweep results

CreateFromSweep

#Since v5.0
public static Brep[] CreateFromSweep(Curve rail1, Curve rail2, IEnumerable<Curve> shapes, bool closed, double tolerance)
General 2 rail sweep. If you are not producing the sweep results that you are after, then use the SweepTwoRail class with options to generate the swept geometry.
rail1 (Curve)Rail to sweep shapes along
rail2 (Curve)Rail to sweep shapes along
shapes (IEnumerable<Curve>)Shape curves
closed (bool)Only matters if shapes are closed
tolerance (double)Tolerance for fitting surface and rails
Array of Brep sweep results

CreateFromSweep

#Since v7.19
public static Brep[] CreateFromSweep(Curve rail1, Curve rail2, IEnumerable<Curve> shapes, Point3d start, Point3d end, bool closed, double tolerance, SweepRebuild rebuild, int rebuildPointCount, double refitTolerance, bool preserveHeight, bool autoAdjust)
Sweep2 function that fits a surface through profile curves that define the surface cross-sections and two curves that defines the surface edges.
rail1 (Curve)Rail to sweep shapes along
rail2 (Curve)Rail to sweep shapes along
shapes (IEnumerable<Curve>)Shape curves
start (Point3d)Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
closed (bool)Only matters if shapes are closed.
tolerance (double)Tolerance for fitting surface and rails.
rebuild (SweepRebuild)The rebuild style.
rebuildPointCount (int)If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance (double)If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0
preserveHeight (bool)Removes the association between the height scaling from the width scaling
autoAdjust (bool)Set to true to have shape curves adjusted, sorted, and matched automatically. This will produce results comparable to Rhino's Sweep2 command. Set to false to not have shape curves adjusted, sorted, and matched automatically.
Array of Brep sweep results

CreateFromSweep

#Since v6.16
public static Brep[] CreateFromSweep(Curve rail1, Curve rail2, IEnumerable<Curve> shapes, Point3d start, Point3d end, bool closed, double tolerance, SweepRebuild rebuild, int rebuildPointCount, double refitTolerance, bool preserveHeight)
Sweep2 function that fits a surface through profile curves that define the surface cross-sections and two curves that defines the surface edges.
rail1 (Curve)Rail to sweep shapes along
rail2 (Curve)Rail to sweep shapes along
shapes (IEnumerable<Curve>)Shape curves
start (Point3d)Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
end (Point3d)Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
closed (bool)Only matters if shapes are closed.
tolerance (double)Tolerance for fitting surface and rails.
rebuild (SweepRebuild)The rebuild style.
rebuildPointCount (int)If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance (double)If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0
preserveHeight (bool)Removes the association between the height scaling from the width scaling
Array of Brep sweep results

CreateFromSweepInParts

#Since v6.0
public static Brep[] CreateFromSweepInParts(Curve rail1, Curve rail2, IEnumerable<Curve> shapes, IEnumerable<Point2d> rail_params, bool closed, double tolerance)
Makes a 2 rail sweep. Like CreateFromSweep but the result is split where parameterization along a rail changes abruptly.
rail1 (Curve)Rail to sweep shapes along
rail2 (Curve)Rail to sweep shapes along
shapes (IEnumerable<Curve>)Shape curves
rail_params (IEnumerable<Point2d>)Shape parameters
closed (bool)Only matters if shapes are closed
tolerance (double)Tolerance for fitting surface and rails
Array of Brep sweep results

CreateFromSweepSegmented

#Since v6.14
public static Brep[] CreateFromSweepSegmented(Curve rail, Curve shape, bool closed, double tolerance)
Sweep1 function that fits a surface through a profile curve that define the surface cross-sections and one curve that defines a surface edge. The Segmented version breaks the rail at curvature kinks and sweeps each piece separately, then put the results together into a Brep.
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is disabled (false).
rail (Curve)Rail to sweep shapes along
shape (Curve)Shape curve
closed (bool)Only matters if shape is closed
tolerance (double)Tolerance for fitting surface and rails
Array of Brep sweep results

CreateFromSweepSegmented

#Since v6.14
public static Brep[] CreateFromSweepSegmented(Curve rail, IEnumerable<Curve> shapes, bool closed, double tolerance)
Sweep1 function that fits a surface through a series of profile curves that define the surface cross-sections and one curve that defines a surface edge. The Segmented version breaks the rail at curvature kinks and sweeps each piece separately, then put the results together into a Brep.
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is disabled (false).
rail (Curve)Rail to sweep shapes along.
shapes (IEnumerable<Curve>)Shape curves.
closed (bool)Only matters if shapes are closed.
tolerance (double)Tolerance for fitting surface and rails.
Array of Brep sweep results.

CreateFromSweepSegmented

#Since v7.0
public static Brep[] CreateFromSweepSegmented(Curve rail, IEnumerable<Curve> shapes, Point3d startPoint, Point3d endPoint, SweepFrame frameType, Vector3d roadlikeNormal, bool closed, SweepBlend blendType, SweepMiter miterType, double tolerance, SweepRebuild rebuildType, int rebuildPointCount, double refitTolerance)
Sweep1 function that fits a surface through a series of profile curves that define the surface cross-sections and one curve that defines a surface edge. The Segmented version breaks the rail at curvature kinks and sweeps each piece separately, then put the results together into a Brep.
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is disabled (false).
rail (Curve)Rail to sweep shapes along.
shapes (IEnumerable<Curve>)Shape curves.
startPoint (Point3d)Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
endPoint (Point3d)Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
frameType (SweepFrame)The frame type.
roadlikeNormal (Vector3d)The roadlike normal directoion. Use Vector3d.Unset if the frame type is not set to roadlike.
closed (bool)Only matters if shapes are closed.
blendType (SweepBlend)The shape blending type.
miterType (SweepMiter)The mitering type.
tolerance (double)
rebuildType (SweepRebuild)The rebuild style.
rebuildPointCount (int)If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance (double)If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0
Array of Brep sweep results.

CreateFromTaperedExtrude

#Since v6.0
public static Brep[] CreateFromTaperedExtrude(Curve curveToExtrude, double distance, Vector3d direction, Point3d basePoint, double draftAngleRadians, ExtrudeCornerType cornerType, double tolerance, double angleToleranceRadians)
Extrude a curve to a taper making a brep (potentially more than 1)
curveToExtrude (Curve)the curve to extrude
distance (double)the distance to extrude
direction (Vector3d)the direction of the extrusion
basePoint (Point3d)the base point of the extrusion
draftAngleRadians (double)angle of the extrusion
cornerType (ExtrudeCornerType)
tolerance (double)tolerance to use for the extrusion
angleToleranceRadians (double)angle tolerance to use for the extrusion
array of breps on success

CreateFromTaperedExtrude

#Since v5.1 Obsolete v6.0
public static Brep[] CreateFromTaperedExtrude(Curve curveToExtrude, double distance, Vector3d direction, Point3d basePoint, double draftAngleRadians, ExtrudeCornerType cornerType)
obsoleteUse version that takes tolerance as input
Extrude a curve to a taper making a brep (potentially more than 1)
Remarks: tolerances used are based on the active doc tolerance
curveToExtrude (Curve)the curve to extrude
distance (double)the distance to extrude
direction (Vector3d)the direction of the extrusion
basePoint (Point3d)the base point of the extrusion
draftAngleRadians (double)angle of the extrusion
cornerType (ExtrudeCornerType)
array of breps on success

CreateFromTaperedExtrudeWithRef

#Since v6.14
public static Brep[] CreateFromTaperedExtrudeWithRef(Curve curve, Vector3d direction, double distance, double draftAngle, Plane plane, double tolerance)
Creates one or more Breps by extruding a curve a distance along an axis with draft angle.
curve (Curve)The curve to extrude.
direction (Vector3d)The extrusion direction.
distance (double)The extrusion distance.
draftAngle (double)The extrusion draft angle in radians.
plane (Plane)The end of the extrusion will be parallel to this plane, and "distance" from the plane's origin. The plane's origin is generally be a point on the curve. For planar curves, a natural choice for the plane's normal direction will be the normal direction of the curve's plane. In any case, plane.Normal = direction may make sense.
tolerance (double)The intersecting and trimming tolerance.
An array of Breps if successful.

CreateFromTorus

#Since v8.1
public static Brep CreateFromTorus(Torus torus)
Constructs a Brep definition of a torus.
torus (Torus)The torus.
A Brep representation of the torus if successful, null otherwise.

CreateOffsetBrep

#Since v7.5
public static Brep[] CreateOffsetBrep(Brep brep, double distance, bool solid, bool extend, bool shrink, double tolerance, out Brep[] outBlends, out Brep[] outWalls)
Offsets a Brep.
brep (Brep)The Brep to offset.
distance (double)The distance to offset. This is a signed distance value with respect to face normals and flipped faces.
solid (bool)If true, then the function makes a closed solid from the input and offset surfaces by lofting a ruled surface between all of the matching edges.
extend (bool)If true, then the function maintains the sharp corners when the original surfaces have sharps corner. If False, then the function creates fillets at sharp corners in the original surfaces.
shrink (bool)If true, then the function shrinks the underlying surfaces to their face's outer boundary loop.
tolerance (double)The offset tolerance.
outBlends (out Brep[])The results of the calculation.
outWalls (out Brep[])The results of the calculation.
Array of Breps if successful. If the function succeeds in offsetting, a single Brep will be returned. Otherwise, the array will contain the offset surfaces, outBlends will contain the set of blends used to fill in gaps (if extend is false), and outWalls will contain the set of wall surfaces that was supposed to join the offset to the original (if solid is true).

CreateOffsetBrep

#Since v6.0
public static Brep[] CreateOffsetBrep(Brep brep, double distance, bool solid, bool extend, double tolerance, out Brep[] outBlends, out Brep[] outWalls)
Offsets a Brep.
brep (Brep)The Brep to offset.
distance (double)The distance to offset. This is a signed distance value with respect to face normals and flipped faces.
solid (bool)If true, then the function makes a closed solid from the input and offset surfaces by lofting a ruled surface between all of the matching edges.
extend (bool)If true, then the function maintains the sharp corners when the original surfaces have sharps corner. If False, then the function creates fillets at sharp corners in the original surfaces.
tolerance (double)The offset tolerance.
outBlends (out Brep[])The results of the calculation.
outWalls (out Brep[])The results of the calculation.
Array of Breps if successful. If the function succeeds in offsetting, a single Brep will be returned. Otherwise, the array will contain the offset surfaces, outBlends will contain the set of blends used to fill in gaps (if extend is false), and outWalls will contain the set of wall surfaces that was supposed to join the offset to the original (if solid is true).

CreatePatch

#Since v5.0
public static Brep CreatePatch(IEnumerable<GeometryBase> geometry, int uSpans, int vSpans, double tolerance)
Constructs a brep patch.

This is the simple version of fit that uses a plane with u x v spans. It makes a plane by fitting to the points from the input geometry to use as the starting surface. The surface has the specified u and v span count.

geometry (IEnumerable<GeometryBase>)A combination of curves, brep trims, points, point clouds or meshes. Curves and trims are sampled to get points. Trims are sampled for points and normals.
uSpans (int)The number of spans in the U direction.
vSpans (int)The number of spans in the V direction.
tolerance (double)Tolerance used by input analysis functions for loop finding, trimming, etc.
A brep fit through input on success, or null on error.

CreatePatch

#Since v5.0
public static Brep CreatePatch(IEnumerable<GeometryBase> geometry, Surface startingSurface, double tolerance)
Constructs a brep patch.

This is the simple version of fit that uses a specified starting surface.

geometry (IEnumerable<GeometryBase>)Combination of Curves, BrepTrims, Points, PointClouds or Meshes. Curves and trims are sampled to get points. Trims are sampled for points and normals.
startingSurface (Surface)A starting surface (can be null).
tolerance (double)Tolerance used by input analysis functions for loop finding, trimming, etc.
Brep fit through input on success, or null on error.

CreatePatch

#Since v5.0
public static Brep CreatePatch(IEnumerable<GeometryBase> geometry, Surface startingSurface, int uSpans, int vSpans, bool trim, bool tangency, double pointSpacing, double flexibility, double surfacePull, bool[] fixEdges, double tolerance)
Constructs a brep patch using all controls
geometry (IEnumerable<GeometryBase>)A combination of curves, brep trims, points, point clouds or meshes. Curves and trims are sampled to get points. Trims are sampled for points and normals.
startingSurface (Surface)A starting surface (can be null).
uSpans (int)Number of surface spans used when a plane is fit through points to start in the U direction.
vSpans (int)Number of surface spans used when a plane is fit through points to start in the U direction.
trim (bool)If true, try to find an outer loop from among the input curves and trim the result to that loop
tangency (bool)If true, try to find brep trims in the outer loop of curves and try to fit to the normal direction of the trim's surface at those locations.
pointSpacing (double)Basic distance between points sampled from input curves.
flexibility (double)Determines the behavior of the surface in areas where its not otherwise controlled by the input. Lower numbers make the surface behave more like a stiff material; higher, less like a stiff material. That is, each span is made to more closely match the spans adjacent to it if there is no input geometry mapping to that area of the surface when the flexibility value is low. The scale is logarithmic. Numbers around 0.001 or 0.1 make the patch pretty stiff and numbers around 10 or 100 make the surface flexible.
surfacePull (double)Tends to keep the result surface where it was before the fit in areas where there is on influence from the input geometry
fixEdges (bool[])Array of four elements. Flags to keep the edges of a starting (untrimmed) surface in place while fitting the interior of the surface. Order of flags is left, bottom, right, top
tolerance (double)Tolerance used by input analysis functions for loop finding, trimming, etc.
A brep fit through input on success, or null on error.

CreatePipe

#Since v5.0
public static Brep[] CreatePipe(Curve rail, double radius, bool localBlending, PipeCapMode cap, bool fitRail, double absoluteTolerance, double angleToleranceRadians)
Creates a single walled pipe.
rail (Curve)The rail, or path, curve.
radius (double)The radius of the pipe.
localBlending (bool)The shape blending. If True, Local (pipe radius stays constant at the ends and changes more rapidly in the middle) is applied. If False, Global (radius is linearly blended from one end to the other, creating pipes that taper from one radius to the other) is applied.
cap (PipeCapMode)The end cap mode.
fitRail (bool)If the curve is a polycurve of lines and arcs, the curve is fit and a single surface is created; otherwise the result is a Brep with joined surfaces created from the polycurve segments.
absoluteTolerance (double)The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians (double)The angle tolerance. When in doubt, use the document's angle tolerance in radians.
Array of Breps success.

CreatePipe

#Since v5.0
public static Brep[] CreatePipe(Curve rail, IEnumerable<double> railRadiiParameters, IEnumerable<double> radii, bool localBlending, PipeCapMode cap, bool fitRail, double absoluteTolerance, double angleToleranceRadians)
Creates a single walled pipe.
rail (Curve)The rail, or path, curve.
railRadiiParameters (IEnumerable<double>)One or more normalized curve parameters where changes in radius occur. Important: curve parameters must be normalized - ranging between 0.0 and 1.0. Use Interval.NormalizedParameterAt to calculate these.
radii (IEnumerable<double>)One or more radii - one at each normalized curve parameter in railRadiiParameters.
localBlending (bool)The shape blending. If True, Local (pipe radius stays constant at the ends and changes more rapidly in the middle) is applied. If False, Global (radius is linearly blended from one end to the other, creating pipes that taper from one radius to the other) is applied.
cap (PipeCapMode)The end cap mode.
fitRail (bool)If the curve is a polycurve of lines and arcs, the curve is fit and a single surface is created; otherwise the result is a Brep with joined surfaces created from the polycurve segments.
absoluteTolerance (double)The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians (double)The angle tolerance. When in doubt, use the document's angle tolerance in radians.
Array of Breps success.

CreatePlanarBreps

#Since v6.0
public static Brep[] CreatePlanarBreps(Curve inputLoop, double tolerance)
Constructs a set of planar breps as outlines by the loops.
inputLoop (Curve)A curve that should form the boundaries of the surfaces or polysurfaces.
tolerance (double)
An array of Planar Breps.

CreatePlanarBreps

#Since v5.0 Obsolete v6.0
public static Brep[] CreatePlanarBreps(Curve inputLoop)
obsoleteUse version that takes tolerance as input
Constructs a set of planar breps as outlines by the loops.
inputLoop (Curve)A curve that should form the boundaries of the surfaces or polysurfaces.
An array of Planar Breps.

CreatePlanarBreps

#Since v6.0
public static Brep[] CreatePlanarBreps(CurveList inputLoops, double tolerance)
Constructs a set of planar Breps as outlines by the loops.
inputLoops (CurveList)Curve loops that delineate the planar boundaries.
tolerance (double)
An array of Planar Breps.

CreatePlanarBreps

#Since v5.0 Obsolete v6.0
public static Brep[] CreatePlanarBreps(CurveList inputLoops)
obsoleteUse version that takes tolerance as input
Constructs a set of planar Breps as outlines by the loops.
inputLoops (CurveList)Curve loops that delineate the planar boundaries.
An array of Planar Breps or null on error.

CreatePlanarBreps

#Since v6.0
public static Brep[] CreatePlanarBreps(IEnumerable<Curve> inputLoops, double tolerance)
Constructs a set of planar breps as outlines by the loops.
inputLoops (IEnumerable<Curve>)Curve loops that delineate the planar boundaries.
tolerance (double)
An array of Planar Breps.

CreatePlanarBreps

#Since v5.0 Obsolete v6.0
public static Brep[] CreatePlanarBreps(IEnumerable<Curve> inputLoops)
obsoleteUse version that takes tolerance as input
Constructs a set of planar breps as outlines by the loops.
inputLoops (IEnumerable<Curve>)Curve loops that delineate the planar boundaries.
An array of Planar Breps.

CreatePlanarBrepsWithIndexMap

#
public static Brep[] CreatePlanarBrepsWithIndexMap(IEnumerable<Curve> inputLoops, double tolerance, out int[][] indexMap)
Constructs a set of planar Breps as outlines by the loops, reporting which input curves bounded each Brep.
Remarks: A curve that closes an outer loop and a curve that closes a hole in the same face are both listed for that face, and a hole rejected while the Brep is built still leaves its curves listed. The entries are not a partition of inputLoops. A self-intersecting input is split into regions, and a curve bounding several of them is listed for each. A curve the merge dropped, one sorted onto no face, and one whose face failed to produce a valid Brep are listed nowhere. A null element in inputLoops throws ArgumentException, because the reported indices are positions in that sequence. The other CreatePlanarBreps overloads drop nulls silently and renumber what follows.
inputLoops (IEnumerable<Curve>)Curve loops that delineate the planar boundaries.
tolerance (double)Tolerance to use when sorting and building the loops.
indexMap (out int[][])One entry per returned Brep, in the same order. Entry i lists, ascending, the positions in inputLoops of the curves sorted onto Brep i. Null when this method returns null.
An array of planar Breps, or null on failure.

CreatePlanarDifference

#Since v7.0
public static Brep[] CreatePlanarDifference(Brep b0, Brep b1, Plane plane, double tolerance)
CreatePlanarDifference
b0 (Brep)The first brep to intersect.
b1 (Brep)The first brep to intersect.
plane (Plane)The plane in which all the input breps lie
tolerance (double)Tolerance to use for Difference operation.
An array of Brep results or null on failure.

CreatePlanarIntersection

#Since v7.0
public static Brep[] CreatePlanarIntersection(Brep b0, Brep b1, Plane plane, double tolerance)
CreatePlanarIntersection
b0 (Brep)The first brep to intersect.
b1 (Brep)The second brep to intersect.
plane (Plane)The plane in which all the input breps lie
tolerance (double)Tolerance to use for intersection operation.
An array of Brep results or null on failure.

CreatePlanarUnion

#Since v7.0
public static Brep[] CreatePlanarUnion(Brep b0, Brep b1, Plane plane, double tolerance)
CreatePlanarUnion
b0 (Brep)The first brep to union.
b1 (Brep)The first brep to union.
plane (Plane)The plane in which all the input breps lie
tolerance (double)Tolerance to use for union operation.
An array of Brep results or null on failure.

CreatePlanarUnion

#Since v7.0
public static Brep[] CreatePlanarUnion(IEnumerable<Brep> breps, Plane plane, double tolerance)
CreatePlanarUnion
breps (IEnumerable<Brep>)The planar regions on which to perform the union operation.
plane (Plane)The plane in which all the input breps lie
tolerance (double)Tolerance to use for union operation.
An array of Brep results or null on failure.

CreateQuadSphere

#Since v6.0
public static Brep CreateQuadSphere(Sphere sphere)
Constructs a Brep definition of a quad sphere.
sphere (Sphere)The input sphere provides the orienting plane and radius.
A Brep if successful, null on error.

CreateShell

#Since v5.4
public static Brep[] CreateShell(Brep brep, IEnumerable<int> facesToRemove, double distance, double tolerance)
Creates a hollowed out shell from a solid Brep. Function only operates on simple, solid, manifold Breps.
brep (Brep)The solid Brep to shell.
facesToRemove (IEnumerable<int>)The indices of the Brep faces to remove. These surfaces are removed and the remainder is offset inward, using the outer parts of the removed surfaces to join the inner and outer parts.
distance (double)The distance, or thickness, for the shell. This is a signed distance value with respect to face normals and flipped faces.
tolerance (double)The offset tolerance. When in doubt, use the document's absolute tolerance.
An array of Brep results or null on failure.

CreateSolid

#Since v5.0
public static Brep[] CreateSolid(IEnumerable<Brep> breps, double tolerance)
Constructs closed polysurfaces from surfaces and polysurfaces that bound a region in space.
breps (IEnumerable<Brep>)The intersecting surfaces and polysurfaces to automatically trim and join into closed polysurfaces.
tolerance (double)The trim and join tolerance. If set to RhinoMath.UnsetValue, Rhino's global absolute tolerance is used.
The resulting polysurfaces on success or null on failure.

CreateThickPipe

#Since v7.0
public static Brep[] CreateThickPipe(Curve rail, double radius0, double radius1, bool localBlending, PipeCapMode cap, bool fitRail, double absoluteTolerance, double angleToleranceRadians)
Creates a double-walled pipe.
rail (Curve)The rail, or path, curve.
radius0 (double)The first radius of the pipe.
radius1 (double)The second radius of the pipe.
localBlending (bool)The shape blending. If True, Local (pipe radius stays constant at the ends and changes more rapidly in the middle) is applied. If False, Global (radius is linearly blended from one end to the other, creating pipes that taper from one radius to the other) is applied.
cap (PipeCapMode)The end cap mode.
fitRail (bool)If the curve is a polycurve of lines and arcs, the curve is fit and a single surface is created; otherwise the result is a Brep with joined surfaces created from the polycurve segments.
absoluteTolerance (double)The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians (double)The angle tolerance. When in doubt, use the document's angle tolerance in radians.
Array of Breps success.

CreateThickPipe

#Since v7.0
public static Brep[] CreateThickPipe(Curve rail, IEnumerable<double> railRadiiParameters, IEnumerable<double> radii0, IEnumerable<double> radii1, bool localBlending, PipeCapMode cap, bool fitRail, double absoluteTolerance, double angleToleranceRadians)
Creates a double-walled pipe.
rail (Curve)The rail, or path, curve.
railRadiiParameters (IEnumerable<double>)One or more normalized curve parameters where changes in radius occur. Important: curve parameters must be normalized - ranging between 0.0 and 1.0. Use Interval.NormalizedParameterAt to calculate these.
radii0 (IEnumerable<double>)One or more radii for the first wall - one at each normalized curve parameter in railRadiiParameters.
radii1 (IEnumerable<double>)One or more radii for the second wall - one at each normalized curve parameter in railRadiiParameters.
localBlending (bool)The shape blending. If True, Local (pipe radius stays constant at the ends and changes more rapidly in the middle) is applied. If False, Global (radius is linearly blended from one end to the other, creating pipes that taper from one radius to the other) is applied.
cap (PipeCapMode)The end cap mode.
fitRail (bool)If the curve is a polycurve of lines and arcs, the curve is fit and a single surface is created; otherwise the result is a Brep with joined surfaces created from the polycurve segments.
absoluteTolerance (double)The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians (double)The angle tolerance. When in doubt, use the document's angle tolerance in radians.
Array of Breps success.

CreateTrimmedPlane

#Since v6.0
public static Brep CreateTrimmedPlane(Plane plane, Curve curve)
Create a Brep trimmed plane.
plane (Plane)Plane that will be trimmed.
curve (Curve)A simple (no self intersections) closed curve that defines the outer boundary of the trimmed plane.
Resulting brep or null on failure.

CreateTrimmedPlane

#Since v6.0
public static Brep CreateTrimmedPlane(Plane plane, IEnumerable<Curve> curves)
Create a Brep trimmed plane.
plane (Plane)Plane that will be trimmed.
curves (IEnumerable<Curve>)A list of curves that form a simple (no self intersections) closed curve that defines the outer boundary of the trimmed plane.
Resulting brep or null on failure.

CreateTrimmedSurface

#Since v6.0
public static Brep CreateTrimmedSurface(BrepFace trimSource, Surface surfaceSource, double tolerance)
Constructs a Brep using the trimming information of a brep face and a surface. Surface must be roughly the same shape and in the same location as the trimming brep face.
trimSource (BrepFace)BrepFace which contains trimmingSource brep.
surfaceSource (Surface)Surface that trims of BrepFace will be applied to.
tolerance (double)
A brep with the shape of surfaceSource and the trims of trimSource or null on failure.

CreateTrimmedSurface

#Since v5.0 Obsolete v6.0
public static Brep CreateTrimmedSurface(BrepFace trimSource, Surface surfaceSource)
obsoleteUse version that takes tolerance as input
Constructs a Brep using the trimming information of a brep face and a surface. Surface must be roughly the same shape and in the same location as the trimming brep face.
trimSource (BrepFace)BrepFace which contains trimmingSource brep.
surfaceSource (Surface)Surface that trims of BrepFace will be applied to.
A brep with the shape of surfaceSource and the trims of trimSource or null on failure.

CreateVariationalPatch

#Since v9.0
public static Brep CreateVariationalPatch(IEnumerable<CurveConstraint> edges, IEnumerable<CurveConstraint> internalCurves, IEnumerable<PointConstraint> points, VariationalPatchSettings settings, bool multiThreading, CancellationToken cancelToken, IProgress<double> progress, out VariationalPatchResult results)
Create a patch using variational approach
edges (IEnumerable<Brep.CurveConstraint>)Edges with continuity constraints
internalCurves (IEnumerable<Brep.CurveConstraint>)Internal curves
points (IEnumerable<Brep.PointConstraint>)Internal points
settings (Brep.VariationalPatchSettings)The settings to use while creating the surface
multiThreading (bool)Use multi-threading during the calculation
cancelToken (CancellationToken)The cancellation token.
progress (IProgress<double>)The provider for progress updates.
results (out Brep.VariationalPatchResult)The results of the patching algorithm.
Trimmed surface if successful, null otherwise

CreateVariationalPatch

#Since v9.0
public static Brep CreateVariationalPatch(RhinoDoc doc, IEnumerable<CurveConstraint> edges, IEnumerable<CurveConstraint> internalCurves, IEnumerable<PointConstraint> points, VariationalPatchSettings settings, bool multiThreading, CancellationToken cancelToken, IProgress<double> progress, out VariationalPatchResult results)
Create a patch using variational approach
doc (RhinoDoc)The Rhino document. Use null if not available.
edges (IEnumerable<Brep.CurveConstraint>)Edges with continuity constraints
internalCurves (IEnumerable<Brep.CurveConstraint>)Internal curves
points (IEnumerable<Brep.PointConstraint>)Internal points
settings (Brep.VariationalPatchSettings)The settings to use while creating the surface
multiThreading (bool)Use multi-threading during the calculation
cancelToken (CancellationToken)The cancellation token.
progress (IProgress<double>)The provider for progress updates.
results (out Brep.VariationalPatchResult)The results of the patching algorithm.
Trimmed surface if successful, null otherwise

CullUnused2dCurves

#Since v5.0
public bool CullUnused2dCurves()
Culls 3d curves not referenced by an edge.
true if operation succeeded; false otherwise.

CullUnused3dCurves

#Since v5.0
public bool CullUnused3dCurves()
Culls 2d curves not referenced by a trim.
true if operation succeeded; false otherwise.

CullUnusedEdges

#Since v5.0
public bool CullUnusedEdges()
Culls edges with m_edge_index == -1.
true if operation succeeded; false otherwise.

CullUnusedFaces

#Since v5.0
public bool CullUnusedFaces()
Culls faces with m_face_index == -1.
true if operation succeeded; false otherwise.

CullUnusedLoops

#Since v5.0
public bool CullUnusedLoops()
Culls loops with m_loop_index == -1.
true if operation succeeded; false otherwise.

CullUnusedSurfaces

#Since v5.0
public bool CullUnusedSurfaces()
Culls surfaces not referenced by a face.
true if operation succeeded; false otherwise.

CullUnusedTrims

#Since v5.0
public bool CullUnusedTrims()
Culls trims with m_trim_index == -1.
true if operation succeeded; false otherwise.

CullUnusedVertices

#Since v5.0
public bool CullUnusedVertices()
Culls vertices with m_vertex_index == -1.
true if operation succeeded; false otherwise.

CutUpSurface

#Since v8.12
public static Brep[] CutUpSurface(Surface surface, IEnumerable<Curve> curves, bool flip, double fitTolerance, double keepTolerance)
Splits, or cuts up, a surface. Designed to split the underlying surface of a Brep face with edge curves.
surface (Surface)The surface to cut up.
curves (IEnumerable<Curve>)The edge curves with consistent orientation. The curves should lie on the surface.
flip (bool)If true, the input curves are oriented clockwise.
fitTolerance (double)The fitting tolerance.
keepTolerance (double)Used to decide which face to keep. For best results, should be at least 2 * fitTolerance.
The Brep pieces if successful, an empty array on failure.

CutUpSurface

#Since v8.0
public static Brep[] CutUpSurface(Surface surface, IEnumerable<Curve> curves, bool useEdgeCurves, double tolerance)
Takes a surface and a set of all 3D curves that define a single trimmed surface, and splits the surface with the curves, keeping the piece that uses all of the curves.
Remarks: This function is useful when importing non-3dm files with questionable geometry. It is also a good way to quickly create a trimmed surface that has multiple inner boundaries without having to call split or trim and then select all of the pieces to throw away. If the surface is closed, an attempt will be made to move seams so that they avoid the curves. If that cannot be done, the result may have more than one face. If the surface is closed in both directions, it is possible that the split will result in two faces that use all of the input curves. In this case all curves must be oriented counter-clockwise, with respect to the surface normal, around the desired result. The surface may be extended if it is not large enough to contain the curves. Noisy singularities will be repaired when possible.
surface (Surface)The surface.
curves (IEnumerable<Curve>)The curves.
useEdgeCurves (bool)The 2D trimming curves are made by pulling back the 3D curves using the fitting tolerance. If useEdgeCurves is true, the input 3D curves will be used as the edge curves in the result. Otherwise, the edges will come from pushing up the 2D pullbacks.
tolerance (double)The fitting tolerance. When in doubt, use the document's model absolute tolerance.
The resulting Breps is successful, otherwise an empty array. Note, you may want to join the results into a single Brep.

DataCRC

[CLSCompliant(false)] public uint DataCRC(uint currentRemainder)
Returns a CRC calculated from the information that defines the object. This CRC can be used as a quick way to see if two objects are not identical.
inherited fromGeometryBase
currentRemainder (uint)The current remainder value.
CRC of the information the defines the object.

DeleteAllUserStrings

public void DeleteAllUserStrings()
inherited fromGeometryBase

DeleteUserString

public bool DeleteUserString(string key)
inherited fromGeometryBase
key (string)

DestroyRegionTopology

#Since v7.13
public void DestroyRegionTopology()
Destroys a Brep's region topology information.

Dispose

public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
inherited fromCommonObject

Dispose

protected override void Dispose(bool disposing)
Overridden in order to destroy local display cache information
inherited fromGeometryBase
disposing (bool)

Duplicate

#Since v5.0
[ConstOperation] public override GeometryBase Duplicate()
Copies this brep.
A brep.

DuplicateBrep

#Since v5.0
[ConstOperation] public Brep DuplicateBrep()
Same as Duplicate(), but already performs a cast to a brep.

This cast always succeeds.

A brep.

DuplicateEdgeCurves

#Since v5.0
[ConstOperation] public Curve[] DuplicateEdgeCurves()
Duplicate all the edges of this Brep.
An array of edge curves.

DuplicateEdgeCurves

#ExampleSince v5.0
[ConstOperation] public Curve[] DuplicateEdgeCurves(bool nakedOnly)
Duplicate edges of this Brep.
nakedOnly (bool)If true, then only the "naked" edges are duplicated. If false, then all edges are duplicated.
Array of edge curves on success.

DuplicateNakedEdgeCurves

#Since v5.7
[ConstOperation] public Curve[] DuplicateNakedEdgeCurves(bool nakedOuter, bool nakedInner)
Duplicate naked edges of this Brep.
nakedOuter (bool)Return naked edges that are part of an outer loop.
nakedInner (bool)Return naked edges that are part of an inner loop.
Array of edge curves on success.

DuplicateShallow

public GeometryBase DuplicateShallow()
Constructs a light copy of this object. By "light", it is meant that the same underlying data is used until something is done to attempt to change it. For example, you could have a shallow copy of a very heavy mesh object and the same underlying data will be used when doing things like inspecting the number of faces on the mesh. If you modify the location of one of the mesh vertices, the shallow copy will create a full duplicate of the underlying mesh data and the shallow copy will become a deep copy.
inherited fromGeometryBase
An object of the same type as this object.

This behavior is overridden by implementing classes.

DuplicateSubBrep

#Since v5.0
[ConstOperation] public Brep DuplicateSubBrep(IEnumerable<int> faceIndices)
Copy a subset of this Brep into another Brep.
faceIndices (IEnumerable<int>)array of face indices in this brep to copy. (If any values in faceIndices are out of range or if faceIndices contains duplicates, this function will return null.)
A brep, or null on error.

DuplicateVertices

#Since v5.0
[ConstOperation] public Point3d[] DuplicateVertices()
Duplicate all the corner vertices of this Brep.
An array or corner vertices.

EnsurePrivateCopy

public void EnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
inherited fromCommonObject

ExtendBrepFacesToConnect

#Since v8.9
public static bool ExtendBrepFacesToConnect(BrepFace Face0, int edgeIndex0, BrepFace Face1, int edgeIndex1, double tol, double angleTol, out Brep outBrep0, out Brep outBrep1)
Extends Faces to meet and trims the faces to each other. If input faces intersect without extending, the selection point indicates the side to keep
Face0 (BrepFace)[in] first face to connect
edgeIndex0 (int)[in] edge to extend.
Face1 (BrepFace)[in] second surface
edgeIndex1 (int)[in] edge to extend.
tol (double)[in] tolerance used for intersecting faces and simplifing extension curve
angleTol (double)[in] angle tolerance in radians used for simplifying extendsion curve
outBrep0 (out Brep)[out] first face extended and trimmed to connect with the second face
outBrep1 (out Brep)[out] second face extended and trimmed to connect with the first face
true if valid connection found

ExtendBrepFacesToConnect

#Since v8.9
public static bool ExtendBrepFacesToConnect(BrepFace Face0, Point3d f0_sel_pt, BrepFace Face1, Point3d f1_sel_pt, double tol, double angleTol, out Brep outBrep0, out Brep outBrep1)
Extends Faces to meet and trims the faces to each other. If input faces intersect without extending, the selection point indicates the side to keep
Face0 (BrepFace)[in] first face to connect
f0_sel_pt (Point3d)selection point on first face near the edge to extend.
Face1 (BrepFace)[in] second surface
f1_sel_pt (Point3d)selection point on second face near the edge to extend.
tol (double)[in] tolerance used for intersecting faces and simplifing extension curve
angleTol (double)[in] angle tolerance in radians used for simplifying extendsion curve
outBrep0 (out Brep)[out] first face extended and trimmed to connect with the second face
outBrep1 (out Brep)[out] second face extended and trimmed to connect with the first face
true if valid connection found

FindCoincidentBrepComponents

#Since v6.2
[ConstOperation] public void FindCoincidentBrepComponents(Point3d point, double tolerance, out int[] faces, out int[] edges, out int[] vertices)
Find the indices of all brep faces, edges and vertices that are within tolerance of a test-point.
point (Point3d)Test point.
tolerance (double)Coincidence tolerance.
faces (out int[])Array of BrepFace indices.
edges (out int[])Array of BrepEdge indices.
vertices (out int[])Array of BrepVertex indices.

Flip

#Since v5.0
public void Flip()
Reverses entire brep orientation of all faces.

GetArea

#Since v5.0
[ConstOperation] public double GetArea()
Compute the Area of the Brep. If you want proper Area data with moments and error information, use the AreaMassProperties class.
The area of the Brep.

GetArea

#Since v5.0
[ConstOperation] public double GetArea(double relativeTolerance, double absoluteTolerance)
Compute the Area of the Brep. If you want proper Area data with moments and error information, use the AreaMassProperties class.
relativeTolerance (double)Relative tolerance to use for area calculation.
absoluteTolerance (double)Absolute tolerance to use for area calculation.
The area of the Brep.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(bool accurate)
Bounding box solver. Gets the world axis aligned bounding box for the geometry.
inherited fromGeometryBase
accurate (bool)If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.
The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(Plane plane, out Box worldBox)
Aligned Bounding box solver. Gets the plane aligned bounding box.
inherited fromGeometryBase
plane (Plane)Orientation plane for BoundingBox.
worldBox (out Box)Aligned box in World coordinates.
A BoundingBox in plane coordinates.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(Plane plane)
Aligned Bounding box solver. Gets the plane aligned bounding box.
inherited fromGeometryBase
plane (Plane)Orientation plane for BoundingBox.
A BoundingBox in plane coordinates.

GetBoundingBox

[ConstOperation] public virtual BoundingBox GetBoundingBox(Transform xform)
Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
inherited fromGeometryBase
xform (Transform)Transformation to apply to object prior to the BoundingBox computation. The geometry itself is not modified.
The accurate bounding box of the transformed geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetConnectedComponents

#Since v7.18
public Brep[] GetConnectedComponents()
If this Brep has two or more connected components, then duplicates of the connected components are returned.
An array of connected components, or an empty array.

GetObjectData

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
inherited fromCommonObject
info (SerializationInfo)The System.Runtime.Serialization.SerializationInfo to populate with data.
context (StreamingContext)The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

GetPointInside

#Since v6.19
[ConstOperation] public bool GetPointInside(double tolerance, out Point3d point)
Finds a point inside of a solid Brep.
tolerance (double)Used for intersecting rays and is not necessarily related to the distance from the brep to the found point. When in doubt, use the document's model absolute tolerance.
point (out Point3d)A point inside the solid Brep.
Returns false if the input is not solid and manifold, if the Brep's bounding box is less than 2.0 * tolerance wide, or if no point could be found due to ray shooting or other errors. Otherwise, true is returned.

GetRegions

#Since v5.0
[ConstOperation] public BrepRegion[] GetRegions()
Gets an array containing all regions in this brep.
An array of regions in this brep. This array can be empty, but not null.

GetTangentConnectedComponents

#Since v8.7
[ConstOperation] public Brep[] GetTangentConnectedComponents(double angleTolerance, bool includeMeshes)
If this Brep has two or more components connected by tangent edges, then duplicates of the connected components are returned.
angleTolerance (double)The angle tolerance, in radians, used to determine tangent edges.
includeMeshes (bool)If true, any cached meshes on this Brep are copied to the returned Breps.
An array of tangent edge connected components, or an empty array.

GetUserString

public string GetUserString(string key)
Gets user string from this geometry.
inherited fromGeometryBase
key (string)id used to retrieve the string.
string associated with the key if successful. null if no key was found.

GetUserStrings

public NameValueCollection GetUserStrings()
Gets a copy of all (user key string, user value string) pairs attached to this geometry.
inherited fromGeometryBase
A new collection.

GetVolume

#Since v5.0
[ConstOperation] public double GetVolume()
Compute the Volume of the Brep. If you want proper Volume data with moments and error information, use the VolumeMassProperties class.
The volume of the Brep.

GetVolume

#Since v5.0
[ConstOperation] public double GetVolume(double relativeTolerance, double absoluteTolerance)
Compute the Volume of the Brep. If you want proper Volume data with moments and error information, use the VolumeMassProperties class.
relativeTolerance (double)Relative tolerance to use for area calculation.
absoluteTolerance (double)Absolute tolerance to use for area calculation.
The volume of the Brep.

GetWireframe

#Since v5.0
[ConstOperation] public Curve[] GetWireframe(int density)
Constructs all the Wireframe curves for this Brep.
density (int)Wireframe density. Valid values range between -1 and 99.
An array of Wireframe curves or null on failure.

InsetFaces

#Since v8.8
[ConstOperation] public Brep InsetFaces(IEnumerable<int> faceIndices, double distance, bool loose, bool ignoreSeams, bool creaseCorners, double tolerance, double angleTolerance)
Individually insets faces of a brep by offsetting the faces outer edges inward and inner edges out then splitting the face with the offset curves.
faceIndices (IEnumerable<int>)the indices of the faces to inset
distance (double)The distance to offset along the face
loose (bool)If true, offset by moving edit points otherwise offset within tolerance.
ignoreSeams (bool)If true, the seam edges are not offset and adjacent edges are extended to meet the seam. Otherwise offset normally.
creaseCorners (bool)If true, splitting curves will be made between the creases on edge curves and creases on the inset curves.
tolerance (double)The fitting tolerance for the offset. When in doubt, use the document's absolute tolerance.
angleTolerance (double)The angle tolerance in radians for identifying creases when creasing corners. When in doubt, use the document's angle tolerance.
The brep with inset faces on success. Null on error.

IsBox

#Since v7.10
[ConstOperation] public bool IsBox()
Verifies a Brep is in the form of a solid box.
true if the Brep is a solid box, false otherwise.

IsBox

#Since v7.10
[ConstOperation] public bool IsBox(double tolerance)
Verifies a Brep is in the form of a solid box.
tolerance (double)The tolerance used to determine if faces are planar and to compare face normals.
true if the Brep is a solid box, false otherwise.

IsDuplicate

#Since v5.0
[ConstOperation] public bool IsDuplicate(Brep other, double tolerance)
See if this and other are same brep geometry.
other (Brep)other brep.
tolerance (double)tolerance to use when comparing control points.
true if breps are the same.

IsExtrusion

#Since v9.0
[ConstOperation] public bool IsExtrusion()
Determines if the Brep is a portion of an extrusion within RhinoMath.ZeroTolerance.
true if the Brep is an extrusion.

IsExtrusion

#Since v9.0
[ConstOperation] public bool IsExtrusion(double tolerance)
Determines if the Brep is a portion of an extrusion within a given tolerance.
tolerance (double)tolerance to use when checking.
true if the Brep is an extrusion.

IsOrientedManifold

#Since v8.26
public bool IsOrientedManifold(out bool isOriented, out bool hasBoundary)
Test a Brep to see if it is an oriented manifold. Non manifold Breps have at least one edge that is shared among three or more faces.
isOriented (out bool)Set to true if the Brep is an oriented manifold, or false if the Brep is not an oriented manifold.
hasBoundary (out bool)Set to true if the Brep has a boundary edge, or false if the Brep does not have a boundary edge.
If the Brep is a manifold, true is returned. Otherwise false is returned.

IsPointInside

#Since v5.0
[ConstOperation] public bool IsPointInside(Point3d point, double tolerance, bool strictlyIn)
Determines if point is inside a Brep. This question only makes sense when the brep is a closed and manifold. This function does not check for closed or manifold, so result is not valid in those cases. Intersects a line through point with brep, finds the intersection point Q closest to point, and looks at face normal at Q. If the point Q is on an edge or the intersection is not transverse at Q, then another line is used.
point (Point3d)3d point to test.
tolerance (double)3d distance tolerance used for intersection and determining strict inclusion. A good default is RhinoMath.SqrtEpsilon.
strictlyIn (bool)if true, point is in if inside brep by at least tolerance. if false, point is in if truly in or within tolerance of boundary.
true if point is in, false if not.

IsValidGeometry

#Since v5.0
[ConstOperation] public bool IsValidGeometry(out string log)
Expert user function that tests the brep to see if its geometry information is valid. The value of brep.IsValidTopology() must be true before brep.IsValidGeometry() can be safely called.
log (out string)If the brep geometry is not valid, then a brief description of the problem in English is assigned to this out parameter. The information is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Otherwise, string.Empty.
A value that indicates whether the geometry is valid.

IsValidTolerancesAndFlags

#Since v5.0
[ConstOperation] public bool IsValidTolerancesAndFlags(out string log)
Expert user function that tests the brep to see if its tolerances and flags are valid. The values of brep.IsValidTopology() and brep.IsValidGeometry() must be true before brep.IsValidTolerancesAndFlags() can be safely called.
log (out string)If the brep tolerance or flags are not valid, then a brief description of the problem in English is assigned to this out parameter. The information is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Otherwise, string.Empty.
A value that indicates

IsValidTopology

#Since v5.0
[ConstOperation] public bool IsValidTopology(out string log)
Tests the brep to see if its topology information is valid.
log (out string)If the brep topology is not valid, then a brief English description of the problem is appended to the log. The information appended to log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool.
true if the topology is valid; false otherwise.

IsValidWithLog

public bool IsValidWithLog(out string log)
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
inherited fromCommonObject
log (out string)A textual log. This out parameter is assigned during this call.
true if this object is valid; false otherwise.

Join

#Since v5.0
public bool Join(Brep otherBrep, double tolerance, bool compact)
If any edges of this brep overlap edges of otherBrep, merge a copy of otherBrep into this brep joining all edges that overlap within tolerance.
Remarks: if no edges overlap, this brep is unchanged. otherBrep is copied if it is merged with this, and otherBrep is always unchanged Use this to join a list of breps in a series. When joining multiple breps in series, compact should be set to false. Call compact on the last Join.
otherBrep (Brep)Brep to be added to this brep.
tolerance (double)3d distance tolerance for detecting overlapping edges.
compact (bool)if true, set brep flags and tolerances, remove unused faces and edges.
true if any edges were joined.

JoinBreps

#Since v8.5
public static Brep[] JoinBreps(IEnumerable<Brep> brepsToJoin, double tolerance, double angleTolerance, out List<int[]> indexMap)
Joins the breps in the input array at any overlapping edges to form as few as possible resulting breps. There may be more than one brep in the result array.
brepsToJoin (IEnumerable<Brep>)A list, an array or any enumerable set of breps to join.
tolerance (double)3d distance tolerance for detecting overlapping edges. When in doubt, use the document's model absolute tolerance.
angleTolerance (double)Angle tolerance, in radians, used for merging edges. When in doubt, use the document's model angle tolerance.
indexMap (out List<int[]>)List of integer arrays, one for each joined result, containing all input Brep indices that went into making each result. Note, this can be null.
New joined breps on success, null on failure.

JoinBreps

#Since v8.3
public static Brep[] JoinBreps(IEnumerable<Brep> brepsToJoin, double tolerance, double angleTolerance)
Joins the breps in the input array at any overlapping edges to form as few as possible resulting breps. There may be more than one brep in the result array.
brepsToJoin (IEnumerable<Brep>)A list, an array or any enumerable set of breps to join.
tolerance (double)3d distance tolerance for detecting overlapping edges. When in doubt, use the document's model absolute tolerance.
angleTolerance (double)Angle tolerance, in radians, used for merging edges. When in doubt, use the document's model angle tolerance.
New joined breps on success, null on failure.

JoinBreps

#Since v5.0
public static Brep[] JoinBreps(IEnumerable<Brep> brepsToJoin, double tolerance)
Joins the breps in the input array at any overlapping edges to form as few as possible resulting breps. There may be more than one brep in the result array.
brepsToJoin (IEnumerable<Brep>)A list, an array or any enumerable set of breps to join.
tolerance (double)3d distance tolerance for detecting overlapping edges.
New joined breps on success, null on failure.

JoinEdges

#Since v6.0
public bool JoinEdges(int edgeIndex0, int edgeIndex1, double joinTolerance, bool compact)
Joins two naked edges, or edges that are coincident or close together.
edgeIndex0 (int)The first edge index.
edgeIndex1 (int)The second edge index.
joinTolerance (double)The join tolerance.
compact (bool)If joining more than one edge pair and want the edge indices of subsequent pairs to remain valid, set to false. But then call Brep.Compact() on the final result.
true if successful, false otherwise.

JoinNakedEdges

#Since v5.0
public int JoinNakedEdges(double tolerance)
Joins naked edge pairs within the same brep that overlap within tolerance.
tolerance (double)The tolerance value.
number of joins made.

MakeDeformable

public bool MakeDeformable()
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
inherited fromGeometryBase
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

MakeValidForV2

#Since v6.0
public bool MakeValidForV2()
No support is available for this function.

Expert user function that converts all geometry in Brep to NURB form.

Remarks: Don't call this function unless you know exactly what you are doing.

MemoryEstimate

[CLSCompliant(false)] [ConstOperation] public uint MemoryEstimate()
Computes an estimate of the number of bytes that this object is using in memory.
inherited fromGeometryBase
An estimated memory footprint.

MergeBreps

#Since v5.0
public static Brep MergeBreps(IEnumerable<Brep> brepsToMerge, double tolerance)
Combines two or more breps into one. A merge is like a boolean union that keeps the inside pieces. This function creates non-manifold Breps which in general are unusual in Rhino. You may want to consider using JoinBreps or CreateBooleanUnion functions instead.
brepsToMerge (IEnumerable<Brep>)must contain more than one Brep.
tolerance (double)the tolerance to use when merging.
Single merged Brep on success. Null on error.

MergeCoplanarFaces

#Since v6.10
public bool MergeCoplanarFaces(double tolerance, double angleTolerance)
Merges adjacent coplanar faces into single faces.
tolerance (double)Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance (double)Angle tolerance, in radians, for determining when faces are parallel. When in doubt, use the document's ModelAngleToleranceRadians property.
true if faces were merged, false if no faces were merged.

MergeCoplanarFaces

#Since v5.0
public bool MergeCoplanarFaces(double tolerance)
Merges adjacent coplanar faces into single faces.
tolerance (double)Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
true if faces were merged, false if no faces were merged.

MergeCoplanarFaces

#Since v7.19
public bool MergeCoplanarFaces(int faceIndex, double tolerance, double angleTolerance)
Merges coplanar faces adjacent to Brep face into a single face.
faceIndex (int)The index of the Brep face to search.
tolerance (double)Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance (double)Angle tolerance, in radians, for determining when faces are parallel. When in doubt, use the document's ModelAngleToleranceRadians property.
true if faces were merged, false if no faces were merged.

MergeCoplanarFaces

#Since v7.19
public bool MergeCoplanarFaces(int faceIndex0, int faceIndex1, double tolerance, double angleTolerance)
Merges two coplanar, adjacent Brep faces into a single face.
faceIndex0 (int)The index of the first Brep face.
faceIndex1 (int)The index of the second Brep face.
tolerance (double)Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance (double)Angle tolerance, in radians, for determining when faces are parallel. When in doubt, use the document's ModelAngleToleranceRadians property.
true if faces were merged, false if no faces were merged.

MergeSurfaces

#Since v6.0
public static Brep MergeSurfaces(Brep brep0, Brep brep1, double tolerance, double angleToleranceRadians, Point2d point0, Point2d point1, double roundness, bool smooth)
Merges two surfaces into one surface at untrimmed edges. Both surfaces must be untrimmed and share an edge.
brep0 (Brep)The first single-face Brep to merge.
brep1 (Brep)The second single-face Brep to merge.
tolerance (double)Surface edges must be within this tolerance for the two surfaces to merge.
angleToleranceRadians (double)Edge must be within this angle tolerance in order for contiguous edges to be combined into a single edge.
point0 (Point2d)2D pick point on the first single-face Brep. The value can be unset.
point1 (Point2d)2D pick point on the second single-face Brep. The value can be unset.
roundness (double)Defines the roundness of the merge. Acceptable values are between 0.0 (sharp) and 1.0 (smooth).
smooth (bool)The surface will be smooth. This makes the surface behave better for control point editing, but may alter the shape of both surfaces.
The merged Brep if successful, null if not successful.

MergeSurfaces

#Since v6.0
public static Brep MergeSurfaces(Brep brep0, Brep brep1, double tolerance, double angleToleranceRadians)
Merges two surfaces into one surface at untrimmed edges. Both surfaces must be untrimmed and share an edge.
brep0 (Brep)The first single-face Brep to merge.
brep1 (Brep)The second single-face Brep to merge.
tolerance (double)Surface edges must be within this tolerance for the two surfaces to merge.
angleToleranceRadians (double)Edge must be within this angle tolerance in order for contiguous edges to be combined into a single edge.
The merged Brep if successful, null if not successful.

MergeSurfaces

#Since v6.0
public static Brep MergeSurfaces(Surface surface0, Surface surface1, double tolerance, double angleToleranceRadians)
Merges two surfaces into one surface at untrimmed edges.
surface0 (Surface)The first surface to merge.
surface1 (Surface)The second surface to merge.
tolerance (double)Surface edges must be within this tolerance for the two surfaces to merge.
angleToleranceRadians (double)Edge must be within this angle tolerance in order for contiguous edges to be combined into a single edge.
The merged surfaces as a Brep if successful, null if not successful.

NonConstOperation

protected override void NonConstOperation()
Destroy cache handle
inherited fromGeometryBase

OnSwitchToNonConst

protected override void OnSwitchToNonConst()
Is called when a non-constant operation occurs.
inherited fromGeometryBase

PrepareForBooleans

#Since v9.0
public bool PrepareForBooleans()
Prepares this Brep for a Boolean or intersection operation by applying the same cleanup Rhino performs when a Brep is added to the document. Breps that have never been added to a document can fail these operations, or return unexpected results, without it.
Remarks: Because kinked surfaces can cause problems downstream, Rhino, by default, splits kinked surfaces when adding Breps to the document. So this method splits all kinky Brep faces. Also, because inward pointing face normals for solid Breps can cause problems, Rhino flips inward pointing normals for solids when adding Breps to the document. So this method checks the solid orientation and, if inward, flips the face normals.

This method modifies the Brep in place. If it returns false, then the Brep was modified but is no longer valid. Duplicate the Brep first if you need to keep the original, and note that flipping an inward pointing solid discards a deliberately inside out orientation.

true if the Brep is ready to use, false otherwise.

PrepareForBooleans

#Since v9.0
public bool PrepareForBooleans(double angleToleranceRadians)
Prepares this Brep for a Boolean or intersection operation by applying the same cleanup Rhino performs when a Brep is added to the document. Breps that have never been added to a document can fail these operations, or return unexpected results, without it.
Remarks: Because kinked surfaces can cause problems downstream, Rhino, by default, splits kinked surfaces when adding Breps to the document. So this method splits all kinky Brep faces. Also, because inward pointing face normals for solid Breps can cause problems, Rhino flips inward pointing normals for solids when adding Breps to the document. So this method checks the solid orientation and, if inward, flips the face normals.

This method modifies the Brep in place. If it returns false, then the Brep was modified but is no longer valid. Duplicate the Brep first if you need to keep the original, and note that flipping an inward pointing solid discards a deliberately inside out orientation.

angleToleranceRadians (double)Angle tolerance, in radians, used to split kinky faces. When in doubt, use the document's model angle tolerance.
true if the Brep is ready to use, false otherwise.

PushPullExtend

#Since v8.16
public Brep PushPullExtend(int faceIndex, Transform transform, double tolerance)
If the brep.Faces[faceIndex] is planar, and all the adjacent faces are planar, this function transforms brep.Faces[faceIndex] with the transform parameter and recomputes the adjacent faces. See the PushPull commands extend mode.
faceIndex (int)The index of the face being transformed
transform (Transform)The transformation
tolerance (double)The tolerance for planarity checks. When in doubt, use the document's absolute tolerance.
The brep with the transformed face on success. Null on error.

RebuildTrimsForV2

#Since v5.0
public void RebuildTrimsForV2(BrepFace face, NurbsSurface nurbsSurface)
No support is available for this function.

Expert user function used by MakeValidForV2 to convert trim curves from one surface to its NURBS form. After calling this function, you need to change the surface of the face to a NurbsSurface.

Remarks: Don't call this function unless you know exactly what you are doing.
face (BrepFace)Face whose underlying surface has a parameterization that is different from its NURBS form.
nurbsSurface (NurbsSurface)NURBS form of the face's underlying surface.

RemoveFins

#Since v7.0
public bool RemoveFins()
Recursively removes any Brep face with a naked edge. This function is only useful for non-manifold Breps.
true if successful, false if everything is removed or if the result has any Brep edges with more than two Brep trims.

RemoveHoles

#Since v6.0
[ConstOperation] public Brep RemoveHoles(double tolerance)
Remove all inner loops, or holes, in a Brep.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
The Brep without holes if successful, null otherwise.

RemoveHoles

#Since v6.8
[ConstOperation] public Brep RemoveHoles(IEnumerable<ComponentIndex> loops, double tolerance)
Removes inner loops, or holes, in a Brep.
loops (IEnumerable<ComponentIndex>)A list of BrepLoop component indexes, where BrepLoop.LoopType == Rhino.Geometry.BrepLoopType.Inner.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
The Brep without holes if successful, null otherwise.

Repair

#Since v6.0
public bool Repair(double tolerance)
Fills in missing or fixes incorrect component information from a Brep. Useful when reading Brep information from other file formats that do not provide as complete of a Brep definition as required by Rhino.
tolerance (double)The repair tolerance. When in doubt, use the document's model absolute tolerance.
True on success.

ReplaceEdge

#Since v9.0
[ConstOperation] public Brep ReplaceEdge(IEnumerable<int> edgeIndices, BrepReplaceEdgeMethod method, Curve replacementCurve, double tolerance)
Re-trims the given edges of this single-face Brep, replacing each deleted edge with new boundary geometry. This is the SDK equivalent of the ReplaceEdge command.
edgeIndices (IEnumerable<int>)The indices of the edges to replace.
method (BrepReplaceEdgeMethod)How the deleted edges are re-trimmed.
replacementCurve (Curve)The curve used to re-trim when method is BrepReplaceEdgeMethod.Curve; ignored (may be null) otherwise.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
The modified Brep if successful, null otherwise (for example, if this Brep has more than one face).

Rotate

public bool Rotate(double angleRadians, Vector3d rotationAxis, Point3d rotationCenter)
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
inherited fromGeometryBase
angleRadians (double)Angle of rotation in radians.
rotationAxis (Vector3d)Direction of the axis of rotation.
rotationCenter (Point3d)Point on the axis of rotation.
true if geometry successfully rotated.

Scale

public bool Scale(double scaleFactor)
Scales the object by the specified factor. The scale is centered at the origin.
inherited fromGeometryBase
scaleFactor (double)The uniform scaling factor.
true if geometry successfully scaled.

SetTolerancesBoxesAndFlags

#Since v6.0
public void SetTolerancesBoxesAndFlags()
Set tolerances and flags in a Brep.

SetTolerancesBoxesAndFlags

#Since v6.0
public void SetTolerancesBoxesAndFlags(bool bLazy, bool bSetVertexTolerances, bool bSetEdgeTolerances, bool bSetTrimTolerances, bool bSetTrimIsoFlags, bool bSetTrimTypeFlags, bool bSetLoopTypeFlags, bool bSetTrimBoxes)
Set tolerances and flags in a Brep.
bLazy (bool)If true, only flags and tolerances that are not set will be calculated.
bSetVertexTolerances (bool)Set true to compute BrepVertex tolerances.
bSetEdgeTolerances (bool)Set true to compute BrepEdge tolerances.
bSetTrimTolerances (bool)Set true to compute BrepTrim tolerances.
bSetTrimIsoFlags (bool)Set true to compute BrepTrim.IsoStatus values.
bSetTrimTypeFlags (bool)Set true to compute BrepTrim.TrimType values.
bSetLoopTypeFlags (bool)Set true to compute BrepLoop.BrepLoopType values.
bSetTrimBoxes (bool)Set true to compute BrepTrim bounding boxes.

SetTrimIsoFlags

#Since v5.4
public void SetTrimIsoFlags()
This function can be used to set the BrepTrim::m_iso flag. It is intended to be used when creating a Brep from a definition that does not include compatible parameter space type information.

SetUserString

public bool SetUserString(string key, string value)
Attach a user string (key,value combination) to this geometry.
inherited fromGeometryBase
key (string)id used to retrieve this string.
value (string)string associated with key.
true on success.

SetVertices

#Since v5.4
public void SetVertices()
This function can be used to compute vertex information for a b-rep when everything but the Vertices array is properly filled in. It is intended to be used when creating a Brep from a definition that does not include explicit vertex information.

Split

#Since v5.0
[ConstOperation] public Brep[] Split(Brep cutter, double intersectionTolerance, out bool toleranceWasRaised)
Splits a Brep into pieces using a Brep as a cutter.
cutter (Brep)The Brep to use as a cutter.
intersectionTolerance (double)The tolerance with which to compute intersections.
toleranceWasRaised (out bool)Set to true if the split failed at intersectionTolerance but succeeded when the tolerance was increased to twice intersectionTolerance.
A new array of Breps. This array can be empty.

Split

#Since v5.0
[ConstOperation] public Brep[] Split(Brep cutter, double intersectionTolerance)
Splits a Brep into pieces using a Brep as a cutter.
cutter (Brep)The Brep to use as a cutter.
intersectionTolerance (double)The tolerance with which to compute intersections.
A new array of Breps. This array can be empty.

Split

#Since v6.13
[ConstOperation] public Brep[] Split(IEnumerable<Brep> cutters, double intersectionTolerance)
Splits a Brep into pieces using Breps as cutters.
cutters (IEnumerable<Brep>)One or more Breps to use as cutters.
intersectionTolerance (double)The tolerance with which to compute intersections.
A new array of Breps. This array can be empty.

Split

#Since v6.13
[ConstOperation] public Brep[] Split(IEnumerable<Curve> cutters, double intersectionTolerance)
Splits a Brep into pieces using curves, at least partially on the Brep, as cutters.
cutters (IEnumerable<Curve>)The splitting curves. Only the portion of the curve on the Brep surface will be used for cutting.
intersectionTolerance (double)The tolerance with which to compute intersections.
A new array of Breps. This array can be empty.

Split

#Since v6.13
[ConstOperation] public Brep[] Split(IEnumerable<GeometryBase> cutters, Vector3d normal, bool planView, double intersectionTolerance)
Splits a Brep into pieces using a combination of curves, to be extruded, and Breps as cutters.
Remarks: A Curve in cutters is extruded to produce a surface to use as a cutter. The extrusion direction is chosen, as in the Rhino Split command, based on the properties of the active view. In particular the construction plane Normal and whether the active view is a plan view, a parallel projection with construction plane normal as the view direction. If planView is false and the curve is planar then the curve is extruded perpendicular to the curve, otherwise the curve is extruded in the normal direction.
cutters (IEnumerable<GeometryBase>)The curves, surfaces, faces and Breps to be used as cutters. Any other geometry is ignored.
normal (Vector3d)A construction plane normal, used in deciding how to extrude a curve into a cutter.
planView (bool)Set true if the assume view is a plan, or parallel projection, view.
intersectionTolerance (double)The tolerance with which to compute intersections.
A new array of Breps. This array can be empty.

SplitDisjointPieces

#Since v8.15
public static Brep[] SplitDisjointPieces(Brep brep, out List<int[]> indexMap)
Separates, or splits, a disjoint Brep into separate Breps.
brep (Brep)The disjoint Brep to separate.
indexMap (out List<int[]>)List of integer arrays, one for each result, containing all input Brep face indices that went into making each result. Note, this can be null.
An array of Brep pieces if successful, otherwise an empty array if the Brep is not disjoint or on error.

SplitDisjointPieces

#Since v8.15
public static Brep[] SplitDisjointPieces(Brep brep)
Separates, or splits, a disjoint Brep into separate Breps.
brep (Brep)The disjoint Brep to separate.
An array of Brep pieces if successful, otherwise an empty array if the Brep is not disjoint or on error.

Standardize

#Since v5.0
public void Standardize()
Standardizes all trims, edges, and faces in the brep. After standardizing, there may be unused curves and surfaces in the brep. Call Brep.Compact to remove these unused curves and surfaces.

ToJSON

public string ToJSON(SerializationOptions options)
Create a JSON string representation of this object
inherited fromCommonObject
options (SerializationOptions)

Transform

public bool Transform(Transform xform)
Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
inherited fromGeometryBase
xform (Transform)Transformation to apply to geometry.
true if geometry successfully transformed.

TransformComponent

#Since v6.0
public bool TransformComponent(IEnumerable<ComponentIndex> components, Transform xform, double tolerance, double timeLimit, bool useMultipleThreads)
Transform an array of Brep components, bend neighbors to match, and leave the rest fixed.
components (IEnumerable<ComponentIndex>)The Brep components to transform.
xform (Transform)The transformation to apply.
tolerance (double)The desired fitting tolerance to use when bending faces that share edges with both fixed and transformed components.
timeLimit (double)If the deformation is extreme, it can take a long time to calculate the result. If time_limit > 0, then the value specifies the maximum amount of time in seconds you want to spend before giving up.
useMultipleThreads (bool)True if multiple threads can be used.
true if successful, false otherwise.

Translate

public bool Translate(double x, double y, double z)
Translates the object along the specified vector.
inherited fromGeometryBase
x (double)The X component.
y (double)The Y component.
z (double)The Z component.
true if geometry successfully translated.

Translate

public bool Translate(Vector3d translationVector)
Translates the object along the specified vector.
inherited fromGeometryBase
translationVector (Vector3d)A moving vector.
true if geometry successfully translated.

Trim

#Since v5.0
[ConstOperation] public Brep[] Trim(Brep cutter, double intersectionTolerance)
Trims a brep with an oriented cutter. The parts of the brep that lie inside (opposite the normal) of the cutter are retained while the parts to the outside (in the direction of the normal) are discarded. If the Cutter is closed, then a connected component of the Brep that does not intersect the cutter is kept if and only if it is contained in the inside of cutter. That is the region bounded by cutter opposite from the normal of cutter, If cutter is not closed all these components are kept.
cutter (Brep)A cutting brep.
intersectionTolerance (double)A tolerance value with which to compute intersections.
This Brep is not modified, the trim results are returned in an array.

Trim

#Since v5.0
[ConstOperation] public Brep[] Trim(Plane cutter, double intersectionTolerance)
Trims a Brep with an oriented cutter. The parts of Brep that lie inside (opposite the normal) of the cutter are retained while the parts to the outside ( in the direction of the normal ) are discarded. A connected component of Brep that does not intersect the cutter is kept if and only if it is contained in the inside of Cutter. That is the region bounded by cutter opposite from the normal of cutter, or in the case of a Plane cutter the half space opposite from the plane normal.
cutter (Plane)A cutting plane.
intersectionTolerance (double)A tolerance value with which to compute intersections.
This Brep is not modified, the trim results are returned in an array.

TryConvertBrep

#Since v5.0
public static Brep TryConvertBrep(GeometryBase geometry)
Attempts to convert a generic Geometry object into a Brep.
geometry (GeometryBase)Geometry to convert, not all types of GeometryBase can be represented by BReps.
Brep if a brep form could be created or null if this is not possible. If geometry was of type Brep to begin with, the same object is returned, i.e. it is not duplicated.

TryGetExtrusion

#Since v9.0
[ConstOperation] public bool TryGetExtrusion(out Extrusion extrusion, double tolerance)
Tests a Brep to see if it is an extrusion and returns the extrusion.
extrusion (out Extrusion)On success, the extrusion parameters are filled in.
tolerance (double)tolerance to use when checking.
true if the Brep is a portion of an extrusion.

TryGetExtrusion

#Since v9.0
[ConstOperation] public bool TryGetExtrusion(out Extrusion extrusion)
Tests a Brep to see if it is an extrusion within RhinoMath.ZeroTolerance and returns the extrusion.
extrusion (out Extrusion)On success, the extrusion parameters are filled in.
true if the Brep is an extrusion.

UnjoinEdges

#Since v6.0
[ConstOperation] public Brep[] UnjoinEdges(IEnumerable<int> edgesToUnjoin)
Un-joins, or separates, edges within the Brep. Note, seams in closed surfaces will not separate.
edgesToUnjoin (IEnumerable<int>)The indices of the Brep edges to un-join.
This Brep is not modified, the trim results are returned in an array.

UntrimFace

#Since v9.0
[ConstOperation] public Brep UntrimFace(int faceIndex, double tolerance)
Untrims a face completely, expanding it back to its underlying surface: the outer boundary is untrimmed and all inner loops (holes) are removed.
faceIndex (int)The index of the face to untrim.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
The untrimmed Brep if successful, null otherwise.

UntrimOuterLoop

#Since v9.0
[ConstOperation] public Brep UntrimOuterLoop(int faceIndex)
Untrims the outer boundary of a face, expanding the face back to the boundary of its underlying surface. Inner loops (holes) are left in place. The outer boundary is only untrimmed when all of its edges are naked; otherwise the operation fails to avoid corrupting adjacent faces.
faceIndex (int)The index of the face to untrim.
The untrimmed Brep if successful, null otherwise.

WireCut

#Since v9.0
public bool WireCut(Curve openCurve, Vector3d direction, Vector3d trimDirection, double depth, double trimDepth, bool bothSides, bool trimBothSides, double tolerance, bool splitKinkyFaces, out Brep[] keptPieces, out Brep[] cutAwayPieces)
Cuts this solid brep with a single open cutting curve. The curve is extruded along direction into a sheet, then along trimDirection to close the sheet into a solid cutter.
openCurve (Curve)Open cutting curve.
direction (Vector3d)First extrusion direction (the wire sweep).
trimDirection (Vector3d)Second extrusion direction that closes the cutter.
depth (double)Depth along direction. RhinoMath.UnsetValue or a value <= 0 cuts through and skips trim capping.
trimDepth (double)Depth along trimDirection. Ignored when cutting through.
bothSides (bool)Extrude both ways along direction.
trimBothSides (bool)Extrude both ways along trimDirection.
tolerance (double)Intersection and boolean tolerance, typically the document absolute tolerance.
splitKinkyFaces (bool)Split output pieces along creases.
keptPieces (out Brep[])Pieces that remain after the cut (boolean difference side).
cutAwayPieces (out Brep[])The cut-away pieces (boolean intersection side).
true if successful.

WireCut

#Since v9.0
public bool WireCut(IEnumerable<Curve> closedCurves, Vector3d direction, double depth, bool bothSides, double tolerance, bool splitKinkyFaces, out Brep[] keptPieces, out Brep[] cutAwayPieces)
Cuts this solid brep with extrusions of closed planar curves
closedCurves (IEnumerable<Curve>)Closed cutting curves. All are extruded along the same direction.
direction (Vector3d)Extrusion direction of the cutters.
depth (double)Extrusion depth. RhinoMath.UnsetValue or a value <= 0 cuts all the way through.
bothSides (bool)Extrude the cutters to both sides of the curves. Ignored when cutting through.
tolerance (double)Intersection and boolean tolerance, typically the document absolute tolerance.
splitKinkyFaces (bool)Split output pieces along creases.
keptPieces (out Brep[])Pieces that remain after the cut (boolean difference side).
cutAwayPieces (out Brep[])The cut-away pieces (boolean intersection side).
true if successful.