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

Constructors

Brep

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

Brep

#
Protected constructor used in serialization.
protected Brep()

Properties

Curves2D

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

Curves3D

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

Disposed

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

Edges

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

Faces

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

HasBrepForm

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

HasRegionTopology

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

HasUserData

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

IsDeformable

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

IsDocumentControlled

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.
public sealed override bool IsDocumentControlled { get; }
inherited fromGeometryBase

IsManifold

#Since v5.0
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.
public bool IsManifold { get; }

IsShallowDuplicate

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)
public bool IsShallowDuplicate { get; }
inherited fromGeometryBase

IsSolid

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

IsSurface

#Since v5.0
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.

public bool IsSurface { get; }

IsValid

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

Loops

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

ObjectType

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

SolidOrientation

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

Surfaces

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

Trims

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

UserData

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

UserDictionary

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

UserStringCount

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

Vertices

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

Methods

AddEdgeCurve

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

AddSurface

#Since v5.0
Adds a 3D surface used by BrepFace.
public int AddSurface(
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
Add a 2d curve used by the brep trims
public int AddTrimCurve(
curve
)
Index used to reference this geometry in the trimming curve list

Append

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

CapPlanarHoles

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

ChangeSeam

#Since v6.4
Change the seam of a closed trimmed surface.
public static Brep ChangeSeam(
face,
A Brep face with a closed underlying surface.
direction,
The parameter direction (0 = U, 1 = V). The face's underlying surface must be closed in this direction.
parameter,
The parameter at which to place the seam.
tolerance
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
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.
[ConstOperation] public bool ClosestPoint(
testPoint,
Base point to project to surface.
out Point3d
closestPoint,
Location of the closest Brep point.
ci,
Component index of the Brep component that contains the closest point. Possible component index types are ComponentIndexType.BrepEdge and ComponentIndexType.BrepFace.
out double
s,
If ci.ComponentIndexType == ComponentIndexType.BrepEdge, then s is the parameter of the closest edge point.
out double
t,
If ci.ComponentIndexType == ComponentIndexType.BrepFace, then (s,t) is the parameter of the closest face point.
maximumDistance,
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
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
Finds a point on the brep that is closest to testPoint.
[ConstOperation] public Point3d ClosestPoint(
testPoint
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
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.
public void Compact()

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.
[ConstOperation] public ComponentIndex ComponentIndex()
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

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

CopyTrimCurves

#Since v5.0
Copy all trims from a Brep face onto a surface.
public static Brep CopyTrimCurves(
trimSource,
Brep face which defines the trimming curves.
surfaceSource,
The surface to trim.
tolerance
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
Creates a brep representation of the sphere with two similar trimmed NURBS surfaces, and no singularities.
public static Brep CreateBaseballSphere(
center,
The center of the sphere.
radius,
The radius of the sphere.
tolerance
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
Makes a curve blend between points on two surface edges. The blend will be tangent to the surfaces and perpendicular to the edges.
public static Curve CreateBlendShape(
face0,
First face to blend from.
edge0,
First edge to blend from.
t0,
Location on first edge for first end of blend curve.
rev0,
If false, edge0 will be used in its natural direction. If true, edge0 will be used in the reversed direction.
continuity0,
Continuity for the blend at the start.
face1,
Second face to blend from.
edge1,
Second edge to blend from.
t1,
Location on second edge for second end of blend curve.
rev1,
If false, edge1 will be used in its natural direction. If true, edge1 will be used in the reversed direction.
continuity1
>Continuity for the blend at the end.
)
The blend curve on success. null on failure

CreateBlendSurface

#Since v6.0
Makes a surface blend between two surface edges.
public static Brep[] CreateBlendSurface(
face0,
First face to blend from.
edge0,
First edge to blend from.
domain0,
The domain of edge0 to use.
rev0,
If false, edge0 will be used in its natural direction. If true, edge0 will be used in the reversed direction.
continuity0,
Continuity for the blend at the start.
face1,
Second face to blend from.
edge1,
Second edge to blend from.
domain1,
The domain of edge1 to use.
rev1,
If false, edge1 will be used in its natural direction. If true, edge1 will be used in the reversed direction.
continuity1
Continuity for the blend at the end.
)
Remarks: Same as the overload that takes BlendSurfaceOptions, with the default options except for continuity, and the absolute tolerance of the active document.
Array of Breps if successful.

CreateBlendSurface

#
Makes the surface blend the BlendSrf command makes between two surface edges.
public static Brep[] CreateBlendSurface(
face0,
First face to blend from.
edge0,
Edge of face0 to blend from.
domain0,
The part of edge0 to use, in edge0's parameters.
rev0,
If false, edge0 will be used in its natural direction. If true, edge0 will be used in the reversed direction.
face1,
Second face to blend from.
edge1,
Edge of face1 to blend from.
domain1,
The part of edge1 to use, in edge1's parameters.
rev1,
If false, edge1 will be used in its natural direction. If true, edge1 will be used in the reversed direction.
options,
Continuity and the other BlendSrf settings.
tolerance
Fitting tolerance. BlendSrf uses the document's absolute tolerance.
)
Remarks: When the whole of two closed edges is used, the blend is closed, and the seams and directions are matched the way BlendSrf matches them automatically. rev0 and rev1 are not used in that case.
Array of Breps if successful, an empty array if not.

CreateBooleanDifference

#Since v6.0
Compute the Solid Difference of two Breps.
public static Brep[] CreateBooleanDifference(
firstBrep,
First Brep for boolean difference.
secondBrep,
Second Brep for boolean difference.
tolerance,
Tolerance to use for difference operation.
manifoldOnly
If true, non-manifold input breps are ignored.
)
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.
An array of Brep results or null on failure.

CreateBooleanDifference

#Since v5.0
Compute the Solid Difference of two Breps.
public static Brep[] CreateBooleanDifference(
firstBrep,
First Brep for boolean difference.
secondBrep,
Second Brep for boolean difference.
tolerance
Tolerance to use for difference operation.
)
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.
An array of Brep results or null on failure.

CreateBooleanDifference

#ExampleSince v6.0
Compute the Solid Difference of two sets of Breps.
public static Brep[] CreateBooleanDifference(
firstSet,
First set of Breps (the set to subtract from).
secondSet,
Second set of Breps (the set to subtract).
tolerance,
Tolerance to use for difference operation.
manifoldOnly
If true, non-manifold input breps are ignored.
)
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.
An array of Brep results or null on failure.

CreateBooleanDifference

#ExampleSince v5.0
Compute the Solid Difference of two sets of Breps.
public static Brep[] CreateBooleanDifference(
firstSet,
First set of Breps (the set to subtract from).
secondSet,
Second set of Breps (the set to subtract).
tolerance
Tolerance to use for difference operation.
)
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.
An array of Brep results or null on failure.

CreateBooleanDifferenceWithIndexMap

#Since v8.13
Compute the solid difference between two sets of Breps.
public static Brep[] CreateBooleanDifferenceWithIndexMap(
firstSet,
The set to be differenced from.
secondSet,
The set to difference with.
tolerance,
Tolerance to use for the boolean operation.
manifoldOnly,
If true, non-manifold input breps are ignored.
out int[]
indexMap
results[i] is the result if subtracting something from firstSet[indexMap[i]].
)
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.
An array of Brep results or null on failure. May be empty if all of the firstSet is differenced away.

CreateBooleanIntersection

#Since v6.0
Compute the Solid Intersection of two Breps.
public static Brep[] CreateBooleanIntersection(
firstBrep,
First Brep for boolean intersection.
secondBrep,
Second Brep for boolean intersection.
tolerance,
Tolerance to use for intersection operation.
manifoldOnly
If true, non-manifold input breps are ignored.
)
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.
An array of Brep results or null on failure.

CreateBooleanIntersection

#Since v5.0
Compute the Solid Intersection of two Breps.
public static Brep[] CreateBooleanIntersection(
firstBrep,
First Brep for boolean intersection.
secondBrep,
Second Brep for boolean intersection.
tolerance
Tolerance to use for intersection operation.
)
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.
An array of Brep results or null on failure.

CreateBooleanIntersection

#Since v6.0
Compute the Solid Intersection of two sets of Breps.
public static Brep[] CreateBooleanIntersection(
firstSet,
First set of Breps.
secondSet,
Second set of Breps.
tolerance,
Tolerance to use for intersection operation.
manifoldOnly
If true, non-manifold input breps are ignored.
)
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.
An array of Brep results or null on failure.

CreateBooleanIntersection

#Since v5.0
Compute the Solid Intersection of two sets of Breps.
public static Brep[] CreateBooleanIntersection(
firstSet,
First set of Breps.
secondSet,
Second set of Breps.
tolerance
Tolerance to use for intersection operation.
)
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.
An array of Brep results or null on failure.

CreateBooleanSplit

#Since v6.16
Splits shared areas of Breps and creates separate Breps from the shared and unshared parts.
public static Brep[] CreateBooleanSplit(
firstBrep,
The Brep to split.
secondBrep,
The cutting Brep.
tolerance
Tolerance to use for splitting operation. When in doubt, use the document's model absolute tolerance.
)
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.
An array of Brep if successful, an empty array on failure.

CreateBooleanSplit

#Since v6.16
Splits shared areas of Breps and creates separate Breps from the shared and unshared parts.
public static Brep[] CreateBooleanSplit(
firstSet,
The Breps to split.
secondSet,
The cutting Breps.
tolerance
Tolerance to use for splitting operation. When in doubt, use the document's model absolute tolerance.
)
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.
An array of Brep if successful, an empty array on failure.

CreateBooleanUnion

#Since v8.0
Compute the Boolean Union of a set of Breps.
public static Brep[] CreateBooleanUnion(
breps,
Breps to union.
tolerance,
Tolerance to use for union operation.
manifoldOnly,
If true, non-manifold input breps are ignored.
out Point3d[]
nakedEdgePoints,
If Boolean failed because the intersection hit a naked edge, a point will be added where the intersection hits the edge.
out Point3d[]
badIntersectionPoints,
If Boolean failed because an intersection ends on the interior of both surfaces, a point is added.This happens when the surface intersector fails.
out Point3d[]
nonManifoldEdgePoints
If Boolean failed because the intersection hit a non-manifold edge, a point will be added where the intersection hits the edge.
)
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.
An array of Brep results or null on failure.

CreateBooleanUnion

#Since v6.0
Compute the Boolean Union of a set of Breps.
public static Brep[] CreateBooleanUnion(
breps,
Breps to union.
tolerance,
Tolerance to use for union operation.
manifoldOnly
If true, non-manifold input breps are ignored.
)
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.
An array of Brep results or null on failure.

CreateBooleanUnion

#Since v5.0
Compute the Boolean Union of a set of Breps.
public static Brep[] CreateBooleanUnion(
breps,
Breps to union.
tolerance
Tolerance to use for union operation.
)
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.
An array of Brep results or null on failure.

CreateBooleanUnionWithIndexMap

#
Compute the Boolean Union of a set of Breps, reporting which inputs produced each result.
public static Brep[] CreateBooleanUnionWithIndexMap(
breps,
Breps to union. May not contain nulls.
tolerance,
Tolerance to use for union operation.
manifoldOnly,
If true, non-manifold input breps are ignored.
out int[][]
indexMap
indexMap[i] holds the positions in breps of the inputs that produced result i. Null when this method returns null.
)
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.
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
Creates a ruled surface as a bevel between two input surface edges.
public static Brep[] CreateChamferSurface(
face0,
First face to chamfer from.
uv0,
A parameter face0 at the side you want to keep after chamfering.
radius0,
The distance from the intersection of face0 to the edge of the chamfer.
face1,
Second face to chamfer from.
uv1,
A parameter face1 at the side you want to keep after chamfering.
radius1,
The distance from the intersection of face1 to the edge of the chamfer.
extend,
If true, then when one input surface is longer than the other, the chamfer surface is extended to the input surface edges.
tolerance
The tolerance. When in doubt, use the document's model absolute tolerance.
)
obsoleteUse the CreateFilletSurface that takes settings and returns results
Array of Breps if successful.

CreateChamferSurface

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

CreateContourCurves

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

CreateContourCurves

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

CreateCurvatureAnalysisMesh

#Since v9.0
Creates an array of analysis meshes for the brep, one per face. The meshes are not set on the brep.
public static Mesh[] CreateCurvatureAnalysisMesh(
brep,
The brep to mesh.
state,
Supplies the curvature style and the false color ranges.
meshingParameters
The mesh density. RhinoDoc.GetAnalysisMeshingParameters returns what a document uses, and MeshingParameters.DefaultAnalysisMesh is the default.
)
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.
The analysis meshes. The array is empty if no mesh could be created.

CreateCurvatureAnalysisMesh

#Since v6.0
Create an array of analysis meshes for the brep using the specified settings. Meshes aren't set on the brep.
public static Mesh[] CreateCurvatureAnalysisMesh(
brep,
The brep to mesh.
state
CurvatureAnalysisSettingsState
)
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.

The analysis meshes. The array is empty if no mesh could be created.

CreateDevelopableLoft

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

CreateDevelopableLoft

#Since v6.10
Creates a single developable surface between two curves.
public static Brep[] CreateDevelopableLoft(
rail0,
The first rail curve.
rail1,
The second rail curve.
fixedRulings
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
Constructs a coons patch from 2, 3, or 4 curves.
public static Brep CreateEdgeSurface(
curves
A list, an array or any enumerable set of curves.
)
resulting brep or null on failure.

CreateFilletEdges

#Since v8.6
Fillets, chamfers, or blends the edges of a brep.
public static Brep[] CreateFilletEdges(
brep,
The brep to fillet, chamfer, or blend edges.
edgeIndices,
An array of one or more edge indices where the fillet, chamfer, or blend will occur.
startRadii,
An array of starting fillet, chamfer, or blend radaii, one for each edge index.
endRadii,
An array of ending fillet, chamfer, or blend radaii, one for each edge index.
blendType,
The blend type.
railType,
The rail type.
setbackFillets,
Use setback fillets (not used with blendType=BlendType.Chamfer)
tolerance,
The tolerance to be used to perform calculations.
angleTolerance
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
Fillets, chamfers, or blends the edges of a brep.
public static Brep[] CreateFilletEdges(
brep,
The brep to fillet, chamfer, or blend edges.
edgeIndices,
An array of one or more edge indices where the fillet, chamfer, or blend will occur.
startRadii,
An array of starting fillet, chamfer, or blend radaii, one for each edge index.
endRadii,
An array of ending fillet, chamfer, or blend radaii, one for each edge index.
blendType,
The blend type.
railType,
The rail type.
tolerance
The tolerance to be used to perform calculations.
)
obsoletePrefer the version that takes setbackFillets and angleTolerance options.
Array of Breps if successful.

CreateFilletEdgesVariableRadius

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

CreateFilletSurface

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

CreateFilletSurface

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

CreateFilletSurface

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

CreateFilletSurfaceCurve

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

CreateFromBox

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

CreateFromBox

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

CreateFromBox

#Since v5.0
Constructs new brep from 8 corner points.
public static Brep CreateFromBox(
corners
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
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.
public static Brep CreateFromCone(
cone,
A cone value.
capBottom
if true the base of the cone should be capped.
)
A Brep if successful, null on error.

CreateFromCornerPoints

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

CreateFromCornerPoints

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

CreateFromCylinder

#Since v5.0
Constructs a Brep definition of a cylinder.
public static Brep CreateFromCylinder(
cylinder,
cylinder.IsFinite() must be true.
capBottom,
if true end at cylinder.m_height[0] should be capped.
capTop
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
Joins two naked edges, or edges that are coincident or close together, from two Breps.
public static Brep CreateFromJoinedEdges(
brep0,
The first Brep.
edgeIndex0,
The edge index on the first Brep.
brep1,
The second Brep.
edgeIndex1,
The edge index on the second Brep.
joinTolerance
The join tolerance.
)
The resulting Brep if successful, null on failure.

CreateFromLoft

#Since v7.0
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
public static Brep[] CreateFromLoft(
curves,
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,
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,
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,
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,
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 from the surface edge where start tangent is to be matched
EndTrim,
BrepTrim from the surface edge where end tangent is to be matched
loftType,
type of loft to perform.
closed
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
Constructs one or more Breps by lofting through a set of curves.
public static Brep[] CreateFromLoft(
curves,
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,
Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end,
Optional ending point of loft. Use Point3d.Unset if you do not want to include an end point.
loftType,
type of loft to perform.
closed,
true if the last curve in this loft should be connected back to the first one.
angleTol
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
Constructs one or more Breps by lofting through a set of curves.
public static Brep[] CreateFromLoft(
curves,
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,
Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end,
Optional ending point of loft. Use Point3d.Unset if you do not want to include an end point.
loftType,
type of loft to perform.
closed
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
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.
public static Brep[] CreateFromLoftRebuild(
curves,
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,
Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end,
Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType,
type of loft to perform.
closed,
true if the last curve in this loft should be connected back to the first one.
angleTol,
angle tolerance, in radians, used to perform the loft.
rebuildPointCount
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
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.
public static Brep[] CreateFromLoftRebuild(
curves,
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,
Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end,
Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType,
type of loft to perform.
closed,
true if the last curve in this loft should be connected back to the first one.
rebuildPointCount
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
Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by refitting to a specified tolerance.
public static Brep[] CreateFromLoftRefit(
curves,
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,
Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end,
Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType,
type of loft to perform.
closed,
true if the last curve in this loft should be connected back to the first one.
angleTol,
angle tolerance, in radians, used to perform the loft.
refitTolerance
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
Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by refitting to a specified tolerance.
public static Brep[] CreateFromLoftRefit(
curves,
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,
Optional starting point of loft. Use Point3d.Unset if you do not want to include a start point.
end,
Optional ending point of lost. Use Point3d.Unset if you do not want to include an end point.
loftType,
type of loft to perform.
closed,
true if the last curve in this loft should be connected back to the first one.
refitTolerance
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
Match an edge to the target curve using the settings provided
public static bool CreateFromMatch(
edge,
The edge to match. This need to be an untrimmed surface edge.
targetCurve,
The curve to match to. This needs to be a BrepEdge if tangent or curvature matching is requested.
settings,
The settings used for matching
out Brep
matched,
If successful, this contains the matched brep
out Brep
target
If successful and MatchSrfSettings.Average is true, this contains the changed target brep.
)

CreateFromMatch

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

CreateFromMesh

#Since v5.1
Create a brep representation of a mesh
public static Brep CreateFromMesh(
Mesh
mesh,
trimmedTriangles
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
Offsets a face including trim information to create a new brep.
public static Brep CreateFromOffsetFace(
face,
the face to offset.
offsetDistance,
An offset distance.
offsetTolerance,
Use 0.0 to make a loose offset. Otherwise, the document's absolute tolerance is usually sufficient.
bothSides,
When true, offset to both sides of the input face.
createSolid
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
Constructs a brep form of a surface of revolution.
public static Brep CreateFromRevSurface(
surface,
The surface of revolution.
capStart,
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
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
Constructs a Brep definition of a sphere.
public static Brep CreateFromSphere(
sphere
The input sphere provides the orienting plane and radius.
)
A Brep if successful, null on error.

CreateFromSurface

#Since v5.0
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.
public static Brep CreateFromSurface(
surface
A surface to convert.
)
Resulting brep or null on failure.

CreateFromSweep

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

CreateFromSweep

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

CreateFromSweep

#Since v9.0
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.
public static Brep[] CreateFromSweep(
rail,
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,
Shape curves.
startPoint,
Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
endPoint,
Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
frameType,
The frame type.
roadlikeNormal,
The roadlike normal directoion. Use Vector3d.Unset if the frame type is not set to roadlike.
closed,
Only matters if shapes are closed.
blendType,
The shape blending type.
miterType,
The mitering type.
tolerance,
rebuildType,
The rebuild style.
rebuildPointCount,
If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance,
If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0.
refitRail
false = segmented sweep, true = refit-rail sweep.
)
Remarks: This version mimics what Rhino's Sweep1 command does.
Array of Brep sweep results.

CreateFromSweep

#Since v7.0
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.
public static Brep[] CreateFromSweep(
rail,
Rail to sweep shapes along.
shapes,
Shape curves.
startPoint,
Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
endPoint,
Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
frameType,
The frame type.
roadlikeNormal,
The roadlike normal directoion. Use Vector3d.Unset if the frame type is not set to roadlike.
closed,
Only matters if shapes are closed.
blendType,
The shape blending type.
miterType,
The mitering type.
tolerance,
rebuildType,
The rebuild style.
rebuildPointCount,
If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance
If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0
)
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is enabled (true).
Array of Brep sweep results.

CreateFromSweep

#Since v5.0
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.
public static Brep[] CreateFromSweep(
rail1,
Rail to sweep shapes along
rail2,
Rail to sweep shapes along
shape,
Shape curve
closed,
Only matters if shape is closed
tolerance
Tolerance for fitting surface and rails
)
Array of Brep sweep results

CreateFromSweep

#Since v5.0
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.
public static Brep[] CreateFromSweep(
rail1,
Rail to sweep shapes along
rail2,
Rail to sweep shapes along
shapes,
Shape curves
closed,
Only matters if shapes are closed
tolerance
Tolerance for fitting surface and rails
)
Array of Brep sweep results

CreateFromSweep

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

CreateFromSweepInParts

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

CreateFromSweepSegmented

#Since v6.14
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.
public static Brep[] CreateFromSweepSegmented(
rail,
Rail to sweep shapes along
shape,
Shape curve
closed,
Only matters if shape is closed
tolerance
Tolerance for fitting surface and rails
)
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is disabled (false).
Array of Brep sweep results

CreateFromSweepSegmented

#Since v6.14
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.
public static Brep[] CreateFromSweepSegmented(
rail,
Rail to sweep shapes along.
shapes,
Shape curves.
closed,
Only matters if shapes are closed.
tolerance
Tolerance for fitting surface and rails.
)
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is disabled (false).
Array of Brep sweep results.

CreateFromSweepSegmented

#Since v7.0
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.
public static Brep[] CreateFromSweepSegmented(
rail,
Rail to sweep shapes along.
shapes,
Shape curves.
startPoint,
Optional starting point of sweep. Use Point3d.Unset if you do not want to include a start point.
endPoint,
Optional ending point of sweep. Use Point3d.Unset if you do not want to include an end point.
frameType,
The frame type.
roadlikeNormal,
The roadlike normal directoion. Use Vector3d.Unset if the frame type is not set to roadlike.
closed,
Only matters if shapes are closed.
blendType,
The shape blending type.
miterType,
The mitering type.
tolerance,
rebuildType,
The rebuild style.
rebuildPointCount,
If rebuild == SweepRebuild.Rebuild, the number of points. Otherwise specify 0.
refitTolerance
If rebuild == SweepRebuild.Refit, the refit tolerance. Otherwise, specify 0.0
)
Remarks: Rhino's Sweep1 command uses this when the "refit rail" option is disabled (false).
Array of Brep sweep results.

CreateFromTaperedExtrude

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

CreateFromTaperedExtrude

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

CreateFromTaperedExtrudeWithRef

#Since v6.14
Creates one or more Breps by extruding a curve a distance along an axis with draft angle.
public static Brep[] CreateFromTaperedExtrudeWithRef(
curve,
The curve to extrude.
direction,
The extrusion direction.
distance,
The extrusion distance.
draftAngle,
The extrusion draft angle in radians.
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
The intersecting and trimming tolerance.
)
An array of Breps if successful.

CreateFromTorus

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

CreateOffsetBrep

#Since v7.5
Offsets a Brep.
public static Brep[] CreateOffsetBrep(
brep,
The Brep to offset.
distance,
The distance to offset. This is a signed distance value with respect to face normals and flipped faces.
solid,
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,
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,
If true, then the function shrinks the underlying surfaces to their face's outer boundary loop.
tolerance,
The offset tolerance.
out Brep[]
outBlends,
The results of the calculation.
out Brep[]
outWalls
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
Offsets a Brep.
public static Brep[] CreateOffsetBrep(
brep,
The Brep to offset.
distance,
The distance to offset. This is a signed distance value with respect to face normals and flipped faces.
solid,
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,
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,
The offset tolerance.
out Brep[]
outBlends,
The results of the calculation.
out Brep[]
outWalls
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
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.

public static Brep CreatePatch(
geometry,
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,
The number of spans in the U direction.
vSpans,
The number of spans in the V direction.
tolerance
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
Constructs a brep patch.

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

public static Brep CreatePatch(
geometry,
Combination of Curves, BrepTrims, Points, PointClouds or Meshes. Curves and trims are sampled to get points. Trims are sampled for points and normals.
startingSurface,
A starting surface (can be null).
tolerance
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
Constructs a brep patch using all controls
public static Brep CreatePatch(
geometry,
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,
A starting surface (can be null).
uSpans,
Number of surface spans used when a plane is fit through points to start in the U direction.
vSpans,
Number of surface spans used when a plane is fit through points to start in the U direction.
trim,
If true, try to find an outer loop from among the input curves and trim the result to that loop
tangency,
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,
Basic distance between points sampled from input curves.
flexibility,
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,
Tends to keep the result surface where it was before the fit in areas where there is on influence from the input geometry
bool[]
fixEdges,
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
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
Creates a single walled pipe.
public static Brep[] CreatePipe(
rail,
The rail, or path, curve.
radius,
The radius of the pipe.
localBlending,
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,
The end cap mode.
fitRail,
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,
The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians
The angle tolerance. When in doubt, use the document's angle tolerance in radians.
)
Array of Breps success.

CreatePipe

#Since v5.0
Creates a single walled pipe.
public static Brep[] CreatePipe(
rail,
The rail, or path, curve.
railRadiiParameters,
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,
One or more radii - one at each normalized curve parameter in railRadiiParameters.
localBlending,
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,
The end cap mode.
fitRail,
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,
The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians
The angle tolerance. When in doubt, use the document's angle tolerance in radians.
)
Array of Breps success.

CreatePlanarBreps

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

CreatePlanarBreps

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

CreatePlanarBreps

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

CreatePlanarBreps

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

CreatePlanarBreps

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

CreatePlanarBreps

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

CreatePlanarBrepsWithIndexMap

#
Constructs a set of planar Breps as outlines by the loops, reporting which input curves bounded each Brep.
public static Brep[] CreatePlanarBrepsWithIndexMap(
inputLoops,
Curve loops that delineate the planar boundaries.
tolerance,
Tolerance to use when sorting and building the loops.
out int[][]
indexMap
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.
)
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.
An array of planar Breps, or null on failure.

CreatePlanarDifference

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

CreatePlanarIntersection

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

CreatePlanarUnion

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

CreatePlanarUnion

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

CreateQuadSphere

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

CreateShell

#Since v5.4
Creates a hollowed out shell from a solid Brep. Function only operates on simple, solid, manifold Breps.
public static Brep[] CreateShell(
brep,
The solid Brep to shell.
facesToRemove,
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,
The distance, or thickness, for the shell. This is a signed distance value with respect to face normals and flipped faces.
tolerance
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
Constructs closed polysurfaces from surfaces and polysurfaces that bound a region in space.
public static Brep[] CreateSolid(
breps,
The intersecting surfaces and polysurfaces to automatically trim and join into closed polysurfaces.
tolerance
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
Creates a double-walled pipe.
public static Brep[] CreateThickPipe(
rail,
The rail, or path, curve.
radius0,
The first radius of the pipe.
radius1,
The second radius of the pipe.
localBlending,
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,
The end cap mode.
fitRail,
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,
The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians
The angle tolerance. When in doubt, use the document's angle tolerance in radians.
)
Array of Breps success.

CreateThickPipe

#Since v7.0
Creates a double-walled pipe.
public static Brep[] CreateThickPipe(
rail,
The rail, or path, curve.
railRadiiParameters,
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,
One or more radii for the first wall - one at each normalized curve parameter in railRadiiParameters.
radii1,
One or more radii for the second wall - one at each normalized curve parameter in railRadiiParameters.
localBlending,
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,
The end cap mode.
fitRail,
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,
The sweeping and fitting tolerance. When in doubt, use the document's absolute tolerance.
angleToleranceRadians
The angle tolerance. When in doubt, use the document's angle tolerance in radians.
)
Array of Breps success.

CreateTrimmedPlane

#Since v6.0
Create a Brep trimmed plane.
public static Brep CreateTrimmedPlane(
plane,
Plane that will be trimmed.
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
Create a Brep trimmed plane.
public static Brep CreateTrimmedPlane(
plane,
Plane that will be trimmed.
curves
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
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.
public static Brep CreateTrimmedSurface(
trimSource,
BrepFace which contains trimmingSource brep.
surfaceSource,
Surface that trims of BrepFace will be applied to.
tolerance
)
A brep with the shape of surfaceSource and the trims of trimSource or null on failure.

CreateTrimmedSurface

#Since v5.0 Obsolete v6.0
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.
public static Brep CreateTrimmedSurface(
trimSource,
BrepFace which contains trimmingSource brep.
surfaceSource
Surface that trims of BrepFace will be applied to.
)
obsoleteUse version that takes tolerance as input
A brep with the shape of surfaceSource and the trims of trimSource or null on failure.

CreateVariationalPatch

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

CreateVariationalPatch

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

CullUnused2dCurves

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

CullUnused3dCurves

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

CullUnusedEdges

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

CullUnusedFaces

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

CullUnusedLoops

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

CullUnusedSurfaces

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

CullUnusedTrims

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

CullUnusedVertices

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

CutUpSurface

#Since v8.12
Splits, or cuts up, a surface. Designed to split the underlying surface of a Brep face with edge curves.
public static Brep[] CutUpSurface(
surface,
The surface to cut up.
curves,
The edge curves with consistent orientation. The curves should lie on the surface.
flip,
If true, the input curves are oriented clockwise.
fitTolerance,
The fitting tolerance.
keepTolerance
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
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.
public static Brep[] CutUpSurface(
surface,
The surface.
curves,
The curves.
useEdgeCurves,
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
The fitting tolerance. When in doubt, use the document's model absolute tolerance.
)
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.
The resulting Breps is successful, otherwise an empty array. Note, you may want to join the results into a single Brep.

DataCRC

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.
[CLSCompliant(false)] public uint DataCRC(
currentRemainder
The current remainder value.
)
inherited fromGeometryBase
CRC of the information the defines the object.

DeleteAllUserStrings

public void DeleteAllUserStrings()
inherited fromGeometryBase

DeleteUserString

public bool DeleteUserString(
key
)
inherited fromGeometryBase

DestroyRegionTopology

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

Dispose

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

Dispose

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

Duplicate

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

DuplicateBrep

#Since v5.0
Same as Duplicate(), but already performs a cast to a brep.

This cast always succeeds.

[ConstOperation] public Brep DuplicateBrep()
A brep.

DuplicateEdgeCurves

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

DuplicateEdgeCurves

#ExampleSince v5.0
Duplicate edges of this Brep.
[ConstOperation] public Curve[] DuplicateEdgeCurves(
nakedOnly
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
Duplicate naked edges of this Brep.
[ConstOperation] public Curve[] DuplicateNakedEdgeCurves(
nakedOuter,
Return naked edges that are part of an outer loop.
nakedInner
Return naked edges that are part of an inner loop.
)
Array of edge curves on success.

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.
public GeometryBase DuplicateShallow()
inherited fromGeometryBase
An object of the same type as this object.

This behavior is overridden by implementing classes.

DuplicateSubBrep

#Since v5.0
Copy a subset of this Brep into another Brep.
[ConstOperation] public Brep DuplicateSubBrep(
faceIndices
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
Duplicate all the corner vertices of this Brep.
[ConstOperation] public Point3d[] DuplicateVertices()
An array or corner vertices.

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.
public void EnsurePrivateCopy()
inherited fromCommonObject

ExtendBrepFacesToConnect

#Since v8.9
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
public static bool ExtendBrepFacesToConnect(
Face0,
[in] first face to connect
edgeIndex0,
[in] edge to extend.
Face1,
[in] second surface
edgeIndex1,
[in] edge to extend.
tol,
[in] tolerance used for intersecting faces and simplifing extension curve
angleTol,
[in] angle tolerance in radians used for simplifying extendsion curve
out Brep
outBrep0,
[out] first face extended and trimmed to connect with the second face
out Brep
outBrep1
[out] second face extended and trimmed to connect with the first face
)
true if valid connection found

ExtendBrepFacesToConnect

#Since v8.9
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
public static bool ExtendBrepFacesToConnect(
Face0,
[in] first face to connect
f0_sel_pt,
selection point on first face near the edge to extend.
Face1,
[in] second surface
f1_sel_pt,
selection point on second face near the edge to extend.
tol,
[in] tolerance used for intersecting faces and simplifing extension curve
angleTol,
[in] angle tolerance in radians used for simplifying extendsion curve
out Brep
outBrep0,
[out] first face extended and trimmed to connect with the second face
out Brep
outBrep1
[out] second face extended and trimmed to connect with the first face
)
true if valid connection found

FindCoincidentBrepComponents

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

Flip

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

GetArea

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

GetArea

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

GetBoundingBox

Bounding box solver. Gets the world axis aligned bounding box for the geometry.
[ConstOperation] public BoundingBox GetBoundingBox(
accurate
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.
)
inherited fromGeometryBase
The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetBoundingBox

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

GetBoundingBox

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

GetBoundingBox

Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
[ConstOperation] public virtual BoundingBox GetBoundingBox(
xform
Transformation to apply to object prior to the BoundingBox computation. The geometry itself is not modified.
)
inherited fromGeometryBase
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
If this Brep has two or more connected components, then duplicates of the connected components are returned.
public Brep[] GetConnectedComponents()
An array of connected components, or an empty array.

GetObjectData

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

GetPointInside

#Since v6.19
Finds a point inside of a solid Brep.
[ConstOperation] public bool GetPointInside(
tolerance,
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.
out Point3d
point
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
Gets an array containing all regions in this brep.
[ConstOperation] public BrepRegion[] GetRegions()
An array of regions in this brep. This array can be empty, but not null.

GetTangentConnectedComponents

#Since v8.7
If this Brep has two or more components connected by tangent edges, then duplicates of the connected components are returned.
[ConstOperation] public Brep[] GetTangentConnectedComponents(
angleTolerance,
The angle tolerance, in radians, used to determine tangent edges.
includeMeshes
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

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

GetUserStrings

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

GetVolume

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

GetVolume

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

GetWireframe

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

InsetFaces

#Since v8.8
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.
[ConstOperation] public Brep InsetFaces(
faceIndices,
the indices of the faces to inset
distance,
The distance to offset along the face
loose,
If true, offset by moving edit points otherwise offset within tolerance.
ignoreSeams,
If true, the seam edges are not offset and adjacent edges are extended to meet the seam. Otherwise offset normally.
creaseCorners,
If true, splitting curves will be made between the creases on edge curves and creases on the inset curves.
tolerance,
The fitting tolerance for the offset. When in doubt, use the document's absolute tolerance.
angleTolerance
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
Verifies a Brep is in the form of a solid box.
[ConstOperation] public bool IsBox()
true if the Brep is a solid box, false otherwise.

IsBox

#Since v7.10
Verifies a Brep is in the form of a solid box.
[ConstOperation] public bool IsBox(
tolerance
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
See if this and other are same brep geometry.
[ConstOperation] public bool IsDuplicate(
other,
other brep.
tolerance
tolerance to use when comparing control points.
)
true if breps are the same.

IsExtrusion

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

IsExtrusion

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

IsOrientedManifold

#Since v8.26
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.
public bool IsOrientedManifold(
out bool
isOriented,
Set to true if the Brep is an oriented manifold, or false if the Brep is not an oriented manifold.
out bool
hasBoundary
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
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.
[ConstOperation] public bool IsPointInside(
point,
3d point to test.
tolerance,
3d distance tolerance used for intersection and determining strict inclusion. A good default is RhinoMath.SqrtEpsilon.
strictlyIn
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
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.
[ConstOperation] public bool IsValidGeometry(
out string
log
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
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.
[ConstOperation] public bool IsValidTolerancesAndFlags(
out string
log
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
Tests the brep to see if its topology information is valid.
[ConstOperation] public bool IsValidTopology(
out string
log
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

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

Join

#Since v5.0
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.
public bool Join(
otherBrep,
Brep to be added to this brep.
tolerance,
3d distance tolerance for detecting overlapping edges.
compact
if true, set brep flags and tolerances, remove unused faces and edges.
)
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.
true if any edges were joined.

JoinBreps

#Since v8.5
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.
public static Brep[] JoinBreps(
brepsToJoin,
A list, an array or any enumerable set of breps to join.
tolerance,
3d distance tolerance for detecting overlapping edges. When in doubt, use the document's model absolute tolerance.
angleTolerance,
Angle tolerance, in radians, used for merging edges. When in doubt, use the document's model angle tolerance.
out List<int[]>
indexMap
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
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.
public static Brep[] JoinBreps(
brepsToJoin,
A list, an array or any enumerable set of breps to join.
tolerance,
3d distance tolerance for detecting overlapping edges. When in doubt, use the document's model absolute tolerance.
angleTolerance
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
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.
public static Brep[] JoinBreps(
brepsToJoin,
A list, an array or any enumerable set of breps to join.
tolerance
3d distance tolerance for detecting overlapping edges.
)
New joined breps on success, null on failure.

JoinEdges

#Since v6.0
Joins two naked edges, or edges that are coincident or close together.
public bool JoinEdges(
edgeIndex0,
The first edge index.
edgeIndex1,
The second edge index.
joinTolerance,
The join tolerance.
compact
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
Joins naked edge pairs within the same brep that overlap within tolerance.
public int JoinNakedEdges(
tolerance
The tolerance value.
)
number of joins made.

MakeDeformable

If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
public bool MakeDeformable()
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
No support is available for this function.

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

public bool MakeValidForV2()
Remarks: Don't call this function unless you know exactly what you are doing.

MemoryEstimate

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

MergeBreps

#Since v5.0
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.
public static Brep MergeBreps(
brepsToMerge,
must contain more than one Brep.
tolerance
the tolerance to use when merging.
)
Single merged Brep on success. Null on error.

MergeCoplanarFaces

#Since v6.10
Merges adjacent coplanar faces into single faces.
public bool MergeCoplanarFaces(
tolerance,
Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance
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
Merges adjacent coplanar faces into single faces.
public bool MergeCoplanarFaces(
tolerance
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
Merges coplanar faces adjacent to Brep face into a single face.
public bool MergeCoplanarFaces(
faceIndex,
The index of the Brep face to search.
tolerance,
Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance
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
Merges two coplanar, adjacent Brep faces into a single face.
public bool MergeCoplanarFaces(
faceIndex0,
The index of the first Brep face.
faceIndex1,
The index of the second Brep face.
tolerance,
Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance
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
Merges two surfaces into one surface at untrimmed edges. Both surfaces must be untrimmed and share an edge.
public static Brep MergeSurfaces(
brep0,
The first single-face Brep to merge.
brep1,
The second single-face Brep to merge.
tolerance,
Surface edges must be within this tolerance for the two surfaces to merge.
angleToleranceRadians,
Edge must be within this angle tolerance in order for contiguous edges to be combined into a single edge.
point0,
2D pick point on the first single-face Brep. The value can be unset.
point1,
2D pick point on the second single-face Brep. The value can be unset.
roundness,
Defines the roundness of the merge. Acceptable values are between 0.0 (sharp) and 1.0 (smooth).
smooth
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
Merges two surfaces into one surface at untrimmed edges. Both surfaces must be untrimmed and share an edge.
public static Brep MergeSurfaces(
brep0,
The first single-face Brep to merge.
brep1,
The second single-face Brep to merge.
tolerance,
Surface edges must be within this tolerance for the two surfaces to merge.
angleToleranceRadians
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
Merges two surfaces into one surface at untrimmed edges.
public static Brep MergeSurfaces(
surface0,
The first surface to merge.
surface1,
The second surface to merge.
tolerance,
Surface edges must be within this tolerance for the two surfaces to merge.
angleToleranceRadians
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

Destroy cache handle
protected override void NonConstOperation()
inherited fromGeometryBase

OnSwitchToNonConst

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

PrepareForBooleans

#Since v9.0
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.
public bool PrepareForBooleans()
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
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.
public bool PrepareForBooleans(
angleToleranceRadians
Angle tolerance, in radians, used to split kinky faces. When in doubt, use the document's model angle tolerance.
)
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.

PushPullExtend

#Since v8.16
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.
public Brep PushPullExtend(
faceIndex,
The index of the face being transformed
transform,
The transformation
tolerance
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
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.

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

RemoveFins

#Since v7.0
Recursively removes any Brep face with a naked edge. This function is only useful for non-manifold Breps.
public bool RemoveFins()
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
Remove all inner loops, or holes, in a Brep.
[ConstOperation] public Brep RemoveHoles(
tolerance
The tolerance. When in doubt, use the document's model absolute tolerance.
)
The Brep without holes if successful, null otherwise.

RemoveHoles

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

Repair

#Since v6.0
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.
public bool Repair(
tolerance
The repair tolerance. When in doubt, use the document's model absolute tolerance.
)
True on success.

ReplaceEdge

#Since v9.0
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.
[ConstOperation] public Brep ReplaceEdge(
edgeIndices,
The indices of the edges to replace.
method,
How the deleted edges are re-trimmed.
replacementCurve,
The curve used to re-trim when method is BrepReplaceEdgeMethod.Curve; ignored (may be null) otherwise.
tolerance
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

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

Scale

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

SetTolerancesBoxesAndFlags

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

SetTolerancesBoxesAndFlags

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

SetTrimIsoFlags

#Since v5.4
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.
public void SetTrimIsoFlags()

SetUserString

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

SetVertices

#Since v5.4
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.
public void SetVertices()

Split

#Since v5.0
Splits a Brep into pieces using a Brep as a cutter.
[ConstOperation] public Brep[] Split(
cutter,
The Brep to use as a cutter.
intersectionTolerance,
The tolerance with which to compute intersections.
out bool
toleranceWasRaised
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
Splits a Brep into pieces using a Brep as a cutter.
[ConstOperation] public Brep[] Split(
cutter,
The Brep to use as a cutter.
intersectionTolerance
The tolerance with which to compute intersections.
)
A new array of Breps. This array can be empty.

Split

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

Split

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

Split

#Since v6.13
Splits a Brep into pieces using a combination of curves, to be extruded, and Breps as cutters.
[ConstOperation] public Brep[] Split(
cutters,
The curves, surfaces, faces and Breps to be used as cutters. Any other geometry is ignored.
normal,
A construction plane normal, used in deciding how to extrude a curve into a cutter.
planView,
Set true if the assume view is a plan, or parallel projection, view.
intersectionTolerance
The tolerance with which to compute intersections.
)
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.
A new array of Breps. This array can be empty.

SplitDisjointPieces

#Since v8.15
Separates, or splits, a disjoint Brep into separate Breps.
public static Brep[] SplitDisjointPieces(
brep,
The disjoint Brep to separate.
out List<int[]>
indexMap
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
Separates, or splits, a disjoint Brep into separate Breps.
public static Brep[] SplitDisjointPieces(
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
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.
public void Standardize()

ToJSON

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

Transform

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.
public bool Transform(
Transform
xform
Transformation to apply to geometry.
)
inherited fromGeometryBase
true if geometry successfully transformed.

TransformComponent

#Since v6.0
Transform an array of Brep components, bend neighbors to match, and leave the rest fixed.
public bool TransformComponent(
components,
The Brep components to transform.
xform,
The transformation to apply.
tolerance,
The desired fitting tolerance to use when bending faces that share edges with both fixed and transformed components.
timeLimit,
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
True if multiple threads can be used.
)
true if successful, false otherwise.

Translate

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

Translate

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

Trim

#Since v5.0
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.
[ConstOperation] public Brep[] Trim(
cutter,
A cutting brep.
intersectionTolerance
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
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.
[ConstOperation] public Brep[] Trim(
cutter,
A cutting plane.
intersectionTolerance
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
Attempts to convert a generic Geometry object into a Brep.
public static Brep TryConvertBrep(
geometry
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
Tests a Brep to see if it is an extrusion and returns the extrusion.
[ConstOperation] public bool TryGetExtrusion(
extrusion,
On success, the extrusion parameters are filled in.
tolerance
tolerance to use when checking.
)
true if the Brep is a portion of an extrusion.

TryGetExtrusion

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

UnjoinEdges

#Since v6.0
Un-joins, or separates, edges within the Brep. Note, seams in closed surfaces will not separate.
[ConstOperation] public Brep[] UnjoinEdges(
edgesToUnjoin
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
Untrims a face completely, expanding it back to its underlying surface: the outer boundary is untrimmed and all inner loops (holes) are removed.
[ConstOperation] public Brep UntrimFace(
faceIndex,
The index of the face to untrim.
tolerance
The tolerance. When in doubt, use the document's model absolute tolerance.
)
The untrimmed Brep if successful, null otherwise.

UntrimOuterLoop

#Since v9.0
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.
[ConstOperation] public Brep UntrimOuterLoop(
faceIndex
The index of the face to untrim.
)
The untrimmed Brep if successful, null otherwise.

WireCut

#Since v9.0
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.
public bool WireCut(
openCurve,
Open cutting curve.
direction,
First extrusion direction (the wire sweep).
trimDirection,
Second extrusion direction that closes the cutter.
depth,
Depth along direction. RhinoMath.UnsetValue or a value <= 0 cuts through and skips trim capping.
trimDepth,
Depth along trimDirection. Ignored when cutting through.
bothSides,
Extrude both ways along direction.
trimBothSides,
Extrude both ways along trimDirection.
tolerance,
Intersection and boolean tolerance, typically the document absolute tolerance.
splitKinkyFaces,
Split output pieces along creases.
out Brep[]
keptPieces,
Pieces that remain after the cut (boolean difference side).
out Brep[]
cutAwayPieces
The cut-away pieces (boolean intersection side).
)
true if successful.

WireCut

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