Class Mesh
Represents a mesh EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Mesh : EntityObject, IHasXData, ICloneable
Remarks
Use this entity to overcome the limitations of the PolyfaceMesh, but, keep in mind that this entity was first introduced in AutoCad 2010.
The maximum number of faces a mesh can have is 16000000 (16 millions).
Constructors
| Improve this Doc View SourceMesh(IEnumerable<Vector3>, IEnumerable<Int32[]>)
Initializes a new instance of the Mesh class.
Declaration
public Mesh(IEnumerable<Vector3> vertexes, IEnumerable<int[]> faces)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector3> | vertexes | Mesh vertex list. |
| System.Collections.Generic.IEnumerable<System.Int32[]> | faces | Mesh faces list. |
Mesh(IEnumerable<Vector3>, IEnumerable<Int32[]>, IEnumerable<MeshEdge>)
Initializes a new instance of the Mesh class.
Declaration
public Mesh(IEnumerable<Vector3> vertexes, IEnumerable<int[]> faces, IEnumerable<MeshEdge> edges)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector3> | vertexes | Mesh vertex list. |
| System.Collections.Generic.IEnumerable<System.Int32[]> | faces | Mesh faces list. |
| System.Collections.Generic.IEnumerable<MeshEdge> | edges | Mesh edges list, this parameter is only really useful when it is required to assign creases values to edges. |
Properties
| Improve this Doc View SourceEdges
Gets the mesh edges list.
Declaration
public List<MeshEdge> Edges { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<MeshEdge> |
Faces
Gets the mesh faces list.
Declaration
public List<int[]> Faces { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Int32[]> |
SubdivisionLevel
Gets or sets the mesh subdivision level.
Declaration
public byte SubdivisionLevel { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
Remarks
The valid range is from 0 to 255. The recommended range is 0-5 to prevent creating extremely dense meshes.
Vertexes
Gets the mesh vertexes list.
Declaration
public List<Vector3> Vertexes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<Vector3> |
Methods
| Improve this Doc View SourceClone()
Creates a new Mesh that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Mesh that is a copy of this instance. |
Overrides
| Improve this Doc View SourceTransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.