Skip to content

Add permanent sketch origin node per sketch#176

Merged
trailcode merged 2 commits into
mainfrom
sketch-origin
Jul 7, 2026
Merged

Add permanent sketch origin node per sketch#176
trailcode merged 2 commits into
mainfrom
sketch-origin

Conversation

@trailcode

@trailcode trailcode commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Closes #175

Summary

  • Adds a built-in Origin node to every sketch, shown as a permanent red + marker.
  • Reference-plane sketches: origin at (0, 0) on the sketch plane.
  • Face-derived sketches: origin at the bounding-box center of the outer face wire.
  • Origin is permanent, snap-enabled, non-deletable, and persisted in JSON (origin on the node).
  • Fixes origin being removed on mode change by calling m_nodes.finalize() after committing the origin.
  • Syncs permanent node marks when a sketch becomes current.

Documentation

  • Developer: src/doc/sketch.md
  • User guide: new Sketch origin section, cross-links from usage.md, usage-settings.md
  • Settings ? help for permanent node marker scale links to sketch origin
  • CHANGELOG.md [Unreleased] entry

Test plan

  • SketchOriginNodePlane — origin at plane (0, 0)

  • SketchOriginNodeFromFaceBBoxCenter — origin at face wire bbox center

  • SketchOriginNodeSurvivesOnMode — origin not wiped by on_mode() / cancel_elm()

  • Full Sketch_test suite passes

  • Manual: create sketch from planar face; confirm red + at face center

  • Manual: create sketch on XY plane; confirm + at plane origin

  • Manual: try deleting Origin via selection (should not remove)

@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@trailcode trailcode merged commit 1ab04cf into main Jul 7, 2026
3 checks passed
@trailcode trailcode deleted the sketch-origin branch July 7, 2026 00:33
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.

Add permanent sketch origin node per sketch

1 participant