Skip to content

Workbench task with geometry links - #269

Merged
trailcode merged 12 commits into
mainfrom
Trailcode/workbench
Sep 23, 2026
Merged

trailcode merged 12 commits into
mainfrom
Trailcode/workbench

Conversation

@trailcode

@trailcode trailcode commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Sketch / Design / Workbench task toolbar. Workbench List stores geometry links (source_id) with their own placement, separate from Design bodies.
  • Design cut, fuse, and common reuse the first operand's Shape_id, and cross-section clip keeps each survivor's id, so Workbench instances update instead of disappearing. Consumed operands still drop their links. Those booleans reject Workbench instances.
  • Deleting a Design source still removes its Workbench links. Shape_remove_delta records the cascaded links, so undo restores them.
  • .ezy mode slots 1, 3, and 24 stay Design Move / Rotate / Align shafts. Workbench Move / Rotate / Align shafts use new slots, so a file saved in the old Design tools does not open in Workbench.
  • Align shafts axial sense, Workbench face pick / set frame, Extrude sketch face on the Sketch task, and the Workbench task icon.

Closes #268

Test plan

  • EzyCad_tests --gtest_filter=Shp_test.Cut*:Shp_test.Fuse*:Shp_test.Common*:Shp_test.Undo_delete_design_restores_workbench_links:Shp_test.Design_geom_change_syncs_workbench_link:Shp_test.Workbench_json_round_trip_and_source_delete:Mode_helpers*
  • Two Workbench instances of one solid: cut the Design body, both instances show the cut and keep their frames. Undo and redo.
  • Delete the Design solid: its Workbench instances disappear. Undo restores the body and the instances.
  • Cut on a Workbench selection is rejected; Design solids and instances stay.
  • A project saved with mode integer 1, 3, or 24 opens in Design Move, Rotate, or Align shafts.
  • Workbench Move / Rotate / Align shafts change instance pose only. Design Move does not move instances.
  • Extrude sketch face is on the Sketch toolbar. Esc returns to Sketch inspection.

Note

High Risk
Changes core document semantics (dual shape stores, boolean id reuse, mode enum/slots), persistence, and transform behavior across Design vs Workbench—regressions would affect saved projects and assembly-style workflows.

Overview
Introduces a Sketch / Design / Workbench task model: the toolbar has task switchers and only shows tools for the active task. Design still edits bodies in the Shape List (move/rotate/scale/align bake BREP); Workbench arranges linked instances in a new Workbench List pane (m_wbk_shps, persisted as .ezy workbench[] with sourceId + frame, no duplicate BREP).

Add to Workbench (button, context menu, or drag) creates placements that track Design geometry when the same Shape_id survives edits. Cut, fuse, common, and cross-section clip now reuse the first/survivor operand id where appropriate; Shape_replace_delta avoids dropping links when the same id is re-inserted. Workbench Move / Rotate / Align shafts update instance pose only; G/R/J follow the current task; S stays Design Scale. Idle modes rename to Design_inspection / Sketch_inspection (legacy names still parse).

Also ships Workbench toolbar/list polish (face pick, set frame, task sync on list selection), align-shafts default axial sense, extrude on the Sketch task, changelog fixes (transform mid-drag, sketch overlaps, wasm link), docs/agent plans, and the Workbench task icon.

Reviewed by Cursor Bugbot for commit cdcf2d1. 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 97185a4. Configure here.

Comment thread src/gui_occt_view.cpp
Comment thread src/mode.h Outdated
Comment thread src/shp_operation.cpp
@trailcode
trailcode merged commit 1912472 into main Sep 23, 2026
4 checks passed
@trailcode
trailcode deleted the Trailcode/workbench branch September 23, 2026 16:41
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.

Workbench task with geometry links

1 participant