Summary
Tighten reset and helper conventions: extend clear_all for enums/aggregates, convert multi-field reset sites to clear_all, and align anonymous-namespace helpers with trailing _ names (declare near top / define at file bottom). Update the style guide so agents and humans share the same rule.
Problem
- Multi-field reset blocks were hand-rolled and easy to leave incomplete.
clear_all already covered optionals/arithmetic/handles but not enums or plain aggregates.
- File-local helpers were inconsistently named/placed vs private methods (
name_) and the documented reader-first .cpp layout.
Implemented scope
Code:
src/utl.h / src/utl.inl: document and support enum + aggregate reset via T{}.
- Shape/sketch/GUI reset call sites:
shp_cyl_align, shp_move, shp_extrude, shp_cross_section, shp_rotate, skt_*, gui.cpp, hover clear in gui_occt_view.
- File-local helpers: trailing
_, forward decls + bottom defs across GUI (gui_add, gui_settings, gui.cpp, gui_occt_view), shape/sketch (shp_*, skt_*), utilities (utl_*), and main.cpp.
- ImGui add-primitive dialogs: shared
table_row_input_double_.
Documentation:
docs/ezycad_code_style.md — private methods and file-local helpers share trailing _; helper organization wording.
src/doc/utility.md — clear_all coverage.
Out of scope: scr_*.cpp Lua/Python bindings (different style; optional follow-up).
Acceptance criteria
Notes
- AIS erase-then-Nullify sequences left explicit where order matters.
Summary
Tighten reset and helper conventions: extend
clear_allfor enums/aggregates, convert multi-field reset sites toclear_all, and align anonymous-namespace helpers with trailing_names (declare near top / define at file bottom). Update the style guide so agents and humans share the same rule.Problem
clear_allalready covered optionals/arithmetic/handles but not enums or plain aggregates.name_) and the documented reader-first.cpplayout.Implemented scope
Code:
src/utl.h/src/utl.inl: document and support enum + aggregate reset viaT{}.shp_cyl_align,shp_move,shp_extrude,shp_cross_section,shp_rotate,skt_*,gui.cpp, hover clear ingui_occt_view._, forward decls + bottom defs across GUI (gui_add,gui_settings,gui.cpp,gui_occt_view), shape/sketch (shp_*,skt_*), utilities (utl_*), andmain.cpp.table_row_input_double_.Documentation:
docs/ezycad_code_style.md— private methods and file-local helpers share trailing_; helper organization wording.src/doc/utility.md—clear_allcoverage.Out of scope:
scr_*.cppLua/Python bindings (different style; optional follow-up).Acceptance criteria
clear_allresets enums and aggregates safely.clear_allwhere sequencing allows.name_with bottom definitions.EzyCad_tests(127) pass.Notes