Expand description
The reshape framework: record substitutions, apply them over a shape in one pass.
Healing operations want to say “this edge becomes that one, this face
goes away” and have the change ripple upward (every wire holding the
edge rebuilt, every face holding the wire, up to the solid) without
each fix reimplementing the traversal. A Reshape collects the
requests; Reshape::apply rebuilds bottom-up, sharing rebuilt nodes
so a substituted edge is one new node however many faces reach it, and
reports what became of every input through the ordinary history.
A node can stand in a shape at more than one placement (an assembly
placing one part twice). A request on a node (Reshape::replace) is
stated in the frame of the occurrence it names, and every occurrence of
the node takes it, carried by the placement between the two: each copy
changes alike. A request on one occurrence (Reshape::replace_at)
changes that copy alone; every other keeps its nodes. A node rebuilt
around changed children is made in its own frame and placed where its
occurrence stands, and occurrences rebuilt alike share the new node.
Structs§
- Reshape
- A batch of substitutions, applied in one rebuild.