RhinoCommon API
BrepCreatePatch Method (IEnumerableGeometryBase, Surface, Int32, Int32, Boolean, Boolean, Double, Double, Double, Boolean, Double) |
Constructs a brep patch using all controls
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)

public static Brep CreatePatch( IEnumerable<GeometryBase> geometry, Surface startingSurface, int uSpans, int vSpans, bool trim, bool tangency, double pointSpacing, double flexibility, double surfacePull, bool[] fixEdges, double tolerance )
Public Shared Function CreatePatch ( geometry As IEnumerable(Of GeometryBase), startingSurface As Surface, uSpans As Integer, vSpans As Integer, trim As Boolean, tangency As Boolean, pointSpacing As Double, flexibility As Double, surfacePull As Double, fixEdges As Boolean(), tolerance As Double ) As Brep
Parameters
- geometry
- Type: System.Collections.GenericIEnumerableGeometryBase
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
- Type: Rhino.GeometrySurface
A starting surface (can be null). - uSpans
- Type: SystemInt32
Number of surface spans used when a plane is fit through points to start in the U direction. - vSpans
- Type: SystemInt32
Number of surface spans used when a plane is fit through points to start in the U direction. - trim
- Type: SystemBoolean
If true, try to find an outer loop from among the input curves and trim the result to that loop - tangency
- Type: SystemBoolean
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
- Type: SystemDouble
Basic distance between points sampled from input curves. - flexibility
- Type: SystemDouble
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 logrithmic. Numbers around 0.001 or 0.1 make the patch pretty stiff and numbers around 10 or 100 make the surface flexible. - surfacePull
- Type: SystemDouble
Tends to keep the result surface where it was before the fit in areas where there is on influence from the input geometry - fixEdges
- Type: SystemBoolean
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
- Type: SystemDouble
Tolerance used by input analysis functions for loop finding, trimming, etc.
Return Value
Type: BrepA brep fit through input on success, or null on error.

Rhino for Mac
Supported in: 5.4Rhino for Windows
Supported in: 6.14