Skip to content

Add Project and Sweep sketch tools - #75

Open
WC3D wants to merge 5 commits into
Formsmith746:mainfrom
WC3D:feat/sketch-project-sweep
Open

Add Project and Sweep sketch tools#75
WC3D wants to merge 5 commits into
Formsmith746:mainfrom
WC3D:feat/sketch-project-sweep

Conversation

@WC3D

@WC3D WC3D commented Aug 25, 2026

Copy link
Copy Markdown

Note: stacked on #74#76 (extrude fix) — merge those first; this will be retargeted to main after. Reviewing only e1bef3b is sufficient.

Completes the sketch toolbar with the two remaining Create / Transform commands:

  • Project: project a mesh or another sketch onto the active sketch plane, either as a linked reference (automatically refreshed from its source whenever the sketch is opened or rebuilt) or as an editable copy
  • Sweep: create a 3D body from one selected closed profile swept along one selected open path; sweep shapes remember their section/path segments and rebuild when the sketch is re-edited

Supporting changes:

  • constructionPlanes.ts math helpers for workplane pose conversion (pure quaternion/pose math only — no construction-plane shapes or UI in this change)
  • Projection/sweep persistence and validation in .skf projects
  • Guards so projected geometry cannot be dragged or marquee-selected
  • Unit tests for projection, sweep, and plane math (283 unit + 14 e2e passing)

Expand the sketch toolbar with new geometry and editing commands:

Draw tools: center-point circle, two-point circle, corner/center
rectangle, inscribed/circumscribed/edge polygon with a side-count
stepper, and placed sketch text.

Create / Transform: offset paths, mirror across an axis or selected
segment, and rectangular/circular patterns driven by a small options
panel.

Inspect: dimension tool with driving length dimensions, reference
distance dimensions between point/midpoint/intersection anchors,
and horizontal/vertical/fixed constraints with a lightweight solver.

Supporting changes: planar region detection so extrudes can target
overlapping profiles (with region-aware OCCT extrude + healing),
geometry libs for the new tools, .skf persistence for constraints/
dimensions/texts, and unit plus real-kernel e2e tests.
A CSS extraction pass dropped 33 rules for classes that existed
upstream but were restyled by the sketch menu work: selectable
extrusion regions, sketch points (incl. fixed state), constrained
segments, segment dimension labels, drag/curve handles, measurement
points, polygon side stepper, constraint inspector, image resize
handle, grid settings, and toolbar disabled states. Without them,
selected extrusion profiles gave no visual feedback.
@WC3D
WC3D force-pushed the feat/sketch-project-sweep branch from e1bef3b to 320ed1b Compare August 25, 2026 07:51
WC3D added 3 commits August 25, 2026 04:02
The closed-profile hit-target overlay sat above the region fill
layer in the sketch SVG, so with Select active every click inside a
profile started a whole-shape drag instead of toggling that
region's extrusion selection. Region fills now receive clicks as
intended; whole-shape dragging still works via marquee selection
and selected-shape handles.
Assign holes to outlines per selected region instead of inferring
nesting from outline areas. The area heuristic mis-grouped profiles
inside a sketch (for example an overlapping or unselected inner
profile), so editing a sketch and toggling region selection could
produce wrong geometry. Regions now carry their own outer/hole
paths, and each selected region extrudes exactly as shown.
Project meshes or other sketches onto the active sketch plane as
linked references (refreshed from their source whenever the sketch
opens or rebuilds) or as editable copies, using the new planar
projection lib. Sweep extrudes a selected closed profile along a
selected open path and rebuilds when the sketch is re-edited.

Includes constructionPlanes math helpers for workplane pose
conversion (no construction-plane shapes or UI in this change),
sweep/projection persistence and validation in .skf projects,
guards so projected geometry cannot be dragged or marquee-selected,
and unit tests for projection, sweep, and plane math.
@WC3D
WC3D force-pushed the feat/sketch-project-sweep branch from 320ed1b to ae30ed3 Compare August 25, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant