Skip to main content

Crate axiolid_project

Crate axiolid_project 

Source
Expand description

Projection of triangle meshes onto a plane, and prism intersection.

§The bridge between the 3D and 2D halves

Triangle meshes live on one side of this kernel and planar booleans on the other. Both halves exist; the fold that connects them did not, so a consumer holding a mesh had to write the projection itself and pick its own winding and degeneracy conventions.

§Degenerate triangles are dropped explicitly

A triangle seen edge-on projects to a zero-area sliver. It contributes nothing to a union, but silently discarding it hides the difference between “this mesh is edge-on” and “this mesh is empty”. The count is therefore reported in ProjectionEvidence.

§A projection is geometry, not a footprint

project_mesh answers exactly one question: which points of the plane does this mesh cover. It does not decide which mesh to project, which plane counts as the reference, or which parts of a building should have been included. Those are the questions that turn a projection into a footprint, a shadow, a clash silhouette, or a formwork outline, and they have different answers per consumer.

Concretely, two downstream users asking for “the footprint” will disagree about overhangs, balconies, and structure below grade. A kernel that picked one of those answers would be wrong for the other user and would hide the choice inside a function whose name implied there was nothing to choose. The same split applies elsewhere in this kernel: a clearance query reports a distance and refuses to call it adequate.

So the mechanical half lives here – project, union, preserve holes, report evidence – and the naming, plane selection, and inclusion rules live with the consumer that has a reason to prefer one rule over another.

Structs§

Projection
A projected footprint.
ProjectionEvidence
What a projection actually did.

Enums§

ProjectionError
Why a projection could not be produced.

Functions§

intersect_prism
Intersect a mesh footprint with a vertical prism over a 2D region.
project_mesh
Project a triangle mesh onto plane and union the projected triangles.

Type Aliases§

Plane
An orthonormal projection plane.