Mesh
Returns the area of the provided Mesh
Returns the number of edges in the Mesh
Returns raw vertices of this mesh as a list of numbers. Each set of
six consecutive numbers represents two points
The vertex indices that make up each face in a counterclockwise fashion
Returns the number of triangles in the Mesh
Returns raw vertices of this mesh as a list of numbers. Each set of
nine consecutive numbers represents three points of a triangle
Returns the number of vertices in the Mesh
The normal vector at this vertex
The positions of the vertices
Returns raw vertices of this mesh as a list of numbers. Each set of
three consecutive numbers represents a point.
Returns the volume of the provided Mesh
public static Mesh ByGeometry(Geometry inputGeometry, double tolerance = -1, int maxGridLines = 512)
Convert a Geometry object such as a Solid or Surface into a Mesh.
The resolution of the mesh is determined by the Dynamo render precision
public static Mesh ByPointsFaceIndices(IEnumerable<Point> vertexPositions, IEnumerable<IndexGroup> indices)
Create a mesh from a collection of Points and a collection of IndexGroups referencing the Point collection
Create a new Mesh from supplied vertices and indices. Vertices should
not overlap. Indices should be sets of three integers
indicating the three locations in the virtices array
of the three points of a triangle
public static Mesh Cone(Point origin, double baseRadius = 1, double topRadius = 0, double height = 1, int divisions = 0, bool cap = true)
Create a mesh cone based on the current settings.
public static Mesh Cuboid(Point origin, double length = 1, double width = 1, double height = 1, int xDivisions = 0, int yDivisions = 0, int zDivisions = 0)
Create a mesh cuboid based on the current settings.
Exports meshes to a format determined by file name:
.mix -- Meshmixer
.obj -- Wavefront
.stl -- STL format
.dae -- COLLADA
.ply -- Polygon File Format
This function returns the filename of the output file, which may
need to be changed if it contains non-ascii characters
public static Mesh ExtrudePolyCurve(PolyCurve polycurve, double height, Vector direction, bool cap = false)
Returns a mesh by extruding a 3D polyline.
Parse the incoming JSON string formatted with dynamo.geometry:mesh-1.0.0 schema.
Imports a file, parsing it into a number of Meshes.
Currently supported formats are:
.mix -- Meshmixer
.obj -- Wavefront
public static Mesh Plane(Point origin, double xWidth = 1, double yWidth = 1, int xDivisions = 0, int yDivisions = 0)
Create a mesh plane based on the current settings.
public static Mesh Sphere(Point origin, double radius = 1, int divisions = 0, bool icosphere = true)
Create a mesh sphere based on the current settings.
Returns a new mesh subtracting the tool mesh from the original mesh.
Returns a new mesh consistenting of the intersection between the tool
mesh and the original mesh.
Returns a new mesh unifying the tool mesh and the original mesh.
Removes internal boundaries of a Mesh. An internal boundary occurs
when there are coincident vertices, such as if Mesh had separate
triangle groups for the lid of a pot and the body of the pot.
Converts the Mesh edges to Lines, and returns them
Converts Mesh triangles to individual meshes and returns them.
public Mesh GenerateSupport(double baseHeight = 0.4, double baseDiameter = 8, double postDiameter = 3, double tipHeight = 1, double tipDiameter = 0.5)
Returns a new Mesh with support structure. Default threshold settings are used if input is empty.
Intersects input Plane with the Mesh, producing a PolyCurve
public Mesh MakeHollow(int holeCount = 1, double holeRadius = 1.5, double wallThickness = 2, double solidResolution = 128, double meshResolution = 128)
Returns a new Mesh that has been hollowed out for 3D printing.
Returns a new Mesh that is watertight and 3D printable. As a result of
making a Mesh watertight, self-intersections, overlaps, and non-manifold
geometry is removed from the mesh. The method computes a thin-band distance
field and generates a new Mesh using marching cubes but doesn't project
back onto the original Mesh.
Basically the Mesh is filled with a bunch of tiny boxes, and a new
mesh is created around this.
Reflect the Mesh across the input Plane
Nearest point on the Mesh to the specified point
Create a precise geometric planar cut which removes portions of the mesh
that lie on the side of the plane in the direction of the plane normal.
Projects point onto the Mesh along the specified direction
Returns a new Mesh with a reduced number of triangles.
Returns a new Mesh distributing triangles more evenly over the whole of the selection
regardless of any change in triangle normals across the given selection.
Returns a new Mesh with the following defects repaired:
Small components: if the Mesh contains a very small, disconnected
segments, relative to the overall Mesh size, they will be
discarded.
Holes: holes in the mesh are filled in
Non-manifold regions: if a vertex is connected to more than
two *boundary* edges, or an edge is connected to more than
two triangles then the vertex / edge is non-manifold. The
mesh toolkit will remove geometry until the mesh is manifold
This method tries to preserve as much of the original mesh as
possible, as opposed to MakeWatertight, which resamples the Mesh
Rotate the Mesh around the input axis by input degrees. Rotation
is centered at the origin
Scale the Mesh by the input amount
Scale Mesh non-uniformally by scale factors
Returns a new smooth Mesh. Smoothing type by default is
cotangent which smooths without spreading the vertices.
Convert the Mesh into a JSON object formatted with dynamo.geometry:mesh-1.0.0 schema.
Translate a Mesh in the direction of input Vector by the length of the Vector
Translate the Mesh in the direction of the input Vector by the input distance
Translates the Mesh by the input distances
Returns Triangle Centroids
Returns the normals for each triangle face in a given mesh.
Converts the Mesh faces to Surface patches, and returns them. Note:
this method can generate A LOT of heavy Surfaces, and may
slow down Dynamo with large meshes.
Returns the vertex indices for each mesh triangle.
(as opposed to unique vertex indices)