Fix WASM Alt+LMB rectangle multi-select (#220) - #250
Merged
Conversation
added 2 commits
August 6, 2026 18:25
4 tasks
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.
Summary
GLFWwindow*(Occt_glfw_winis not created on Emscripten, so live Alt was always missing and OCCT rebound the gesture to orbit).SelectRectangle, also select displayed document solids whose projected AABB intersects the band (complex / STEP parts stock picking often skipped). On WASM, map OCCT window pixels into GLFW cursor space.usage.md,usage-occt-view.md,gui.md, CHANGELOG; planwasm-alt-drag-multiselect.md.Fixes #220
Test plan
EzyCad_tests(includesGrouped_solids_stay_displayed_and_selectable)Related
agents/plans/wasm-alt-drag-multiselect.mdNote
Medium Risk
Touches core 3D input, selection override, and shared modifier polling on desktop and WASM; behavior change is localized to Alt-drag and post-rectangle selection.
Overview
Fixes #220 by making Alt + left-drag rectangle multi-select work on the WASM build and improving rubber-band picking for complex parts.
WASM input:
Occt_viewstores a non-owningGLFWwindow*for live modifier and cursor polling (Emscripten never createsOcct_glfw_win, so Alt was always missing on mouse-move and OCCT treated the gesture as orbit). Zoom and mouse paths use the same GLFW cursor space.Rubber-band picking: After OCCT
SelectRectangle, displayed document solids whose projected AABB overlaps the band are added to the selection—addressing misses on complex / STEP BREPs and grouped shapes. On WASM, projected pixels are scaled from OCCT window size to GLFW/canvas size.Shape List: Row highlight for selection follows the 3D viewer only; the current group gets a lighter tint so it is not confused with multi-select after Alt-drag.
Docs, CHANGELOG, agent plan/drafts, and a grouped-solid selection test are updated.
Reviewed by Cursor Bugbot for commit d7e2561. Bugbot is set up for automated code reviews on this repo. Configure here.