Repository navigation
feat: Pick and highlight geometry through the server in client mode - #204
Open
LKasianAnsys wants to merge 10 commits into
Open
LKasianAnsys wants to merge 10 commits into
LKasianAnsys wants to merge 10 commits into
Conversation
LKasianAnsys
force-pushed
the
feat/geometry-picker-for-client-mode
branch
3 times, most recently
from
November 4, 2026 16:56
d97531c to
fbff12e
Compare
LKasianAnsys
force-pushed
the
feat/geometry-picker-for-client-mode
branch
2 times, most recently
from
November 4, 2026 21:16
942f749 to
3a5657a
Compare
LKasianAnsys
force-pushed
the
feat/geometry-picker-for-client-mode
branch
from
November 5, 2026 14:46
d7ea751 to
272b7b8
Compare
LKasianAnsys
force-pushed
the
feat/geometry-picker-for-client-mode
branch
from
November 5, 2026 15:33
272b7b8 to
affc2d1
Compare
LKasianAnsys
marked this pull request as ready for review
November 5, 2026 17:03
This branch has not been deployed
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.
Issue
Addresses #192
Summary
Until now, geometry picking has had two separate implementations: client mode picked in WASM and drew the highlight on a narrow canvas overlay, and server mode picked and highlighted on the server. This PR moves client mode onto the server-mode implementation. It also fixes a VTK object id clash between the browser and the server in client mode.
Changes
pixel_scalepayload). The highlight then matches server mode in size.VtkScene.js, LocalRendererandLocalScene.GetActor) instead of a property read.RemoteVtkScenenow registers onevtkPointsat id2 ** 30(then unregisters its state). Registering at an explicit id raises the counter, and it never falls, so every id the browser allocates afterwards lands above the server's range.Tests Unit and Jest tests are updated or added for the new flow. Tests for the removed WASM picking code are deleted. A new Jest test (
RemoteVtkSceneIdFloor) pins that the id registration at1073741824is the first wasm call after load.Manual testing
The client and server rendering modes now share a geometry picking and highlight mechanism. Test in both modes and they should look and behave the same way.
Id clash check (client mode): Load the viewer with the browser console open at the default level. Pick geometry repeatedly, and call scene-modifying APIs such as
add_datasetbetween picks. Expect no crash and no wrong-object updates, and no console warning starting withError in WebAssembly moduleorCould not reserve the browser id range.