BrepCutUpSurface Method (Surface, IEnumerableCurve, Boolean, Double) |
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.
Namespace:
Rhino.Geometry
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 8.0
Syntax public static Brep[] CutUpSurface(
Surface surface,
IEnumerable<Curve> curves,
bool useEdgeCurves,
double tolerance
)
Public Shared Function CutUpSurface (
surface As Surface,
curves As IEnumerable(Of Curve),
useEdgeCurves As Boolean,
tolerance As Double
) As Brep()
Parameters
- surface
- Type: Rhino.GeometrySurface
The surface. - curves
- Type: System.Collections.GenericIEnumerableCurve
The curves. - useEdgeCurves
- Type: SystemBoolean
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
- Type: SystemDouble
The fitting tolerance.
When in doubt, use the document's model absolute tolerance.
Return Value
Type:
Brep
The resulting Breps is successful, otherwise an empty array.
Note, you may want to join the results into a single Brep.
Exceptions 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.
See Also