Mesh
Represents a geometry type that is defined by vertices and faces.
This is often called a face-vertex mesh.
Inheritance Hierarchy
System.Object
Rhino.Runtime.CommonObject
Rhino.Geometry.GeometryBase
Rhino.Geometry.Mesh
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]public class Mesh : GeometryBase
The Mesh type exposes the following members.
Constructors
Name
Description
Public Method
Code Example
Mesh.
Initializes a new empty mesh.
Protected Method
Mesh(SerializationInfo, StreamingContext)
Protected constructor for internal use.
Properties
Name
Description
Public Property
ComponentStates
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.
Public Property
DisjointMeshCount
Gets the number of disjoint (topologically unconnected) pieces in this mesh.
Public Property
Disposed
Indicates if this object has been disposed or the document it originally belonged to has been disposed.
(Inherited from CommonObject.)
Public Property
FaceNormals
Gets access to the face normal collection in this mesh.
Public Property
Code Example
Faces
Gets access to the mesh face list.
Public Property
HasBrepForm
Returns true if the Brep.TryConvertBrep function will be successful for this object
(Inherited from GeometryBase.)
Public Property
HasCachedTextureCoordinates
Will return true if SetCachedTextureCoordinates has been called; otherwise will return false.
Public Property
HasPrincipalCurvatures
HasPrincipalCurvatures
Public Property
HasUserData
Gets true if this class has any custom information attached to it through UserData.
(Inherited from CommonObject.)
Public Property
IsClosed
Returns true if every mesh “edge” has two or more faces.
Public Property
IsDeformable
true if object can be accurately modified with “squishy” transformations like projections, shears, and non-uniform scaling.
(Inherited from GeometryBase.)
Public Property
IsDocumentControlled
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 from GeometryBase.)
Public Property
IsOriented
Returns true if the mesh is manifold and every pair of faces that share an “edge” have compatible orientations.
Public Property
IsSolid
Returns true if the mesh is solid. A “solid” is a closed oriented manifold.
Public Property
IsValid
Tests an object to see if it is valid.
(Inherited from CommonObject.)
Public Property
Ngons
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.Public Property
Code Example
Normals
Gets access to the vertex normal collection in this mesh.
Public Property
ObjectType
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
(Inherited from GeometryBase.)
Public Property
PartitionCount
Number of partition information chunks stored on this mesh based on the last call to CreatePartitions
Public Property
TextureCoordinates
Gets access to the vertex texture coordinate collection in this mesh.
Public Property
TopologyEdges
Gets the MeshTopologyEdgeList object associated with this mesh.
This object stores edge connectivity.
Public Property
TopologyVertices
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.
Public Property
UserData
List of custom information that is attached to this class.
(Inherited from CommonObject.)
Public Property
UserDictionary
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 from CommonObject.)
Public Property
UserStringCount
Gets the amount of user strings.
(Inherited from GeometryBase.)
Public Property
VertexColors
Gets access to the (optional) vertex color collection in this mesh.
Public Property
Code Example
Vertices
Gets access to the vertices set of this mesh.
Methods
Name
Description
Public Method
Append(IEnumerable.Mesh.)
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.
Public Method
Code Example
Append(Mesh)
Appends a copy of another mesh to this one and updates indices of appended mesh parts.
Public Method
Check
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.
Public Method
ClearSurfaceData
Removes surface parameters, curvature parameters and surface statistics from the mesh.
Public Method
ClearTextureData
Removes all texture coordinate information from this mesh.
Public Method
ClosestMeshPoint
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.
Public Method
ClosestPoint(Point3d)
Gets the point on the mesh that is closest to a given test point.
Public Method
ClosestPoint(Point3d, Point3d., Double)
Gets the point on the mesh that is closest to a given test point.
Public Method
ClosestPoint(Point3d, Point3d., Vector3d., Double)
Gets the point on the mesh that is closest to a given test point.
Public Method
CollapseFacesByArea
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
Public Method
CollapseFacesByByAspectRatio
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
Public Method
CollapseFacesByEdgeLength
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
Public Method
ColorAt(MeshPoint)
Evaluate a mesh color at a set of barycentric coordinates.
Public Method
ColorAt(Int32, Double, Double, Double, Double)
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
.Public Method
Code Example
Compact
Removes any unreferenced objects from arrays, re-indexes as needed and shrinks arrays to minimum required size.
Public Method
ComponentIndex
If this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index.
(Inherited from GeometryBase.)
Public Method
ComputeCurvatureApproximation
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.
Public Method
Static Member
ComputeThickness(IEnumerable.Mesh., Double)
Compute thickness metrics for this mesh.
Public Method
Static Member
ComputeThickness(IEnumerable.Mesh., Double, CancellationToken)
Compute thickness metrics for this mesh.
Public Method
Static Member
ComputeThickness(IEnumerable.Mesh., Double, Double, CancellationToken)
Compute thickness metrics for this mesh.
Protected Method
ConstructConstObject
Assigns a parent object and a sub-object index to this.
(Inherited from CommonObject.)
Public Method
CopyFrom
Copies mesh values into this mesh from another mesh.
Public Method
Static Member
CreateBooleanDifference(IEnumerable.Mesh., IEnumerable.Mesh.)
Computes the solid difference of two sets of Meshes.
Public Method
Static Member
CreateBooleanDifference(IEnumerable.Mesh., IEnumerable.Mesh., MeshBooleanOptions, Result.)
Computes the solid difference of two sets of Meshes.
Public Method
Static Member
CreateBooleanIntersection(IEnumerable.Mesh., IEnumerable.Mesh.)
Computes the solid intersection of two sets of meshes.
Public Method
Static Member
CreateBooleanIntersection(IEnumerable.Mesh., IEnumerable.Mesh., MeshBooleanOptions, Result.)
Computes the solid intersection of two sets of meshes.
Public Method
Static Member
CreateBooleanSplit(IEnumerable.Mesh., IEnumerable.Mesh.)
Splits a set of meshes with another set.
Public Method
Static Member
CreateBooleanSplit(IEnumerable.Mesh., IEnumerable.Mesh., MeshBooleanOptions, Result.)
Splits a set of meshes with another set.
Public Method
Static Member
CreateBooleanUnion(IEnumerable.Mesh.)
Computes the solid union of a set of meshes. WARNING: Use the overload that takes a tolerance or options.
Public Method
Static Member
CreateBooleanUnion(IEnumerable.Mesh., Double)
Computes the solid union of a set of meshes.
Public Method
Static Member
CreateBooleanUnion(IEnumerable.Mesh., MeshBooleanOptions, Result.)
Computes the solid union of a set of meshes.
Public Method
Static Member
CreateContourCurves(Mesh, Plane)
Obsolete.
(Old call maintained for compatibility.)
Public Method
Static Member
CreateContourCurves(Mesh, Plane, Double)
Constructs contour curves for a mesh, sectioned at a plane.
Public Method
Static Member
CreateContourCurves(Mesh, Point3d, Point3d, Double)
Obsolete.
(Old call maintained for compatibility.)
Public Method
Static Member
Code Example
CreateContourCurves(Mesh, Point3d, Point3d, Double, Double)
Constructs contour curves for a mesh, sectioned along a linear axis.
Public Method
Static Member
CreateConvexHull3D
Attempts to create a 3d convex hull mesh from input points.
Public Method
Static Member
CreateExtrusion(Curve, Vector3d)
Constructs a mesh by extruding a curve along a vector.
Public Method
Static Member
CreateExtrusion(Curve, Vector3d, MeshingParameters)
Constructs a mesh by extruding a curve along a vector.
Public Method
Static Member
CreateFromBox(BoundingBox, Int32, Int32, Int32)
Constructs new mesh that matches a bounding box.
Public Method
Static Member
CreateFromBox(Box, Int32, Int32, Int32)
Constructs new mesh that matches an aligned box.
Public Method
Static Member
CreateFromBox(IEnumerable.Point3d., Int32, Int32, Int32)
Constructs new mesh from 8 corner points.
Public Method
Static Member
Code Example
CreateFromBrep(Brep)
Obsolete.
Constructs a mesh from a brep.
Public Method
Static Member
Code Example
CreateFromBrep(Brep, MeshingParameters)
Constructs a mesh from a brep.
Public Method
Static Member
CreateFromClosedPolyline
Attempts to create a Mesh that is a triangulation of a simple closed polyline that projects onto a plane.
Public Method
Static Member
CreateFromCone(Cone, Int32, Int32)
Constructs a solid mesh cone.
Public Method
Static Member
CreateFromCone(Cone, Int32, Int32, Boolean)
Constructs a mesh cone.
Public Method
Static Member
CreateFromCone(Cone, Int32, Int32, Boolean, Boolean)
Constructs a mesh cone.
Public Method
Static Member
CreateFromCurveExtrusion
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)
.Public Method
Static Member
CreateFromCurvePipe
Constructs a new mesh pipe from a curve.
Public Method
Static Member
CreateFromCylinder(Cylinder, Int32, Int32)
Constructs a capped mesh cylinder.
Public Method
Static Member
CreateFromCylinder(Cylinder, Int32, Int32, Boolean, Boolean)
Constructs a mesh cylinder.
Public Method
Static Member
CreateFromCylinder(Cylinder, Int32, Int32, Boolean, Boolean, Boolean)
Constructs a mesh cylinder.
Public Method
Static Member
CreateFromCylinder(Cylinder, Int32, Int32, Boolean, Boolean, Boolean, Boolean)
Constructs a mesh cylinder.
Public Method
Static Member
CreateFromExtrusion
Constructs a mesh from a brep.
Public Method
Static Member
CreateFromFilteredFaceList
Constructs a sub-mesh, that contains a filtered list of faces.
Public Method
Static Member
CreateFromIterativeCleanup
Repairs meshes with vertices that are too near, using a tolerance value.
Public Method
Static Member
CreateFromLines
Creates a mesh by analizing the edge structure. Input lines could be from the extraction of edges from an original mesh.
Public Method
Static Member
CreateFromPatchSingleFace
Creates a single mesh face from the given input.
Public Method
Static Member
CreateFromPlanarBoundary(Curve, MeshingParameters)
Obsolete.
Do not use this overload. Use version that takes a tolerance parameter instead.
Public Method
Static Member
CreateFromPlanarBoundary(Curve, MeshingParameters, Double)
Attempts to construct a mesh from a closed planar curve.RhinoMakePlanarMeshes
Public Method
Static Member
CreateFromPlane
Constructs a planar mesh grid.
Public Method
Static Member
CreateFromSphere
Constructs a mesh sphere.
Public Method
Static Member
CreateFromSubD
Create a mesh from a SubD limit surface
Public Method
Static Member
CreateFromSubDControlNet
Create a mesh from a SubD control net
Public Method
Static Member
CreateFromSubDControlNetWithTextureCoordinates
Create a mesh from a SubD control net including texture coordinates
Public Method
Static Member
CreateFromSurface(Surface)
Constructs a mesh from a surface
Public Method
Static Member
CreateFromSurface(Surface, MeshingParameters)
Constructs a mesh from a surface
Public Method
Static Member
CreateFromSurfaceControlNet
Calculate a mesh representation of a surface’s control net.
Public Method
Static Member
CreateFromTessellation
Attempts to create a mesh that is a triangulation of a list of points, projected on a plane, including its holes and fixed edges.
Public Method
Static Member
CreateFromTorus
Constructs a mesh torus.
Public Method
Static Member
CreateIcoSphere
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.
Public Method
CreatePartitions
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.
Public Method
Static Member
CreatePatch
Construct a mesh patch from a variety of input geometry.
Public Method
Static Member
CreateQuadSphere
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.
Public Method
Static Member
CreateUnweldedMesh
Creates a new unwelded mesh from an existing mesh. Texture coordinates are ignored.
Public Method
CreateVertexColorsFromBitmap
Populate the vertex colors from a bitmap image.
Public Method
DataCRC
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 from GeometryBase.)
Public Method
DeleteAllUserStrings
(Inherited from GeometryBase.)
Public Method
DeleteUserString
(Inherited from GeometryBase.)
Public Method
DestroyPartition
Destroys mesh partition.
Public Method
DestroyTopology
Removes topology data, forcing all topology information to be recomputed.
Public Method
DestroyTree
Destroys the mesh vertex access tree.
Public Method
Dispose.
Actively reclaims unmanaged resources that this instance uses.
(Inherited from CommonObject.)
Protected Method
Dispose(Boolean)
Overridden in order to destroy local display cache information
(Inherited from GeometryBase.)
Public Method
Duplicate
Constructs a copy of this mesh. This is the same as
DuplicateMesh.
.(Overrides
GeometryBase.Duplicate.
.)Public Method
DuplicateMesh
Constructs a copy of this mesh. This is the same as
Duplicate.
.Public Method
DuplicateShallow
Constructs a light copy of this object. By “light”, it is meant that the same underlying data is used until something is done to attempt to change it. For example, you could have a shallow copy of a very heavy mesh object and the same underlying data will be used when doing things like inspecting the number of faces on the mesh. If you modify the location of one of the mesh vertices, the shallow copy will create a full duplicate of the underlying mesh data and the shallow copy will become a deep copy.
(Inherited from GeometryBase.)
Public Method
EnsurePrivateCopy
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
(Inherited from CommonObject.)
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public Method
EvaluateMeshGeometry
If the mesh has SurfaceParameters, the surface is evaluated at these parameters and the mesh geometry is updated.
Public Method
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.
Public Method
ExtendSelectionByEdgeRidge
Suggests an extension of a selection set by using information related with topology and alignment.
Public Method
ExtendSelectionByFaceLoop
Suggests an extension of a face selection set by using information related with topology and alignment.
Public Method
ExtractNonManifoldEdges
Extracts, or removes, non-manifold mesh edges.
Public Method
FileHole
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.
Public Method
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.
Protected Method
Finalize
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
(Inherited from CommonObject.)
Public Method
Flip(Boolean, Boolean, Boolean)
Reverses the direction of the mesh.
Public Method
Flip(Boolean, Boolean, Boolean, Boolean)
Reverses the direction of the mesh.
Public Method
Code Example
GetBoundingBox(Boolean)
Bounding box solver. Gets the world axis aligned bounding box for the geometry.
(Inherited from GeometryBase.)
Public Method
Code Example
GetBoundingBox(Plane)
Aligned Bounding box solver. Gets the plane aligned bounding box.
(Inherited from GeometryBase.)
Public Method
GetBoundingBox(Transform)
Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
(Inherited from GeometryBase.)
Public Method
GetBoundingBox(Plane, Box.)
Aligned Bounding box solver. Gets the plane aligned bounding box.
(Inherited from GeometryBase.)
Public Method
GetCachedTextureCoordinates(Guid)
Call this method to get cached texture coordinates for a texture mapping with the specified Id.
Public Method
GetCachedTextureCoordinates(RhinoObject, 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.
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public Method
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.
Public Method
Code Example
GetNakedEdges
Returns all edges of a mesh that are considered “naked” in the sense that the edge only has one face.
Public Method
GetNgonAndFacesCount
Retrieves the count of items that
GetNgonAndFacesEnumerable.
will provide.Public Method
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.
Public Method
GetObjectData
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
(Inherited from CommonObject.)
Public Method
GetOutlines(Plane)
Constructs the outlines of a mesh projected against a plane.
Public Method
GetOutlines(RhinoViewport)
Constructs the outlines of a mesh. The projection information in the viewport is used to determine how the outlines are projected.
Public Method
GetOutlines(ViewportInfo, Plane)
Constructs the outlines of a mesh.
Public Method
GetPartition
Retrieves a partition. See
CreatePartitions(Int32, Int32)
for details.Public Method
GetSelfIntersections
Gets the intersections of this mesh with itself.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
GetUnsafeLock
Allows to obtain unsafe pointers to the underlying unmanaged data structures of the mesh.
Public Method
GetUserString
Gets user string from this geometry.
(Inherited from GeometryBase.)
Public Method
GetUserStrings
Gets a copy of all (user key string, user value string) pairs attached to this geometry.
(Inherited from GeometryBase.)
Public Method
HealNakedEdges
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.
Public Method
InvalidateCachedTextureCoordinates
Invalidates all cached texture coordinates. Call this function when you have made changes that will affect the texture coordinates on the mesh.
Public Method
IsManifold.
Returns true if every mesh “edge” has at most two faces.
Public Method
IsManifold(Boolean, Boolean., Boolean.)
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.
Public Method
IsPointInside
Determines if a point is inside a solid mesh.
Public Method
IsValidWithLog
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
(Inherited from CommonObject.)
Public Method
MakeDeformable
If possible, converts the object into a form that can be accurately modified with “squishy” transformations like projections, shears, an non-uniform scaling.
(Inherited from GeometryBase.)
Public Method
MatchEdges
Moves face edges of an open mesh to meet adjacent face edges. The method will first try to match vertices, and then then it will try to split edges to make the edges match.
Protected Method
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public Method
MemoryEstimate
Computes an estimate of the number of bytes that this object is using in memory.
(Inherited from GeometryBase.)
Public Method
MergeAllCoplanarFaces(Double)
Merges adjacent coplanar faces into single faces.
Public Method
MergeAllCoplanarFaces(Double, Double)
Merges adjacent coplanar faces into single faces.
Protected Method
NonConstOperation
Clear local cache on non constant calls
(Overrides
GeometryBase.NonConstOperation.
.)Public Method
NormalAt(MeshPoint)
Evaluate a mesh normal at a set of barycentric coordinates.
Public Method
NormalAt(Int32, Double, Double, Double, Double)
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.
Public Method
Offset(Double)
Makes a new mesh with vertices offset a distance in the opposite direction of the existing vertex normals. Same as Mesh.Offset(distance, false)
Public Method
Offset(Double, Boolean)
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.
Public Method
Offset(Double, Boolean, Vector3d)
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.
Public Method
Offset(Double, Boolean, Vector3d, List.Int32..)
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.
Protected Method
OnSwitchToNonConst
Performs some memory cleanup if necessary
(Overrides
GeometryBase.OnSwitchToNonConst.
.)Public Method
PatchSingleFace
Creates a single mesh face from the given input. The new mesh will be apppended to this mesh.
Public Method
PointAt(MeshPoint)
Evaluate a mesh at a set of barycentric coordinates.
Public Method
PointAt(Int32, Double, Double, Double, Double)
Evaluates a mesh at a set of barycentric coordinates. Barycentric coordinates must be assigned in accordance with the rules as defined by MeshPoint.T.
Public Method
PullCurve
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.
Public Method
PullPointsToMesh
Pulls a collection of points to a mesh.
Public Method
QuadRemesh(QuadRemeshParameters)
Quad remesh this mesh.
Public Method
QuadRemesh(QuadRemeshParameters, IEnumerable.Curve.)
Quad remesh this mesh.
Public Method
QuadRemeshAsync(QuadRemeshParameters, IProgress.Int32., CancellationToken)
Quad remesh this mesh asynchronously.
Public Method
QuadRemeshAsync(QuadRemeshParameters, IEnumerable.Curve., IProgress.Int32., CancellationToken)
Quad remesh this mesh asynchronously.
Public Method
QuadRemeshAsync(IEnumerable.Int32., QuadRemeshParameters, IEnumerable.Curve., IProgress.Int32., CancellationToken)
Quad remesh this mesh asynchronously.
Public Method
Static Member
QuadRemeshBrep(Brep, QuadRemeshParameters)
Create QuadRemesh from a Brep Set Brep Face Mode by setting QuadRemeshParameters.PreserveMeshArrayEdgesMode
Public Method
Static Member
QuadRemeshBrep(Brep, QuadRemeshParameters, IEnumerable.Curve.)
Create Quad Remesh from a Brep
Public Method
Static Member
QuadRemeshBrepAsync(Brep, QuadRemeshParameters, IProgress.Int32., CancellationToken)
Quad remesh this Brep asynchronously.
Public Method
Static Member
QuadRemeshBrepAsync(Brep, QuadRemeshParameters, IEnumerable.Curve., IProgress.Int32., CancellationToken)
Quad remesh this Brep asynchronously.
Public Method
RebuildNormals
Removes mesh normals and reconstructs the face and vertex normals based on the orientation of the faces.
Public Method
Reduce(ReduceMeshParameters)
Reduce polygon count
Public Method
Reduce(ReduceMeshParameters, Boolean)
Reduce polygon count
Public Method
Reduce(Int32, Boolean, Int32, Boolean)
Reduce polygon count
Public Method
Reduce(Int32, Boolean, Int32, Boolean, Boolean)
Reduce polygon count
Public Method
Reduce(Int32, Boolean, Int32, Boolean, CancellationToken, IProgress.Double., String.)
Reduce polygon count
Public Method
Reduce(Int32, Boolean, Int32, Boolean, CancellationToken, IProgress.Double., String., Boolean)
Reduce polygon count
Public Method
ReleaseUnsafeLock
Updates the Mesh data with the information that was stored via the MeshUnsafeLock.
Public Method
Static Member
RequireIterativeCleanup
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.
Public Method
Rotate
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
(Inherited from GeometryBase.)
Public Method
Scale
Scales the object by the specified factor. The scale is centered at the origin.
(Inherited from GeometryBase.)
Public Method
SetCachedTextureCoordinates
Set cached texture coordinates using the specified mapping.
Public Method
SetCachedTextureCoordinatesFromMaterial
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.
Public Method
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.
Public Method
SetTextureCoordinates(TextureMapping, Transform, Boolean)
Set texture coordinates using given mapping and applying given transform. Set lazy to false to generate texture coordinates right away.
Public Method
SetTextureCoordinates(TextureMapping, Transform, Boolean, Boolean)
Set texture coordinates using given mapping and applying given transform. Set lazy to false to generate texture coordinates right away.
Public Method
SetUserString
Attach a user string (key,value combination) to this geometry.
(Inherited from GeometryBase.)
Public Method
ShrinkWrap(ShrinkWrapParameters)
Returns a ShrinkWrapped mesh or null when a mesh was not created or error.
Public Method
Static Member
ShrinkWrap(IEnumerable.Mesh., ShrinkWrapParameters)
Creates a unified ShrinkWrap mesh from a collection of input meshes. Returns null on error or failure.
Public Method
Static Member
ShrinkWrap(PointCloud, ShrinkWrapParameters)
Creates a unified ShrinkWrap mesh from a point cloud returns null on error or failure
Public Method
ShrinkWrap(ShrinkWrapParameters, CancellationToken)
Returns a ShrinkWrapped mesh or null when a mesh was not created or error.
Public Method
Static Member
ShrinkWrap(IEnumerable.GeometryBase., ShrinkWrapParameters, MeshingParameters)
Creates a unified ShrinkWrap mesh from a collection of GeometryBase objects. returns null or error on failure
Public Method
Smooth(Double, Boolean, Boolean, Boolean, Boolean, SmoothingCoordinateSystem)
Smooths a mesh by averaging the positions of mesh vertices in a specified region.
Public Method
Smooth(Double, Boolean, Boolean, Boolean, Boolean, SmoothingCoordinateSystem, Plane)
Smooths a mesh by averaging the positions of mesh vertices in a specified region.
Public Method
Smooth(Double, Int32, Boolean, Boolean, Boolean, Boolean, SmoothingCoordinateSystem, Plane)
Smooths a mesh by averaging the positions of mesh vertices in a specified region.
Public Method
Smooth(IEnumerable.Int32., Double, Boolean, Boolean, Boolean, Boolean, SmoothingCoordinateSystem, Plane)
Smooths part of a mesh by averaging the positions of mesh vertices in a specified region.
Public Method
Smooth(IEnumerable.Int32., Double, Int32, Boolean, Boolean, Boolean, Boolean, SmoothingCoordinateSystem, Plane)
Smooths part of a mesh by averaging the positions of mesh vertices in a specified region.
Public Method
SolidOrientation
Determines orientation of a “solid” mesh.
Public Method
Split(IEnumerable.Mesh.)
Split a mesh with a collection of meshes. Suggestion: upgrade to overload with tolerance. Does not split at coplanar intersections.
Public Method
Split(Mesh)
Split a mesh with another mesh. Suggestion: upgrade to overload with tolerance.
Public Method
Split(Plane)
Split a mesh by an infinite plane.
Public Method
Split(IEnumerable.Mesh., Double, Boolean, TextLog, CancellationToken, IProgress.Double.)
Split a mesh with a collection of meshes.
Public Method
Split(IEnumerable.Mesh., Double, Boolean, Boolean, TextLog, CancellationToken, IProgress.Double.)
Split a mesh with a collection of meshes.
Public Method
SplitDisjointPieces
Splits up the mesh into its unconnected pieces.
Public Method
SplitWithProjectedPolylines(IEnumerable.PolylineCurve., Double)
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.
Public Method
SplitWithProjectedPolylines(IEnumerable.PolylineCurve., Double, TextLog, CancellationToken, IProgress.Double.)
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.
Public Method
Subdivide.
Subdivides the faces of the mesh.
Public Method
Subdivide(IEnumerable.Int32.)
Subdivides specific faces of the mesh.
Public Method
ToJSON
Create a JSON string representation of this object
(Inherited from CommonObject.)
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public Method
Transform
Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
(Inherited from GeometryBase.)
Public Method
Translate(Vector3d)
Translates the object along the specified vector.
(Inherited from GeometryBase.)
Public Method
Translate(Double, Double, Double)
Translates the object along the specified vector.
(Inherited from GeometryBase.)
Public Method
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.
Public Method
UnifyNormals(Boolean)
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.
Public Method
Unweld
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.
Public Method
UnweldEdge
Adds creases to a smooth mesh by creating coincident vertices along selected edges.
Public Method
UnweldVertices
Ensures that faces sharing a common topological vertex have unique indices into the MeshVertexList collection.
Public Method
Volume
Compute volume of the mesh.
Public Method
Weld
Makes sure that faces sharing an edge and having a difference of normal greater than or equal to angleToleranceRadians share vertices along that edge, vertex normals are averaged.
Public Method
WithDisplacement
Constructs new mesh from the current one, with displacement applied to it.
Public Method
WithEdgeSoftening
Constructs new mesh from the current one, with edge softening applied to it.
Public Method
WithShutLining
Constructs new mesh from the current one, with shut lining applied to it.