Files
FreeCADWasmDev/docs/current/PART_NATIVE_ROUTE_PROGRESS.md

4.8 KiB

Part Native Routing And Continuation Efficiency

Subsequent completion: PART_BUILDER_DOCUMENT_PROGRESS.md records the native six-mode Builder, mounted task, transaction/persistence behavior and passing business acceptance. The Builder limitations below are historical. Chamfer and BoxSelection remain separate pending workflows.

2026-09-16. This repairs an actual native call path; it does not certify the complete Builder, Chamfer or Check Geometry desktop workflows. Keep all 1508 requirements and all 1342 missing executable-coverage items.

Repaired Behavior

The part.pythonFamilyBatch desktop branch for Part_Builder, Part_Chamfer and Part_CheckGeometry now calls the existing executePartDesktopCommand OCCT implementation. It previously returned a command description, including a constant geometry-validity claim, instead of executing the operation.

The real output includes serialized BREP, validity, volume and edge count. It explicitly declares resultScope=native-geometry and documentChanged=false; geometry execution does not pretend to create a persistent document feature. The mounted Part adapter recognizes this actual native result shape with structural validation. Metadata-only replies remain rejected. The family facade retains native error codes and messages rather than replacing them with an unrelated protocol diagnostic.

Only FreeCADWebPartBoxProbe was incrementally rebuilt. The existing frontend build passed its geometry-boundary check, TypeScript and Vite build, and synchronized public/preview artifacts. No IFC runtime or IFC cases were rebuilt or rerun. Current IFC semantic acceptance remains valid.

Evidence

part-native-route-diagnostics/2026-09-16T02-57-39-540Z/result.json records 10 passing checks using one WASM load and one adapter compilation: two Builder shapes with independently measured area, self-intersection rejection, real edge chamfering, checking its output, corrupt BREP rejection, document-selection validation and rejection of legacy placeholder replies.

business-evidence/d530c34d605d7404c989d048-20260916T030257758136.json retains the updated Builder diagnostic through the business runner. Native planar geometry assertions pass, including area 100, but the whole requirement stays not_implemented because document/task/browser semantics are incomplete. Execution took 2.011 seconds. A matching --reuse request took 0.138 seconds, executed zero cases and preserved the same incomplete evidence.

Avoiding Repeated Stalls

The supplemental source reader previously stopped after four distinct windows, even with a known native repair anchor. Continuous development now permits 16 distinct windows within 48 KB total, preserving exact-file restrictions, per-window bounds, locking and duplicate suppression. The legacy profile keeps its four-window limit. Three focused tests cover these properties.

Builder batches now include the actual local desktop implementation and UI sources, TaskShapeBuilder.cpp, .h and .ui, in their permitted support paths. A new turn need not rediscover or be denied those files.

Child build environments default FREECAD_WEB_FAST_LINK=ON, using the existing incremental public-asset plugin; explicit OFF is retained. The full frontend build observed in this turn spent 97.9 of 100 seconds preparing/copying output. This motivates enabling the existing fast path, not inventing another cache. Existing asset tests verify unchanged file reuse, changed-file replacement, obsolete-file removal and path guards. No unmeasured speedup is claimed. Scheduler regression suite: 180 passed; the context suite, including the new ON/OFF environment check, passed all 12 tests after the follow-up change.

Next Implementation

Do not repeat the repaired metadata-routing investigation or unchanged Builder diagnostic. The next work is native document and task behavior:

  • TaskShapeBuilder.cpp implements six modes: edge from vertices, wire from edges, face from vertices, face from edges, shell from faces, solid from shell. It uses real Part APIs, native selection/subelements, a new Part::Feature and a transaction for each Create action. Closing the task is not shape creation.
  • Reuse the current document owner and the existing document/FCStd mechanisms; do not invent a replacement document or treat a BREP result as persistence.
  • Preserve cross-document rejection, error rollback, undo/redo and independent documents. Add mounted controls and real browser/native cases before placing these command IDs in coveredIds or accepting them.
  • Chamfer still needs persistent features/current document operands and its task lifecycle. BoxSelection still needs actual rectangle/camera picking and native face selection. Existing raw geometry handlers are reusable inputs.

All progress counts come from generated evidence audits. Passing this routing diagnostic does not close any of those full workflow requirements.