6.8 KiB
Sketcher view commands checkpoint
Batch: 65a376a55bddae44ce430ae2
Selected: Sketcher:desktop:Sketcher_ViewSection, Sketcher:desktop:Sketcher_ViewSketch.
Implemented
- Native dispatch in SketcherProbe now routes both commands to retained-document execution in SketcherDesktopCommands.
- Commands require an existing native sketch edit identity. View Sketch uses the global sketch placement rotation. Section toggles a per-editor clip plane through global placement, with direction derived from the current camera quaternion. Invalid or non-unit camera inputs and absent edit sessions/documents are rejected.
- Native document shapes supply OCCT edge discretization and tessellation. Browser Three.js displays these results, with OrbitControls and clipping on context objects while keeping the edited sketch visible.
- Existing module adapter owns request validation and response validation. Workbench shell passes the current camera, consumes native view results, and mounts the new SketcherViewTask. Shared desktop dispatcher was not changed.
- Added native and mounted-browser executable cases and declared their coverage/dependency in the Sketcher business manifest. No verifier, proof requirements, acceptance runner, IFC contract, or passing status was edited.
Evidence and current validation boundary
A focused acceptance runner execution passed both selected IDs with native and mounted browser cases:
docs/current/business-evidence/394f3a26bfd37bb1b9f53845-20260917T163950178624.json
Runner output: passed=2, remaining=[], exitCode=0, executedCount=2, totalSeconds=10.564.
The tested native cases checked active edit requirements, global offset and orientation, front/back section toggles, camera restoration, invalid quaternions/documents, and retained geometry/constraint counts. Browser cases created two actual native hexagon sketches on different planes, orbited the Three.js camera, restored the editing orientation, compared canvas pixels before/after section clipping, verified exact pixel restoration when toggled off, and captured desktop/mobile screenshots. The 390 px section screenshot was visually inspected and shows the native sketch and context edges.
AFTER that passing report, review found and fixed an additional interaction: View Sketch must preserve an already-enabled reversed clip plane while aligning the camera. The native code now retains the clip plane separately and clears temporary section state when entering another edit/reorientation session. Added an executable assertion that View Sketch preserves the enabled reversed clip plane.
The final native target rebuilt successfully and final js/wasm/worker.js were synced to web/public/kernel. The attempted acceptance rerun returned:
{"status":"previous_validation_deferred","deferredIds":["Sketcher:desktop:Sketcher_ViewSection","Sketcher:desktop:Sketcher_ViewSketch"],"executedCount":0,"reason":"User paused repeat validation; select only newly completed gaps. Historical proof is not promoted to current acceptance."}
Therefore the passing evidence predates the final clip-preservation/reset patch; do NOT describe it as verification of the final hashes below. Final business rerun remains deferred by the runner. Do not bypass that guard with direct execution or change acceptance machinery/statuses.
Commands and checks
Focused build, completed after the last native patch:
cmake --build freecad-source/build-web/configure --target FreeCADWebSketcherProbe -j2
Browser tooling reused from /tmp/freecad-sketcher-browser-tools/node_modules/playwright/index.mjs, executable /usr/bin/google-chrome.
The first runner attempt failed to import default playwright; supplying those existing paths resolved the environment failure. The successful run used --retry-failed for that diagnosed environment recovery only.
Final attempted runner command (deferred, zero cases):
FREECAD_SKETCHER_PLAYWRIGHT_MODULE=/tmp/freecad-sketcher-browser-tools/node_modules/playwright/index.mjs FREECAD_BROWSER_EXECUTABLE=/usr/bin/google-chrome python3 tools/run_business_acceptance.py --module Sketcher --ids Sketcher:desktop:Sketcher_ViewSection Sketcher:desktop:Sketcher_ViewSketch --reuse
New viewport TypeScript compilation passed. Ad-hoc shell compilation with classic React JSX mode was inappropriate for its transitive dependencies; rerunning with react-jsx produced 66 diagnostics outside the selected files, mostly missing Vite worker URL declarations. No diagnostics named workbench-shell.tsx, sketcher-view-task.tsx, or sketcher-desktop-adapter.ts. Full output is /tmp/sketcher-view-shell-types.log; this is not a clean project typecheck claim.
npm run check:geometry-boundary was unavailable (Missing script) in both root and web. The requested check was attempted; it did not pass. Do not add or weaken a check to change this result.
Continuation
- Preserve all original/supplemental requirements, existing workflows, and IFC semantic contract. No deployment, pushes, messages, full-parity or API gates were run.
- Implementation and final build/sync are complete for the selected view work. If the runner permits a later authorized rerun, use the exact command above for attributable proof of the final clip-preservation patch. Preserve the deferral and historical evidence meanwhile.
- Existing broader Sketcher boundaries (including LeaveSketch/Grid integration and other unselected commands) are not claimed by this batch. The current scene renderer displays native document shapes; GUI view-provider visibility/temporary visibility parity was not proven by these cases. Parent-container transforms use getGlobalPlacement, but container-specific fixtures were not added.
- No additional source reads are needed for the current patch. The last read attempt hit the supplemental source budget; reuse this checkpoint and retained excerpts.
Final file hashes
freecad-source/src/WebAssembly/FreeCADCoreProbe/SketcherDesktopCommands.cpp:2f4259ee353532a414c1a3d58d00f1e8ed1630387105eff2db90bd2b016470b7freecad-source/src/WebAssembly/FreeCADCoreProbe/SketcherProbe.cpp:eded2957099b70177ba9a5c3236533adf43f8b05949067d740c8dc0abe6f0b92web/src/sketcher-desktop-adapter.ts:242fc9f67400a2ac7b0d11bf0785a432cd8c1bcc3343d3cba419d99c99f93d24web/src/sketcher-view-task.tsx:d68bb2bf05bb0f6b5f8d24a561e49e1cfb4b71ded27b08d4c9cecdde4546b731web/src/workbench-shell.tsx:cf33e95335354c2aeb064b6ed1084e0a818298875239b7e83d4134f062c4e3dbtools/sketcher-business-cases.mjs:b12eff3315ef46e42cf3ec6e0c25d314ceca1e680463932200aa44ad7d965c49docs/business-acceptance/Sketcher.json:058cfe4571d569949d6e4b5970b4208d6e30d04b80e87139720681081c1f9d47web/public/kernel/FreeCADWebSketcherProbe.js:593cb384f62dfe79f704fde212214da11ae7877291102692fbbdf723a15fdc24web/public/kernel/FreeCADWebSketcherProbe.wasm:d788ae69deff346af6783c2b794c4dd683e8afa001f0ee768027f73e1c0e0001
Saved at 2026-09-17T16:43:13.959031+00:00