feat(silo): DAG extraction engine -- extract_dag, classify_type, properties_hash #214

Closed
opened 2026-02-14 19:40:30 +00:00 by forbes · 0 comments
Owner

Summary

Implement the core DAG extraction functions that walk a FreeCAD document and produce the node/edge payload defined in docs/MULTI_USER_CLIENT.md Section 2.

Deliverables

classify_type(type_id)

Map FreeCAD TypeId strings to DAG node types (sketch, pad, pocket, fillet, chamfer, body, part, datum). Return None for non-feature objects.

compute_properties_hash(feature_obj)

SHA-256 hex digest of a feature's parametric inputs. Must cover Sketch (geometry/constraints), Pad/Pocket (length, type, reversed, profile), Fillet/Chamfer (size/angle), and any property that would trigger recomputation.

extract_dag(doc)

Walk doc.Objects, classify each, compute hash, and build edge list via obj.InList (dependency parents). Return (nodes, edges) matching the payload in Section 2.1.

Location

New file: mods/silo/freecad/dag.py

Ref

docs/MULTI_USER_CLIENT.md Sections 2-4

## Summary Implement the core DAG extraction functions that walk a FreeCAD document and produce the node/edge payload defined in `docs/MULTI_USER_CLIENT.md` Section 2. ## Deliverables ### `classify_type(type_id)` Map FreeCAD TypeId strings to DAG node types (sketch, pad, pocket, fillet, chamfer, body, part, datum). Return `None` for non-feature objects. ### `compute_properties_hash(feature_obj)` SHA-256 hex digest of a feature's parametric inputs. Must cover Sketch (geometry/constraints), Pad/Pocket (length, type, reversed, profile), Fillet/Chamfer (size/angle), and any property that would trigger recomputation. ### `extract_dag(doc)` Walk `doc.Objects`, classify each, compute hash, and build edge list via `obj.InList` (dependency parents). Return `(nodes, edges)` matching the payload in Section 2.1. ## Location New file: `mods/silo/freecad/dag.py` ## Ref `docs/MULTI_USER_CLIENT.md` Sections 2-4
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#214