5.3 KiB
Part tube functional gap completion
Date: 2026-09-17 (Asia/Shanghai)
Requirement: Part:desktop:Part_Tube
Implementation
The current-document command now uses the supplied desktop BasicShapes.Shapes.TubeFeature and addTube factory, rather than a detached static BREP approximation. The BasicShapes package is embedded in DocumentProbe with build dependency tracking so its Python proxy can be imported during native FCStd restoration.
Implemented behavior:
- Native
Part::FeaturePythontube with outer radius 5 mm, inner radius 2 mm, height 10 mm and the desktop attachment extension. - Editable dimensions, local placement/axis-angle rotation, unique names and creation inside a selected current-document
App::Partcontainer. - Native FreeCAD dimension expressions. Referenced-object changes recompute the tube; expressions and dependencies survive FCStd restoration. Expressions may be cleared to resume numeric editing.
- Transactional creation and editing. Both entered dimensions and evaluated expression values must satisfy positive outer radius/height and
0 <= inner radius < outer radius; invalid geometry or expressions abort before commit. - Existing desktop-created TubeFeature objects are recognized by their actual proxy class, even without any WebTube metadata. Other Python features are not misidentified as tubes.
- Mounted create/edit controls, expression inputs, container selection, undo/redo, read/cancel, FCStd save/open, OPFS persistence and interactive Three.js geometry. Unapplied form edits are discarded by cancellation; committed edits remain in document history.
Primary files: PartTubeDocument.h, DocumentProbe.cpp, DocumentProbe CMakeLists.txt, part-document-facade.ts, part-desktop-adapter.ts, part-tube-task.tsx, and workbench-shell.tsx.
Verification
The first acceptance command was:
python3 tools/run_business_acceptance.py --module Part --ids Part:desktop:Part_Tube --reuse
It passed 31 scenarios in 20.996 seconds, using one native document kernel and one browser workflow. Main evidence.
Cases check the actual desktop proxy and attachment extension, analytic volume and desktop shape equivalence, radius/height changes, placement, zero inner radius, container membership, source-driven expressions, history, invalid expressions, rollback, document isolation, pending read/cancel, native FCStd restoration and browser persistence. The first attempt used CenterOfMass on the returned compound; this was corrected to read the compound's single solid, whose presence is independently asserted.
Final inspection identified two additional functional boundaries: recognizing desktop tubes without Web metadata and validating expression results before transaction commit. Those were fixed and verified separately with 7 focused new cases, without repeating the already-passed main suite:
node tools/part-tube-boundary-cases.mjs
Supplemental evidence and input hashes.
The supplemental run restores an actual native tube created without WebTube, edits it, distinguishes an unrelated Python feature, and verifies rollback for negative evaluated InnerRadius, OuterRadius and Height in both create and edit operations. Geometry, object lists and undo/redo counts are preserved on failure.
The main report predates these final native-source changes. It remains historical evidence, while the supplemental report identifies the final source/artifact hashes for the newly fixed boundaries. No claim is made that the entire original suite was rerun against the final fingerprint. This follows the user's direction to avoid repetitive validation.
TypeScript checking, production Vite build, incremental DocumentProbe build and native-source whitespace checks passed. Installed native libraries were reused. No historical IFC or other old requirement suite was run.
Visual Inspection
Playwright exercised 1440x900 and 390x844 viewports, visible model pixels, camera rotation, task overflow and the mounted controls. Screenshots were visually inspected; the bore and tube walls are visible and controls do not overlap the canvas.
Continuation
Snapshot: 208/1508 requirements declare executable coverage; 1300 remain uncovered. This measures case coverage, not fresh whole-project acceptance. All original requirements remain.
This change covers tube creation, committed editing, expressions and persistence. It does not certify every generic attachment-editor mode or exact desktop live-preview transaction staging. The supplied native attachment extension is retained for existing attached objects.
Continue prioritizing functional gaps. Preserve the existing scheduler, previous work and deferred-validation policy; do not repeat this or historical IFC suites solely to refresh fingerprints. The overall migration remains unfinished.
The scheduler was thawed and verified active/unfrozen. Cycle 9295 started with a live child process (480818), selecting Join Features and Section Cut for continued gap work.