Skip to main content

Module naming

Module naming 

Source
Expand description

How a boolean names what it creates.

Everything is named after what it was made from, in terms of the names the two operands had before the boolean — their origins. A piece of an edge split in two has the edge’s origin, and so does a piece of that piece; likewise for faces. With N the boolean’s Namer:

entityname
the result solidN
vertex where edges E1 < E2 crossN(E1,E2,i,n): the i-th of their n crossings, counted along E1
vertex where edge E pierces face FN(E,F,i,n): the i-th of the n piercings, counted along E
piece of edge E starting at vertex VN(E,V) — the piece at E’s own start keeps the name E
edge traced along faces F1 < F2 from vertex P to Q (P < Q)N(F1,F2,P,Q), with a trailing ,k only if several such edges join the same P and Q
piece of face F split off along edge EN(F,E) — the other piece keeps the name F

< is the order of the names as strings, so each name is independent of which operand came first and of the order the algorithm found things in. The one exception is the trailing ,k of a traced edge: two intersection branches with the same ends on the same faces (an arc and its complement) are told apart only by when they were traced.

A crossing’s i and n are only known once every crossing of those two entities has been found, and every other name above builds on vertex names. So BooleanNaming hands out a provisional name while the boolean runs, remembers what each entity was made from, and BooleanNaming::finish settles all names at once when it is done.

Structs§

BooleanNaming
The naming bookkeeping of one boolean, see the module docs.