Skip to content

feat: add geometry picker for server mode - #199

Merged
LKasianAnsys merged 10 commits into
mainfrom
feat/geometry-picker-for-server-mode
Nov 9, 2026
Merged

LKasianAnsys merged 10 commits into
mainfrom
feat/geometry-picker-for-server-mode

Conversation

@LKasianAnsys

@LKasianAnsys LKasianAnsys commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

Addresses #192

Summary

Adds geometry picking and highlighting to server mode, so clicking in the client viewport selects and highlights geometry rendered on the server, matching client-mode behavior.

Server side (Python)

  • Extracted CellFeatureFinder and pick models (GeometryPick, PartCellHit) into shared vtk/picking modules so local and server renderers use the same pick logic.
  • Added a screen-position pick on the server scene/renderer, exposed through the trame server app and scene trigger app with new request payloads.
  • Added a server-side GeometryHighlight widget that mirrors the client highlight style (including edge picking, edge dots, and line width fixes).
  • Refactored LocalRenderer/PipelineRenderer to share the pick/highlight code, and made highlight updates data-only (no extra render calls).

Client side (TypeScript)

  • ServerRenderer now sends pick requests using viewport pixel coordinates (ViewportPixel) and reads results via the new GeometryPickReader.
  • Updated IRenderer, SceneTriggerSends, and frontend wiring accordingly.

Tests

  • Added/updated unit tests (Python and Jest) covering the new picking and highlight paths

Notes

This adds geometry picking to server mode, but it leaves client mode unchanged: client mode still picks geometry in the browser with the wasm picker and draws the highlight on a canvas overlaid on the view. The follow-up PRs (#202, #203, #204, #210) move the client mode onto this server-side picker and highlight, so they will share an implementation.

@LKasianAnsys
LKasianAnsys added this pull request to stack #197 November 2, 2026 15:39
@github-actions github-actions Bot added test Work associated with testing added enhancement New feature or request labels Nov 2, 2026
@LKasianAnsys LKasianAnsys changed the title Feat/geometry picker for server mode feat: geometry picker for server mode Nov 2, 2026
@LKasianAnsys LKasianAnsys changed the title feat: geometry picker for server mode feat: add geometry picker for server mode Nov 2, 2026
@LKasianAnsys
LKasianAnsys force-pushed the feat/geometry-picker-for-server-mode branch 6 times, most recently from 186dd1c to 1f417e1 Compare November 4, 2026 21:16
@LKasianAnsys LKasianAnsys self-assigned this Nov 5, 2026
@LKasianAnsys
LKasianAnsys marked this pull request as ready for review November 5, 2026 15:32
@LKasianAnsys
LKasianAnsys force-pushed the feat/geometry-picker-for-server-mode branch from 3e91fa9 to e4c32db Compare November 5, 2026 15:33
@LKasianAnsys LKasianAnsys mentioned this pull request Nov 5, 2026

@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 well. Since we have now refactored the picking logic into shared functionality, we could consider changing the mouse cursor when it hovers over a pickable model while in selection mode. This would help distinguish between areas where selection is possible and other parts of the viewport where picking is not available. It also provides a clear visual cue that the user is in selection mode and currently over a valid pick target. Just a suggestion, as this is purely a usability enhancement and not a functional requirement.

Base automatically changed from feat/4.5b-publish-cross-section-plane-to-client to main November 9, 2026 14:22
@LKasianAnsys
LKasianAnsys force-pushed the feat/geometry-picker-for-server-mode branch from e4c32db to 93a693e Compare November 9, 2026 14:58

@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.

Re-approve

@LKasianAnsys
LKasianAnsys merged commit 60111e4 into main Nov 9, 2026
17 checks passed
@LKasianAnsys
LKasianAnsys deleted the feat/geometry-picker-for-server-mode branch November 9, 2026 15:35
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.

3 participants