[Serializable] public class Mesh : GeometryBase
Represents a geometry type that is defined by vertices and faces.

This is often called a face-vertex mesh.

Constructors

Mesh

#ExampleSince v5.0
public Mesh()
Initializes a new empty mesh.

Mesh

#
protected Mesh(SerializationInfo info, StreamingContext context)
Protected constructor for internal use.
info (SerializationInfo)Serialization data.
context (StreamingContext)Serialization stream.

Properties

ComponentStates

#Since v6.0
public MeshVertexStatusList ComponentStates { get; }
Gets access to the vertex hidden/visibility collection in this mesh. This is a runtime property and it is not saved in the 3dm file.

DisjointMeshCount

#Since v5.0
public int DisjointMeshCount { get; }
Gets the number of disjoint (topologically unconnected) pieces in this mesh.

Disposed

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

FaceNormals

#Since v5.0
public MeshFaceNormalList FaceNormals { get; }
Gets access to the face normal collection in this mesh.

Faces

#ExampleSince v5.0
public MeshFaceList Faces { get; }
Gets access to the mesh face list.

HasBrepForm

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

HasCachedTextureCoordinates

#Since v5.10
public bool HasCachedTextureCoordinates { get; }
Will return true if SetCachedTextureCoordinates has been called; otherwise will return false.

HasPrincipalCurvatures

#Since v7.0
public bool HasPrincipalCurvatures { get; }
HasPrincipalCurvatures

HasUserData

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

IsClosed

#Since v5.0
public bool IsClosed { get; }
Returns true if every mesh "edge" has two or more faces.

IsDeformable

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

IsDocumentControlled

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

IsOriented

#Since v7.6
public bool IsOriented { get; }
Returns true if the mesh is manifold and every pair of faces that share an "edge" have compatible orientations.

IsShallowDuplicate

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

IsSolid

#Since v7.6
public bool IsSolid { get; }
Returns true if the mesh is solid. A "solid" is a closed oriented manifold.

IsValid

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

Ngons

#Since v6.0
public MeshNgonList Ngons { get; }
Gets access to the mesh ngon list.

Ngons represent groups of Faces (triangles + quads).

Faces are used to tessellate an Ngon internally.

When a triangle or quad is referenced in the Ngon list, it is no longer visualized and conceived as a single entity, but takes part of the Ngon.

If you need to get access to both Ngons and the faces that are not referenced by Ngons, that is, all polygons that are visible in the mesh, then use the GetNgonAndFacesEnumerable() helper method.

Normals

#ExampleSince v5.0
public MeshVertexNormalList Normals { get; }
Gets access to the vertex normal collection in this mesh.

ObjectType

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

PartitionCount

#Since v5.6
public int PartitionCount { get; }
Number of partition information chunks stored on this mesh based on the last call to CreatePartitions

PrincipalCurvatures

#Since v9.0
public MeshPrincipalCurvatureList PrincipalCurvatures { get; }
Gets access to the (optional) principal curvatures list in this mesh. Principal curvatures are found on analysis meshes, not render meshes.

TextureCoordinates

#Since v5.0
public MeshTextureCoordinateList TextureCoordinates { get; }
Gets access to the vertex texture coordinate collection in this mesh.

TopologyEdges

#Since v5.0
public MeshTopologyEdgeList TopologyEdges { get; }
Gets the MeshTopologyEdgeList object associated with this mesh.

This object stores edge connectivity.

TopologyVertices

#Since v5.0
public MeshTopologyVertexList TopologyVertices { get; }
Gets the MeshTopologyVertexList object associated with this mesh.

This object stores vertex connectivity and the indices of vertices that were unified while computing the edge topology.

UserData

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

UserDictionary

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

UserStringCount

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

VertexColors

#Since v5.0
public MeshVertexColorList VertexColors { get; }
Gets access to the (optional) vertex color collection in this mesh.

Vertices

#ExampleSince v5.0
public MeshVertexList Vertices { get; }
Gets access to the vertices set of this mesh.

Methods

Append

#Since v6.8
public void Append(IEnumerable<Mesh> meshes)
Append a list of meshes. This function is much more efficient than making repeated calls to Mesh.Append(Mesh) when lots of meshes are being joined into a single large mesh.
meshes (IEnumerable<Mesh>)Meshes to append to this one.

Append

#ExampleSince v5.0
public void Append(Mesh other)
Appends a copy of another mesh to this one and updates indices of appended mesh parts.
other (Mesh)Mesh to append to this one.

Check

#Since v7.0
public bool Check(TextLog textLog, ref MeshCheckParameters parameters)
Examines the mesh and logs a description of what it finds right or wrong. The various properties the function checks for are described in MeshCheckParameters.
textLog (TextLog)The text log
parameters (ref MeshCheckParameters)The mesh checking parameter and results.
Returns true if the mesh is valid, false otherwise.

ClearSurfaceData

#Since v6.0
public void ClearSurfaceData()
Removes surface parameters, curvature parameters and surface statistics from the mesh.

ClearTextureData

#Since v5.0
public void ClearTextureData()
Removes all texture coordinate information from this mesh.

ClosestMeshPoint

#Since v5.0
[ConstOperation] public MeshPoint ClosestMeshPoint(Point3d testPoint, double maximumDistance)
Gets the point on the mesh that is closest to a given test point. Similar to the ClosestPoint function except this returns a MeshPoint class which includes extra information beyond just the location of the closest point.
testPoint (Point3d)The source of the search.
maximumDistance (double)Optional upper bound on the distance from test point to the mesh. If you are only interested in finding a point Q on the mesh when testPoint.DistanceTo(Q) < maximumDistance, then set maximumDistance to that value. This parameter is ignored if you pass 0.0 for a maximumDistance.
closest point information on success. null on failure.

ClosestPoint

#Since v5.0
[ConstOperation] public int ClosestPoint(Point3d testPoint, out Point3d pointOnMesh, double maximumDistance)
Gets the point on the mesh that is closest to a given test point.
testPoint (Point3d)Point to search for.
pointOnMesh (out Point3d)Point on the mesh closest to testPoint.
maximumDistance (double)Optional upper bound on the distance from test point to the mesh. If you are only interested in finding a point Q on the mesh when testPoint.DistanceTo(Q) < maximumDistance, then set maximumDistance to that value. This parameter is ignored if you pass 0.0 for a maximumDistance.
Index of face that the closest point lies on if successful. -1 if not successful; the value of pointOnMesh is undefined.

ClosestPoint

#Since v5.0
[ConstOperation] public int ClosestPoint(Point3d testPoint, out Point3d pointOnMesh, out Vector3d normalAtPoint, double maximumDistance)
Gets the point on the mesh that is closest to a given test point.
testPoint (Point3d)Point to search for.
pointOnMesh (out Point3d)Point on the mesh closest to testPoint.
normalAtPoint (out Vector3d)The normal vector of the mesh at the closest point.
maximumDistance (double)Optional upper bound on the distance from test point to the mesh. If you are only interested in finding a point Q on the mesh when testPoint.DistanceTo(Q) < maximumDistance, then set maximumDistance to that value. This parameter is ignored if you pass 0.0 for a maximumDistance.
Index of face that the closest point lies on if successful. -1 if not successful; the value of pointOnMesh is undefined.

ClosestPoint

#Since v5.0
[ConstOperation] public Point3d ClosestPoint(Point3d testPoint)
Gets the point on the mesh that is closest to a given test point.
testPoint (Point3d)Point to search for.
The point on the mesh closest to testPoint, or Point3d.Unset on failure.

CollapseFacesByArea

#Since v6.0
public int CollapseFacesByArea(double lessThanArea, double greaterThanArea)
Collapses multiple mesh faces, with areas less than LessThanArea and greater than GreaterThanArea, based on the principles found in Stan Melax's mesh reduction PDF, see http://pomax.nihongoresources.com/downloads/PolygonReduction.pdf
Remarks: This number may differ from the initial number of faces that meet the input criteria because the areas of some initial faces may be altered as other faces are collapsed. The face area must be both less than LessThanArea AND greater than GreaterThanArea in order to be considered. Use large numbers for lessThanArea or zero for greaterThanArea to simulate an OR.
lessThanArea (double)Area in which faces are selected if their area is less than or equal to.
greaterThanArea (double)Area in which faces are selected if their area is greater than or equal to.
Number of faces that were collapsed in the process.

CollapseFacesByByAspectRatio

#Since v6.0
public int CollapseFacesByByAspectRatio(double aspectRatio)
Collapses a multiple mesh faces, determined by face aspect ratio, based on criteria found in Stan Melax's polygon reduction, see http://pomax.nihongoresources.com/downloads/PolygonReduction.pdf
Remarks: This number may differ from the initial number of faces that meet the input criteria because the aspect ratios of some initial faces may be altered as other faces are collapsed.
aspectRatio (double)Faces with an aspect ratio less than aspectRatio are considered as candidates.
Number of faces that were collapsed in the process.

CollapseFacesByEdgeLength

#Since v6.0
public int CollapseFacesByEdgeLength(bool bGreaterThan, double edgeLength)
Collapses multiple mesh faces, with greater/less than edge length, based on the principles found in Stan Melax's mesh reduction PDF, see http://pomax.nihongoresources.com/downloads/PolygonReduction.pdf
Remarks: This number may differ from the initial number of edges that meet the input criteria because the lengths of some initial edges may be altered as other edges are collapsed.
bGreaterThan (bool)Determines whether edge with lengths greater than or less than edgeLength are collapsed.
edgeLength (double)Length with which to compare to edge lengths.
Number of edges (faces) that were collapsed, -1 for general failure (like bad topology or index out of range) or -2 if all of the edges would be collapsed and the resulting mesh would be invalid.

ColorAt

#Since v5.0
[ConstOperation] public Color ColorAt(int faceIndex, double t0, double t1, double t2, double t3)
Evaluate a mesh normal at a set of barycentric coordinates. Barycentric coordinates must be assigned in accordance with the rules as defined by MeshPoint.T.
Remarks: Coordinate 0,0,0,0 is not a valid set of barycentric coordinates. The sum of t0 to t3 should be 1.
faceIndex (int)Index of triangle or quad to evaluate.
t0 (double)First barycentric coordinate.
t1 (double)Second barycentric coordinate.
t2 (double)Third barycentric coordinate.
t3 (double)Fourth barycentric coordinate. If the face is a triangle, this coordinate will be ignored.
The interpolated vertex color on the mesh or Color.Transparent if the faceIndex is not valid, if the barycentric coordinates could not be evaluated, or if there are no colors defined on the mesh.

ColorAt

#Since v5.0
[ConstOperation] public Color ColorAt(MeshPoint meshPoint)
Evaluate a mesh color at a set of barycentric coordinates.
meshPoint (MeshPoint)MeshPoint instance containing a valid Face Index and Barycentric coordinates.
The interpolated vertex color on the mesh or Color.Transparent if the faceIndex is not valid, if the barycentric coordinates could not be evaluated, or if there are no colors defined on the mesh.

Compact

#ExampleSince v5.0
public bool Compact()
Removes any unreferenced objects from arrays, re-indexes as needed and shrinks arrays to minimum required size.
true on success, false on failure.

ComponentIndex

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

ComputeAutoCreaseInformation

#Since v6.0
[EditorBrowsable(EditorBrowsableState.Never)] [Browsable(false)] public byte[] ComputeAutoCreaseInformation()
Do not use this method. Length: top.Mesh.Vertices.Count
An array that is bound to change.

ComputeCurvatureApproximation

#Since v8.6
[ConstOperation] public bool ComputeCurvatureApproximation(int type, out double[] perVertexCurvatures)
Compute an approximation of the discrete curvatures of the mesh vertices, according to which type of curvature information is requested. This method will not yield meaningful values on nonmanifold vertices, and nan on naked vertices. For now, this method operates solely on the mesh topology (the fully welded mesh), but distribtes the result across all the ordinary vertices. This method is a const and thread-safe method and will leave the m_K array untouched. An integer indicating which curvature is desired. gaussian_curvature = 1, mean_curvature = 2, minimum unsigned radius of curvature = 3, maximum unsigned radius of curvature = 4 Resulting curvature array on success, null on failure. On success, the length of the array is the number of vertices.
type (int)
perVertexCurvatures (out double[])
True on success and false on failure.

ComputeThickness

#Since v6.0
public static MeshThicknessMeasurement[] ComputeThickness(IEnumerable<Mesh> meshes, double maximumThickness, CancellationToken cancelToken)
Compute thickness metrics for this mesh.
meshes (IEnumerable<Mesh>)Meshes to include in thickness analysis.
maximumThickness (double)Maximum thickness to consider. Use as small a thickness as possible to speed up the solver.
cancelToken (CancellationToken)Computation cancellation token.
Array of thickness measurements.

ComputeThickness

#Since v6.0
public static MeshThicknessMeasurement[] ComputeThickness(IEnumerable<Mesh> meshes, double maximumThickness, double sharpAngle, CancellationToken cancelToken)
Compute thickness metrics for this mesh.
meshes (IEnumerable<Mesh>)Meshes to include in thickness analysis.
maximumThickness (double)Maximum thickness to consider. Use as small a thickness as possible to speed up the solver.
sharpAngle (double)Sharpness angle in radians.
cancelToken (CancellationToken)Computation cancellation token.
Array of thickness measurements.

ComputeThickness

#Since v6.0
public static MeshThicknessMeasurement[] ComputeThickness(IEnumerable<Mesh> meshes, double maximumThickness)
Compute thickness metrics for this mesh.
meshes (IEnumerable<Mesh>)Meshes to include in thickness analysis.
maximumThickness (double)Maximum thickness to consider. Use as small a thickness as possible to speed up the solver.
Array of thickness measurements.

ConstructConstObject

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

CopyFrom

#Since v5.0
public void CopyFrom(Mesh other)
Copies mesh values into this mesh from another mesh.
other (Mesh)The other mesh to copy from.
ArgumentNullExceptionIf other is null.

CreateBooleanDifference

#Since v9.0
public static Mesh[] CreateBooleanDifference(IEnumerable<Mesh> firstSet, IEnumerable<Mesh> secondSet, MeshBooleanOptions options, out Result result, out int[][] inputMap)
Computes the solid difference of two sets of meshes and reports which inputs contributed to each output.
firstSet (IEnumerable<Mesh>)First set of Meshes (the set to subtract from).
secondSet (IEnumerable<Mesh>)Second set of Meshes (the set to subtract).
options (MeshBooleanOptions)An option instance. Should have a valid Tolerance set.
result (out Result)Indicates if the function succeeded, was cancelled, did nothing, or failed.
inputMap (out int[][])On success, one array per output mesh (parallel to the returned array), listing the indices of the input meshes that contributed faces to that output. The index space is flat-concatenated: firstSet occupies 0..n0-1 and secondSet occupies n0..n0+n1-1, in enumeration order; null inputs are skipped and not assigned an index. Null when the function fails.
An array of Mesh results or null on failure.

CreateBooleanDifference

#Since v8.0
public static Mesh[] CreateBooleanDifference(IEnumerable<Mesh> firstSet, IEnumerable<Mesh> secondSet, MeshBooleanOptions options, out Result result)
Computes the solid difference of two sets of Meshes.
firstSet (IEnumerable<Mesh>)First set of Meshes (the set to subtract from).
secondSet (IEnumerable<Mesh>)Second set of Meshes (the set to subtract).
options (MeshBooleanOptions)An option instance. Should have a valid Tolerance set.
result (out Result)Indicates if the function succeeded, was cancelled, did nothing, or failed.
An array of Mesh results or null on failure.

CreateBooleanDifference

#Since v5.0
public static Mesh[] CreateBooleanDifference(IEnumerable<Mesh> firstSet, IEnumerable<Mesh> secondSet)
Computes the solid difference of two sets of Meshes.
firstSet (IEnumerable<Mesh>)First set of Meshes (the set to subtract from).
secondSet (IEnumerable<Mesh>)Second set of Meshes (the set to subtract).
An array of Mesh results or null on failure.

CreateBooleanIntersection

#Since v9.0
public static Mesh[] CreateBooleanIntersection(IEnumerable<Mesh> firstSet, IEnumerable<Mesh> secondSet, MeshBooleanOptions options, out Result result, out int[][] inputMap)
Computes the solid intersection of two sets of meshes and reports which inputs contributed to each output.
firstSet (IEnumerable<Mesh>)First set of Meshes.
secondSet (IEnumerable<Mesh>)Second set of Meshes.
options (MeshBooleanOptions)The boolean option instance, or null.
result (out Result)A value indicating success, or cancel, or failure, or nothing.
inputMap (out int[][])On success, one array per output mesh (parallel to the returned array), listing the indices of the input meshes that contributed faces to that output. The index space is flat-concatenated: firstSet occupies 0..n0-1 and secondSet occupies n0..n0+n1-1, in enumeration order; null inputs are skipped and not assigned an index. Null when the function fails.
An array of Mesh results or null on failure.

CreateBooleanIntersection

#Since v5.0
public static Mesh[] CreateBooleanIntersection(IEnumerable<Mesh> firstSet, IEnumerable<Mesh> secondSet, MeshBooleanOptions options, out Result result)
Computes the solid intersection of two sets of meshes.
firstSet (IEnumerable<Mesh>)First set of Meshes.
secondSet (IEnumerable<Mesh>)Second set of Meshes.
options (MeshBooleanOptions)The boolean option instance, or null.
result (out Result)A value indicating success, or cancel, or failure, or nothing.
An array of Mesh results or null on failure.

CreateBooleanIntersection

#Since v5.0
public static Mesh[] CreateBooleanIntersection(IEnumerable<Mesh> firstSet, IEnumerable<Mesh> secondSet)
Computes the solid intersection of two sets of meshes.
firstSet (IEnumerable<Mesh>)First set of Meshes.
secondSet (IEnumerable<Mesh>)Second set of Meshes.
An array of Mesh results or null on failure.

CreateBooleanSplit

#Since v9.0
public static Mesh[] CreateBooleanSplit(IEnumerable<Mesh> meshesToSplit, IEnumerable<Mesh> meshSplitters, MeshBooleanOptions options, out Result result, out int[][] inputMap)
Splits a set of meshes with another set and reports which inputs contributed to each output.
meshesToSplit (IEnumerable<Mesh>)A list, an array, or any enumerable set of meshes to be split.
meshSplitters (IEnumerable<Mesh>)A list, an array, or any enumerable set of meshes that cut.
options (MeshBooleanOptions)The boolean option instance, or null.
result (out Result)A value indicating success, or cancel, or failure, or nothing.
inputMap (out int[][])On success, one array per output mesh (parallel to the returned array), listing the indices of the input meshes that contributed faces to that output. The index space is flat-concatenated: meshesToSplit occupies 0..n0-1 and meshSplitters occupies n0..n0+n1-1, in enumeration order; null inputs are skipped and not assigned an index. Null when the function fails.
A new mesh array, or null on error.

CreateBooleanSplit

#Since v5.0
public static Mesh[] CreateBooleanSplit(IEnumerable<Mesh> meshesToSplit, IEnumerable<Mesh> meshSplitters, MeshBooleanOptions options, out Result result)
Splits a set of meshes with another set.
meshesToSplit (IEnumerable<Mesh>)A list, an array, or any enumerable set of meshes to be split. If this is null, null will be returned.
meshSplitters (IEnumerable<Mesh>)A list, an array, or any enumerable set of meshes that cut. If this is null, null will be returned.
options (MeshBooleanOptions)The boolean option instance, or null.
result (out Result)A value indicating success, or cancel, or failure, or nothing.
A new mesh array, or null on error.

CreateBooleanSplit

#Since v5.0
public static Mesh[] CreateBooleanSplit(IEnumerable<Mesh> meshesToSplit, IEnumerable<Mesh> meshSplitters)
Splits a set of meshes with another set.
meshesToSplit (IEnumerable<Mesh>)A list, an array, or any enumerable set of meshes to be split. If this is null, null will be returned.
meshSplitters (IEnumerable<Mesh>)A list, an array, or any enumerable set of meshes that cut. If this is null, null will be returned.
A new mesh array, or null on error.

CreateBooleanUnion

#Since v8.0
public static Mesh[] CreateBooleanUnion(IEnumerable<Mesh> meshes, double tolerance)
Computes the solid union of a set of meshes.
meshes (IEnumerable<Mesh>)Meshes to union.
tolerance (double)A valid tolerance value. See Intersection.MeshIntersectionsTolerancesCoefficient
An array of Mesh results or null on failure.

CreateBooleanUnion

#Since v9.0
public static Mesh[] CreateBooleanUnion(IEnumerable<Mesh> meshes, MeshBooleanOptions options, out Result commandResult, out int[][] inputMap)
Computes the solid union of a set of meshes and reports which inputs contributed to each output.
meshes (IEnumerable<Mesh>)Meshes to union.
options (MeshBooleanOptions)An option instance. Can be null, but generally it should be instantiated and have a tolerance set.
commandResult (out Result)A value indicating if the function was successful, or if it was cancelled, or if it did nothing, or failed.
inputMap (out int[][])On success, one array per output mesh (parallel to the returned array), listing the indices of the input meshes that contributed faces to that output. Indices refer to meshes in enumeration order; null inputs are skipped and not assigned an index. Null when the function fails.
An array of Mesh results or null on failure.

CreateBooleanUnion

#Since v8.0
public static Mesh[] CreateBooleanUnion(IEnumerable<Mesh> meshes, MeshBooleanOptions options, out Result commandResult)
Computes the solid union of a set of meshes.
meshes (IEnumerable<Mesh>)Meshes to union.
options (MeshBooleanOptions)An option instance. Can be null, but generally it should be instantiated and have a tolerance set.
commandResult (out Result)A value indicating if the function was successful, or if it was cancelled, or if it did nothing, or failed.

CreateBooleanUnion

#Since v5.0
public static Mesh[] CreateBooleanUnion(IEnumerable<Mesh> meshes)
Computes the solid union of a set of meshes. WARNING: Use the overload that takes a tolerance or options.
meshes (IEnumerable<Mesh>)Meshes to union.
An array of Mesh results or null on failure.

CreateContourCurves

#Since v7.13
public static Curve[] CreateContourCurves(Mesh meshToContour, Plane sectionPlane, double tolerance)
Constructs contour curves for a mesh, sectioned at a plane.
meshToContour (Mesh)A mesh to contour.
sectionPlane (Plane)A cutting plane.
tolerance (double)A tolerance value. If negative, the positive value will be used. WARNING! Good tolerance values are in the magnitude of 10^-7, or RhinoMath.SqrtEpsilon*10. See comments at Intersection.MeshIntersectionsTolerancesCoefficient
An array of curves. This array can be empty.

CreateContourCurves

#Since v5.0 Obsolete v7.13
public static Curve[] CreateContourCurves(Mesh meshToContour, Plane sectionPlane)
obsoletePrefer the option that takes a tolerance value.
(Old call maintained for compatibility.)
meshToContour (Mesh)Avoid.
sectionPlane (Plane)Avoid.
Avoid.

CreateContourCurves

#ExampleSince v7.13
public static Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, double interval, double tolerance)
Constructs contour curves for a mesh, sectioned along a linear axis.
meshToContour (Mesh)A mesh to contour.
contourStart (Point3d)A start point of the contouring axis.
contourEnd (Point3d)An end point of the contouring axis.
interval (double)An interval distance.
tolerance (double)A tolerance value. If negative, the positive value will be used. WARNING! Good tolerance values are in the magnitude of 10^-7, or RhinoMath.SqrtEpsilon*10. See comments at Intersection.MeshIntersectionsTolerancesCoefficient
An array of curves. This array can be empty.

CreateContourCurves

#Since v5.0 Obsolete v7.13
public static Curve[] CreateContourCurves(Mesh meshToContour, Point3d contourStart, Point3d contourEnd, double interval)
obsoletePrefer the overload that takes a tolerance value.
(Old call maintained for compatibility.)
meshToContour (Mesh)Avoid.
contourStart (Point3d)Avoid.
contourEnd (Point3d)Avoid.
interval (double)Avoid.
Avoid.

CreateConvexHull3D

#Since v8.5
public static Mesh CreateConvexHull3D(IEnumerable<Point3d> points, out int[][] hullFacets, double tolerance, double angleTolerance)
Attempts to create a 3d convex hull mesh from input points.
points (IEnumerable<Point3d>)The 3D input points to be covered with the convex hull. These points must not be coplanar.
hullFacets (out int[][])An out parameter of jagged array of indices into the argument point enumerable. Each list item specifies the indices that make up a facet of the convex hull. These indices are not indices into the resulting mesh's indices. Can be the empty jagged array if the resulting mesh is null.
tolerance (double)The tolerance used to decide if points are coplanar or not. Use the document's tolerance if in doubt.
angleTolerance (double)The angle tolerance used for merging coplanar points into facets. Use the document's angle tolerance in radians if in doubt.
A valid mesh if successful. If there were too few input points, or the input was coplanar up to the specified tolerance, the result can be null.

CreateExtrusion

#Since v8.0
public static Mesh CreateExtrusion(Curve profile, Vector3d direction, MeshingParameters parameters)
Constructs a mesh by extruding a curve along a vector.
profile (Curve)Profile curve to extrude.
direction (Vector3d)Direction and length of extrusion.
parameters (MeshingParameters)Parameters used to create the mesh.
A mesh on success or null on failure.

CreateExtrusion

#Since v8.0
public static Mesh CreateExtrusion(Curve profile, Vector3d direction)
Constructs a mesh by extruding a curve along a vector.
profile (Curve)Profile curve to extrude.
direction (Vector3d)Direction and length of extrusion.
A mesh on success or null on failure.

CreateFromBox

#Since v5.6
public static Mesh CreateFromBox(BoundingBox box, int xCount, int yCount, int zCount)
Constructs new mesh that matches a bounding box.
box (BoundingBox)A box to use for creation.
xCount (int)Number of faces in x-direction.
yCount (int)Number of faces in y-direction.
zCount (int)Number of faces in z-direction.
A new brep, or null on failure.

CreateFromBox

#Since v5.3
public static Mesh CreateFromBox(Box box, int xCount, int yCount, int zCount)
Constructs new mesh that matches an aligned box.
box (Box)Box to match.
xCount (int)Number of faces in x-direction.
yCount (int)Number of faces in y-direction.
zCount (int)Number of faces in z-direction.

CreateFromBox

#Since v5.3
public static Mesh CreateFromBox(IEnumerable<Point3d> corners, int xCount, int yCount, int zCount)
Constructs new mesh from 8 corner points.
corners (IEnumerable<Point3d>)8 points defining the box corners arranged as the vN labels indicate.
v7_____________v6
|\             |\
| \            | \
|  \ _____________\
|   v4         |   v5
|   |          |   |
|   |          |   |
v3--|----------v2  |
 \  |           \  |
  \ |            \ |
   \|             \|
    v0_____________v1
xCount (int)Number of faces in x-direction.
yCount (int)Number of faces in y-direction.
zCount (int)Number of faces in z-direction.
A new brep, or null on failure.
A new box mesh, on null on error.

CreateFromBrep

#ExampleSince v5.0
public static Mesh[] CreateFromBrep(Brep brep, MeshingParameters meshingParameters)
Constructs a mesh from a brep.
brep (Brep)Brep to approximate.
meshingParameters (MeshingParameters)Parameters to use during meshing.
An array of meshes.

CreateFromBrep

#ExampleSince v5.0 Obsolete v6.0
public static Mesh[] CreateFromBrep(Brep brep)
obsoleteUse version that takes MeshingParameters as input
Constructs a mesh from a brep.
brep (Brep)Brep to approximate.
An array of meshes.

CreateFromClosedPolyline

#Since v5.0
public static Mesh CreateFromClosedPolyline(Polyline polyline)
Attempts to create a Mesh that is a triangulation of a simple closed polyline that projects onto a plane.
polyline (Polyline)must be closed
New mesh on success or null on failure.

CreateFromCone

#Since v7.0
public static Mesh CreateFromCone(Cone cone, int vertical, int around, bool solid, bool quadCaps)
Constructs a mesh cone.
cone (Cone)
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the cone.
solid (bool)If false the mesh will be open with no faces on the circular planar portion.
quadCaps (bool)If true and it's possible to make quad caps, i.e.. around is even, then caps will have quad faces.
A valid mesh if successful.
ArgumentExceptionThrown when cone is invalid.

CreateFromCone

#Since v6.8
public static Mesh CreateFromCone(Cone cone, int vertical, int around, bool solid)
Constructs a mesh cone.
cone (Cone)
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the cone.
solid (bool)If false the mesh will be open with no faces on the circular planar portion.
A valid mesh if successful.
ArgumentExceptionThrown when cone is invalid.

CreateFromCone

#Since v5.0
public static Mesh CreateFromCone(Cone cone, int vertical, int around)
Constructs a solid mesh cone.
cone (Cone)
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the cone.
A valid mesh if successful.
ArgumentExceptionThrown when cone is invalid.

CreateFromCurveExtrusion

#Since v7.0
public static Mesh CreateFromCurveExtrusion(Curve curve, Vector3d direction, MeshingParameters parameters, BoundingBox boundingBox)
Constructs a mesh from an extruded curve. This method is designed for projecting curves onto a mesh. In most cases, a better to use CreateExtrusion(Curve, Vector3d).
curve (Curve)A curve to extrude.
direction (Vector3d)The direction of extrusion.
parameters (MeshingParameters)The parameters of meshing.
boundingBox (BoundingBox)The bounding box controls the length of the extrusion.
A new mesh, or null on failure.

CreateFromCurvePipe

#Since v6.0
public static Mesh CreateFromCurvePipe(Curve curve, double radius, int segments, int accuracy, MeshPipeCapStyle capType, bool faceted, IEnumerable<Interval> intervals = null)
Constructs a new mesh pipe from a curve.
curve (Curve)A curve to pipe.
radius (double)The radius of the pipe, a measure from the curve to the surface of the mesh pipe.
segments (int)The number of mesh faces that surround the curve. For example with three segments, the cross-section of the pipe looks like an equilateral triangle. The more segments there are, the rounder the pipe is.
accuracy (int)The accuracy of the pipe. Changes the visual fidelity of the pipe along the curve. Higher value means that the center of the pipe is closer to the curve. By increasing the accuracy, the mesh will get more faces along the curve.
capType (MeshPipeCapStyle)The type of cap to be created at the end of the pipe.
faceted (bool)Specifies whether the pipe is faceted, or not. This setting only affects the normals of the pipe mesh.
intervals (IEnumerable<Interval> = null)A series of intervals to pipe, or null to pipe the entire curve.
A new mesh if successful, or null on failure.

CreateFromCylinder

#Since v7.0
public static Mesh CreateFromCylinder(Cylinder cylinder, int vertical, int around, bool capBottom, bool capTop, bool circumscribe, bool quadCaps)
Constructs a mesh cylinder.
cylinder (Cylinder)
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the cylinder.
capBottom (bool)If true end at Cylinder.Height1 should be capped.
capTop (bool)If true end at Cylinder.Height2 should be capped.
circumscribe (bool)If true end polygons will circumscribe circle.
quadCaps (bool)If true and it's possible to make quad caps, i.e.. around is even, then caps will have quad faces.
Returns a mesh cylinder if successful, null otherwise.
ArgumentExceptionThrown when cylinder is invalid.

CreateFromCylinder

#Since v7.0
public static Mesh CreateFromCylinder(Cylinder cylinder, int vertical, int around, bool capBottom, bool capTop, bool quadCaps)
Constructs a mesh cylinder.
cylinder (Cylinder)
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the cylinder.
capBottom (bool)If true end at Cylinder.Height1 should be capped.
capTop (bool)If true end at Cylinder.Height2 should be capped.
quadCaps (bool)If true and it's possible to make quad caps, i.e.. around is even, then caps will have quad faces.
Returns a mesh cylinder if successful, null otherwise.
ArgumentExceptionThrown when cylinder is invalid.

CreateFromCylinder

#Since v7.0
public static Mesh CreateFromCylinder(Cylinder cylinder, int vertical, int around, bool capBottom, bool capTop)
Constructs a mesh cylinder.
cylinder (Cylinder)
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the cylinder.
capBottom (bool)If true end at Cylinder.Height1 should be capped.
capTop (bool)If true end at Cylinder.Height2 should be capped.
Returns a mesh cylinder if successful, null otherwise.
ArgumentExceptionThrown when cylinder is invalid.

CreateFromCylinder

#Since v5.0
public static Mesh CreateFromCylinder(Cylinder cylinder, int vertical, int around)
Constructs a capped mesh cylinder.
cylinder (Cylinder)
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the cylinder.
Returns a mesh cylinder if successful, null otherwise.
ArgumentExceptionThrown when cylinder is invalid.

CreateFromExtrusion

#Since v8.3
public static Mesh CreateFromExtrusion(Extrusion extrusion, MeshingParameters meshingParameters)
Constructs a mesh from a brep.
extrusion (Extrusion)Brep to approximate.
meshingParameters (MeshingParameters)Parameters to use during meshing.
A mesh.

CreateFromFilteredFaceList

#Since v7.0
public static Mesh CreateFromFilteredFaceList(Mesh original, IEnumerable<bool> inclusion)
Constructs a sub-mesh, that contains a filtered list of faces.
original (Mesh)The mesh to copy. If null, null is returned.
inclusion (IEnumerable<bool>)A series of true and false values, that determine if each face is used in the new mesh. If null or empty, a non-filtered copy of the original mesh is returned.

If the amount does not match the length of the face list, the pattern is repeated. If it exceeds the amount of faces in the mesh face list, the pattern is truncated.

A copy of the original mesh with its faces filtered, or null on failure.

CreateFromIsosurface

#
public static Mesh CreateFromIsosurface(Func<Point3d, double> scalarFieldEvaluator, BoundingBox box, int resolution, int RootFindingMaxSteps)
Create an isosurface mesh based on a scalar field evaluator
scalarFieldEvaluator (Func<Point3d, double>)
box (BoundingBox)
resolution (int)
RootFindingMaxSteps (int)

CreateFromIterativeCleanup

#Since v7.0
public static Mesh[] CreateFromIterativeCleanup(IEnumerable<Mesh> meshes, double tolerance)
Repairs meshes with vertices that are too near, using a tolerance value.
meshes (IEnumerable<Mesh>)The meshes to be repaired.
tolerance (double)A minimum distance for clean vertices.
A valid meshes array if successful. If no change was required, some meshes can be null. Otherwise, null, when no changes were done.

CreateFromLines

#Since v6.0
public static Mesh CreateFromLines(Curve[] lines, int maxFaceValence, double tolerance)
Creates a mesh by analizing the edge structure. Input lines could be from the extraction of edges from an original mesh.
lines (Curve[])Lines to use for computation. If curve is non-linear, curve ends are used
maxFaceValence (int)The maximum number of edges per face.
tolerance (double)The distance after which two end points of lines are considered coincident.
A new mesh, or null if no mesh is constructed.

CreateFromPatchSingleFace

#Since v8.0
public static Mesh CreateFromPatchSingleFace(Mesh mesh, IEnumerable<ComponentIndex> components)
Creates a single mesh face from the given input.
mesh (Mesh)The input mesh.
components (IEnumerable<ComponentIndex>)An enumeration of component indexes from the input mesh. This can be one following combinations: 1 vertex (MeshVertex or MeshTopologyVertex) and 1 edge (MeshTopologyEdge), 2 edges (MeshTopologyEdge), or 3 vertices (MeshVertex or MeshTopologyVertex).
A new mesh if successful, null otherwise.

CreateFromPlanarBoundary

#Since v6.0
public static Mesh CreateFromPlanarBoundary(Curve boundary, MeshingParameters parameters, double tolerance)
Attempts to construct a mesh from a closed planar curve.RhinoMakePlanarMeshes
boundary (Curve)must be a closed planar curve.
parameters (MeshingParameters)parameters used for creating the mesh.
tolerance (double)Tolerance to use during operation.
New mesh on success or null on failure.

CreateFromPlanarBoundary

#Since v5.0 Obsolete v6.0
public static Mesh CreateFromPlanarBoundary(Curve boundary, MeshingParameters parameters)
obsoleteUse version that takes a tolerance parameter instead
Do not use this overload. Use version that takes a tolerance parameter instead.
boundary (Curve)Do not use.
parameters (MeshingParameters)Do not use.
Do not use.

CreateFromPlane

#Since v5.0
public static Mesh CreateFromPlane(Plane plane, Interval xInterval, Interval yInterval, int xCount, int yCount)
Constructs a planar mesh grid.
plane (Plane)Plane of mesh.
xInterval (Interval)Interval describing size and extends of mesh along plane x-direction.
yInterval (Interval)Interval describing size and extends of mesh along plane y-direction.
xCount (int)Number of faces in x-direction.
yCount (int)Number of faces in y-direction.
ArgumentExceptionThrown when plane is a null reference.
ArgumentExceptionThrown when xInterval is a null reference.
ArgumentExceptionThrown when yInterval is a null reference.
ArgumentOutOfRangeExceptionThrown when xCount is less than or equal to zero.
ArgumentOutOfRangeExceptionThrown when yCount is less than or equal to zero.

CreateFromSphere

#Since v5.0
public static Mesh CreateFromSphere(Sphere sphere, int xCount, int yCount)
Constructs a mesh sphere.
sphere (Sphere)Base sphere for mesh.
xCount (int)Number of faces in the around direction.
yCount (int)Number of faces in the top-to-bottom direction.
ArgumentExceptionThrown when sphere is invalid.
ArgumentOutOfRangeExceptionThrown when xCount is less than or equal to two.
ArgumentOutOfRangeExceptionThrown when yCount is less than or equal to two.

CreateFromSubD

#Since v9.0
[CLSCompliant(false)] public static Mesh CreateFromSubD(SubD subd, Density displayDensity)
Create a mesh from a SubD limit surface
subd (SubD)SubD to mesh
displayDensity (SubDDisplayParameters.Density)Adaptive display density value to use. If in doubt, pass SubDDisplayParameters.Density.DefaultDensity: this is what the cache uses.
New mesh representing the SubD

CreateFromSubD

#Since v7.0
public static Mesh CreateFromSubD(SubD subd, int displayDensity)
Create a mesh from a SubD limit surface
subd (SubD)SubD to mesh
displayDensity (int)Adaptive display density value to use. If in doubt, pass SubDDisplayParameters.Density.DefaultDensity: this is what the cache uses.
New mesh representing the SubD

CreateFromSubD

#Since v9.0
public static Mesh CreateFromSubD(SubD subd)
Create a mesh from a SubD limit surface, using the default meshing density for SubDs.
subd (SubD)SubD to mesh
New mesh representing the SubD

CreateFromSubDControlNet

#Since v7.0
public static Mesh CreateFromSubDControlNet(SubD subd)
Create a mesh from a SubD control net
subd (SubD)
mesh representing control net on success, null on failure

CreateFromSubDControlNetWithTextureCoordinates

#Since v8.3
public static Mesh CreateFromSubDControlNetWithTextureCoordinates(SubD subd)
Create a mesh from a SubD control net including texture coordinates
subd (SubD)
mesh representing control net on success, null on failure

CreateFromSurface

#Since v6.5
public static Mesh CreateFromSurface(Surface surface, MeshingParameters meshingParameters)
Constructs a mesh from a surface
surface (Surface)Surface to approximate
meshingParameters (MeshingParameters)settings used to create the mesh
New mesh representing the surface

CreateFromSurface

#Since v6.5
public static Mesh CreateFromSurface(Surface surface)
Constructs a mesh from a surface
surface (Surface)Surface to approximate
New mesh representing the surface

CreateFromSurfaceControlNet

#Since v7.18
public static Mesh CreateFromSurfaceControlNet(Surface surface)
Calculate a mesh representation of a surface's control net.
surface (Surface)The surface.
Mesh representing the surface control net on success, null on failure

CreateFromTessellation

#
public static Mesh CreateFromTessellation(IEnumerable<Point3d> points, IEnumerable<IEnumerable<Point3d>> edges, Plane plane, bool allowNewVertices)
Attempts to create a mesh that is a triangulation of a list of points, projected on a plane, including its holes and fixed edges.
points (IEnumerable<Point3d>)A list, an array or any enumerable of points.
edges (IEnumerable<IEnumerable<Point3d>>)A list of polylines, or other lists of points representing edges. This can be null. If nested enumerable items are null, they will be discarded.
plane (Plane)A plane.
allowNewVertices (bool)If true, the mesh might have more vertices than the list of input points, if doing so will improve long thin triangles.
A new mesh, or null if not successful.
ArgumentNullExceptionIf points is null.
ArgumentExceptionIf plane is not valid.

CreateFromTorus

#Since v7.0
public static Mesh CreateFromTorus(Torus torus, int vertical, int around)
Constructs a mesh torus.
torus (Torus)The torus.
vertical (int)Number of faces in the top-to-bottom direction.
around (int)Number of faces around the torus.
Returns a mesh torus if successful, null otherwise.
ArgumentExceptionThrown when torus is invalid.

CreateIcoSphere

#Since v6.0
public static Mesh CreateIcoSphere(Sphere sphere, int subdivisions)
Constructs a icospherical mesh. A mesh icosphere differs from a standard UV mesh sphere in that it's vertices are evenly distributed. A mesh icosphere starts from an icosahedron (a regular polyhedron with 20 equilateral triangles). It is then refined by splitting each triangle into 4 smaller triangles. This splitting can be done several times.
sphere (Sphere)The input sphere provides the orienting plane and radius.
subdivisions (int)The number of times you want the faces split, where 0 <= subdivisions <= 7. Note, the total number of mesh faces produces is: 20 * (4 ^ subdivisions)
A welded mesh icosphere if successful, or null on failure.

CreatePartitions

#Since v5.6
public bool CreatePartitions(int maximumVertexCount, int maximumTriangleCount)
In ancient times (or modern smart phone times), some rendering engines were only able to process small batches of triangles and the CreatePartitions() function was provided to partition the mesh into subsets of vertices and faces that those rendering engines could handle.
maximumVertexCount (int)
maximumTriangleCount (int)
true on success

CreatePatch

#Since v6.0
public static Mesh CreatePatch(Polyline outerBoundary, double angleToleranceRadians, Surface pullbackSurface, IEnumerable<Curve> innerBoundaryCurves, IEnumerable<Curve> innerBothSideCurves, IEnumerable<Point3d> innerPoints, bool trimback, int divisions)
Construct a mesh patch from a variety of input geometry.
outerBoundary (Polyline)(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 (double)Maximum angle between unit tangents and adjacent vertices. Used to divide curve inputs that cannot otherwise be represented as a polyline.
pullbackSurface (Surface)(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 (IEnumerable<Curve>)(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 (IEnumerable<Curve>)(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 (IEnumerable<Point3d>)(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 (bool)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 (int)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.
mesh on success; null on failure

CreateQuadSphere

#Since v6.0
public static Mesh CreateQuadSphere(Sphere sphere, int subdivisions)
Constructs a quad mesh sphere. A quad mesh sphere differs from a standard UV mesh sphere in that it's vertices are evenly distributed. A quad mesh sphere starts from a cube (a regular polyhedron with 6 square sides). It is then refined by splitting each quad into 4 smaller quads. This splitting can be done several times.
sphere (Sphere)The input sphere provides the orienting plane and radius.
subdivisions (int)The number of times you want the faces split, where 0 <= subdivisions <= 8. Note, the total number of mesh faces produces is: 6 * (4 ^ subdivisions)
A welded quad mesh sphere if successful, or null on failure.

CreateQuickHull3D

#Since v9.0
public static Mesh CreateQuickHull3D(IEnumerable<Point3d> points, out List<int[]> indexMap)
Attempts to create a 3d convex hull mesh from input points using the QuickHull algorithm. Hull faces whose shared edges are not clearly convex are merged, so faces of the resulting mesh may be triangles, quads, or larger convex polygons (returned as mesh ngons).
points (IEnumerable<Point3d>)The 3D input points to be covered with the convex hull. At least four points are required, and they must not be coincident, colinear, or coplanar.
indexMap (out List<int[]>)List of integer arrays, one for each hull face, containing the indices into the input points enumerable that make up that face. Note, this can be null.
A valid mesh if successful. If there were too few input points, or the input was degenerate (coincident, colinear, or coplanar), the result is null.

CreateQuickHull3D

#Since v9.0
public static Mesh CreateQuickHull3D(IEnumerable<Point3d> points)
Attempts to create a 3d convex hull mesh from input points using the QuickHull algorithm. Hull faces whose shared edges are not clearly convex are merged, so faces of the resulting mesh may be triangles, quads, or larger convex polygons (returned as mesh ngons).
points (IEnumerable<Point3d>)The 3D input points to be covered with the convex hull. At least four points are required, and they must not be coincident, colinear, or coplanar.
A valid mesh if successful. If there were too few input points, or the input was degenerate (coincident, colinear, or coplanar), the result is null.

CreateQuickHull3D

#Since v9.0
public static Mesh CreateQuickHull3D(PointCloud pointCloud, out List<int[]> indexMap)
Attempts to create a 3d convex hull mesh from an input point cloud using the QuickHull algorithm, also returning the input points that make up each hull face.
pointCloud (PointCloud)The point cloud to be covered with the convex hull. At least four points are required, and they must not be coincident, colinear, or coplanar.
indexMap (out List<int[]>)List of integer arrays, one for each hull face, containing the indices into the point cloud that make up that face. Note, this can be null.
A valid mesh if successful. If there were too few input points, or the input was degenerate (coincident, colinear, or coplanar), the result is null.

CreateQuickHull3D

#Since v9.0
public static Mesh CreateQuickHull3D(PointCloud pointCloud)
Attempts to create a 3d convex hull mesh from an input point cloud using the QuickHull algorithm. Hull faces whose shared edges are not clearly convex are merged, so faces of the resulting mesh may be triangles, quads, or larger convex polygons (returned as mesh ngons).
pointCloud (PointCloud)The point cloud to be covered with the convex hull. At least four points are required, and they must not be coincident, colinear, or coplanar.
A valid mesh if successful. If there were too few input points, or the input was degenerate (coincident, colinear, or coplanar), the result is null.

CreateRefinedCatmullClarkMesh

#Since v6.0
[EditorBrowsable(EditorBrowsableState.Never)] [Browsable(false)] public static Mesh CreateRefinedCatmullClarkMesh(Mesh mesh, RefinementSettings settings = null)
Instantiates a new mesh that represents a Catmull-Clark subdivision of the mesh.
mesh (Mesh)The mesh to subdivide.
settings (RefinementSettings = null)An instance of the settings class, or null for defaults.
A new mesh. null is never returned.

CreateRefinedLoopMesh

#Since v6.0
[EditorBrowsable(EditorBrowsableState.Never)] [Browsable(false)] public static Mesh CreateRefinedLoopMesh(Mesh mesh, LoopFormula formula = LoopFormula.WarrenWeimer, RefinementSettings settings = null)
Instantiates a new mesh that represents a Loop subdivision of the mesh.
mesh (Mesh)The mesh to subdivide.
formula (LoopFormula = LoopFormula.WarrenWeimer)The Loop subdivision formula.
settings (RefinementSettings = null)An instance of the settings class, or null for defaults.
A new mesh. null is never returned.

CreateUnweldedMesh

#Since v8.12
public static Mesh CreateUnweldedMesh(Mesh mesh)
Creates a new unwelded mesh from an existing mesh. Texture coordinates are ignored.
mesh (Mesh)The source mesh to copy.
The new unwelded mesh if successful, null otherwise.

CreateVertexColorsFromBitmap

#Since v7.10
public bool CreateVertexColorsFromBitmap(RhinoDoc doc, TextureMapping mapping, Transform xform, Bitmap bitmap)
Populate the vertex colors from a bitmap image.
doc (RhinoDoc)The document associated with this operation for searching purposes.
mapping (TextureMapping)The texture mapping to be used on the mesh. Surface parameter mapping is assumed if null - but surface parameters must be available on the mesh.
xform (Transform)Local mapping transform for the mesh mapping. Use identity for surface parameter mapping.
bitmap (Bitmap)The bitmap to use for the colors.

DataCRC

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

DeleteAllUserStrings

public void DeleteAllUserStrings()
inherited fromGeometryBase

DeleteUserString

public bool DeleteUserString(string key)
inherited fromGeometryBase
key (string)

DestroyPartition

#Since v6.0
public void DestroyPartition()
Destroys mesh partition.

DestroyTopology

#Since v6.0
public void DestroyTopology()
Removes topology data, forcing all topology information to be recomputed.

DestroyTree

#Since v6.0
public void DestroyTree()
Destroys the mesh vertex access tree.

Dispose

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

Dispose

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

Duplicate

#Since v5.0
public override GeometryBase Duplicate()
Constructs a copy of this mesh. This is the same as DuplicateMesh().
A mesh.

DuplicateMesh

#Since v5.0
public Mesh DuplicateMesh()
Constructs a copy of this mesh. This is the same as Duplicate().

DuplicateShallow

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

This behavior is overridden by implementing classes.

EnsurePrivateCopy

public void 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 fromCommonObject

EvaluateMeshGeometry

#Since v5.0
public bool EvaluateMeshGeometry(Surface surface)
If the mesh has SurfaceParameters, the surface is evaluated at these parameters and the mesh geometry is updated.
surface (Surface)An input surface.
true if the operation succeeded; false otherwise.

ExplodeAtUnweldedEdges

#Since v5.0
[ConstOperation] public Mesh[] ExplodeAtUnweldedEdges()
Explode the mesh into sub-meshes where a sub-mesh is a collection of faces that are contained within a closed loop of "unwelded" edges. Unwelded edges are edges where the faces that share the edge have unique mesh vertices (not mesh topology vertices) at both ends of the edge.
Array of sub-meshes on success; null on error. If the count in the returned array is 1, then nothing happened and the output is essentially a copy of the input.

ExtendSelectionByEdgeRidge

#Since v6.0
public int[] ExtendSelectionByEdgeRidge(int[] preselectedEdges, int newEdge, bool iterative = true)
Suggests an extension of a selection set by using information related with topology and alignment.
preselectedEdges (int[])An array of edges that were already selected.
newEdge (int)A new edge index.
iterative (bool = true)
An array of edges that are in a visual relationship with newEdge.
ArgumentOutOfRangeExceptionIf newEdge is less than 0 or larger than the topology edge count.

ExtendSelectionByFaceLoop

#Since v6.0
public int[] ExtendSelectionByFaceLoop(int[] preselectedFaces, int newFace, bool iterative = true)
Suggests an extension of a face selection set by using information related with topology and alignment.
preselectedFaces (int[])An array of faces that were already selected.
newFace (int)A new face index. If this index is already part of the selection, no extension is suggested.
iterative (bool = true)
An array of faces that are in a visual relationship with newFace.
ArgumentOutOfRangeExceptionIf newFace is less than 0 or larger than the face count.

ExtractNonManifoldEdges

#Since v6.0
public Mesh ExtractNonManifoldEdges(bool selective)
Extracts, or removes, non-manifold mesh edges.
selective (bool)If true, then extract hanging faces only.
A mesh containing the extracted non-manifold parts if successful, null otherwise.

FileHole

#Since v6.0 Obsolete v9.0
public bool FileHole(int topologyEdgeIndex)
obsoleteUse Mesh.FillHole
topologyEdgeIndex (int)

FillHole

#Since v6.0
public bool FillHole(int topologyEdgeIndex)
Given a starting "naked" edge index, this function attempts to determine a "hole" by chaining additional naked edges together until if returns to the start index. Then it triangulates the closed polygon and either adds the faces to the mesh.
topologyEdgeIndex (int)Starting naked edge index.
true if successful, false otherwise.

FillHoles

#Since v6.0
public bool FillHoles()
Attempts to determine "holes" in the mesh by chaining naked edges together. Then it triangulates the closed polygons adds the faces to the mesh.
Remarks: This function does not differentiate between inner and outer naked edges. If you need that, it would be better to use Mesh.FillHole.
true if successful, false otherwise.

Flip

#Since v7.0
public void Flip(bool vertexNormals, bool faceNormals, bool faceOrientation, bool ngonsBoundaryDirection)
Reverses the direction of the mesh.
vertexNormals (bool)If true, vertex normals will be reversed.
faceNormals (bool)If true, face normals will be reversed.
faceOrientation (bool)If true, face orientations will be reversed.
ngonsBoundaryDirection (bool)If true, ngon boundaries will be reversed

Flip

#Since v5.0
public void Flip(bool vertexNormals, bool faceNormals, bool faceOrientation)
Reverses the direction of the mesh.
vertexNormals (bool)If true, vertex normals will be reversed.
faceNormals (bool)If true, face normals will be reversed.
faceOrientation (bool)If true, face orientations will be reversed.

GetBoundingBox

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

GetBoundingBox

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

GetBoundingBox

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

GetBoundingBox

[ConstOperation] public virtual BoundingBox GetBoundingBox(Transform xform)
Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
inherited fromGeometryBase
xform (Transform)Transformation to apply to object prior to the BoundingBox computation. The geometry itself is not modified.
The accurate bounding box of the transformed geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetCachedTextureCoordinates

#Since v5.10
public CachedTextureCoordinates GetCachedTextureCoordinates(Guid textureMappingId)
Call this method to get cached texture coordinates for a texture mapping with the specified Id.
textureMappingId (Guid)Texture mapping Id
Object which allows access to coordinates and other props.

GetCachedTextureCoordinates

#Since v8.7
public CachedTextureCoordinates GetCachedTextureCoordinates(RhinoObject rhinoObject, Texture texture)
Returns cached texture coordinate set based on the texture. Make sure to set up cached texture coordinates for all textures in the material first by calling SetCachedTextureCoordinatesFromMaterial(RhinoObject rhinoObject, Rhino.DocObjects.Material material) If this function returns null then there are no texture coordinates available.
rhinoObject (RhinoObject)RhinoObject that defines texture mappings
texture (Texture)Texture that defines the mapping channel
Cached texture coordinates if available and otherwise null

GetNakedEdgePointStatus

#Since v5.0
[ConstOperation] public bool[] GetNakedEdgePointStatus()
Returns an array of Boolean values equal in length to the number of vertices in this mesh. Each value corresponds to a mesh vertex and is set to true if the vertex is not completely surrounded by faces.
An array of true/false flags that, at each index, reveals if the corresponding vertex is completely surrounded by faces.

GetNakedEdges

#ExampleSince v5.0
[ConstOperation] public Polyline[] GetNakedEdges()
Returns all edges of a mesh that are considered "naked" in the sense that the edge only has one face.
An array of polylines, or null on error.

GetNgonAndFacesCount

#Since v6.0
[ConstOperation] public int GetNgonAndFacesCount()
Retrieves the count of items that GetNgonAndFacesEnumerable() will provide.
The amount of faces that are not part of an ngon + the amount of ngons.

GetNgonAndFacesEnumerable

#Since v6.0
public IEnumerable<MeshNgon> GetNgonAndFacesEnumerable()
Retrieves a complete enumerable, i.e., one that provides an iterator over every face that is present, no matter if defined as a triangle, a quad, or a strictly over-four-sided ngon.
The enumerator capable of enumerating through Ngons> Mesh.Ngons and Faces

GetObjectData

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

GetOutlines

#Since v5.0
[ConstOperation] public Polyline[] GetOutlines(Plane plane)
Constructs the outlines of a mesh projected against a plane.
plane (Plane)A plane to project against.
An array of polylines, or null on error.

GetOutlines

#Since v5.0
[ConstOperation] public Polyline[] GetOutlines(RhinoViewport viewport)
Constructs the outlines of a mesh. The projection information in the viewport is used to determine how the outlines are projected.
viewport (RhinoViewport)A viewport to determine projection direction.
An array of polylines, or null on error.

GetOutlines

#Since v6.0
[ConstOperation] public Polyline[] GetOutlines(ViewportInfo viewportInfo, Plane plane)
Constructs the outlines of a mesh.
viewportInfo (ViewportInfo)The viewport info that provides the outline direction.
plane (Plane)Usually the view's construction plane. If a parallel projection and view plane is parallel to this, then project the results to the plane.
An array of polylines, or null on error.

GetPartition

#Since v5.6
[ConstOperation] public MeshPart GetPartition(int which)
Retrieves a partition. See CreatePartitions(int, int) for details.
which (int)The partition index.

GetSelfIntersections

#Since v7.0
public bool GetSelfIntersections(double tolerance, out Polyline[] perforations, bool overlapsPolylines, out Polyline[] overlapsPolylinesResult, bool overlapsMesh, out Mesh overlapsMeshResult, TextLog textLog, CancellationToken cancel, IProgress<double> progress)
Gets the intersections of this mesh with itself.
tolerance (double)A tolerance value. If negative, the positive value will be used. WARNING! Good tolerance values are in the magnitude of 10^-7, or RhinoMath.SqrtEpsilon*10.
perforations (out Polyline[])The array of perforations.
overlapsPolylines (bool)If true, the next argument is computed.
overlapsPolylinesResult (out Polyline[])The array of overlaps, in terms of polylines.
overlapsMesh (bool)If true, the next argument is computed.
overlapsMeshResult (out Mesh)A mesh that represents the overlaps in terms of surfaces.
textLog (TextLog)A report of the outcome.
cancel (CancellationToken)A cancellation token.
progress (IProgress<double>)A progress reporter.
An array of intersection and overlaps polylines.
True on success, false on failure and cancellation.

GetUnsafeLock

#Since v6.0
public MeshUnsafeLock GetUnsafeLock(bool writable)
Allows to obtain unsafe pointers to the underlying unmanaged data structures of the mesh.
Remarks: The lock implements the IDisposable interface, and one call of its IDisposable.Dispose() or ReleaseUnsafeLock(MeshUnsafeLock) will update the data structure as required. This can be achieved with a using statement (Using in Vb.Net).
writable (bool)true if user will need to write onto the structure. false otherwise.
A lock that needs to be released.

GetUserString

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

GetUserStrings

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

HealNakedEdges

#Since v6.0
public bool HealNakedEdges(double distance)
Attempts to "heal" naked edges in a mesh based on a given distance. First attempts to move vertices to neighboring vertices that are within that distance away. Then it finds edges that have a closest point to the vertex within the distance and splits the edge. When it finds one it splits the edge and makes two new edges using that point.
distance (double)Distance to not exceed when modifying the mesh.
true if successful, false otherwise.

InvalidateCachedTextureCoordinates

#Since v8.0
public void InvalidateCachedTextureCoordinates(bool bOnlyInvalidateCachedSurfaceParameterMapping = false)
Invalidates all cached texture coordinates. Call this function when you have made changes that will affect the texture coordinates on the mesh.
bOnlyInvalidateCachedSurfaceParameterMapping (bool = false)If true then only cached surface parameter mapping texture coordinates will be invalidated. Use this after making changes to the m_S array.

IsManifold

#Since v7.6
public bool IsManifold()
Returns true if every mesh "edge" has at most two faces.
true if the mesh is manifold, false otherwise.

IsManifold

#Since v5.0
public bool IsManifold(bool topologicalTest, out bool isOriented, out bool hasBoundary)
Gets a value indicating whether or not the mesh is manifold. A manifold mesh does not have any edge that borders more than two faces.
topologicalTest (bool)If true, the query treats coincident vertices as the same.
isOriented (out bool)isOriented will be set to true if the mesh is a manifold and adjacent faces have compatible face normals.
hasBoundary (out bool)hasBoundary will be set to true if the mesh is a manifold and there is at least one "edge" with no more than one adjacent face.
true if every mesh "edge" has at most two adjacent faces.

IsPointInside

#Since v5.0
[ConstOperation] public bool IsPointInside(Point3d point, double tolerance, bool strictlyIn)
Determines if a point is inside a closed mesh.
Remarks: The mesh must be closed and manifold; this function returns false for any other mesh. Inside means enclosed by the mesh, so a consistent face orientation is not required and reversing the faces does not change the answer.
point (Point3d)3d point to test.
tolerance (double)(>=0) 3d distance tolerance used for ray-mesh intersection and determining strict inclusion. This is expected to be a tiny value.
strictlyIn (bool)If strictlyIn is true, then point must be inside mesh by at least tolerance in order for this function to return true. If strictlyIn is false, then this function will return true if point is inside or the distance from point to a mesh face is <= tolerance.
true if point is inside the mesh, false if not.

IsValidWithLog

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

MakeDeformable

public bool 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 fromGeometryBase
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

MatchEdges

#Since v7.4
public bool MatchEdges(double distance, bool rachet)
Moves face edges of an open mesh to meet adjacent face edges. The method will first try to match vertices, and then it will try to split edges to make the edges match.
distance (double)The distance tolerance. Use larger tolerances only if you select specific edges to close.
rachet (bool)If true, matching the mesh takes place in four passes starting at a tolerance that is smaller than your specified tolerance and working up to the specified tolerance with successive passes. This matches small edges first and works up to larger edges. If false, then a single pass is made.
True of edges were matched, false otherwise.

MatchEdges

#Since v9.0
public static Mesh[] MatchEdges(IEnumerable<Mesh> inputMeshes, double distance, bool simpleSplits, bool rachet, bool average, bool join)
Moves face edges of open meshes to meet near face edges. The method will first try to match vertices, and then then it will try to split edges to make the edges match.
inputMeshes (IEnumerable<Mesh>)Input meshes to be split and matched.
distance (double)The distance tolerance. Use larger tolerances only if you select specific edges to close.
simpleSplits (bool)When this is true and there is only one split in a face the code just divides the face at that vertex. If it is false or there are multiple splits on the same face TL_Triangulate3dPolygon is called and the resulting faces replace the existing face.
rachet (bool)If true, matching the mesh takes place in four passes starting at a tolerance that is smaller than your specified tolerance and working up to the specified tolerance with successive passes. This matches small edges first and works up to larger edges. If false, then a single pass is made.
average (bool)Set to true if you want an average to the vertex sets to be modified rather than using the first.
join (bool)Set to true if you want the output joined into a single mesh
The resulting output meshes.

MemoryEstimate

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

MergeAllCoplanarFaces

#Since v7.9
public bool MergeAllCoplanarFaces(double tolerance, double angleTolerance)
Merges adjacent coplanar faces into single faces.
tolerance (double)Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance (double)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.

MergeAllCoplanarFaces

#Since v7.9
public bool MergeAllCoplanarFaces(double tolerance)
Merges adjacent coplanar faces into single faces.
tolerance (double)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.

NonConstOperation

#
protected override void NonConstOperation()
Clear local cache on non constant calls

NormalAt

#Since v5.0
[ConstOperation] public Vector3d NormalAt(int faceIndex, double t0, double t1, double t2, double t3)
Evaluate a mesh normal at a set of barycentric coordinates. Barycentric coordinates must be assigned in accordance with the rules as defined by MeshPoint.T.
faceIndex (int)Index of triangle or quad to evaluate.
t0 (double)First barycentric coordinate.
t1 (double)Second barycentric coordinate.
t2 (double)Third barycentric coordinate.
t3 (double)Fourth barycentric coordinate. If the face is a triangle, this coordinate will be ignored.
A Normal vector to the mesh or Vector3d.Unset if the faceIndex is not valid or if the barycentric coordinates could not be evaluated.

NormalAt

#Since v5.0
[ConstOperation] public Vector3d NormalAt(MeshPoint meshPoint)
Evaluate a mesh normal at a set of barycentric coordinates.
meshPoint (MeshPoint)MeshPoint instance containing a valid Face Index and Barycentric coordinates.
A Normal vector to the mesh or Vector3d.Unset if the faceIndex is not valid or if the barycentric coordinates could not be evaluated.

Offset

#
[ConstOperation] public Mesh Offset(double distance, bool solidify, Vector3d direction, out List<int> wallFacesOut)
Makes a new mesh with vertices offset a distance along the direction parameter. Optionally, based on the value of solidify, adds the input mesh and a ribbon of faces along any naked edges. If solidify is false it acts exactly as the Offset(distance) function. Returns list of wall faces, i.e. the faces that connect original and offset mesh when solidified.
distance (double)A distance value.
solidify (bool)true if the mesh should be solidified.
direction (Vector3d)Direction of offset for all vertices.
wallFacesOut (out List<int>)Returns list of wall faces.
A new mesh on success, or null on failure.

Offset

#Since v6.2
[ConstOperation] public Mesh Offset(double distance, bool solidify, Vector3d direction)
Makes a new mesh with vertices offset a distance along the direction parameter. Optionally, based on the value of solidify, adds the input mesh and a ribbon of faces along any naked edges. If solidify is false it acts exactly as the Offset(distance) function.
distance (double)A distance value.
solidify (bool)true if the mesh should be solidified.
direction (Vector3d)Direction of offset for all vertices.
A new mesh on success, or null on failure.

Offset

#Since v5.0
[ConstOperation] public Mesh Offset(double distance, bool solidify)
Makes a new mesh with vertices offset a distance in the opposite direction of the existing vertex normals. Optionally, based on the value of solidify, adds the input mesh and a ribbon of faces along any naked edges. If solidify is false it acts exactly as the Offset(distance) function.
distance (double)A distance value.
solidify (bool)true if the mesh should be solidified.
A new mesh on success, or null on failure.

Offset

#Since v5.0
[ConstOperation] public Mesh Offset(double distance)
Makes a new mesh with vertices offset a distance in the opposite direction of the existing vertex normals. Same as Mesh.Offset(distance, false)
distance (double)A distance value to use for offsetting.
A new mesh on success, or null on failure.

OnSwitchToNonConst

#
protected override void OnSwitchToNonConst()
Performs some memory cleanup if necessary

PartitionMesh

#Since v8.25
public static Mesh[] PartitionMesh(Mesh mesh, int maxVertexCount, int maxFaceCount)
Some file formats and rendering engines are only able to process small batches of triangles. Use this function to partition the mesh into subsets of vertices and faces that those file formats and rendering engines can handle.
Remarks: The resulting sub-meshes tend to be less disjoint than the output of SplitMesh(Mesh, int, bool, bool). The less disjoint meshes will take more time to compute.
mesh (Mesh)Mesh to partition.
maxVertexCount (int)Maximum number of vertices in a partition.///
maxFaceCount (int)Maximum number of faces in a partition.
An array of sub-meshes if successful, otherwise an empty array.

PatchSingleFace

#Since v8.0
public bool PatchSingleFace(IEnumerable<ComponentIndex> components)
Creates a single mesh face from the given input. The new mesh will be apppended to this mesh.
components (IEnumerable<ComponentIndex>)An enumeration of component indexes from this mesh. This can be one following combinations: 1 vertex (MeshVertex or MeshTopologyVertex) and 1 edge (MeshTopologyEdge), 2 edges (MeshTopologyEdge), or 3 vertices (MeshVertex or MeshTopologyVertex).
true if successful, false otherwise.

PointAt

#Since v5.0
[ConstOperation] public Point3d PointAt(int faceIndex, double t0, double t1, double t2, double t3)
Evaluates a mesh at a set of barycentric coordinates. Barycentric coordinates must be assigned in accordance with the rules as defined by MeshPoint.T.
faceIndex (int)Index of triangle or quad to evaluate.
t0 (double)First barycentric coordinate.
t1 (double)Second barycentric coordinate.
t2 (double)Third barycentric coordinate.
t3 (double)Fourth barycentric coordinate. If the face is a triangle, this coordinate will be ignored.
A Point on the mesh or Point3d.Unset if the faceIndex is not valid or if the barycentric coordinates could not be evaluated.

PointAt

#Since v5.0
[ConstOperation] public Point3d PointAt(MeshPoint meshPoint)
Evaluate a mesh at a set of barycentric coordinates.
meshPoint (MeshPoint)MeshPoint instance containing a valid Face Index and Barycentric coordinates.
A Point on the mesh or Point3d.Unset if the faceIndex is not valid or if the barycentric coordinates could not be evaluated.

PullCurve

#Since v7.0
[ConstOperation] public PolylineCurve PullCurve(Curve curve, double tolerance)
Gets a polyline approximation of the input curve and then moves its control points to the closest point on the mesh. Then it "connects the points" over edges so that a polyline on the mesh is formed.
curve (Curve)A curve to pull.
tolerance (double)A tolerance value.
A polyline curve, or null if none could be constructed.

PullPointsToMesh

#Since v5.0
[ConstOperation] public Point3d[] PullPointsToMesh(IEnumerable<Point3d> points)
Pulls a collection of points to a mesh.
points (IEnumerable<Point3d>)An array, a list or any enumerable set of points.
An array of points. This can be empty.

QuadRemesh

#Since v9.0
public Mesh QuadRemesh(IEnumerable<int> faceBlocks, QuadRemeshParameters parameters, IEnumerable<Curve> guideCurves, IProgress<int> progress, CancellationToken cancelToken)
Quad remesh this mesh.
faceBlocks (IEnumerable<int>)
parameters (QuadRemeshParameters)
guideCurves (IEnumerable<Curve>)A curve array used to influence mesh face layout The curves should touch the input mesh Set Guide Curve Influence by using QuadRemeshParameters.GuideCurveInfluence
progress (IProgress<int>)
cancelToken (CancellationToken)

QuadRemesh

#Since v7.0
public Mesh QuadRemesh(QuadRemeshParameters parameters, IEnumerable<Curve> guideCurves)
Quad remesh this mesh.
parameters (QuadRemeshParameters)
guideCurves (IEnumerable<Curve>)A curve array used to influence mesh face layout The curves should touch the input mesh Set Guide Curve Influence by using QuadRemeshParameters.GuideCurveInfluence

QuadRemesh

#Since v7.0
public Mesh QuadRemesh(QuadRemeshParameters parameters)
Quad remesh this mesh.
parameters (QuadRemeshParameters)

QuadRemeshAsync

#Since v7.0
public Task<Mesh> QuadRemeshAsync(IEnumerable<int> faceBlocks, QuadRemeshParameters parameters, IEnumerable<Curve> guideCurves, IProgress<int> progress, CancellationToken cancelToken)
Quad remesh this mesh asynchronously.
faceBlocks (IEnumerable<int>)
parameters (QuadRemeshParameters)
guideCurves (IEnumerable<Curve>)A curve array used to influence mesh face layout The curves should touch the input mesh Set Guide Curve Influence by using QuadRemeshParameters.GuideCurveInfluence
progress (IProgress<int>)
cancelToken (CancellationToken)

QuadRemeshAsync

#Since v7.0
public Task<Mesh> QuadRemeshAsync(QuadRemeshParameters parameters, IEnumerable<Curve> guideCurves, IProgress<int> progress, CancellationToken cancelToken)
Quad remesh this mesh asynchronously.
parameters (QuadRemeshParameters)
guideCurves (IEnumerable<Curve>)A curve array used to influence mesh face layout The curves should touch the input mesh Set Guide Curve Influence by using QuadRemeshParameters.GuideCurveInfluence
progress (IProgress<int>)
cancelToken (CancellationToken)

QuadRemeshAsync

#Since v7.0
public Task<Mesh> QuadRemeshAsync(QuadRemeshParameters parameters, IProgress<int> progress, CancellationToken cancelToken)
Quad remesh this mesh asynchronously.
parameters (QuadRemeshParameters)
progress (IProgress<int>)
cancelToken (CancellationToken)

QuadRemeshBrep

#Since v9.0
public static Mesh QuadRemeshBrep(Brep brep, QuadRemeshParameters parameters, IEnumerable<Curve> guideCurves, IProgress<int> progress, CancellationToken cancelToken)
Quad remesh this Brep.
brep (Brep)Set Brep Face Mode by setting QuadRemeshParameters.PreserveMeshArrayEdgesMode
parameters (QuadRemeshParameters)
guideCurves (IEnumerable<Curve>)
progress (IProgress<int>)
cancelToken (CancellationToken)

QuadRemeshBrep

#Since v7.0
public static Mesh QuadRemeshBrep(Brep brep, QuadRemeshParameters parameters, IEnumerable<Curve> guideCurves)
Create Quad Remesh from a Brep
brep (Brep)Set Brep Face Mode by setting QuadRemeshParameters.PreserveMeshArrayEdgesMode
parameters (QuadRemeshParameters)
guideCurves (IEnumerable<Curve>)A curve array used to influence mesh face layout The curves should touch the input mesh Set Guide Curve Influence by using QuadRemeshParameters.GuideCurveInfluence

QuadRemeshBrep

#Since v7.0
public static Mesh QuadRemeshBrep(Brep brep, QuadRemeshParameters parameters)
Create QuadRemesh from a Brep Set Brep Face Mode by setting QuadRemeshParameters.PreserveMeshArrayEdgesMode
brep (Brep)
parameters (QuadRemeshParameters)

QuadRemeshBrepAsync

#Since v7.0
public static Task<Mesh> QuadRemeshBrepAsync(Brep brep, QuadRemeshParameters parameters, IEnumerable<Curve> guideCurves, IProgress<int> progress, CancellationToken cancelToken)
Quad remesh this Brep asynchronously.
brep (Brep)Set Brep Face Mode by setting QuadRemeshParameters.PreserveMeshArrayEdgesMode
parameters (QuadRemeshParameters)
guideCurves (IEnumerable<Curve>)A curve array used to influence mesh face layout The curves should touch the input mesh Set Guide Curve Influence by using QuadRemeshParameters.GuideCurveInfluence
progress (IProgress<int>)
cancelToken (CancellationToken)

QuadRemeshBrepAsync

#Since v7.0
public static Task<Mesh> QuadRemeshBrepAsync(Brep brep, QuadRemeshParameters parameters, IProgress<int> progress, CancellationToken cancelToken)
Quad remesh this Brep asynchronously.
brep (Brep)Set Brep Face Mode by setting QuadRemeshParameters.PreserveMeshArrayEdgesMode
parameters (QuadRemeshParameters)
progress (IProgress<int>)
cancelToken (CancellationToken)

RebuildMesh

#Since v8.23
public static Mesh RebuildMesh(Mesh mesh, bool preserveTextureCoordinates, bool preserveVertexColors)
Use this function to rebuild meshes that are not acting properly. Vertices and faces are kept. Face normals and vertex normals are recalculated. Surface curvatures, and surfaces parameters are not replaced.
mesh (Mesh)Mesh to be rebuilt.
preserveTextureCoordinates (bool)Retains mesh texture coordinates.
preserveVertexColors (bool)Retains mesh vertex colors.
The rebuilt mesh if successful, null otherwise.

RebuildMesh

#Since v8.23
public static Mesh RebuildMesh(Mesh mesh)
Use this function to rebuild meshes that are not acting properly. Vertices and faces are kept. Face normals and vertex normals are recalculated. Texture coordinates, vertex colors, surface curvatures, and surfaces parameters are not replaced.
mesh (Mesh)Mesh to be rebuilt.
The rebuilt mesh if successful, null otherwise.

RebuildNormals

#Since v6.0
public void RebuildNormals()
Removes mesh normals and reconstructs the face and vertex normals based on the orientation of the faces.

Reduce

#Since v6.15
public bool Reduce(int desiredPolygonCount, bool allowDistortion, int accuracy, bool normalizeSize, bool threaded)
Reduce polygon count
desiredPolygonCount (int)desired or target number of faces
allowDistortion (bool)If true, faces are removed until desiredPolygonCount is reached, distorting the shape as needed. If false, only flat (coplanar) regions are simplified, which leaves the shape unchanged and ignores desiredPolygonCount.
accuracy (int)Integer from 1 to 10 telling how accurate reduction algorithm to use. Greater number gives more accurate results
normalizeSize (bool)If true mesh is fitted to an axis aligned unit cube until reduction is complete
threaded (bool)If True then will run computation inside a worker thread and ignore any provided CancellationTokens and ProgressReporters. If False then will run on main thread.
True if mesh is successfully reduced and false if mesh could not be reduced for some reason.

Reduce

#Since v6.15
public bool Reduce(int desiredPolygonCount, bool allowDistortion, int accuracy, bool normalizeSize, CancellationToken cancelToken, IProgress<double> progress, out string problemDescription, bool threaded)
Reduce polygon count
desiredPolygonCount (int)desired or target number of faces
allowDistortion (bool)If true, faces are removed until desiredPolygonCount is reached, distorting the shape as needed. If false, only flat (coplanar) regions are simplified, which leaves the shape unchanged and ignores desiredPolygonCount.
accuracy (int)Integer from 1 to 10 telling how accurate reduction algorithm to use. Greater number gives more accurate results
normalizeSize (bool)If true mesh is fitted to an axis aligned unit cube until reduction is complete
cancelToken (CancellationToken)
progress (IProgress<double>)
problemDescription (out string)
threaded (bool)If True then will run computation inside a worker thread and ignore any provided CancellationTokens and ProgressReporters. If False then will run on main thread.
True if mesh is successfully reduced and false if mesh could not be reduced for some reason.

Reduce

#Since v6.0
public bool Reduce(int desiredPolygonCount, bool allowDistortion, int accuracy, bool normalizeSize, CancellationToken cancelToken, IProgress<double> progress, out string problemDescription)
Reduce polygon count
desiredPolygonCount (int)desired or target number of faces
allowDistortion (bool)If true, faces are removed until desiredPolygonCount is reached, distorting the shape as needed. If false, only flat (coplanar) regions are simplified, which leaves the shape unchanged and ignores desiredPolygonCount.
accuracy (int)Integer from 1 to 10 telling how accurate reduction algorithm to use. Greater number gives more accurate results
normalizeSize (bool)If true mesh is fitted to an axis aligned unit cube until reduction is complete
cancelToken (CancellationToken)
progress (IProgress<double>)
problemDescription (out string)
True if mesh is successfully reduced and false if mesh could not be reduced for some reason.

Reduce

#Since v5.10
public bool Reduce(int desiredPolygonCount, bool allowDistortion, int accuracy, bool normalizeSize)
Reduce polygon count
desiredPolygonCount (int)desired or target number of faces
allowDistortion (bool)If true, faces are removed until desiredPolygonCount is reached, distorting the shape as needed. If false, only flat (coplanar) regions are simplified, which leaves the shape unchanged and ignores desiredPolygonCount.
accuracy (int)Integer from 1 to 10 telling how accurate reduction algorithm to use. Greater number gives more accurate results
normalizeSize (bool)If true mesh is fitted to an axis aligned unit cube until reduction is complete
True if mesh is successfully reduced and false if mesh could not be reduced for some reason.

Reduce

#Since v6.15
public bool Reduce(ReduceMeshParameters parameters, bool threaded)
Reduce polygon count
parameters (ReduceMeshParameters)Parameters
threaded (bool)If True then will run computation inside a worker thread and ignore any provided CancellationTokens and ProgressReporters. If False then will run on main thread.
True if mesh is successfully reduced and false if mesh could not be reduced for some reason.

Reduce

#Since v6.0
public bool Reduce(ReduceMeshParameters parameters)
Reduce polygon count
parameters (ReduceMeshParameters)Parameters
True if mesh is successfully reduced and false if mesh could not be reduced for some reason.

ReleaseUnsafeLock

#Since v6.0
public void ReleaseUnsafeLock(MeshUnsafeLock meshData)
Updates the Mesh data with the information that was stored via the MeshUnsafeLock.
meshData (MeshUnsafeLock)The data that will be unlocked.

RequireIterativeCleanup

#Since v7.0
public static bool RequireIterativeCleanup(IEnumerable<Mesh> meshes, double tolerance)
Analyzes some meshes, and determines if a pass of CreateFromIterativeCleanup would change the array.

All available cleanup steps are used. Currently available cleanup steps are:

- mending of single precision coincidence even though double precision vertices differ.

- union of nearly identical vertices, irrespectively of their origin.

- removal of t-joints along edges.

meshes (IEnumerable<Mesh>)A list, and array or any enumerable of meshes.
tolerance (double)A 3d distance. This is usually a value of about 10e-7 magnitude.
True if meshes would be changed, otherwise false.

Rotate

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

Scale

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

SelfSplit

#Since v9.0
[ConstOperation] public Mesh[] SelfSplit(double tolerance, bool splitAtCoplanar, bool createNgons, TextLog textLog, CancellationToken cancel, IProgress<double> progress)
Split a mesh with itself.
tolerance (double)A value for intersection tolerance.

WARNING! Correct values are typically in the (10e-8 - 10e-4) range.

An option is to use the document tolerance diminished by a few orders or magnitude.

Intersection.MeshIntersectionsTolerancesCoefficient
splitAtCoplanar (bool)If false, coplanar areas will not be separated.
createNgons (bool)If true, creates ngons along the split ridge.
textLog (TextLog)A text log to write onto.
cancel (CancellationToken)A cancellation token.
progress (IProgress<double>)A progress reporter item. This can be null.
An array of mesh parts representing the split result, or null: when no mesh intersected, or if a cancel stopped the computation.

SelfSplit

#Since v9.0
[ConstOperation] public Mesh[] SelfSplit(double tolerance)
Split a mesh with itself.
tolerance (double)A value for intersection tolerance.

WARNING! Correct values are typically in the (10e-8 - 10e-4) range.

An option is to use the document tolerance diminished by a few orders or magnitude.

Intersection.MeshIntersectionsTolerancesCoefficient
A new mesh array with the split result. This can be null if no result was found.

SelfSplit

#Since v9.0
[ConstOperation] public Mesh[] SelfSplit(MeshSplitOptions options)
Split a mesh with itself.
options (MeshSplitOptions)The split option instance, or null for the defaults.

Because MeshBooleanOptions derives from MeshSplitOptions, an instance used for mesh booleans can be passed here directly.

An array of mesh parts representing the split result, or null: when no mesh intersected, or if a cancel stopped the computation.

SetCachedTextureCoordinates

#Since v5.10
public void SetCachedTextureCoordinates(TextureMapping tm, ref Transform xf)
Set cached texture coordinates using the specified mapping.
tm (TextureMapping)
xf (ref Transform)

SetCachedTextureCoordinatesFromMaterial

#Since v8.7
public void SetCachedTextureCoordinatesFromMaterial(RhinoObject rhinoObject, Material material)
Sets up cached texture coordinate set for each texture in the material. Textures in the Material define which mapping channels are used and the RhinoObject defines what texture mapping is used for each mapping channel. After this method is called all necessary texture coordinate sets are cached and correct texture coordinates for each texture can be fetched using GetCachedTextureCoordinates(RhinoObject rhinoObject, Rhino.DocObjects.Texture texture) If any texture coordinates are already cached they will not be re-computed.
rhinoObject (RhinoObject)RhinoObject that defines texture mappings
material (Material)Material with textures that define mapping channels

SetSurfaceParametersFromTextureCoordinates

#Since v8.0
public bool SetSurfaceParametersFromTextureCoordinates()
If the mesh does not have surface evaluation parameters, has texture coordinates, and the surface parameters can be set in a way so the existing texture coordinates can be computed from the surface parameters, then this function sets the surface parameters. This is useful when meshes that have texture coordinates and do not have surface parameters want to set the surface parameters in a way so that the texture mapping of type TextureMappingType.SurfaceParameters will restore the texture coordinates.
true - successful false - failure - no changes made to the mesh

SetTextureCoordinates

#Since v7.0
public void SetTextureCoordinates(TextureMapping tm, Transform xf, bool lazy, bool seamCheck)
Sets texture coordinates using the given texture mapping and transform.
tm (TextureMapping)Texture mapping
xf (Transform)Transform to apply to the texture mapping
lazy (bool)If true and the mesh's texture coordinates were already computed from this same mapping and transform, no calculation is performed. If false, texture coordinates are always recalculated.
seamCheck (bool)If true then some mesh edges might be unwelded to better represent UV discontinuities in the texture mapping. This only happens for the following mappings: Box, Sphere, Cylinder

SetTextureCoordinates

#Since v6.0
public void SetTextureCoordinates(TextureMapping tm, Transform xf, bool lazy)
Sets texture coordinates using the given texture mapping and transform.
tm (TextureMapping)Texture mapping
xf (Transform)Transform to apply to the texture mapping
lazy (bool)If true and the mesh's texture coordinates were already computed from this same mapping and transform, no calculation is performed. If false, texture coordinates are always recalculated.

SetUserString

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

ShrinkWrap

#Since v8.21
public static Mesh ShrinkWrap(IEnumerable<GeometryBase> geometryBases, ShrinkWrapParameters parameters, MeshingParameters meshingParameters, CancellationToken token)
Creates a unified ShrinkWrap mesh from a collection of GeometryBase objects. returns null or error on failure Supports cancellation during volumetric calculations. geometryBase mesh creation is not cancellable
geometryBases (IEnumerable<GeometryBase>)
parameters (ShrinkWrapParameters)A ShrinkWrapParameters object that specifies the configuration settings for the ShrinkWrap process.
meshingParameters (MeshingParameters)GeometryBase objects are converted to meshes first using the MeshingParameters provided. Those meshes are then used in the ShrinkWrap process.
token (CancellationToken)Supports cancellation during volumetric calculations. geometryBase mesh creation is not cancellable

ShrinkWrap

#Since v8.3
public static Mesh ShrinkWrap(IEnumerable<GeometryBase> geometryBases, ShrinkWrapParameters parameters, MeshingParameters meshingParameters)
Creates a unified ShrinkWrap mesh from a collection of GeometryBase objects. returns null or error on failure
geometryBases (IEnumerable<GeometryBase>)
parameters (ShrinkWrapParameters)A ShrinkWrapParameters object that specifies the configuration settings for the ShrinkWrap process.
meshingParameters (MeshingParameters)GeometryBase objects are converted to meshes first using the MeshingParameters provided. Those meshes are then used in the ShrinkWrap process.

ShrinkWrap

#Since v8.21
public static Mesh ShrinkWrap(IEnumerable<Mesh> meshes, ShrinkWrapParameters parameters, CancellationToken token)
Creates a unified ShrinkWrap mesh from a collection of input meshes. Returns null on error or failure. Supports cancellation during volumetric calculations.
meshes (IEnumerable<Mesh>)
parameters (ShrinkWrapParameters)
token (CancellationToken)Supports cancellation during volumetric calculations.

ShrinkWrap

#Since v8.0
public static Mesh ShrinkWrap(IEnumerable<Mesh> meshes, ShrinkWrapParameters parameters)
Creates a unified ShrinkWrap mesh from a collection of input meshes. Returns null on error or failure.
meshes (IEnumerable<Mesh>)
parameters (ShrinkWrapParameters)A ShrinkWrapParameters object that specifies the configuration settings for the ShrinkWrap process.

ShrinkWrap

#Since v8.21
public static Mesh ShrinkWrap(PointCloud pointCloud, ShrinkWrapParameters parameters, CancellationToken token)
Creates a unified ShrinkWrap mesh from a point cloud returns null on error or failure Supports cancellation during volumetric calculations.
pointCloud (PointCloud)
parameters (ShrinkWrapParameters)
token (CancellationToken)

ShrinkWrap

#Since v8.0
public static Mesh ShrinkWrap(PointCloud pointCloud, ShrinkWrapParameters parameters)
Creates a unified ShrinkWrap mesh from a point cloud returns null on error or failure
pointCloud (PointCloud)
parameters (ShrinkWrapParameters)

ShrinkWrap

#Since v8.0
public Mesh ShrinkWrap(ShrinkWrapParameters parameters, CancellationToken token)
Returns a ShrinkWrapped mesh or null when a mesh was not created or error. Supports cancellation during volumetric calculations.
parameters (ShrinkWrapParameters)A ShrinkWrapParameters object that specifies the configuration settings for the ShrinkWrap process.
token (CancellationToken)Supports cancellation during volumetric calculations.

ShrinkWrap

#Since v8.0
public Mesh ShrinkWrap(ShrinkWrapParameters parameters)
Returns a ShrinkWrapped mesh or null when a mesh was not created or error.
parameters (ShrinkWrapParameters)A ShrinkWrapParameters object that specifies the configuration settings for the ShrinkWrap process.

Smooth

#Since v6.0
public bool Smooth(double smoothFactor, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem, Plane plane)
Smooths a mesh by averaging the positions of mesh vertices in a specified region.
smoothFactor (double)The smoothing factor, which controls how much vertices move towards the average of the neighboring vertices.
bXSmooth (bool)When true vertices move in X axis direction.
bYSmooth (bool)When true vertices move in Y axis direction.
bZSmooth (bool)When true vertices move in Z axis direction.
bFixBoundaries (bool)When true vertices along naked edges will not be modified.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
plane (Plane)If SmoothingCoordinateSystem.CPlane specified, then the construction plane.
True if successful, false otherwise.

Smooth

#Since v6.0
public bool Smooth(double smoothFactor, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem)
Smooths a mesh by averaging the positions of mesh vertices in a specified region.
smoothFactor (double)The smoothing factor, which controls how much vertices move towards the average of the neighboring vertices.
bXSmooth (bool)When true vertices move in X axis direction.
bYSmooth (bool)When true vertices move in Y axis direction.
bZSmooth (bool)When true vertices move in Z axis direction.
bFixBoundaries (bool)When true vertices along naked edges will not be modified.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
True if successful, false otherwise.

Smooth

#Since v8.0
public bool Smooth(double smoothFactor, int numSteps, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem, Plane plane)
Smooths a mesh by averaging the positions of mesh vertices in a specified region.
smoothFactor (double)The smoothing factor, which controls how much vertices move towards the average of the neighboring vertices.
numSteps (int)The number of smoothing iterations.
bXSmooth (bool)When true vertices move in X axis direction.
bYSmooth (bool)When true vertices move in Y axis direction.
bZSmooth (bool)When true vertices move in Z axis direction.
bFixBoundaries (bool)When true vertices along naked edges will not be modified.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
plane (Plane)If SmoothingCoordinateSystem.CPlane specified, then the construction plane.
True if successful, false otherwise.

Smooth

#Since v6.8
public bool Smooth(IEnumerable<int> vertexIndices, double smoothFactor, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem, Plane plane)
Smooths part of a mesh by averaging the positions of mesh vertices in a specified region.
vertexIndices (IEnumerable<int>)The mesh vertex indices that specify the part of the mesh to smooth.
smoothFactor (double)The smoothing factor, which controls how much vertices move towards the average of the neighboring vertices.
bXSmooth (bool)When true vertices move in X axis direction.
bYSmooth (bool)When true vertices move in Y axis direction.
bZSmooth (bool)When true vertices move in Z axis direction.
bFixBoundaries (bool)When true vertices along naked edges will not be modified.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
plane (Plane)If SmoothingCoordinateSystem.CPlane specified, then the construction plane.
True if successful, false otherwise.

Smooth

#Since v8.0
public bool Smooth(IEnumerable<int> vertexIndices, double smoothFactor, int numSteps, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem, Plane plane)
Smooths part of a mesh by averaging the positions of mesh vertices in a specified region.
vertexIndices (IEnumerable<int>)The mesh vertex indices that specify the part of the mesh to smooth.
smoothFactor (double)The smoothing factor, which controls how much vertices move towards the average of the neighboring vertices.
numSteps (int)The number of smoothing iterations.
bXSmooth (bool)When true vertices move in X axis direction.
bYSmooth (bool)When true vertices move in Y axis direction.
bZSmooth (bool)When true vertices move in Z axis direction.
bFixBoundaries (bool)When true vertices along naked edges will not be modified.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
plane (Plane)If SmoothingCoordinateSystem.CPlane specified, then the construction plane.
True if successful, false otherwise.

SolidOrientation

#Since v5.0
[ConstOperation] public int SolidOrientation()
Determines orientation of a "solid" mesh.

+1 = mesh is solid with outward facing normals.

-1 = mesh is solid with inward facing normals.

0 = mesh is not solid.

Split

#Since v7.0
public Mesh[] Split(IEnumerable<Mesh> meshes, double tolerance, bool splitAtCoplanar, bool createNgons, TextLog textLog, CancellationToken cancel, IProgress<double> progress)
Split a mesh with a collection of meshes.
meshes (IEnumerable<Mesh>)Meshes to split with.
tolerance (double)A value for intersection tolerance.

WARNING! Correct values are typically in the (10e-8 - 10e-4) range.

An option is to use the document tolerance diminished by a few orders or magnitude.

Intersection.MeshIntersectionsTolerancesCoefficient
splitAtCoplanar (bool)If false, coplanar areas will not be separated.
createNgons (bool)If true, creates ngons along the split ridge.
textLog (TextLog)A text log to write onto.
cancel (CancellationToken)A cancellation token.
progress (IProgress<double>)A progress reporter item. This can be null.
An array of mesh parts representing the split result, or null: when no mesh intersected, or if a cancel stopped the computation.

Split

#Since v7.0
[ConstOperation] public Mesh[] Split(IEnumerable<Mesh> meshes, double tolerance, bool splitAtCoplanar, TextLog textLog, CancellationToken cancel, IProgress<double> progress)
Split a mesh with a collection of meshes.
meshes (IEnumerable<Mesh>)Meshes to split with.
tolerance (double)A value for intersection tolerance.

WARNING! Correct values are typically in the (10e-8 - 10e-4) range.

An option is to use the document tolerance diminished by a few orders or magnitude.

Intersection.MeshIntersectionsTolerancesCoefficient
splitAtCoplanar (bool)If false, coplanar areas will not be separated.
textLog (TextLog)A text log to write onto.
cancel (CancellationToken)A cancellation token.
progress (IProgress<double>)A progress reporter item. This can be null.
An array of mesh parts representing the split result, or null: when no mesh intersected, or if a cancel stopped the computation.

Split

#Since v9.0
public Mesh[] Split(IEnumerable<Mesh> meshes, MeshSplitOptions options)
Split a mesh with a collection of meshes.
meshes (IEnumerable<Mesh>)Meshes to split with.
options (MeshSplitOptions)The split option instance, or null for the defaults.

Because MeshBooleanOptions derives from MeshSplitOptions, an instance used for mesh booleans can be passed here directly.

An array of mesh parts representing the split result, or null: when no mesh intersected, or if a cancel stopped the computation.

Split

#Since v5.0
[ConstOperation] public Mesh[] Split(IEnumerable<Mesh> meshes)
Split a mesh with a collection of meshes. Suggestion: upgrade to overload with tolerance. Does not split at coplanar intersections.
meshes (IEnumerable<Mesh>)Meshes to split with.
An array of mesh segments representing the split result.

Split

#Since v5.0
[ConstOperation] public Mesh[] Split(Mesh mesh)
Split a mesh with another mesh. Suggestion: upgrade to overload with tolerance.
mesh (Mesh)Mesh to split with.
An array of mesh segments representing the split result.

Split

#Since v5.0
[ConstOperation] public Mesh[] Split(Plane plane)
Split a mesh by an infinite plane.
plane (Plane)The splitting plane.
A new mesh array with the split result. This can be null if no result was found.

SplitDisjointPieces

#Since v5.0
[ConstOperation] public Mesh[] SplitDisjointPieces()
Splits up the mesh into its unconnected pieces.
An array containing all the disjoint pieces that make up this Mesh.

SplitMesh

#Since v8.25
public static Mesh[] SplitMesh(Mesh mesh, int maxCount, bool countSum, bool countTriangles)
Some file formats and rendering engines are only able to process small batches of triangles. Use this function to split the mesh into subsets of vertices and faces that those file formats and rendering engines can handle.
mesh (Mesh)Mesh to split.
maxCount (int)Maximum count.
countSum (bool)If true, split if total vertices + faces is greater than maxCount. If false, split if either total vertices or faces is greater than maxCount.
countTriangles (bool)If true, count triangles. If false, count triangles and quads.
An array of sub-meshes if successful, otherwise an empty array.

SplitNon2Manifolds

#Since v9.0
[ConstOperation] public Mesh[] SplitNon2Manifolds()
Split a mesh where at non-2 manifolds boundaries.
An array of mesh parts representing the split result, or null: when no mesh split, or if a cancel stopped the computation.

SplitNon2Manifolds

#Since v9.0
[ConstOperation] public Mesh[] SplitNon2Manifolds(TextLog textLog, CancellationToken cancel, IProgress<double> progress)
Split a mesh where at non-2 manifolds boundaries.
textLog (TextLog)A text log to write onto.
cancel (CancellationToken)A cancellation token.
progress (IProgress<double>)A progress reporter item. This can be null.
An array of mesh parts representing the split result, or null: when no mesh split, or if a cancel stopped the computation.

SplitWithProjectedPolylines

#Since v7.0
[ConstOperation] public Mesh[] SplitWithProjectedPolylines(IEnumerable<PolylineCurve> curves, double tolerance, TextLog textLog, CancellationToken cancel, IProgress<double> progress)
Splits a mesh by adding edges in correspondence with input polylines, and divides the mesh at partitioned areas. Polyline segments that are measured not to be on the mesh will be ignored.
curves (IEnumerable<PolylineCurve>)An array, a list or any enumerable of polyline curves.
tolerance (double)A tolerance value.
textLog (TextLog)A text log, or null.
cancel (CancellationToken)A cancellation token to stop the computation at a given point.
progress (IProgress<double>)A progress reporter to inform the user about progress. The reported value is indicative.
An array of meshes, or null if no change would happen.

SplitWithProjectedPolylines

#Since v7.0
[ConstOperation] public Mesh[] SplitWithProjectedPolylines(IEnumerable<PolylineCurve> curves, double tolerance)
Splits a mesh by adding edges in correspondence with input polylines, and divides the mesh at partitioned areas. Polyline segments that are measured not to be on the mesh will be ignored.
curves (IEnumerable<PolylineCurve>)An array, a list or any enumerable of polyline curves.
tolerance (double)A tolerance value.
An array of meshes, or null if no change would happen.

Subdivide

#Since v8.0
public bool Subdivide()
Subdivides the faces of the mesh.
True if successful, false otherwise.

Subdivide

#Since v8.0
public bool Subdivide(IEnumerable<int> faceIndices)
Subdivides specific faces of the mesh.
faceIndices (IEnumerable<int>)Indices of the faces to subdivide.
True if successful, false otherwise.

ToJSON

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

Transform

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

Translate

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

Translate

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

UnifyNormals

#Since v5.0
public int UnifyNormals()
Attempts to fix inconsistencies in the directions of mesh faces in a mesh. This function does not modify mesh vertex normals, it rearranges the mesh face winding and face normals to make them all consistent. Note, you may want to call Mesh.Normals.ComputeNormals() to recompute vertex normals after calling this functions.
number of faces that were modified.

UnifyNormals

#Since v6.0
public int UnifyNormals(bool countOnly)
Attempts to fix inconsistencies in the directions of mesh faces in a mesh. This function does not modify mesh vertex normals, it rearranges the mesh face winding and face normals to make them all consistent. Note, you may want to call Mesh.Normals.ComputeNormals() to recompute vertex normals after calling this functions.
countOnly (bool)If true, then only the number of faces that would be modified is determined.
If countOnly=false, the number of faces that were modified. If countOnly=true, the number of faces that would be modified.

Unweld

#Since v5.0
public void Unweld(double angleToleranceRadians, bool modifyNormals)
Makes sure that faces sharing an edge and having a difference of normal greater than or equal to angleToleranceRadians have unique vertices along that edge, adding vertices if necessary.
angleToleranceRadians (double)Angle at which to make unique vertices.
modifyNormals (bool)Determines whether new vertex normals will have the same vertex normal as the original (false) or vertex normals made from the corresponding face normals (true)

UnweldEdge

#Since v6.3
public bool UnweldEdge(IEnumerable<int> edgeIndices, bool modifyNormals)
Adds creases to a smooth mesh by creating coincident vertices along selected edges.
edgeIndices (IEnumerable<int>)An array of mesh topology edge indices.
modifyNormals (bool)If true, the vertex normals on each side of the edge take the same value as the face to which they belong, giving the mesh a hard edge look. If false, each of the vertex normals on either side of the edge is assigned the same value as the original normal that the pair is replacing, keeping a smooth look.
true if successful, false otherwise.

UnweldVertices

#Since v7.0
public bool UnweldVertices(IEnumerable<int> topologyVertexIndices, bool modifyNormals)
Ensures that faces sharing a common topological vertex have unique indices into the MeshVertexList collection.
topologyVertexIndices (IEnumerable<int>)Topological vertex indices, from the MeshTopologyVertexList collection, to be unwelded. Use MeshTopologyVertexList.TopologyVertexIndex(int) to convert from vertex indices to topological vertex indices.
modifyNormals (bool)If true, the new vertex normals will be calculated from the face normal.
true if successful, false otherwise.

Volume

#Since v6.0
[ConstOperation] public double Volume()
Compute volume of the mesh.
Volume of the mesh.

Weld

#Since v9.0
public void Weld(double angleToleranceRadians, bool preserveSurfaceParameters)
Makes sure that faces sharing an edge and having a difference of normal less than or equal to angleToleranceRadians share vertices along that edge, vertex normals are averaged.
angleToleranceRadians (double)Angle at which to weld vertices.
preserveSurfaceParameters (bool)If true, vertex copies whose surface parameters differ are never merged into a single vertex - the edge between them is left unwelded instead of averaging or discarding one side's parameters. Vertex copies whose surface parameters already match are still merged normally.

Weld

#Since v5.0
public void Weld(double angleToleranceRadians)
Makes sure that faces sharing an edge and having a difference of normal less than or equal to angleToleranceRadians share vertices along that edge, vertex normals are averaged.
angleToleranceRadians (double)Angle at which to weld vertices.

WithDisplacement

#Since v6.0
[ConstOperation] public Mesh WithDisplacement(MeshDisplacementInfo displacement)
Constructs new mesh from the current one, with displacement applied to it.
displacement (MeshDisplacementInfo)Information on mesh displacement.
A new mesh with shutlining.
ArgumentNullExceptionIf displacer is null.
InvalidOperationExceptionIf displacement failed because of an error. The exception message specifies the error.

WithEdgeSoftening

#Since v6.0
[ConstOperation] public Mesh WithEdgeSoftening(double softeningRadius, bool chamfer, bool faceted, bool force, double angleThreshold)
Constructs new mesh from the current one, with edge softening applied to it.
softeningRadius (double)The softening radius.
chamfer (bool)Specifies whether to chamfer the edges.
faceted (bool)Specifies whether the edges are faceted.
force (bool)Specifies whether to soften edges despite too large a radius.
angleThreshold (double)Threshold angle (in degrees) which controls whether an edge is softened or not. The angle refers to the angles between the adjacent faces of an edge.
A new mesh with soft edges.
InvalidOperationExceptionIf displacement failed because of an error. The exception message specifies the error.

WithShutLining

#Since v6.0
[ConstOperation] public Mesh WithShutLining(bool faceted, double tolerance, IEnumerable<ShutLiningCurveInfo> curves)
Constructs new mesh from the current one, with shut lining applied to it.
faceted (bool)Specifies whether the shutline is faceted.
tolerance (double)The tolerance of the shutline.
curves (IEnumerable<ShutLiningCurveInfo>)A collection of curve arguments.
A new mesh with shutlining. Null on failure.
ArgumentNullExceptionIf curves is null.
InvalidOperationExceptionIf displacement failed because of an error. The exception message specifies the error.