Files
FreeCADWasmDev/docs/current/PART_ADDITIONAL_PRIMITIVES_PROGRESS.md

5.1 KiB

Additional Part primitive functionality

Date: 2026-09-17 (Asia/Shanghai) Requirement: Part:desktop:Part_Primitives Status: partially implemented; full requirement remains incomplete.

Added Types

The existing primitive document path and task now support six additional desktop native types:

  • Part::Prism: integer polygon count, circumradius, height and both skew angles.
  • Part::RegularPolygon: integer polygon count and circumradius.
  • Part::Circle: radius and angular interval, including arcs.
  • Part::Ellipse: major/minor radii and angular interval.
  • Part::Line: both endpoint coordinates, including negative values.
  • Part::Vertex: X/Y/Z coordinates, including zero and negative values.

These are native parametric objects created by the existing DocumentProbe, not detached approximations. Numeric property handling now distinguishes native integer and floating properties. Invalid polygon counts, radii, angular intervals and coincident line endpoints are rejected. Native recompute/transaction ownership, unique repeated creation and FCStd persistence are reused.

The primitive task displays lines and point markers as well as triangle meshes. An Isolate Selected toggle allows inspecting a curve or vertex without a solid hiding it. Undo/redo refreshes the selected object's input values. The task opts into reserved scene-toolbar space on narrow viewports. The separate project workspace's original primitive set is unchanged; PartTaskPrimitive extends the task/document types without advertising unimplemented project controls.

Files: DocumentProbe.cpp, part-document-facade.ts, part-primitives-task.tsx, and the additional-primitive case helper. Desktop references: PrimitiveFeature.cpp, PrismExtension.cpp, FeaturePartCircle.cpp, and DlgPrimitives.cpp.

Executed Evidence

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

All 15 scenario groups completed in 37.505 seconds. The helper deliberately returned not_implemented, so the runner correctly reported 0 passed and retained the requirement as incomplete.

Formal incomplete evidence

Detailed results

Verified scope includes native creation/editing of all six types, analytic prism volume and topology, polygon perimeter, circle arc length, line length, exact vertex coordinates, integer parameter round-tripping, invalid-input preservation through facade and native calls, repeated unique creation, document isolation, undo/redo, native FCStd restoration and continued edits. Browser cases operate actual controls for all six types and restore editable native objects from real OPFS FCStd bytes after page reload.

The earlier seven-type suite remains as runLegacyPrimitiveTaskCases for history. The selected entrypoint now exercises the new six-type increment through runAdditionalPrimitiveCases; it does not repeat the seven previously exercised types. Existing source/proof records are retained. One kernel serves the whole new native batch, followed by one browser workflow. Only DocumentProbe was incrementally built; no OCCT rebuild was required.

TypeScript checking, production Vite build and changed native source whitespace checking passed. An earlier attempt completed native assertions but timed out on a mismatched test button label; the test now targets the existing New Document button. Native behavior was not weakened to make it pass.

Visual Inspection

Each additional type was rendered in isolation and checked for nonbackground pixels. Desktop/mobile layout, orbit interaction and mixed geometry were exercised at 1440x900 and 390x844. Prism, ellipse, vertex and mobile screenshots were visually inspected.

Remaining Work

At the time of this increment the panel exposed 13 native primitive types. Subsequent Wedge and Helix/Spiral work brings the panel to all 16 types. Complete placement/orientation, active-container controls, Cylinder skew and circle-from-three-points interaction still remain. No full-command pass or increase in accepted requirement count is claimed.

Continue from these concrete gaps rather than repeating the six new types or the earlier seven-type batch without relevant changes. Preserve all 1508 requirements, existing evidence and historical-validation deferral. Shared writes and formal evidence were serialized with the existing scheduler; no second scheduler was started.

Handoff: the service was thawed and verified active/unfrozen. Cycle 9334 started with a live child process (687979) and new command activity on Primitives/Projection. The earlier primitive checkpoints now point to this increment's remaining-work list.