Files
FreeCADWasmDev/docs/current/partdesign-e7e20346-checkpoint.md

8.3 KiB

PartDesign Batch e7e203467bd0cc3ce3fd8685

Implemented Scope

Selected commands are PartDesign_DuplicateSelection, PartDesign_Migrate, PartDesign_MoveFeature and PartDesign_MoveFeatureInTree.

The mounted workbench dispatcher already calls the PartDesign desktop adapter. The adapter now normalizes whole-object selections, checks current-document selection, rejects conflicting explicit objects and unfinished/cancelled tasks, and publishes native result selection for these four commands. The document facade admits the four actions and validates their request fields. No shared dispatcher, workbench shell, alternate Worker or geometry backend was added.

PartDesignDocumentWorkflow.cpp now implements:

  • duplicateSelection: App::Document::copyObject with optional recursive copying, adding allowed copies without a Body to the supplied active Body. Native naming, object types, properties and dependency remapping are retained.
  • migrate: scan orphan native PartDesign solid features, form independent linear chains, transfer their orphan profiles, and create a Body per chain. Branches, external bases, cycles and profiles already owned by a Body reject explicitly.
  • moveFeature: require one source Body and another destination Body; include sketch dependencies and reject other dependencies remaining in the source or source features depending on the moved objects. Transfer in original Body order using native removeObject/addObjects.
  • moveFeatureInTree: remove/reinsert ordered selections after a same-Body target or at the beginning. Reject foreign/base selections, selected insertion targets and orders that put features before their dependencies.

All operations use existing native transactions, recompute, error handling, undo/redo and FCStd persistence. Snapshots now expose Body Group order and these actions return selectedObjects. Desktop source decisions are from CommandBody.cpp at 400, 460, 560, 767, 836, 866 and 1033.

Executable Cases

New tools/partdesign-body-business-cases.mjs is imported by the existing partdesign-business-cases.mjs entry point. It is registered as an acceptance dependency so edits invalidate its evidence. The four coveredIds were registered only after their semantic assertions existed. No proof requirement, verifier, runner or passing status was edited.

The cases run the real PartDesign Worker with published WASM and the mounted workbench command buttons through Playwright. They assert native Pad and sketch types, independent copied profile links, solved sketch DOF, Body ownership/order/ tip, analytic volume and mesh, one transaction, undo restoring original objects, redo, invalid-input/history preservation, FCStd save/close/open and continued source/copied feature parameter edits. Mounted browser cases use the same assertions and the actual command/payload controls. Native selection publication is also checked.

Build And Evidence

The focused build completed:

python3 tools/web_build_lock.py -- cmake --build freecad-source/build-web/configure --target FreeCADWebPartDesignRuntimeProbe -j8

Ninja also rebuilt existing Sketcher SketchGeometry.cpp and SketchObjectExternal.cpp changes present in the workspace. They were not edited in this turn. Existing compiler/linker warnings concerned PTHREAD_POOL_SIZE during compilation, USE_PTHREADS with ALLOW_MEMORY_GROWTH, and exported FS_readFile.

node tools/sync-assets.mjs completed, copying three runtime artifacts. node web/node_modules/typescript/bin/tsc --noEmit -p web/tsconfig.json passed. JavaScript syntax and scoped diff whitespace checks passed. Existing browser URL: http://localhost:5180/workbench.html?module=PartDesign.

Initial four-ID acceptance took 10.937 seconds. All native workflows reached their final assertions; browser cases stopped on an ambiguous button.run selector. Evidence, preserved unchanged: docs/current/business-evidence/46c7c94b4f4bb100bb3ce940-20260917T021934917325.json

After narrowing the Run button selector, an isolated retry initially returned unchanged_failure_preserved because this new imported case file had not yet been registered in dependencies. Adding that real dependency made the correction attributable; no status, fingerprint or evidence was manually changed.

Successful DuplicateSelection run: 21 cases, including 10 browser cases, 10.018 seconds: docs/current/business-evidence/3774f7cdab28b6155c63b6b8-20260917T022024325315.json

Next three-ID run: Migrate passed 17 cases (8 browser); MoveFeatureInTree passed 21 (10 browser). MoveFeature completed native assertions but browser selection matched both MoveFeature and MoveFeatureInTree. Run took 20.563 seconds: docs/current/business-evidence/72714590dfc7acce7716ec53-20260917T022057991833.json

The final case change selects buttons by an exact command-name descendant. MoveFeature then passed 21 cases (10 browser), 8.968 seconds: docs/current/business-evidence/84398a23ec503f67a143e795-20260917T022148916910.json

There are 80 successful cases across those individual reports, 38 browser cases. This is not a claim that a final combined run passed: DuplicateSelection, Migrate and MoveFeatureInTree were executed before the final shared-selector change, while MoveFeature was executed after it. No native or adapter changes were made after the successful build or first runner invocation.

Next Continuation

Final combined freshness invocation:

python3 tools/run_business_acceptance.py --module PartDesign --ids PartDesign:desktop:PartDesign_DuplicateSelection PartDesign:desktop:PartDesign_Migrate PartDesign:desktop:PartDesign_MoveFeature PartDesign:desktop:PartDesign_MoveFeatureInTree --reuse

The scheduler rejected it with exit 78, previous_validation_deferred, executedCount 0, reason: "User paused repeat validation; select only newly completed gaps. Historical proof is not promoted to current acceptance."

Do not bypass the guard or repeatedly issue the unchanged rejected invocation. Reuse this build/sync and the original reports. When permitted by the outer pipeline, refresh the three results predating the exact command selector and reuse MoveFeature if its fingerprints remain valid.

Remaining Behavior Boundaries

These successful cases certify the explicit workflows above, not every desktop option. Preserve all of the following as remaining work:

  • Migration does not create/reuse the desktop active App::Part, set GUI workflow preferences, migrate branched/external-base chains, fix historical sketch support, or relink external references to new Bodies. Empty modern-document migration currently returns an error. The fixture is a real orphan recursively copied Pad/profile, not an imported historical legacy FCStd fixture.
  • MoveFeature currently requires an owned source Body and only automatically collects sketch dependencies. It does not reproduce the full GUI movable- dependency collector, detached source objects, origin/datum dependency moves, all nonempty-target combinations or arbitrary multi-feature moves in tests.
  • Reordering tests cover moving a datum after a sketch while preserving Pad tip, and rejecting an invalid sketch-after-Pad order. Beginning insertion, multiple selections, moving solid tips and Body base edge cases still need cases. Dependency-order rejection is stricter than the desktop command's TODO warning.
  • DuplicateSelection delegates native copying but has no dependency-selection dialog or desktop visibility/property-preference parity. Whole-Body copying, nonrecursive copies, mixed object types and no-active-Body user workflows need dedicated cases. No mutation is represented by proxy geometry.
  • The mounted command/payload flow is tested. Specialized graphical task panels, mobile/canvas layout and browser OPFS reload are not certified by this suite.

Earlier checkpoints and all original/supplemental requirements remain in force, including docs/current/partdesign-98e219d6-checkpoint.md and prior SubShapeBinder boundaries. Preserve the IFC semantic export contract, semantic assertions, verifier, proof areas, acceptance machinery and historical evidence. No full parity/API gate, deployment, push or external message was performed.

The initial unscoped git status was rejected with SCHEDULER_GIT_SCOPE_REJECTED (exit 64). This was a diagnostic scope rejection, not a CAD failure. Later scoped diff whitespace checks succeeded. All command sessions started in this turn completed before checkpointing.