Methods_T_Rhino_Geometry_Brep - mcneel/rhinocommon-api-docs GitHub Wiki

Brep Methods

The Brep type exposes the following members.

Methods

 

Name Description
Public method AddEdgeCurve Add a 3d curve used by the brep edges
Public method AddSurface Adds a 3D surface used by BrepFace.
Public method AddTrimCurve Add a 2d curve used by the brep trims
Public method Append Appends a copy of another brep to this and updates indices of appended brep parts. Duplicates are not removed
Public method CapPlanarHoles Returns a new Brep that is equivalent to this Brep with all planar holes capped.
Public method ClosestPoint(Point3d) Finds a point on the brep that is closest to testPoint.
Public method ClosestPoint(Point3d, Point3d, ComponentIndex, Double, Double, Double, Vector3d) Finds a point on a brep that is closest to testPoint.
Public method Compact Deletes any unreferenced objects from arrays, reindexes as needed, and shrinks arrays to minimum required size. Uses CUllUnused* members to delete any unreferenced objects from arrays.
Public method ComponentIndex If this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index. (Inherited from GeometryBase.)
Protected method ConstructConstObject Assigns a parent object and a subobject index to this. (Inherited from CommonObject.)
Public methodStatic member CopyTrimCurves Copy all trims from a Brep face onto a surface.
Public methodStatic member CreateBlendShape Makes a curve blend between points on two surface edges. The blend will be tangent to the surfaces and perpendicular to the edges.
Public methodStatic member CreateBlendSurface Makes a surface blend between two surface edges.
Public methodStatic member CreateBooleanDifference(Brep, Brep, Double) Compute the Solid Difference of two Breps.
Public methodStatic memberCode example CreateBooleanDifference(IEnumerable(Brep), IEnumerable(Brep), Double) Compute the Solid Difference of two sets of Breps.
Public methodStatic member CreateBooleanDifference(Brep, Brep, Double, Boolean) Compute the Solid Difference of two Breps.
Public methodStatic memberCode example CreateBooleanDifference(IEnumerable(Brep), IEnumerable(Brep), Double, Boolean) Compute the Solid Difference of two sets of Breps.
Public methodStatic member CreateBooleanIntersection(Brep, Brep, Double) Compute the Solid Intersection of two Breps.
Public methodStatic member CreateBooleanIntersection(IEnumerable(Brep), IEnumerable(Brep), Double) Compute the Solid Intersection of two sets of Breps.
Public methodStatic member CreateBooleanIntersection(Brep, Brep, Double, Boolean) Compute the Solid Intersection of two Breps.
Public methodStatic member CreateBooleanIntersection(IEnumerable(Brep), IEnumerable(Brep), Double, Boolean) Compute the Solid Intersection of two sets of Breps.
Public methodStatic member CreateBooleanUnion(IEnumerable(Brep), Double) Compute the Boolean Union of a set of Breps.
Public methodStatic member CreateBooleanUnion(IEnumerable(Brep), Double, Boolean) Compute the Boolean Union of a set of Breps.
Public methodStatic member CreateChamferSurface(BrepFace, Point2d, Double, BrepFace, Point2d, Double, Boolean, Double) Creates a ruled surface as a bevel between two input surface edges.
Public methodStatic member CreateChamferSurface(BrepFace, Point2d, Double, BrepFace, Point2d, Double, Boolean, Boolean, Double, Brep[], Brep[]) Creates a ruled surface as a bevel between two input surface edges.
Public methodStatic member CreateContourCurves(Brep, Plane) Constructs the contour curves for a brep, using a slicing plane.
Public methodStatic memberCode example CreateContourCurves(Brep, Point3d, Point3d, Double) Constructs the contour curves for a brep at a specified interval.
Public methodStatic memberCode example CreateEdgeSurface Constructs a coons patch from 2, 3, or 4 curves.
Public methodStatic member CreateFilletEdges Fillets, chamfers, or blends the edges of a brep.
Public methodStatic member CreateFilletSurface(BrepFace, Point2d, BrepFace, Point2d, Double, Boolean, Double) Creates a constant-radius round surface between two surfaces.
Public methodStatic member CreateFilletSurface(BrepFace, Point2d, BrepFace, Point2d, Double, Boolean, Boolean, Double, Brep[], Brep[]) Creates a constant-radius round surface between two surfaces.
Public methodStatic memberCode example CreateFromBox(BoundingBox) Constructs new brep that matches a bounding box.
Public methodStatic member CreateFromBox(Box) Constructs new brep that matches an aligned box.
Public methodStatic member CreateFromBox(IEnumerable(Point3d)) Constructs new brep from 8 corner points.
Public methodStatic member CreateFromCone 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 methodStatic member CreateFromCornerPoints(Point3d, Point3d, Point3d, Double) Makes a brep with one face.
Public methodStatic member CreateFromCornerPoints(Point3d, Point3d, Point3d, Point3d, Double) make a Brep with one face.
Public methodStatic member CreateFromCylinder Constructs a Brep definition of a cylinder.
Public methodStatic memberCode example CreateFromLoft Constructs one or more Breps by lofting through a set of curves.
Public methodStatic member CreateFromLoftRebuild 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 methodStatic member CreateFromLoftRefit 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 methodStatic member CreateFromMesh Create a brep representation of a mesh
Public methodStatic member CreateFromOffsetFace Offsets a face including trim information to create a new brep.
Public methodStatic memberCode example CreateFromRevSurface Constructs a brep form of a surface of revolution.
Public methodStatic member CreateFromSphere Constructs a Brep definition of a sphere.
Public methodStatic member CreateFromSurface 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 methodStatic member CreateFromSweep(Curve, Curve, Boolean, Double) General 1 rail sweep. If you are not producing the sweep results that you are after, then use the SweepOneRail class with options to generate the swept geometry
Public methodStatic member CreateFromSweep(Curve, IEnumerable(Curve), Boolean, Double) General 1 rail sweep. If you are not producing the sweep results that you are after, then use the SweepOneRail class with options to generate the swept geometry
Public methodStatic member CreateFromSweep(Curve, Curve, Curve, Boolean, Double) 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 methodStatic member CreateFromSweep(Curve, Curve, IEnumerable(Curve), Boolean, Double) 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 methodStatic member CreateFromTaperedExtrude(Curve, Double, Vector3d, Point3d, Double, ExtrudeCornerType) **Obsolete. ** Extrude a curve to a taper making a brep (potentially more than 1)
Public methodStatic member CreateFromTaperedExtrude(Curve, Double, Vector3d, Point3d, Double, ExtrudeCornerType, Double, Double) Extrude a curve to a taper making a brep (potentially more than 1)
Public methodStatic member CreateOffsetBrep Offsets a Brep.
Public methodStatic member CreatePatch(IEnumerable(GeometryBase), Surface, Double) Constructs a brep patch. This is the simple version of fit that uses a specified starting surface.
Public methodStatic member CreatePatch(IEnumerable(GeometryBase), Int32, Int32, Double) 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 methodStatic member CreatePatch(IEnumerable(GeometryBase), Surface, Int32, Int32, Boolean, Boolean, Double, Double, Double, Boolean[], Double) Constructs a brep patch using all controls
Public methodStatic member CreatePipe(Curve, Double, Boolean, PipeCapMode, Boolean, Double, Double) Creates a single walled pipe
Public methodStatic member CreatePipe(Curve, IEnumerable(Double), IEnumerable(Double), Boolean, PipeCapMode, Boolean, Double, Double) Creates a single walled pipe
Public methodStatic member CreatePlanarBreps(Curve) **Obsolete. ** Constructs a set of planar breps as outlines by the loops.
Public methodStatic member CreatePlanarBreps(IEnumerable(Curve)) **Obsolete. ** Constructs a set of planar breps as outlines by the loops.
Public methodStatic member CreatePlanarBreps(CurveList) **Obsolete. ** Constructs a set of planar Breps as outlines by the loops.
Public methodStatic member CreatePlanarBreps(Curve, Double) Constructs a set of planar breps as outlines by the loops.
Public methodStatic member CreatePlanarBreps(IEnumerable(Curve), Double) Constructs a set of planar breps as outlines by the loops.
Public methodStatic member CreatePlanarBreps(CurveList, Double) Constructs a set of planar Breps as outlines by the loops.
Public methodStatic member CreateShell Creates a hollowed out shell from a solid Brep. Function only operates on simple, solid, manifold Breps.
Public methodStatic member CreateSolid Constructs closed polysurfaces from surfaces and polysurfaces that bound a region in space.
Public methodStatic member CreateTrimmedPlane(Plane, Curve) Create a Brep trimmed plane.
Public methodStatic member CreateTrimmedPlane(Plane, IEnumerable(Curve)) Create a Brep trimmed plane.
Public methodStatic member CreateTrimmedSurface(BrepFace, Surface) **Obsolete. ** 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 methodStatic member CreateTrimmedSurface(BrepFace, Surface, Double) 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 method CullUnused2dCurves Culls 3d curves not referenced by an edge.
Public method CullUnused3dCurves Culls 2d curves not referenced by a trim.
Public method CullUnusedEdges Culls edges with m_edge_index == -1.
Public method CullUnusedFaces Culls faces with m_face_index == -1.
Public method CullUnusedLoops Culls loops with m_loop_index == -1.
Public method CullUnusedSurfaces Culls surfaces not referenced by a face.
Public method CullUnusedTrims Culls trims with m_trim_index == -1.
Public method CullUnusedVertices Culls vertices with m_vertex_index == -1.
Public method Dispose() Actively reclaims unmanaged resources that this instance uses. (Inherited from CommonObject.)
Protected method Dispose(Boolean) For derived class implementers. This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

(Inherited from CommonObject.)

Public method Duplicate Copies this brep. (Overrides GeometryBase.Duplicate().)
Public method DuplicateBrep Same as Duplicate(), but already performs a cast to a brep. This cast always succeeds.
Public method DuplicateEdgeCurves() Duplicate all the edges of this Brep.
Public methodCode example DuplicateEdgeCurves(Boolean) Duplicate edges of this Brep.
Public method DuplicateNakedEdgeCurves Duplicate naked edges of this Brep
Public method DuplicateShallow Constructs a light copy of this object. By "light", it is meant that the same underlying data is used until something is done to attempt to change it. For example, you could have a shallow copy of a very heavy mesh object and the same underlying data will be used when doing things like inspecting the number of faces on the mesh. If you modify the location of one of the mesh vertices, the shallow copy will create a full duplicate of the underlying mesh data and the shallow copy will become a deep copy. (Inherited from GeometryBase.)
Public method DuplicateSubBrep Copy a subset of this Brep into another Brep.
Public method DuplicateVertices Duplicate all the corner vertices of this Brep.
Public method EnsurePrivateCopy If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want. (Inherited from CommonObject.)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize() Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected method Finalize() Passively reclaims unmanaged resources when the class user did not explicitly call Dispose(). (Inherited from CommonObject.)
Public method Flip Reverses entire brep orientation of all faces.
Public method GetArea() Compute the Area of the Brep. If you want proper Area data with moments and error information, use the AreaMassProperties class.
Public method GetArea(Double, Double) Compute the Area of the Brep. If you want proper Area data with moments and error information, use the AreaMassProperties class.
Public methodCode example GetBoundingBox(Boolean) Boundingbox solver. Gets the world axis aligned boundingbox for the geometry. (Inherited from GeometryBase.)
Public methodCode example GetBoundingBox(Plane) Aligned Boundingbox solver. Gets the plane aligned boundingbox. (Inherited from GeometryBase.)
Public method GetBoundingBox(Transform) Aligned Boundingbox solver. Gets the world axis aligned boundingbox for the transformed geometry. (Inherited from GeometryBase.)
Public method GetBoundingBox(Plane, Box) Aligned Boundingbox solver. Gets the plane aligned boundingbox. (Inherited from GeometryBase.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetObjectData Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object. (Inherited from CommonObject.)
Public method GetRegions Gets an array containing all regions in this brep.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetUserString Gets user string from this geometry. (Inherited from GeometryBase.)
Public method GetUserStrings Gets a copy of all (user key string, user value string) pairs attached to this geometry. (Inherited from GeometryBase.)
Public method GetVolume() Compute the Volume of the Brep. If you want proper Volume data with moments and error information, use the VolumeMassProperties class.
Public method GetVolume(Double, Double) Compute the Volume of the Brep. If you want proper Volume data with moments and error information, use the VolumeMassProperties class.
Public method GetWireframe Constructs all the Wireframe curves for this Brep.
Public method IsDuplicate See if this and other are same brep geometry.
Public method IsPointInside Determines if point is inside Brep. This question only makes sense when the brep is a closed manifold. This function does not 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.
Public method IsValidGeometry 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.
Public method IsValidTolerancesAndFlags 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.
Public method IsValidTopology Tests the brep to see if its topology information is valid.
Public method IsValidWithLog Determines if an object is valid. Also provides a report on errors if this object happens not to be valid. (Inherited from CommonObject.)
Public method Join 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 methodStatic member JoinBreps 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 method JoinNakedEdges Joins naked edge pairs within the same brep that overlap within tolerance.
Public method MakeDeformable If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling. (Inherited from GeometryBase.)
Public method MakeValidForV2 No support is available for this function. Expert user function that converts all geometry in brep to nurbs form.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method MemoryEstimate Computes an estimate of the number of bytes that this object is using in memory. (Inherited from GeometryBase.)
Public methodStatic member MergeBreps 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 method MergeCoplanarFaces Merges adjacent coplanar faces into single faces.
Protected method NonConstOperation For derived classes implementers. Defines the necessary implementation to free the instance from being const.

(Inherited from CommonObject.)

Protected method OnSwitchToNonConst Is called when a non-const operation occurs. (Inherited from GeometryBase.)
Public method RebuildTrimsForV2 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 method Repair No support is available for this function. Attempts to "right" a brep that is not faulty or incomplete.
Public method Rotate Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule). (Inherited from GeometryBase.)
Public method Scale Scales the object by the specified factor. The scale is centered at the origin. (Inherited from GeometryBase.)
Public method SetTolerancesBoxesAndFlags() Set tolerances and flags in a Brep.
Public method SetTolerancesBoxesAndFlags(Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean) Set tolerances and flags in a Brep.
Public method SetTrimIsoFlags This function can be used to set the BrepTrim::m_iso flag. It is intended to be used when creating a Brep from a definition that does not include compatible parameter space type information.
Public method SetUserString Attach a user string (key,value combination) to this geometry. (Inherited from GeometryBase.)
Public method SetVertices This function can be used to compute vertex information for a b-rep when everything but the Vertices array is properly filled in. It is intended to be used when creating a Brep from a definition that does not include explicit vertex information.
Public method Split(Brep, Double) Splits a Brep into pieces.
Public method Split(Brep, Double, Boolean) Splits a Brep into pieces.
Public method Standardize Standardizes all trims, edges, and faces in the brep. After standardizing, there may be unused curves and surfaces in the brep. Call Brep.Compact to remove these unused curves and surfaces.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method 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. (Inherited from GeometryBase.)
Public method Translate(Vector3d) Translates the object along the specified vector. (Inherited from GeometryBase.)
Public method Translate(Double, Double, Double) Translates the object along the specified vector. (Inherited from GeometryBase.)
Public method Trim(Brep, Double) 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.
Public method Trim(Plane, Double) 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 halfspace opposite from the plane normal.
Public methodStatic member TryConvertBrep Attempts to convert a generic Geometry object into a Brep.
  Back to Top

See Also

Reference

Brep Class
Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️