Skip to main content

Module history

Module history 

Source
Expand description

What an operation did to its inputs.

docs/DATA_MODEL.md §7. Every operation in this crate and above it reports three things about each shape it was given:

  • generated: new entities made from it that did not exist before. A prism’s side faces are generated from the profile’s edges.
  • modified: what it became. A face split in two is modified into both halves.
  • deleted: it has no image in the result at all.

This is not bookkeeping for its own sake. A parametric application records “fillet that edge” and must still find that edge after the model is rebuilt with different dimensions; it does so by walking history. Half- populated history does not error; it reopens the document with the wrong faces filleted, which is why every operation populates it from the commit that introduces it rather than later.

§Composition is the hard part

Operations chain. If A modifies x into y and B then modifies y into z, the composed history must say A-then-B modified x into z. Getting that wrong is how a reference survives one rebuild and dies on the next, which is far harder to diagnose than dying immediately. See History::then.

Structs§

Built
A shape together with the history of the operation that produced it.
History
A record of what one operation, or a chain of them, did.