fix: make shape selection mode depend on current editing mode#121
Merged
Conversation
added 3 commits
June 7, 2026 16:20
…ations - New RemotePythonServer with PythonExecutionQueue for thread-safe execution on main thread (OCCT/GUI safety). - TCP listener (port configurable via --listen [host:]port), accepts Python code snippets, executes in embedded interpreter with existing ezy/view/Shp bindings. - CLI support in main: --listen, --headless (parsed). - Early Python init when server enabled for remote use. - Extended Python bindings (fit_all, screenshot, get_shape, get_camera, set_camera, etc.) and help text. - Added fit_all() to Occt_view. - Reference client script. - Updated agents/dev.md with usage and testing instructions. - Debug prints and error handling for socket issues. - Fixes for build (socket types, const error, etc.). This allows external Python scripts to control the running EzyCad instance (GUI or headless) for automation, remote control, etc. Refs: conversation on dual app+server mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses inconsistent shape selection mode behavior across different editing modes in EzyCad.
Problem
The global
m_shp_selection_modedidn't adapt when switching modes (e.g., Move/Rotate/Scale should prefer whole-shape/compound selection; returning to a previous mode should restore its last-used filter).Sketch-related modes had ad-hoc handling but no per-mode memory.
Changes
occt_view.h/cpp:std::map<Mode, TopAbs_ShapeEnum> m_modes_selection_mode_mapto persist selection mode per editing mode.set_shp_selection_modeto update the map for the current mode.on_mode()to restore mode-specific selection (with explicit cases for Move/Rotate/Scale -> TopAbs_COMPOUND and sketch modes).gui_mode.cpp: Added assertions and parent-mode mappings for Normal mode consistency.gui.cpp: Minor addition in sketch properties dialog.Testing
Closes #120
This improves usability for precise modeling workflows.