DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="3.4.0.6892" />

 Mesh

public class Mesh : DesignScriptEntity
public double Area { get; }

Returns the area of the provided Mesh

public int EdgeCount { get; }

Returns the number of edges in the Mesh

public IEnumerable<double> EdgesAsSixNumbers { get; }

Returns raw vertices of this mesh as a list of numbers. Each set of six consecutive numbers represents two points

public IndexGroup[] FaceIndices { get; }

The vertex indices that make up each face in a counterclockwise fashion

public int TriangleCount { get; }

Returns the number of triangles in the Mesh

public IEnumerable<double> TrianglesAsNineNumbers { get; }

Returns raw vertices of this mesh as a list of numbers. Each set of nine consecutive numbers represents three points of a triangle

public int VertexCount { get; }

Returns the number of vertices in the Mesh

public Vector[] VertexNormals { get; }

The normal vector at this vertex

public Point[] VertexPositions { get; }

The positions of the vertices

public IEnumerable<double> VerticesAsThreeNumbers { get; }

Returns raw vertices of this mesh as a list of numbers. Each set of three consecutive numbers represents a point.

public double Volume { get; }

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

public static Mesh ByVerticesAndIndices(IEnumerable<Point> vertices, IEnumerable<int> indices)

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.

public static string ExportMeshes(string filename, IEnumerable<Mesh> meshes)

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.

public static Mesh FromJson(string json)

Parse the incoming JSON string formatted with dynamo.geometry:mesh-1.0.0 schema.

public static Mesh[] ImportFile(string fileName)

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.

public Mesh BooleanUnion(Mesh tool)

Returns a new mesh unifying the tool mesh and the original mesh.

public Mesh CloseCracks()

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.

public Line[] Edges()

Converts the Mesh edges to Lines, and returns them

public Mesh[] Explode()

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.

public PolyCurve[] Intersect(Plane intersectionPlane)

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.

public Mesh Mirror(Plane mirrorPlane)

Reflect the Mesh across the input Plane

public Point Nearest(Point point)

Nearest point on the Mesh to the specified point

public Mesh PlaneCut(Plane plane, bool makeSolid = false)

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.

public Point Project(Point point, Vector dir)

Projects point onto the Mesh along the specified direction

public Mesh Reduce(double triangleCount)

Returns a new Mesh with a reduced number of triangles.

public Mesh Remesh()

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.

public Mesh Repair()

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

public Mesh Rotate(Vector axis, double degrees = 0)

Rotate the Mesh around the input axis by input degrees. Rotation is centered at the origin

public Mesh Scale(double scaleFactor = 1)

Scale the Mesh by the input amount

public Mesh Scale(double x = 1, double y = 1, double z = 1)

Scale Mesh non-uniformally by scale factors

public Mesh Smooth(double scale = 4)

Returns a new smooth Mesh. Smoothing type by default is cotangent which smooths without spreading the vertices.

public string ToJson()

Convert the Mesh into a JSON object formatted with dynamo.geometry:mesh-1.0.0 schema.

public Mesh Translate(Vector vector)

Translate a Mesh in the direction of input Vector by the length of the Vector

public Mesh Translate(Vector vector, double distance = 0)

Translate the Mesh in the direction of the input Vector by the input distance

public Mesh Translate(double x = 0, double y = 0, double z = 0)

Translates the Mesh by the input distances

Returns Triangle Centroids

Returns the normals for each triangle face in a given mesh.

public Surface[] Triangles()

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.

public List<int> VertexIndicesByTri()

Returns the vertex indices for each mesh triangle. (as opposed to unique vertex indices)