Files
FreeCADWasmDev/docs/current/part-fixed-box-delivery-20260910.md
wangdequan 9a7c4f0335 Save FreeCAD Web workspace sources and user validation evidence
IFC native binding remains incomplete; preserve accurate test results.
2026-09-15 22:01:58 +08:00

4.4 KiB

Part Fixed Box Delivery

New Business

Part:desktop:Part_Box2 and Part:desktop:Part_Box3 now create retained, editable native Part::Box features in the current document. The provided desktop src/Mod/Part/Gui/Command.cpp defines 100 mm dimensions and positions (0,0,0) / (50,50,50). The Web implementation uses the existing FreeCAD Part::Box, Placement, document transactions and linked OCCT geometry, not a JavaScript shape substitute.

The primary workspace exposes the two commands beside the box dimension editor. The existing desktop dispatcher also routes them through part.document and part-save.worker.ts, with DocumentProbe owning the native objects. No new WASM, Worker, geometry engine or cross-instance native pointers were introduced. The generated desktop route metadata points to that same Worker so preloading does not initialize the legacy PartBoxProbe for these commands.

Blocking Defects Fixed

  • The previous fallback returned no current-document operation for these command IDs. The native creation action now assigns unique names, preserves other objects and commits exactly one transaction. Invalid names, presets and overrides are rejected without changing the document.
  • Selection and reopen could show previous property editor values until a React effect ran. Property synchronization now runs before paint.
  • Workbench run passed activeTask=true for an ordinary click, making commands reject their own execution. Runner busy state is now separate from the explicitly supplied existing-task state. Browser cases verify accept, active-task rejection, and recovery through the actual workbench button.
  • Existing format/boolean workflows and old source/receipts are retained. Part_Boolean dialog and Part_BoxSelection rectangle selection are not certified by these two new cases.

Verification

  • New commands: business-evidence/ab54bf7461e28ffa36554439-20260910T023109084571.json, two passed IDs with 12 cases each. Native geometry/bounds, current-document isolation, undo/redo, duplicate naming, malformed input, dimension edits, FCStd persistence, OPFS reload, real browser Worker/dispatcher and mounted workbench buttons are covered.
  • Part regression: business-evidence/06a3fb7a10a814e55d2b7371-20260910T022257908225.json, all 20 declared IDs passed. The final workbench-button extension for Box2/Box3 is covered by the newer evidence above.
  • Web regression after final publication: business-evidence/815a9219e10b1a8b04f5db32-20260910T023105277664.json, 10/10 passed.
  • Desktop/mobile screenshots and nonblank canvas-pixel/orbit checks: part-fixed-box-browser/. Both 1440x1000 and 390x844 viewports were exercised.
  • Focused facade/download tests: 5 passed. Scheduler/route-scope/build-lock regressions: 86 passed. TypeScript, geometry-boundary audit and production bundle passed.

Measured Time

Step Seconds Scope
First native compile/link 31.76 DocumentProbe.cpp only
Native invalid-name follow-up compile/link 34.17 DocumentProbe.cpp only; no OCCT compilation
No-change native dependency check 0.31 No compilation/linking
Complete frontend build 15.49 Existing build pipeline
Final frontend bundle 6.06 Pure frontend change after existing asset publication
Part 20-ID regression 75.089 Existing cases plus the two new workflows
Final two-command acceptance 19.793 Actual native/browser execution, no build
Final Web 10-ID regression 19.252 Actual production browser execution

These are measured command durations, not total engineering time. One intermediate acceptance overlapped asset synchronization and was correctly rejected by fingerprint checks; no evidence was accepted from that unstable run. Build/publication must finish before starting dependent acceptance. Browser read-only cases may run alongside unrelated work.

Continuation

  • Reuse these passed cases when source/artifact fingerprints match. Do not requeue Box2/Box3 as unimplemented or count a refreshed receipt as another new feature.
  • Keep fixed-box semantics in DocumentProbe and its existing Part adapter. Do not route them back to the legacy PartBoxProbe fallback or add an independent WASM.
  • Preserve explicit activeTask exclusion. Launching a command runner is not an existing native task and must not set that flag to true.
  • The full project remains incomplete; the new delivery count for this work is exactly two business IDs, independently of refreshed evidence elsewhere.