Files
FreeCADWasmDev/docs/current/part-offset-d8875da77baf3cea04bcb3c4-checkpoint.md

7.2 KiB

Part Offset Batch Checkpoint

Batch: d8875da77baf3cea04bcb3c4. Checkpoint date: 2026-09-17 Asia/Shanghai.

Selected requirements remain Part_CompJoinFeatures, Part_CompOffset, Part_Offset, and Part_PickCurveNet. This turn delivered the 3D Offset document workflow and executed its acceptance cases. The whole four-command batch is not complete.

Implemented And Executed

  • DocumentProbe.cpp now supports createOffset and editOffset using native Part::Offset, Source, and Value. Default distance is 1 mm. It validates the current document, whole-object selection, feature name/type, finite nonzero distance, source shape, and dependency cycles. Recompute and valid-shape checks precede transaction commit. Failure aborts the transaction. Snapshots expose offsetFeature.source and offsetFeature.value.
  • Native source visibility is hidden and result visibility enabled within the offset transaction. Undo/redo and FCStd persist the feature and source link. No frontend geometry algorithm was added.
  • part-desktop-adapter.ts routes Part_Offset, and the 3D branch of Part_CompOffset, through part.document in the existing DocumentProbe owner. The shared dispatcher already calls this adapter and was not changed.
  • part-document-facade.ts declares the new document actions and property snapshot. part-offset-task.tsx is mounted in workbench-shell.tsx for both commands. It provides distance/source selection, creation, editing, cancel without mutation, undo/redo, FCStd open/save through OPFS, and native geometry display.
  • tools/part-offset-business-cases.mjs is invoked from the existing tools/part-business-cases.mjs for Part:desktop:Part_Offset. Tests check default expansion bounds and volume, source dependency, visibility, selection, document isolation, transaction count, invalid inputs, native failure rollback, cancellation, analytic inner volumes, source recompute, unique names, FCStd restore, mounted browser controls, OPFS restore after reload, desktop/mobile screenshots, canvas pixels, rotation, and task width.

Attributable Evidence

Executed command:

python3 tools/run_business_acceptance.py --module Part --ids Part:desktop:Part_Offset --reuse

Runner result: passed, passed 1, remaining empty, exit 0, executedCount 1, reused false, elapsed 23.126 seconds.

Evidence: docs/current/business-evidence/a21e660b1f9d8a382572e450-20260916T205950340047.json.

Artifacts: docs/current/part-offset-business/2026-09-16T20-59-27-700Z/. Desktop and mobile geometry images were also visually inspected. Mobile task clientWidth and scrollWidth both measured 390. Existing scene controls overlay the upper portion of the mobile canvas; no shared scene UI changes were made in this turn.

The initial runner execution failed on an exact comparison of derived mesh/edge arrays after cancellation. Snapshot actions include different mesh data, and recompute can reorder tessellation/edge traversal and change floating-point roundoff. The case now compares all remaining object state with numeric tolerance (1e-7), while separate cases still assert topology, volume, bounds, mesh presence and pixels. That correction was rerun through the acceptance runner; no report status was edited manually.

Focused TypeScript check of the adapter and mounted task passed. npm --prefix web run check:geometry-boundary passed with no findings; this is only static ownership evidence. FreeCADWebDocumentProbe was incrementally built with cmake --build freecad-source/build-web/configure --target FreeCADWebDocumentProbe -j2, and its JS/WASM/worker artifacts were copied to web/public/kernel. Existing server reused at http://127.0.0.1:5180/workbench.html. No owned build/test process remains running.

Preserved Boundaries And Next Steps

  1. Part_CompOffset is incomplete. Its 3D branch uses the new document implementation; action 1 / offset2d explicitly returns implementation_required. The mounted task currently exposes the 3D branch only. Implement its native Part::Offset2D branch and actual dropdown controls, then add cases that exercise both branches. No composite-command passing evidence or covers tags were added.
  2. The selected desktop source is already read: Command.cpp:1879 creates Part::Offset2D, assigns Source, initializes Value to 1.0, recomputes, and enters edit mode. It requires exactly one shape and no active dialog. This closely matches the new 3D owner path. Native type, input topology and additional options must be verified, not replaced with a detached wire BREP result.
  3. Part_CompJoinFeatures remains explicitly blocked for linked document selections in the adapter. Command.cpp:576 delegates indices 0/1/2 to Part_JoinConnect, Part_JoinEmbed, and Part_JoinCutout. Existing BREP handlers do not prove persistent feature proxies, operand links, recompute, visibility or transactions. Reuse actual local Join feature source/proxies through the same native document owner. A subsequent packet may need JoinFeatures/JoinAPI source anchors.
  4. Part_PickCurveNet: Command.cpp:95 has an empty activated body. Existing PartDesktopCommands.cpp:1436 instead performs a curve-BREP operation. Reconcile the browser command with the supplied desktop semantics and executable assertions; do not invent a native curve-network editor or declare success from a descriptor alone.
  5. 3D Offset proof covers the default native feature options and editable Value/Source. Full native offset task options, appearance copying (ShapeAppearance, LineColor, PointColor), link-transform variants and desktop live-preview edit transaction semantics have not been asserted. Preserve these original desktop requirements as follow-up boundaries rather than claiming broad desktop parity from the current runner result.
  6. Acceptance contract, verifier, proof requirements, and runner were not modified. docs/business-acceptance/Part.json still has its original declarations; do not manually promote statuses or rewrite that contract to remove a preflight diagnostic. The runner has actual current proof for the selected Part_Offset ID. Reuse it while inputs remain unchanged; changes to shared native/adapter inputs require affected verification.
  7. All IFC semantic requirements remain in force. No IFC source, contract or proof machinery was modified or rerun. No full-parity/API gate, deployment, push, external message, or new geometry backend was used.

Source And Execution Notes

Use the packet-aware reader for further source windows and retain source/command/time limits. The latest source-window response reported 21 regular windows remaining; no supplemental windows were used. Important already-read anchors are DocumentProbe transaction routing near original line 953, recompute/snapshot near original 1260, adapter entry near line 36, and shell task mounting near original line 1743. Edits shifted those lines.

npm run check:geometry-boundary with an exec working-directory override initially resolved the wrong package in this environment; npm --prefix web run check:geometry-boundary succeeded. Broad git status and directory rg --files were scope-rejected; use explicit current files or the provided bounded search tool. Do not replay unrelated source searches or unchanged failing batches.