Skip to content

Shape local frame: axes / plane / up and face-based set - #252

Merged
trailcode merged 4 commits into
mainfrom
Trailcode/shp-axis-and-plane
Sep 1, 2026
Merged

Shape local frame: axes / plane / up and face-based set#252
trailcode merged 4 commits into
mainfrom
Trailcode/shp-axis-and-plane

Conversation

@trailcode

@trailcode trailcode commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Per-solid local XYZ frame UI: Shape List Show axes / Show plane / Show up, Reset frame to bbox, Set from planar/cylindrical face..., Flip up / Flip axis (Z).
  • AIS triad (X red, Y green, Z blue), plane, and up annotations; suppressed in sketch modes; frameDisplay persisted in .ezy.
  • Mode::Shape_set_frame (Shape List only, no toolbar/hotkey); planar origin = face area centroid; cylindrical origin = solid center projected onto the axis; undo via frame-only Shape_geom_delta.

Test plan

  • Build Release EzyCad
  • Shape List solid: toggle Show axes / Show plane / Show up; annotations appear and hide in a sketch mode
  • Reset frame to bbox recenters world-aligned frame and turns axes on
  • Set from planar face... on a circular end face puts origin at the circle center; Z along normal
  • Set from cylindrical face... aligns Z to the cylinder axis
  • Flip up / Flip axis (Z) and undo restore prior frame
  • Save/reload .ezy keeps frameDisplay flags
  • Spot-check docs/usage.md, src/doc/shape.md / gui.md, CHANGELOG

Closes #251


Note

Medium Risk
New interactive mode, OCCT AIS lifecycle, and project JSON fields affect viewer stability and undo; scope is modeling UI rather than security-critical paths.

Overview
Adds Shape List workflows to view and edit each solid’s local gp_Ax3 frame: toggle Show axes / Show plane / Show up, Reset frame to bbox, Flip up / Flip axis (Z), and Set from planar/cylindrical face... (new Mode::Shape_set_frame + Shp_set_frame, no toolbar hotkey).

Shp now builds optional AIS overlays (RGB triad, cyan plane, green up arrow), keeps them in sync with transforms and effective visibility (sketch modes, Hide all, hidden groups), and tears them down on remove/load/shutdown. Display toggles persist in .ezy as frameDisplay; frame edits use undoable Occt_view::set_shape_frame (Shape_geom_delta). Undo/redo maps Shape_set_frame back to Normal like other pick/drag tools.

Reviewed by Cursor Bugbot for commit 7c045ac. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 432eae6. Configure here.

Comment thread src/gui_occt_view.cpp
Comment thread src/shp.cpp Outdated
Comment thread src/shp_set_frame.cpp
@trailcode
trailcode merged commit 86fa954 into main Sep 1, 2026
4 checks passed
@trailcode
trailcode deleted the Trailcode/shp-axis-and-plane branch September 1, 2026 23:14
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.

Shape local frame: axes / plane / up display and face-based set

1 participant