Expand description
DRAFT ANALYSIS: every face of the shown model coloured by its draft angle against a pull direction and a minimum (docs/features/draft.md).
Display only. Nothing here touches the history, the document or undo: the
classes are read off the DISPLAY mesh (its outward normals, inside each
face’s own triangle range, so a trimmed face is judged on what is there,
not on its whole carrier), and the colour is an analysis tint on the face
(crate::scene::FaceDisplay::analysis_color) that wins over the user’s
face colour while the analysis is on and leaves it untouched.
The draft angle of a surface point is the angle between its outward normal
and the plane square to the pull: asin(n · pull), so a wall along the
pull reads 0°, a wall leaning away from the pull as it rises (the material
side narrowing, the way a drafted boss is) reads positive, and a face that
faces along the pull reads +90°. A flat face has one angle. A curved face
is SAMPLED at its mesh vertices, and its class comes from the least and the
greatest sample; the exact extreme can sit between samples, so a curved
face whose sampled range ends within NEAR_LIMIT_DEG of the minimum is
marked nearLimit.
Structs§
- Face
Draft - One face’s reading.
Enums§
- Draft
Class - The classes, in legend order.
Constants§
- CAP_
TOL_ DEG - A face within this of ±90° everywhere is square to the pull (a cap, or a parting face).
- NEAR_
LIMIT_ DEG - Within this of the minimum, a CURVED face’s sampled range is “near the limit”: the samples could have missed an extreme just over it.
Functions§
- analyse_
solid - Read every face of
solidagainst the unitpullandminimum_deg. - classify
- The class of a face whose draft runs from
min_degtomax_deg, against a minimum ofminimum_deg(≥ 0). - face_
normals - The outward normals one face of
solidpresents in WORLD space: one for a flat face (its triangles’ common normal, signed by the mesh normals), else every vertex normal of its triangles.Nonefor a face with none. - near_
limit - Whether a curved face’s sampled range ends within
NEAR_LIMIT_DEGof the minimum on either side.