3.2 KiB
Parametric Slice Document Handoff
Policy: reuse local desktop sources and existing WASM. Implement first; users validate during use. No automated tests, browser checks or business acceptance.
Added Business Path
The earlier BREP-only slicing remains unchanged. An explicit resultScope=native-document now creates actual parametric document objects:
- BREP input creates retained Part::Feature base/tool objects from user bytes.
- Same-runtime whole-object selection can instead supply existing base/tools.
- SplitFeatures.makeSlice creates FeatureSlice with Base, Tools, Mode, Tolerance.
- FeatureSlice recompute reuses SplitAPI.slice and the existing Part/OCCT path.
- SliceApart calls CompoundTools.Explode.explodeCompound and creates the desktop CompoundFilter links/items plus its optional grouping object.
- A native transaction covers object creation, recompute and result serialization. Failure aborts it and closes only a newly created, owned document.
- Accept retains the document and returns actual object names, links, BREP and an FCStd snapshot. Cancel does not create or modify objects. Prior active document is restored. New document creation is explicit and rejects an existing name.
The existing PartSliceTask adds Parametric Document, native document name and New Document controls to its BREP file workflow. It displays returned object/link rows and stores/downloads the real FCStd using OPFS. It does not calculate geometry. Facade checks distinguish document results from BREP-only results and retain native errors. Source-only discovery or exposed flags do not substitute for the result.
Remaining Work
Dedicated property editing, the global document tree, cross-worker document transfer and Web reopen integration remain incomplete. FCStd serialization uses the supplied proxy classes but restoration was not executed or verified. Visibility is set only when a native ViewObject exists; no fake headless view provider is added. The object table is not a claim of a full global model-tree editor.
This closes the prior creation/relationship/persistence-output gap, not all project placeholders. Reuse makeSlice/Explode/CompoundFilter and the current build. Do not reimplement their algorithms or repeat the previous BREP migration.
Timings
One affected Part target rebuilt, 51 direct link dependencies reused. No CMake regeneration or unchanged OCCT rebuild. Native receipt: part-slice-document-implementation-pipeline.json.
| Step | Seconds |
|---|---|
| Module registry | 0.101 |
| Capability registry | 7.987 |
| Preflight | 0.048 |
| Native build | 33.018 |
| Artifact sync | 2.399 |
| Completion metadata, not acceptance | 0.929 |
| Native pipeline total | 44.482 |
| Frontend build total | 9.318 |
| Public asset sync within frontend | 7.032 |
Both builds exited 0. Frontend used FREECAD_WEB_FAST_LINK=ON. Source decisions were updated in place and the prior receipts retained. Future implementation packets also include CompoundTools.Explode/CompoundFilter and the existing task.
The unattended scheduler remained alive in waiting_for_retry at cycle 8127 during this work. Cooldown history was not cleared and no duplicate scheduler was started. Its survival is not evidence of restored throughput or project completion.