Class Mesh
Represents a Half-Edge Mesh data structure.
Inheritance
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Mesh : object
Constructors
| Improve this Doc View SourceMesh(List<MeshVertex>, List<List<Int32>>)
Initializes a new instance of the Mesh class from verticees and faces.
Declaration
public Mesh(List<MeshVertex> vertices, List<List<int>> faceIndexes)
Parameters
Type | Name | Description |
---|---|---|
List<MeshVertex> | vertices | list of mesh vertices. |
List<List<System.Int32>> | faceIndexes | Nested list with face vertices index. |
Mesh(List<Point3d>, List<List<Int32>>)
Initializes a new instance of the Mesh class from verticees and faces.
Declaration
public Mesh(List<Point3d> vertices, List<List<int>> faceIndexes)
Parameters
Type | Name | Description |
---|---|---|
List<Point3d> | vertices | list of mesh vertices. |
List<List<System.Int32>> | faceIndexes | Nested list with face vertices index. |
Mesh(Mesh)
Initializes a new instance of the Mesh class from an existing one.
Declaration
public Mesh(Mesh halfEdgeMesh)
Parameters
Type | Name | Description |
---|---|---|
Mesh | halfEdgeMesh | Existing Half-Edge Mesh. |
Properties
| Improve this Doc View SourceBoundaries
Gets or sets the boundaries of the mesh.
Declaration
public List<MeshFace> Boundaries { get; set; }
Property Value
Type | Description |
---|---|
List<MeshFace> |
Corners
Gets or sets the corners of the mesh.
Declaration
public List<MeshCorner> Corners { get; set; }
Property Value
Type | Description |
---|---|
List<MeshCorner> |
Edges
Gets or sets the edges of the mesh.
Declaration
public List<MeshEdge> Edges { get; set; }
Property Value
Type | Description |
---|---|
List<MeshEdge> |
EulerCharacteristic
Gets the euler characteristic of the mesh.
Declaration
public int EulerCharacteristic { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Faces
Gets or sets the faces of the mesh.
Declaration
public List<MeshFace> Faces { get; set; }
Property Value
Type | Description |
---|---|
List<MeshFace> |
HalfEdges
Gets or sets the half-edges of the mesh.
Declaration
public List<MeshHalfEdge> HalfEdges { get; set; }
Property Value
Type | Description |
---|---|
List<MeshHalfEdge> |
Vertices
Gets or sets the vertices of the mesh.
Declaration
public List<MeshVertex> Vertices { get; set; }
Property Value
Type | Description |
---|---|
List<MeshVertex> |
Methods
| Improve this Doc View SourceGetMeshInfo()
Get human readable description of this mesh.
Declaration
public string GetMeshInfo()
Returns
Type | Description |
---|---|
System.String | Mesh description as text. |
HasIsolatedFaces()
Check if the mesh contains isolated faces.
Declaration
public bool HasIsolatedFaces()
Returns
Type | Description |
---|---|
System.Boolean | True if there are isolated faces, false if not. |
HasIsolatedVertices()
Check if the mesh has isolated vertices.
Declaration
public bool HasIsolatedVertices()
Returns
Type | Description |
---|---|
System.Boolean | True if there are isolated vertices, false if not. |
HasNonManifoldEdges()
Check if the mesh contains non-manifold edges.
Declaration
public bool HasNonManifoldEdges()
Returns
Type | Description |
---|---|
System.Boolean | True if there are non-manifold edges, false if not. |
IndexCorners()
Assign an index to each corner of the mesh.
Declaration
public Dictionary<MeshCorner, int> IndexCorners()
Returns
Type | Description |
---|---|
Dictionary<MeshCorner, System.Int32> | Dictionary containing Corner-Index assignments. |
IndexEdges()
Assign an index to each edge of the mesh.
Declaration
public Dictionary<MeshEdge, int> IndexEdges()
Returns
Type | Description |
---|---|
Dictionary<MeshEdge, System.Int32> | Dictionary containing Edge-Index assignments. |
IndexElements()
Assign an index number to each mesh member.
Declaration
public void IndexElements()
IndexFaces()
Assign an index to each face of the mesh.
Declaration
public Dictionary<MeshFace, int> IndexFaces()
Returns
Type | Description |
---|---|
Dictionary<MeshFace, System.Int32> | Dictionary containing Face-Index assignments. |
IndexHalfEdes()
Assign an index to each Half-Edge of the mesh.
Declaration
public Dictionary<MeshHalfEdge, int> IndexHalfEdes()
Returns
Type | Description |
---|---|
Dictionary<MeshHalfEdge, System.Int32> | Dictionary containing HalfEdge-Index assignments. |
IndexVertices()
Assign an index to each vertex of the mesh.
Declaration
public Dictionary<MeshVertex, int> IndexVertices()
Returns
Type | Description |
---|---|
Dictionary<MeshVertex, System.Int32> | Dictionary containing Vertex-Index assignments. |
IsNgonMesh()
Check if a mesh is n-gonal.
Declaration
public bool IsNgonMesh()
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the mesh contains ANY ngons. |
IsQuadMesh()
Check if a mesh is quad.
Declaration
public bool IsQuadMesh()
Returns
Type | Description |
---|---|
System.Boolean | Returns true if all faces are quads. |
IsTriangularMesh()
Check if a mesh is triangular.
Declaration
public bool IsTriangularMesh()
Returns
Type | Description |
---|---|
System.Boolean | Returns true if all faces are triangular. |
ToString()
Gets string representation of the mesh.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | Mesh string. |