feat: [Remote rendering 3.3c] server-authoritative cross-section plane - #139
Open
LKasianAnsys wants to merge 8 commits into
Conversation
LKasianAnsys
force-pushed
the
feat/3.3c-server-authoritative-cross-section-plane
branch
from
September 23, 2026 23:55
43ac721 to
f3eeaf9
Compare
LKasianAnsys
changed the base branch from
main
to
feat/3.3b-fold-edge-visibility-into-global-toggle
September 24, 2026 00:01
LKasianAnsys
marked this pull request as ready for review
September 24, 2026 03:52
LKasianAnsys
force-pushed
the
feat/3.3b-fold-edge-visibility-into-global-toggle
branch
from
September 24, 2026 18:05
b10db12 to
da48fb9
Compare
LKasianAnsys
force-pushed
the
feat/3.3c-server-authoritative-cross-section-plane
branch
from
September 24, 2026 18:05
bba6e39 to
1b79275
Compare
LKasianAnsys
force-pushed
the
feat/3.3b-fold-edge-visibility-into-global-toggle
branch
from
September 24, 2026 18:12
da48fb9 to
93267a1
Compare
# Conflicts: # src/ansys/visor/viewer/models/runtime/requests/widget_state_payloads.py # src/ansys/visor/viewer/vtk/scene/base.py
# Conflicts: # src/ansys/visor/visor-client/src/jest-tests/WasmRendererWidgetTriggers.test.tsx
LKasianAnsys
force-pushed
the
feat/3.3c-server-authoritative-cross-section-plane
branch
from
September 24, 2026 18:12
1b79275 to
7ee86d1
Compare
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 #21
Context
This is the third PR of 4 to move ownership of widget state from the client to the server.
In addition to the widget toggles added in #137 , the cross-section widget's plane state is also synced back to the server. the cross section plane's origin and normal are added to the server. The browser reports the plane it settled on at the end of a drag (
EndInteractionEvent), and the plane is saved and restored with the rest of the scene.Also included: the
finalize_scenecall on the server moved fromVisorVtkLocal.load_stateto intoVisorSceneBase.apply_state, after the restores and before the state push, so the graph and client rebuilds from a scene up to date with what was just restored. Note thatapply_stateonly has one caller,load_state, so this affects only the load path.Known Issue
There is a known issue when loading a saved scene with the cross-section visibility set to true. When the saved scene is loaded into a viewer with no dataset, this leaves the cross-section plane hidden in the browser until the cross-section widget button is toggled twice (on to start with (though the plane doesn't render) -> off -> on), after which is is correct and in the right position. The plane and its values restore fine; this appears to be an issue with the client-side display, not one with the state itself. This is deferred to user story 3.6, which is dedicated to addressing the save/load state workflow end to end, after ownership of all parts of the viewer state have been moved to the server.
[edit] After testing a minor version bump of VTK 9.7.0 (Python), it appears this issue goes away.
Manual testing
Copilot summary
This pull request implements a server-authoritative, scene-wide cross-section plane that is synchronized from the frontend to the backend, mirroring the camera’s existing contract. It introduces new payloads, record-keeping, and serialization methods, and updates the renderer and scene logic to ensure the cross-section state is consistently tracked, persisted, and restored. This enables reliable round-tripping of the cross-section plane, including after reloads or state restores.
Cross-section plane synchronization and state management:
SyncCrossSectionPlanePayloadto carry the cross-section plane’s origin and normal from the frontend, and registered its handling in the local app (widget_state_payloads.py,local_app.py). [1] [2] [3] [4] [5]VisorLocalRendererandNullRenderer, including new methods for getting, setting, and serializing the plane state. [1] [2] [3] [4] [5]IRenderer) to require cross-section plane state methods, ensuring all renderer implementations comply.Scene persistence and state restoration: