99d8d382b9
* Bill of materials: part properties on components and assembly.bom A component definition now carries part properties (part number, description, revision, other tools' keys) and free text properties, saved with the component and shared by its occurrences. component.metadata and component.metadata.set read and change them in one undo step; Paste New copies them; parts.insert numbers standard parts from their standard and size, and parts.resize renumbers them. assembly.bom counts the placed components (flat: parts at any depth through their subassemblies; top: direct children), grouped by part number or by definition, sorted by part number, and writes CSV (fixed, quoted columns) or JSON. The app gets a Bill of Materials window on the INSPECT panel that lists, edits and exports the rows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Bill of materials: name a merged row's equal definitions once Two standard parts with the same size are separate definitions with the same name; their row now reads "SHCS M6x20" instead of repeating it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Window widths test: close the Bill of Materials window between commands The test closes the floating windows a command opens before starting the next one; the Bill of Materials window was left open and measured against the next dialogs' limits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Bill of materials: sub-parts in their part's row, and part properties without re-evaluating assembly.bom takes group_children: true. A part with a part number keeps what is placed inside it (a bolt's washer and nut) in its own row, listed under it as children (items 1.1, 1.2, with each and count) instead of rows of their own; bolts with different contents stay different rows, and total_occurrences is the same either way. The window has a switch for it and shows the children under their part; the CSV lists them after their row. Changing part properties re-evaluated the model, re-seated every joint and rebuilt the placed model: 361 ms per change with 30 jointed bolts. A change that only touches components' metadata and properties now takes the same path as a render-only change (proved on the whole Document), also for its undo and redo: 0.6 ms. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Bill of materials: look the structure up once, not per subassembly Deciding whether a subassembly is a part (it has bodies of its own) scanned every body of the model for each subassembly, and each body looked up its feature by a linear search of the timeline: subassemblies × bodies × features. assembly.bom now indexes the placements, the body owners (Document::body_owners: one pass over the bodies with the timeline in a map, the same rule as model_body_component) and the numbered components once per call. 600 bodies and features with 60 subassemblies: 8.1 ms → 1.3 ms; the old cost grows with the cube of the design's size. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: bherbruck <brennen.herbruck@gmail.com>