Click or drag to resize

MeshCreatePatch Method

Construct a mesh patch from a variety of input geometry.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 6.0
Syntax
public static Mesh CreatePatch(
	Polyline outerBoundary,
	double angleToleranceRadians,
	Surface pullbackSurface,
	IEnumerable<Curve> innerBoundaryCurves,
	IEnumerable<Curve> innerBothSideCurves,
	IEnumerable<Point3d> innerPoints,
	bool trimback,
	int divisions
)

Parameters

outerBoundary
Type: Rhino.GeometryPolyline
(optional: can be null) Outer boundary polyline, if provided this will become the outer boundary of the resulting mesh. Any of the input that is completely outside the outer boundary will be ignored and have no impact on the result. If any of the input intersects the outer boundary the result will be unpredictable and is likely to not include the entire outer boundary.
angleToleranceRadians
Type: SystemDouble
Maximum angle between unit tangents and adjacent vertices. Used to divide curve inputs that cannot otherwise be represented as a polyline.
pullbackSurface
Type: Rhino.GeometrySurface
(optional: can be null) Initial surface where 3d input will be pulled to make a 2d representation used by the function that generates the mesh. Providing a pullbackSurface can be helpful when it is similar in shape to the pattern of the input, the pulled 2d points will be a better representation of the 3d points. If all of the input is more or less coplanar to start with, providing pullbackSurface has no real benefit.
innerBoundaryCurves
Type: System.Collections.GenericIEnumerableCurve
(optional: can be null) Polylines to create holes in the output mesh. If innerBoundaryCurves are the only input then the result may be null if trimback is set to false (see comments for trimback) because the resulting mesh could be invalid (all faces created contained vertices from the perimeter boundary).
innerBothSideCurves
Type: System.Collections.GenericIEnumerableCurve
(optional: can be null) These polylines will create faces on both sides of the edge. If there are only input points(innerPoints) there is no way to guarantee a triangulation that will create an edge between two particular points. Adding a line, or polyline, to innerBothsideCurves that includes points from innerPoints will help guide the triangulation.
innerPoints
Type: System.Collections.GenericIEnumerablePoint3d
(optional: can be null) Points to be used to generate the mesh. If outerBoundary is not null, points outside of that boundary after it has been pulled to pullbackSurface (or the best plane through the input if pullbackSurface is null) will be ignored.
trimback
Type: SystemBoolean
Only used when a outerBoundary has not been provided. When that is the case, the function uses the perimeter of the surface as the outer boundary instead. If true, any face of the resulting triangulated mesh that contains a vertex of the perimeter boundary will be removed.
divisions
Type: SystemInt32
Only used when a outerBoundary has not been provided. When that is the case, division becomes the number of divisions each side of the surface's perimeter will be divided into to create an outer boundary to work with.

Return Value

Type: Mesh
mesh on success; null on failure
See Also