Class MeshGeometry
Represents the geometry of a HE_Mesh such as positions at vertices.
Inheritance
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public static class MeshGeometry : object
Methods
| Improve this Doc View SourceAngle(MeshCorner)
Compute the angle (in radians) at the specified corner.
Declaration
public static double Angle(MeshCorner corner)
Parameters
Type | Name | Description |
---|---|---|
MeshCorner | corner | Corner. |
Returns
Type | Description |
---|---|
System.Double | The angle (in radians). |
AngleDefect(MeshVertex)
Computes the angle defect at the given vertex.
Declaration
public static double AngleDefect(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex to compute angle defect. |
Returns
Type | Description |
---|---|
System.Double | Number representing the deviation of the current vertex from $2\PI$. |
Area(MeshFace)
Computes the area of the specified face.
Declaration
public static double Area(MeshFace face)
Parameters
Type | Name | Description |
---|---|---|
MeshFace | face | Face. |
Returns
Type | Description |
---|---|
System.Double | The face area. |
BarycentricDualArea(MeshVertex)
Computes the barycentric dual area around a given mesh vertex.
Declaration
public static double BarycentricDualArea(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
System.Double | The dual area. |
Centroid(MeshFace)
Compute the centroid of the specified face.
Declaration
public static Point3d Centroid(MeshFace face)
Parameters
Type | Name | Description |
---|---|---|
MeshFace | face | Face. |
Returns
Type | Description |
---|---|
Point3d | The centroid. |
Circumcenter(MeshFace)
Compute the circumcenter the specified face.
Declaration
public static Point3d Circumcenter(MeshFace face)
Parameters
Type | Name | Description |
---|---|---|
MeshFace | face | Face. |
Returns
Type | Description |
---|---|
Point3d | The circumcenter. |
CircumcentricDualArea(MeshVertex)
Computes the circumcentric dual area around a given mesh vertex.
Declaration
public static double CircumcentricDualArea(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
System.Double | The dual area. |
Cotan(MeshHalfEdge)
Computes the cotangent of the angle opposite to a half-edge.
Declaration
public static double Cotan(MeshHalfEdge hE)
Parameters
Type | Name | Description |
---|---|---|
MeshHalfEdge | hE | The half-edge |
Returns
Type | Description |
---|---|
System.Double | The cotangent value. |
DihedralAngle(MeshHalfEdge)
Computes the signed angle (in radians) between the faces adjacent to the specified half-edge.
Declaration
public static double DihedralAngle(MeshHalfEdge hE)
Parameters
Type | Name | Description |
---|---|---|
MeshHalfEdge | hE | H e. |
Returns
Type | Description |
---|---|
System.Double | The angle (in radians) between faces. |
FaceNormal(MeshFace)
Compute the normal vector of the specified face.
Declaration
public static Vector3d FaceNormal(MeshFace face)
Parameters
Type | Name | Description |
---|---|---|
MeshFace | face | Face. |
Returns
Type | Description |
---|---|
Vector3d | The normal. |
Length(MeshEdge)
Calculates the length of the specified edge.
Declaration
public static double Length(MeshEdge edge)
Parameters
Type | Name | Description |
---|---|---|
MeshEdge | edge | Edge. |
Returns
Type | Description |
---|---|
System.Double | The length. |
MeanEdgeLength(Mesh)
Calculates the mean edge length of the mesh.
Declaration
public static double MeanEdgeLength(Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | Mesh. |
Returns
Type | Description |
---|---|
System.Double | The mean edge length of the mesh. |
MidPoint(MeshEdge)
Calculates the midpoint of the specified edge.
Declaration
public static Point3d MidPoint(MeshEdge edge)
Parameters
Type | Name | Description |
---|---|---|
MeshEdge | edge | Edge. |
Returns
Type | Description |
---|---|
Point3d | The point. |
OrthonormalBases(MeshFace)
Compute the orthonormal bases of the specified face.
Declaration
public static Vector3d[] OrthonormalBases(MeshFace face)
Parameters
Type | Name | Description |
---|---|---|
MeshFace | face | Face. |
Returns
Type | Description |
---|---|
Vector3d[] | Array containing the 2 Vector3d. |
PrincipalCurvatures(MeshVertex)
Compute the principal curvature scalar values at a given vertex.
Declaration
public static double[] PrincipalCurvatures(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex to compute the curvature. |
Returns
Type | Description |
---|---|
System.Double[] | Returns an array of 2 values {k1, k2}. |
ScalarGaussCurvature(MeshVertex)
Compute the Gaussian curvature at the given vertex.
Declaration
public static double ScalarGaussCurvature(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex to compute Gaussian curvature. |
Returns
Type | Description |
---|---|
System.Double | Number representing the gaussian curvature at that vertex. |
ScalarMeanCurvature(MeshVertex)
Compute the Mean curvature at the given vertex.
Declaration
public static double ScalarMeanCurvature(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex to compute Mean curvature. |
Returns
Type | Description |
---|---|
System.Double | Number representing the Mean curvature at that vertex. |
TotalAngleDefect(Mesh)
Compute the total angle defect of the mesh.
Declaration
public static double TotalAngleDefect(Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | Mesh to compute angle defect. |
Returns
Type | Description |
---|---|
System.Double | Returns the total angle defect as a scalar value. |
TotalArea(Mesh)
Computes the total area of the mesh.
Declaration
public static double TotalArea(Mesh mesh)
Parameters
Type | Name | Description |
---|---|---|
Mesh | mesh | Mesh. |
Returns
Type | Description |
---|---|
System.Double | The mesh area. |
Vector(MeshHalfEdge)
Calculate the vector of a specified half-edge.
Declaration
public static Vector3d Vector(MeshHalfEdge halfEdge)
Parameters
Type | Name | Description |
---|---|---|
MeshHalfEdge | halfEdge | Half edge. |
Returns
Type | Description |
---|---|
Vector3d | The half-edge vector. |
VertexNormalAngleWeighted(MeshVertex)
Computes the angle weighted normal around the specified vertex.
Declaration
public static Vector3d VertexNormalAngleWeighted(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
Vector3d | The normal vector at that vertex. |
VertexNormalAreaWeighted(MeshVertex)
Computes the area weighted normal around the specified vertex.
Declaration
public static Vector3d VertexNormalAreaWeighted(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
Vector3d | The normal vector at that vertex. |
VertexNormalEquallyWeighted(MeshVertex)
Computes the equally weighted normal around the specified vertex.
Declaration
public static Vector3d VertexNormalEquallyWeighted(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
Vector3d | The normal vector at that vertex. |
VertexNormalGaussCurvature(MeshVertex)
Computes the gauss curvature weighted normal around the specified vertex.
Declaration
public static Vector3d VertexNormalGaussCurvature(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
Vector3d | The normal vector at that vertex. |
VertexNormalMeanCurvature(MeshVertex)
Computes the mean curvature weighted normal around the specified vertex.
Declaration
public static Vector3d VertexNormalMeanCurvature(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
Vector3d | The normal vector at that vertex. |
VertexNormalSphereInscribed(MeshVertex)
Computes the sphere inscribed normal around the specified vertex.
Declaration
public static Vector3d VertexNormalSphereInscribed(MeshVertex vertex)
Parameters
Type | Name | Description |
---|---|---|
MeshVertex | vertex | Vertex. |
Returns
Type | Description |
---|---|
Vector3d | The normal vector at that vertex. |