Skip to main content

assign_sketch_loop_ids

Function assign_sketch_loop_ids 

Source
pub fn assign_sketch_loop_ids(doc: &mut Value) -> bool
Expand description

Assign every closed loop’s id onto the geometries of a SOLVED sketch document, in place, and report whether anything changed.

This is the persistence half of the scheme: the kernel DERIVES ids the same way every run (so a document that has never been through here still names its faces correctly), and this writes the derived ids down so they survive the one edit deriving cannot: deleting the edge an id was seeded from. The editor calls it when a sketch is committed.

doc is the persistentData.sketch object. Geometry that is construction-only or not part of a closed loop is left untouched — only a loop has an identity.