Skip to content

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

Merged
LKasianAnsys merged 2 commits into
mainfrom
feat/use-server-side-picking-in-client-mode
Nov 16, 2026
Merged

LKasianAnsys merged 2 commits into
mainfrom
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 2 times, most recently from d15a61b to 4515cc7 Compare November 5, 2026 18:22
@LKasianAnsys LKasianAnsys mentioned this pull request Nov 5, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/use-server-side-picking-in-client-mode branch 4 times, most recently from 92d5886 to f808d55 Compare November 10, 2026 14:18
Base automatically changed from feat/geometry-picker-for-client-mode to main November 13, 2026 14:28
@LKasianAnsys
LKasianAnsys force-pushed the feat/use-server-side-picking-in-client-mode branch from f808d55 to 2c8ed45 Compare November 13, 2026 14:28

@ansBAkula ansBAkula left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works

@LKasianAnsys
LKasianAnsys merged commit cd7dfbc into main Nov 16, 2026
17 of 18 checks passed
@LKasianAnsys
LKasianAnsys deleted the feat/use-server-side-picking-in-client-mode branch November 16, 2026 13:57
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

3 participants