Skip to main content

Module draft

Module draft 

Source
Expand description

draft: planar faces of a solid tilted about a neutral plane, so the part comes out of its mould.

Why the faces are replaced, not cut. A draft only changes the planes some faces lie in; the solid keeps its topology — every face, edge and vertex is still there, still between the same neighbours. So the drafted solid is rebuilt face by face (geop_lib_shell::rebuilt): each drafted face gets its tilted plane, each vertex of one moves to where the surfaces around it now meet, each edge to where its two faces do. The alternative, a boolean with a wedge per face, would have to put the wedge’s tilted face exactly through the face’s edge on the neutral plane — a cut along an edge that already exists, the one configuration a boolean cannot stay tight through — and a wedge beside an inward corner would cut into the neighbour. Replacing the geometry needs neither, and keeps every name.

The tilt. A face with outward normal n turns about the line where its plane meets the neutral plane, by the draft angle, so that its normal leans towards the pull direction p, the neutral plane’s normal: past the neutral plane, along p, the solid gets narrower, and it comes out of a mould pulled that way. A negative angle leans the faces the other way.

What it does not do (yet): draft faces that are not planar, faces parallel to the neutral plane (they have no line to turn about), or faces that meet a neighbour tangentially (a fillet along an edge). An angle so large that an edge turns around, or that a wall’s two sides cross, is refused.

Functions§

draft
Tilts the planar faces faces of one solid by angle (in radians, a quarter turn either way at most) about where each meets the plane neutral, whose normal is the pull direction — see the module docs — and returns the drafted solid, which replaces it and is named namer’s root. Every face, edge and vertex keeps its name.