-
Notifications
You must be signed in to change notification settings - Fork 4
Compound / assembly modeling in EzyCad #59
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Status: Open — deferred for design discussion; revisit later.
Context
- STEP assemblies (e.g. multi-part crankshaft
.stpfiles) often define manyPRODUCTentities in the file. Example:B5D-E1400-00 CRANKSHAFT ASSY YAMAHA FREEGO LTK125.stpcontains 9PRODUCTlines in the STEP text. - Open CASCADE may still deliver one top-level
TopoDS_Shape(often aTopoDS_Compound) afterTransferRoots(), rather than nine separate roots—behavior depends on the exporter and reader settings. - Performance and UX (move, tessellation, selection) are heavy when the whole assembly is one large compound mesh.
Current behavior (EzyCad)
- Each document shape is a
Shp(AIS_Shape) holding aTopoDS_Shape. Compounds are already valid B-rep;BRepTools::Write/Readin project JSON preserves topology. m_shpsis a flat list—no scene hierarchy, assembly tree, or named instances in the document model.- Export already builds a
TopoDS_Compoundwhen merging multiple selected shapes (build_export_shape_).
Gaps (what “compound support” could mean)
- Workflow: Explode or split a compound into multiple
Shpentries for editing; optionally group selected shapes into one compound. - UI: Scene tree showing children of compounds; clearer selection of sub-solids (depends on OCCT selection modes).
- STEP: Optional import strategies (e.g. split roots, or STEPCAF / XCAF) for assembly metadata, names, and structure.
- Long-term: Full XCAF-based assembly model and richer STEP round-trip.
Suggested directions (when revisiting)
| Tier | Scope | Notes |
|---|---|---|
| 1 | Explode / group compounds | TopExp_Explorer or TopoDS_Iterator; replace one Shp with N, or merge N into one compound; undo integration. |
| 2 | Tree panel + import tweaks | List m_shps and compound children; optional STEP post-split for multiple roots. |
| 3 | XCAF / STEPCAF | Product tree, colors, instance transforms; large effort. |
Related work already done (same era)
- PLY import/export, binary file open for import,
import_stepreturnsStatus,.stpin import filter, batched redisplay for transforms, PLY export via mesh writer (notDEPLY_Provider).
References
- OCCT:
TopoDS_Compound,TopExp_Explorer,STEPControl_Reader, optionalSTEPCAFControl_Reader/ XCAF. - Code:
Occt_view::import_step,build_export_shape_,m_shps/to_jsonshape array inocct_view.cpp.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request