Measures how far a point is from a plane, with a sign: positive on the side the normal points to, negative on the other.
Example: point [0,5,0] and the XZ plane with normal [0,1,0] -> 5
The point and the plane
The signed distance in model units
Finds every segment where the surfaces of two meshes cut through each other, testing each triangle of one against each triangle of the other.
Example: a cube mesh and a sphere mesh -> the segments that together trace their intersection curve
The two meshes and the tolerance
The crossing segments, in no particular order
Finds where the surfaces of two meshes cut through each other and joins the pieces into polylines, closed where the curve loops.
Example: a cube mesh and a sphere mesh -> closed polylines where the two surfaces meet
The two meshes and the tolerance
The intersection curves as polylines
Finds where the surfaces of two meshes cut through each other, as one list of points per curve.
A closed curve repeats its first point at the end so the loop is explicit. Example: a cube mesh and a sphere mesh -> point lists tracing where the two surfaces meet
The two meshes and the tolerance
One point list per intersection curve
Finds the plane a triangle lies in: its unit normal and its distance from the origin along that normal.
The normal follows the right-hand rule around the triangle's points. A triangle with no area, whose points are on one line, has no plane and gives undefined. Example: [[0,0,0], [1,0,0], [0,1,0]] -> { normal: [0,0,1], d: 0 }
The triangle and the tolerance below which its area counts as zero
The plane, or undefined for a flat triangle
Finds the segment where two triangles cut through each other.
Triangles that do not touch, are parallel, or lie in the same plane give undefined. Example: a triangle in the XY plane and one standing across it -> the segment where they cross
The two triangles and the tolerance
The crossing segment, or undefined when there is none
Geometry on plain triangle meshes: a mesh is a list of triangles, each three points. The methods here work out the plane of a triangle, the distance from a point to a plane, and where two meshes cut through each other, as segments, as polylines or as point lists. They need no CAD kernel, so they run on any triangulated data.