Class NwcMeasureEngine
- Namespace
- NwcIO.Model.Measure
- Assembly
- NwcIO.dll
High-precision 3D measurement engine providing point-to-point, point-to-mesh, mesh-to-mesh clearance, triangle area, normal vector, and polyline distance calculations.
public static class NwcMeasureEngineInheritance
Inherited Members
Methods
ClosestPointOnTriangle(Vector3d, Vector3d, Vector3d, Vector3d)
Computes the point on a 3D triangle closest to the specified query point. Implements Christer Ericson's Voronoi region algorithm.
public static Vector3d ClosestPointOnTriangle(Vector3d p, Vector3d a, Vector3d b, Vector3d c)Parameters
Returns
ComputeMeshCentroid(NwcMesh, bool)
Computes the average vertex centroid of a mesh.
public static Vector3d ComputeMeshCentroid(NwcMesh mesh, bool useWorldCoordinates = true)Parameters
Returns
ComputeMeshSurfaceArea(NwcMesh, bool)
Computes the total surface area of all triangles in a mesh.
public static double ComputeMeshSurfaceArea(NwcMesh mesh, bool useWorldCoordinates = true)Parameters
Returns
ComputeMeshVolume(NwcMesh, bool)
Computes the signed volume of a closed 3D manifold solid mesh.
public static double ComputeMeshVolume(NwcMesh mesh, bool useWorldCoordinates = true)Parameters
Returns
ComputeTriangleArea(Vector3d, Vector3d, Vector3d)
Computes the surface area of a 3D triangle defined by three vertices.
public static double ComputeTriangleArea(Vector3d a, Vector3d b, Vector3d c)Parameters
Returns
ComputeTriangleNormal(Vector3d, Vector3d, Vector3d)
Computes the unit normal vector of a 3D triangle defined by three vertices in CCW order.
public static Vector3d ComputeTriangleNormal(Vector3d a, Vector3d b, Vector3d c)Parameters
Returns
MeasureAngle(Vector3d, Vector3d)
Computes the angle in degrees between two 3D direction vectors.
public static double MeasureAngle(Vector3d dirA, Vector3d dirB)Parameters
Returns
MeasureAngle(Vector3d, Vector3d, Vector3d)
Computes the angle in degrees between two line segments meeting at a common vertex: angle(A - Vertex - B).
public static double MeasureAngle(Vector3d a, Vector3d vertex, Vector3d b)Parameters
Returns
MeasureDistance(Vector3d, Vector3d)
Measures the 3D Euclidean distance and directional projections between two points.
public static NwcDistanceMeasurement MeasureDistance(Vector3d a, Vector3d b)Parameters
Returns
MeasureMeshToMesh(NwcMesh, NwcMesh, bool)
Measures the clearance (minimum distance) between two 3D polygon meshes.
public static NwcMeshToMeshMeasurement MeasureMeshToMesh(NwcMesh meshA, NwcMesh meshB, bool useWorldCoordinates = true)Parameters
Returns
MeasurePath(IEnumerable<Vector3d>)
Measures cumulative polyline distance across a sequence of 3D points.
public static NwcPolylineMeasurement MeasurePath(IEnumerable<Vector3d> points)Parameters
pointsIEnumerable<Vector3d>
Returns
MeasurePointToMesh(Vector3d, NwcMesh, bool)
Measures the shortest distance from a 3D point to a mesh surface, locating the closest point.
public static NwcPointToMeshMeasurement MeasurePointToMesh(Vector3d point, NwcMesh mesh, bool useWorldCoordinates = true)