Skip to content

feat: Apply server-side part picking in client mode - #210

Open
LKasianAnsys wants to merge 2 commits into
feat/geometry-picker-for-client-modefrom
feat/use-server-side-picking-in-client-mode
Open

LKasianAnsys wants to merge 2 commits into
feat/geometry-picker-for-client-modefrom
feat/use-server-side-picking-in-client-mode

Conversation

@LKasianAnsys

@LKasianAnsys LKasianAnsys commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

Resolves #192

Summary

Client (WASM) mode now picks parts on the server instead of in the browser. This matches how geometry picking already works in client mode.

Backend
Added a pick_part_in_view trigger on LocalApp. It takes a pixel, the window size and the client's camera, and returns the node id under that pixel, or None. It doesn't change the selection.

  • Added pick_part_in_view to VtkPipelineRenderer, which builds the pick view from the client's camera. VisorLocalScene calls it under the scene lock, and VisorVTKLocal wires it into LocalApp.
  • Added a PickInViewPayload base class. PickPartInViewPayload and PickGeometryInViewPayload now extend it.

Frontend

  • IRenderer has a new pickPartAsync(normX, normY). It replaces addViewerClickedListener with addCanvasClickListener, which reports a click's position and modifier keys but picks nothing.
  • WasmRenderer sends pick_part_in_view to the server and parses the reply with a new PartPickReader. It no longer keeps its own actor-id to node-id map. The code that builds the pick view is now shared with pickGeometryAsync.
  • VisorFrontend, VtkScene.js, ServerRenderer and NullRenderer are updated to the new click and pick flow.

Tests

  • Python and Jest tests cover the new trigger, renderer, scene and click handling. Existing tests are adjusted to the new interfaces.

@github-actions github-actions Bot added test Work associated with testing added enhancement New feature or request labels Nov 5, 2026
@LKasianAnsys
LKasianAnsys added this pull request to stack #197 November 5, 2026 14:59
@LKasianAnsys LKasianAnsys self-assigned this Nov 5, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/use-server-side-picking-in-client-mode branch from 75e3d34 to 911c746 Compare November 5, 2026 15:33
@LKasianAnsys
LKasianAnsys marked this pull request as ready for review November 5, 2026 17:43
@LKasianAnsys
LKasianAnsys force-pushed the feat/use-server-side-picking-in-client-mode branch from 911c746 to d15a61b Compare November 5, 2026 18:14
@LKasianAnsys
LKasianAnsys force-pushed the feat/use-server-side-picking-in-client-mode branch from d15a61b to 4515cc7 Compare November 5, 2026 18:22
@LKasianAnsys LKasianAnsys mentioned this pull request Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added enhancement New feature or request test Work associated with testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Geometry picking

2 participants