Files
FreeCADWasmDev/docs/current/PART_CHAMFER_DOCUMENT_PROGRESS.md

3.8 KiB

Part Chamfer Document Workflow

Later continuation: PART_BOX_SELECTION_PROGRESS.md records completion of the separate face box-selection workflow. Its pending status below is historical.

2026-09-16. Part:desktop:Part_Chamfer now has passing native and browser business evidence. This adds one previously uncovered workflow to the existing 1508 requirements; repeated regressions are not counted as new delivery.

Implementation

The document route creates or edits the supplied desktop Part::Chamfer feature with actual Base, Edges and EdgeLinks properties. It reuses FeatureChamfer.cpp, Part::FilletBase and OCCT. Equal, unequal and multiple per-edge distance pairs are supported. Source placement/dimension edits propagate through the native dependency graph. Each create/edit is one native transaction; invalid recompute rolls back existing properties and new objects. Duplicate/out-of-range edges, nonpositive/nonfinite distances, overwrite, cross-document selection, inconsistent selection and dependency cycles reject.

PartChamferDocument.h contains the document-specific validation and property assignment. DocumentProbe owns transactions, recompute, source/feature visibility, serialization and undo/redo. The caller's pending import transaction is preserved. Task cancellation makes no document mutation. FCStd retains the feature type, base links, edge distances, labels and display state.

The mounted task exposes base/feature selection, equal/two-distance modes, edge checkboxes with per-edge distances, select-all/clear, apply, undo/redo, close/read, OPFS save and local FCStd opening. The existing Three.js view shows native meshes and edge curves; source shapes are hidden behind their resulting chamfers. The task can reopen and edit a saved native chamfer after page reload. No new WASM module or frontend geometry algorithm was introduced.

Only the affected DocumentProbe and FeatureChamfer binding were rebuilt. The feature's existing exception handlers are compiled with -fexceptions under FREECAD_WEB so invalid OCCT distances remain recoverable document errors. Existing legacy BREP-only callers retain their prior route. Native feature workflow requests use the existing part.document worker.

Evidence

business-evidence/f10dadc5239ac66c1d72c03a-20260916T052511477355.json: Chamfer passed 20 scenarios. Builder and Part save/reopen passed in the same focused regression run (three requirements, 64.415 seconds). The acceptance runner closed runtime:42876ac8d8754c52b449 using attributable cases; no issue or passing status was edited by hand.

Checks include analytically expected volumes for one equal edge, unequal distances and multiple edges; base placement and dimension recompute; edit and undo/redo; invalid geometry and cycles; caller transaction preservation; FCStd/OPFS restore; actual mounted controls; nonblank desktop/mobile geometry and changed pixels after orbiting. Screenshots are hashed in the evidence. Desktop viewport: 1440x900. Mobile layout: 390x844, with no panel overflow.

An identical Chamfer request with --reuse took 0.149 seconds, read one report, executed zero cases and retained the original evidence. No IFC tests were run. TypeScript, the geometry ownership check, production Vite build, 47 business automation tests and 12 scheduler-context tests passed.

Continue

Use generated reconciliation for current counts. Chamfer and Builder are no longer missing executable workflows. BoxSelection and other unaccepted desktop commands remain separate work. Preserve their existing partial code/cases; do not treat this new chamfer evidence as coverage for them.

The panel selects explicit native edges and supports per-edge distance pairs; it does not introduce a new rectangle-picking implementation. Unsupported geometries still report native failure and leave prior document state intact.