Repository navigation
feat: push the model to GeoViewer (optional button) - #146
Open
lachlangrose wants to merge 1 commit into
Open
lachlangrose wants to merge 1 commit into
lachlangrose wants to merge 1 commit into
Conversation
Add an optional "Push model to GeoViewer" button in a new GeoViewer tab of the export panel. It sends the stratigraphic and fault surfaces to a running GeoViewer over its local link (protocol 1.8): a small stdlib WebSocket client, the frame codec, and a short session that says hello, sends the objects, and removes the objects of the last push that are not sent again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
lachlangrose
added this pull request to stack #139
October 23, 2026 00:16
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.
What
An optional Push model to GeoViewer button, in a new GeoViewer tab of the export panel (step 5). It sends the stratigraphic and fault surfaces of the solved model to a running GeoViewer, the advanced 3D viewer. The model and the plugin's own 3D view do not change.
Stacked PR. The base is
feat/viewer-object-registry(#145), the top of the usability stack. Merge the stack first.How it works
main/geoviewer/protocol.py: the frame codec of protocol 1.8 (hello,scene.upsertfor Group and Surface,scene.remove). Standard library and numpy only. Coordinates are written relative to the origin of the scene (f32, or f64 when a model is more than 4 km from the origin).main/geoviewer/websocket_client.py: a small stdlib WebSocket client with theAuthorization: Bearer <token>header. It needs no new dependency.main/geoviewer/link.py: a short session. It connects, sayshello, takes the origin that the viewer uses, sends the objects, removes old objects, collects errors, and closes. Nothing stays open, so there is no state to repair when the viewer stops.main/geoviewer/scene.py: turns the model surfaces into objects. Ids start withloopstructural/, so a new push replaces the objects of the last push (objects that are not sent again are removed). Other objects of the scene stay. Faults get a red colour.No change in GeoViewer was necessary: protocol 1.8 already has everything this needs.
Tests
pytest tests/unit: 333 passed.geoviewer --port,GEOVIEWER_TOKEN): two pushes in a row gave 6 objects each time, no errors, and the inventory showed no duplicates.ruffpasses). Please click through it once.Notes
127.0.0.1only.🤖 Generated with Claude Code