From 8b07d5c1e2bf097d6c751253ae523b594b0a9711 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Mon, 30 Nov 2026 11:37:55 +0100 Subject: [PATCH 01/22] feat: add Scene and SceneObject Split VtkPipeline into the shared data side and a per-scene SceneObject render side; one render window per Scene, registered in the vtkWeb ObjectIdMap. Replace the global renderer shared object with scenes. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/app.py | 10 +- src/opengeodeweb_viewer/scene/__init__.py | 4 + src/opengeodeweb_viewer/scene/scene.py | 119 +++++++ src/opengeodeweb_viewer/scene/scene_object.py | 310 ++++++++++++++++++ src/opengeodeweb_viewer/vtk_pipeline.py | 259 +-------------- src/opengeodeweb_viewer/vtk_protocol.py | 74 ++--- tests/test_scene.py | 27 ++ tests/test_vtk_pipeline.py | 11 +- 8 files changed, 497 insertions(+), 317 deletions(-) create mode 100644 src/opengeodeweb_viewer/scene/__init__.py create mode 100644 src/opengeodeweb_viewer/scene/scene.py create mode 100644 src/opengeodeweb_viewer/scene/scene_object.py create mode 100644 tests/test_scene.py diff --git a/src/opengeodeweb_viewer/app.py b/src/opengeodeweb_viewer/app.py index fcc284dd..c895fee6 100644 --- a/src/opengeodeweb_viewer/app.py +++ b/src/opengeodeweb_viewer/app.py @@ -8,7 +8,6 @@ from opengeodeweb_microservice.database import connection from vtkmodules.vtkCommonCore import vtkFileOutputWindow, vtkOutputWindow -from vtkmodules.vtkRenderingCore import vtkRenderer, vtkRenderWindow from vtkmodules.web import protocols as vtk_protocols # Third party imports @@ -96,14 +95,7 @@ def initialize(self) -> None: vtk_std_err_out = vtkOutputWindow() vtk_std_err_out.SetInstance(err_out) - if not _Server.view: - renderer = vtkRenderer() - render_window = vtkRenderWindow() - render_window.AddRenderer(renderer) - self.setSharedObject("renderer", renderer) - self.getApplication().GetObjectIdMap().SetActiveObject("VIEW", render_window) - - render_window.SetOffScreenRendering(not _Server.debug) + self.setSharedObject("scenes", {}) # ============================================================================= diff --git a/src/opengeodeweb_viewer/scene/__init__.py b/src/opengeodeweb_viewer/scene/__init__.py new file mode 100644 index 00000000..3421cf20 --- /dev/null +++ b/src/opengeodeweb_viewer/scene/__init__.py @@ -0,0 +1,4 @@ +from opengeodeweb_viewer.scene.scene import Scene +from opengeodeweb_viewer.scene.scene_object import SceneObject, sync_composite_pipeline + +__all__ = ["Scene", "SceneObject", "sync_composite_pipeline"] diff --git a/src/opengeodeweb_viewer/scene/scene.py b/src/opengeodeweb_viewer/scene/scene.py new file mode 100644 index 00000000..2fffe4d4 --- /dev/null +++ b/src/opengeodeweb_viewer/scene/scene.py @@ -0,0 +1,119 @@ +# Standard library imports +from __future__ import annotations + +from dataclasses import dataclass, field +from typing import TYPE_CHECKING + +import vtkmodules.vtkRenderingOpenGL2 # noqa: F401 registers the OpenGL render window backend + +# Third party imports +from vtkmodules.vtkInteractionStyle import vtkInteractorStyleTrackball +from vtkmodules.vtkInteractionWidgets import vtkOrientationMarkerWidget +from vtkmodules.vtkRenderingAnnotation import vtkAxesActor, vtkCubeAxesActor +from vtkmodules.vtkRenderingCore import vtkActor, vtkRenderer, vtkRenderWindow +from vtkmodules.vtkRenderingUI import vtkGenericRenderWindowInteractor + +# Local application imports +from opengeodeweb_viewer.orientation_marker import style_marker +from opengeodeweb_viewer.text_style import TextStyle, style_grid_scale +from opengeodeweb_viewer.vtk_pipeline import ClippingPlanePreview, RulerPipeline + +if TYPE_CHECKING: + from vtkmodules.vtkWebCore import vtkObjectIdMap + + from opengeodeweb_viewer.scene.scene_object import SceneObject + +DEFAULT_BACKGROUND = (180 / 255, 180 / 255, 180 / 255) + + +@dataclass +class Scene: + """Everything one view shows: its own render window, scene widgets and data render side.""" + + scene_id: str + view_id: str + renderer: vtkRenderer + render_window: vtkRenderWindow + # The vtkWeb map the render window is registered in, under view_id + object_id_map: vtkObjectIdMap + grid_scale: vtkCubeAxesActor = field(init=False) + axes: vtkAxesActor = field(init=False) + widget: vtkOrientationMarkerWidget = field(init=False) + ruler: RulerPipeline = field(init=False) + text_style: TextStyle = field(init=False) + basemaps_dirty: bool = False + preview_actor: vtkActor | None = None + clipping_plane_previews: list[ClippingPlanePreview] = field(default_factory=list) + objects: dict[str, SceneObject] = field(default_factory=dict) + + def __post_init__(self) -> None: + self.reset() + + @classmethod + def create(cls, scene_id: str, object_id_map: vtkObjectIdMap) -> Scene: + renderer = vtkRenderer() + render_window = vtkRenderWindow() + render_window.AddRenderer(renderer) + render_window.SetOffScreenRendering(True) # noqa: FBT003 VTK API + view_id = str(object_id_map.GetGlobalId(render_window)) + return cls(scene_id, view_id, renderer, render_window, object_id_map) + + def dispose(self) -> None: + self.widget.EnabledOff() + self.renderer.RemoveAllViewProps() + self.objects.clear() + self.clipping_plane_previews = [] + self.preview_actor = None + self.render_window.Finalize() + self.object_id_map.FreeObject(self.render_window) + + def reset(self) -> None: + renderer = self.renderer + renderer.RemoveAllViewProps() + self.clipping_plane_previews = [] + + grid_scale = vtkCubeAxesActor() + grid_scale.SetCamera(renderer.GetActiveCamera()) + grid_scale.DrawXGridlinesOn() + grid_scale.DrawYGridlinesOn() + grid_scale.DrawZGridlinesOn() + grid_scale.SetGridLineLocation(grid_scale.VTK_GRID_LINES_FURTHEST) + grid_scale.SetFlyModeToOuterEdges() + grid_scale.SetXTitle("X") + grid_scale.SetYTitle("Y") + grid_scale.SetZTitle("Z") + grid_scale.VisibilityOff() + self.grid_scale = grid_scale + renderer.AddActor(grid_scale) + + render_window_interactor = vtkGenericRenderWindowInteractor() + render_window_interactor.SetRenderWindow(self.render_window) + style = vtkInteractorStyleTrackball() + render_window_interactor.SetInteractorStyle(style) + render_window_interactor.EnableRenderOff() + widget = vtkOrientationMarkerWidget() + widget.SetInteractor(render_window_interactor) + widget.SetViewport(0.8, 0.0, 1, 0.2) + axes = vtkAxesActor() + widget.SetOrientationMarker(axes) + widget.EnabledOn() + widget.InteractiveOff() + self.axes = axes + self.widget = widget + + ruler = RulerPipeline() + ruler.add_to_renderer(renderer) + self.ruler = ruler + + self.text_style = TextStyle() + self.apply_text_style() + + renderer.SetBackground(DEFAULT_BACKGROUND) + renderer.ResetCamera() + + def apply_text_style(self) -> None: + """Style the scene widgets: the scalar bars layout is the caller's, it needs the data.""" + style = self.text_style + style_grid_scale(self.grid_scale, style) + style_marker(self.widget.GetOrientationMarker(), style) + self.ruler.set_text_color(None if style.is_default else style.rgb, style.opacity) diff --git a/src/opengeodeweb_viewer/scene/scene_object.py b/src/opengeodeweb_viewer/scene/scene_object.py new file mode 100644 index 00000000..c1ae55c5 --- /dev/null +++ b/src/opengeodeweb_viewer/scene/scene_object.py @@ -0,0 +1,310 @@ +# Standard library imports +from dataclasses import dataclass, field +from typing import TYPE_CHECKING, cast + +# Third party imports +from vtkmodules.vtkCommonDataModel import ( + vtkDataObject, + vtkDataSet, + vtkMultiBlockDataSet, + vtkVector2d, +) +from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor +from vtkmodules.vtkRenderingCore import ( + VTK_GET_ARRAY_BY_NAME, + VTK_SCALAR_MODE_USE_CELL_DATA, + VTK_SCALAR_MODE_USE_POINT_DATA, + VTK_SCALAR_MODE_USE_POINT_FIELD_DATA, + vtkActor, + vtkColorTransferFunction, + vtkCompositeDataDisplayAttributes, + vtkCompositePolyDataMapper, + vtkDataSetMapper, + vtkMapper, +) + +# Local application imports +from opengeodeweb_viewer.utils_functions import create_color_transfer_function +from opengeodeweb_viewer.vtk_pipeline import ( + BlockStyle, + ColorMapKey, + EdgesWidthActor, + HighlightPipeline, + ModelEdgesStyle, + ModelPointsStyle, + ModelScalarBar, + PointsSizeActor, + VtkPipeline, + style_actor_key, +) + +if TYPE_CHECKING: + from collections.abc import Mapping + + +@dataclass +class SceneObject: + """The render side of a data in one scene: its data side is the shared VtkPipeline.""" + + mapper: vtkMapper + actor: vtkActor = field(default_factory=vtkActor) + # Set by set_visibility: the basemap actors also hide on their own, without forgetting it + visibility: bool = True + highlight: HighlightPipeline = field(default_factory=HighlightPipeline) + scalar_bar: vtkScalarBarActor = field(default_factory=vtkScalarBarActor) + scalar_bars: dict[str, ModelScalarBar] = field(default_factory=dict) + block_styles: dict[int, BlockStyle] = field(default_factory=dict) + # One lookup table per block, refilled in place: the composite mapper keys its + # per-block state on the table address, which a freed table could hand to a new one + block_lookup_tables: dict[int, vtkColorTransferFunction] = field(default_factory=dict) + pick_mapper: vtkMapper | None = None + points_mapper: vtkDataSetMapper | None = None + points_actor: vtkActor | None = None + points_scalar_bar: vtkScalarBarActor | None = None + points_visibility: bool = False + color_map_points: list[float] = field(default_factory=list) + # One points actor per distinct size, since point size is an actor property + points_size_actors: dict[float, PointsSizeActor] = field(default_factory=dict) + points_block_styles: dict[int, ModelPointsStyle] = field(default_factory=dict) + edges_mapper: vtkDataSetMapper | None = None + edges_actor: vtkActor | None = None + edges_scalar_bar: vtkScalarBarActor | None = None + edges_visibility: bool = False + # Attribute shown by the points and edges dedicated scalar bars, None when they have none + points_color_map_key: ColorMapKey | None = None + edges_color_map_key: ColorMapKey | None = None + # One edges actor per distinct width, since line width is an actor property + edges_width_actors: dict[float, EdgesWidthActor] = field(default_factory=dict) + edges_block_styles: dict[int, ModelEdgesStyle] = field(default_factory=dict) + # Set by apply_basemap on a basemap: its drape over the georeferenced data + drape_actor: vtkActor | None = None + + def connect_mappers(self, pipeline: VtkPipeline) -> None: + self.mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + if self.points_mapper is not None: + self.points_mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + if self.edges_mapper is not None: + self.edges_mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + + def get_block_style(self, block_id: int) -> BlockStyle: + if block_id not in self.block_styles: + style = BlockStyle( + name="", + attribute_location="point", + points=[], + minimum=0.0, + maximum=1.0, + item=0, + no_data_color=None, + ) + self.block_styles[block_id] = style + return self.block_styles[block_id] + + def clear_block_scalars(self, pipeline: VtkPipeline, block_id: int) -> None: + if block_id in self.block_styles: + self.block_styles[block_id]["name"] = "" + if block_id >= len(pipeline.block_data_sets): + return + block = pipeline.block_data_sets[block_id] + if not isinstance(block, vtkDataSet): + return + block.GetPointData().SetActiveScalars("") + block.GetCellData().SetActiveScalars("") + if isinstance(self.mapper, vtkCompositePolyDataMapper): + attributes = self.mapper.GetCompositeDataDisplayAttributes() + attributes.SetBlockScalarVisibility(block, False) # noqa: FBT003 VTK API + attributes.RemoveBlockLookupTable(block) + attributes.RemoveBlockArrayName(block) + attributes.RemoveBlockArrayComponent(block) + attributes.RemoveBlockScalarRange(block) + attributes.RemoveBlockScalarMode(block) + attributes.RemoveBlockInterpolateScalarsBeforeMapping(block) + + def clear_blocks_scalars(self, pipeline: VtkPipeline) -> None: + self.block_styles.clear() + for block_id in range(len(pipeline.block_data_sets)): + self.clear_block_scalars(pipeline, block_id) + + def update_block_colors(self, pipeline: VtkPipeline, block_id: int) -> None: + if block_id >= len(pipeline.block_data_sets): + return + block = pipeline.block_data_sets[block_id] + if not isinstance(block, vtkDataSet): + return + style = self.get_block_style(block_id) + if not style["name"]: + self.clear_block_scalars(pipeline, block_id) + return + is_point = style["attribute_location"] == "point" + field_data = block.GetPointData() if is_point else block.GetCellData() + other_field_data = block.GetCellData() if is_point else block.GetPointData() + scalar_array = field_data.GetArray(style["name"]) + if not scalar_array: + return + item = style.get("item", 0) + no_data_color = style.get("no_data_color") + if block_id not in self.block_lookup_tables: + self.block_lookup_tables[block_id] = vtkColorTransferFunction() + lut = self.block_lookup_tables[block_id] + source_lut = create_color_transfer_function( + style["points"], style["minimum"], style["maximum"], item, no_data_color + ) + lut.DeepCopy(source_lut) + # DeepCopy leaves the no data color behind + lut.SetNanColor(source_lut.GetNanColor()) + lut.SetNanOpacity(source_lut.GetNanOpacity()) + field_data.SetActiveScalars(style["name"]) + other_field_data.SetActiveScalars("") + if isinstance(self.mapper, vtkCompositePolyDataMapper): + attributes = self.mapper.GetCompositeDataDisplayAttributes() + attributes.RemoveBlockColor(block) + attributes.SetBlockLookupTable(block, lut) + attributes.SetBlockArrayName(block, style["name"]) + attributes.SetBlockArrayComponent(block, item) + attributes.SetBlockScalarRange(block, vtkVector2d(style["minimum"], style["maximum"])) + attributes.SetBlockScalarMode( + block, + (VTK_SCALAR_MODE_USE_POINT_DATA if is_point else VTK_SCALAR_MODE_USE_CELL_DATA), + ) + attributes.SetBlockInterpolateScalarsBeforeMapping(block, is_point) + attributes.SetBlockScalarVisibility(block, True) # noqa: FBT003 VTK API + self.mapper.ScalarVisibilityOn() + self.mapper.SetColorModeToMapScalars() + self.mapper.InterpolateScalarsBeforeMappingOn() + self.mapper.Modified() + + def update_style_actor_attributes( + self, + pipeline: VtkPipeline, + mapper: vtkCompositePolyDataMapper, + styles: Mapping[int, ModelPointsStyle | ModelEdgesStyle], + actor_key: float, + ) -> None: + # A block shows in a style actor only when it is visible and its style matches the actor + main_mapper = cast("vtkCompositePolyDataMapper", self.mapper) + attributes = main_mapper.GetCompositeDataDisplayAttributes() + actor_attributes = vtkCompositeDataDisplayAttributes() + for block_id, block in enumerate(pipeline.block_data_sets): + if not isinstance(block, vtkDataSet): + continue + style = styles.get(block_id) + block_visibility = not attributes.HasBlockVisibility( + block + ) or attributes.GetBlockVisibility(block) + visible = ( + style is not None + and style_actor_key(style) == actor_key + and style.visibility + and block_visibility + ) + actor_attributes.SetBlockVisibility(block, visible) + if not visible or style is None: + continue + if style.color is not None: + actor_attributes.SetBlockColor(block, list(style.color)) + actor_attributes.SetBlockOpacity(block, style.opacity) + self.set_block_point_attribute(actor_attributes, block, style.attribute) + mapper.SetCompositeDataDisplayAttributes(actor_attributes) + mapper.Modified() + + def update_points_size_actors(self, pipeline: VtkPipeline) -> None: + for size, size_actor in self.points_size_actors.items(): + self.update_style_actor_attributes( + pipeline, size_actor.mapper, self.points_block_styles, size + ) + + def update_edges_width_actors(self, pipeline: VtkPipeline) -> None: + for width, width_actor in self.edges_width_actors.items(): + self.update_style_actor_attributes( + pipeline, width_actor.mapper, self.edges_block_styles, width + ) + + @staticmethod + def set_block_point_attribute( + attributes: vtkCompositeDataDisplayAttributes, + block: vtkDataSet, + attribute: BlockStyle | None, + ) -> None: + if attribute is None or not block.GetPointData().GetArray(attribute["name"]): + attributes.SetBlockScalarVisibility(block, False) # noqa: FBT003 VTK API + return + lut = create_color_transfer_function( + attribute["points"], + attribute["minimum"], + attribute["maximum"], + attribute["item"], + attribute["no_data_color"], + ) + # Field data mode keeps the active scalars shared with the polygons untouched + attributes.SetBlockScalarMode(block, VTK_SCALAR_MODE_USE_POINT_FIELD_DATA) + attributes.SetBlockArrayAccessMode(block, VTK_GET_ARRAY_BY_NAME) + attributes.SetBlockArrayName(block, attribute["name"]) + attributes.SetBlockArrayComponent(block, attribute["item"]) + attributes.SetBlockLookupTable(block, lut) + attributes.SetBlockScalarRange( + block, vtkVector2d(attribute["minimum"], attribute["maximum"]) + ) + attributes.SetBlockInterpolateScalarsBeforeMapping(block, True) # noqa: FBT003 VTK API + attributes.SetBlockScalarVisibility(block, True) # noqa: FBT003 VTK API + + @staticmethod + def sync_mapper_display_attributes( + mapper: vtkCompositePolyDataMapper, + source_blocks: list[vtkDataObject | None], + new_blocks: list[vtkDataObject | None], + ) -> None: + attributes = mapper.GetCompositeDataDisplayAttributes() + synced_attributes = vtkCompositeDataDisplayAttributes() + color_rgb = [0.0, 0.0, 0.0] + for source_block, destination_block in zip(source_blocks, new_blocks, strict=False): + if source_block and destination_block: + if attributes.HasBlockColor(source_block): + attributes.GetBlockColor(source_block, color_rgb) + synced_attributes.SetBlockColor(destination_block, color_rgb) + if attributes.HasBlockVisibility(source_block): + synced_attributes.SetBlockVisibility( + destination_block, attributes.GetBlockVisibility(source_block) + ) + if attributes.HasBlockOpacity(source_block): + synced_attributes.SetBlockOpacity( + destination_block, attributes.GetBlockOpacity(source_block) + ) + mapper.SetCompositeDataDisplayAttributes(synced_attributes) + + def sync_block_display_attributes( + self, + source_blocks: list[vtkDataObject | None], + new_blocks: list[vtkDataObject | None], + ) -> None: + mapper = cast("vtkCompositePolyDataMapper", self.mapper) + self.sync_mapper_display_attributes(mapper, source_blocks, new_blocks) + + def update_block_actors(self, pipeline: VtkPipeline) -> None: + self.update_points_size_actors(pipeline) + self.update_edges_width_actors(pipeline) + for block_id in self.block_styles: + self.update_block_colors(pipeline, block_id) + + def set_composite_input(self, pipeline: VtkPipeline, dataset: vtkDataObject) -> None: + self.mapper.SetInputDataObject(dataset) + for size_actor in self.points_size_actors.values(): + size_actor.mapper.SetInputDataObject(dataset) + for width_actor in self.edges_width_actors.values(): + width_actor.mapper.SetInputDataObject(dataset) + if self.pick_mapper and isinstance(dataset, vtkMultiBlockDataSet): + mapper = cast("vtkCompositePolyDataMapper", self.mapper) + attributes = mapper.GetCompositeDataDisplayAttributes() + self.pick_mapper.SetInputDataObject(pipeline.prune_hidden_blocks(dataset, attributes)) + + +def sync_composite_pipeline( + pipeline: VtkPipeline, scene_objects: list[SceneObject], dataset: vtkDataObject +) -> None: + """Swap the shared blocks of the data, keeping the block styles of every scene showing it.""" + new_blocks = pipeline.extract_blocks(dataset) + for scene_object in scene_objects: + scene_object.sync_block_display_attributes(pipeline.block_data_sets, new_blocks) + pipeline.block_data_sets = new_blocks + for scene_object in scene_objects: + scene_object.update_block_actors(pipeline) + scene_object.set_composite_input(pipeline, dataset) diff --git a/src/opengeodeweb_viewer/vtk_pipeline.py b/src/opengeodeweb_viewer/vtk_pipeline.py index 2e6daf9d..c16cd5ea 100644 --- a/src/opengeodeweb_viewer/vtk_pipeline.py +++ b/src/opengeodeweb_viewer/vtk_pipeline.py @@ -17,7 +17,6 @@ vtkSelection, vtkSelectionNode, vtkStaticPointLocator, - vtkVector2d, ) from vtkmodules.vtkCommonTransforms import vtkTransform from vtkmodules.vtkFiltersCore import vtkAppendPolyData, vtkCleanPolyData, vtkCutter @@ -39,28 +38,17 @@ # Third party imports from vtkmodules.vtkRenderingCore import ( - VTK_GET_ARRAY_BY_NAME, - VTK_SCALAR_MODE_USE_CELL_DATA, - VTK_SCALAR_MODE_USE_POINT_DATA, - VTK_SCALAR_MODE_USE_POINT_FIELD_DATA, vtkActor, - vtkColorTransferFunction, vtkCompositeDataDisplayAttributes, vtkCompositePolyDataMapper, vtkDataSetMapper, vtkFollower, - vtkMapper, vtkPolyDataMapper, vtkRenderer, vtkTexture, ) from vtkmodules.vtkRenderingFreeType import vtkVectorText -from opengeodeweb_viewer.utils_functions import ( - ColorClassProtocol, - create_color_transfer_function, -) - if TYPE_CHECKING: from collections.abc import Mapping @@ -75,6 +63,9 @@ from opengeodeweb_viewer.basemap_compose import LayerState from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane + from opengeodeweb_viewer.utils_functions import ( + ColorClassProtocol, + ) logger = logging.getLogger(__name__) @@ -344,9 +335,8 @@ class BasemapState: layers: Mapping[str, LayerState] # Detail only: the base basemap it lies on detail_of: str | None = None - # Its drape and the georeferenced data it drapes + # The georeferenced data it drapes, its drape actor is per scene drape_ids: list[str] = field(default_factory=list) - drape_actor: vtkActor | None = None # Base only: the top surfaces it drapes, for its detail draped_surfaces: list[vtkPolyData] = field(default_factory=list) # Every visible map (drape), and the visible maps not cropped (flat map around) @@ -356,10 +346,10 @@ class BasemapState: @dataclass class VtkPipeline: + """The data side of a data, shared by every scene showing it.""" + reader: vtkXMLReader - mapper: vtkMapper filter: vtkGeometryFilter = field(default_factory=vtkGeometryFilter) - actor: vtkActor = field(default_factory=vtkActor) slice_filter: vtkAppendFilter | None = None clipping_filter: vtkExtractGeometry | vtkTableBasedClipDataSet | None = None # The planes of clipping_filter, followed by the basemaps lying over this data @@ -370,45 +360,10 @@ class VtkPipeline: # The z shifts of each source component at full explosion, # with the source time they were computed at explode_shifts: tuple[int, dict[int, list[float]]] | None = None - # Set by set_visibility: the basemap actors also hide on their own, without forgetting it - visibility: bool = True # Set by apply_basemap: the data is a map under the other data basemap: BasemapState | None = None - highlight: HighlightPipeline = field(default_factory=HighlightPipeline) block_data_sets: list[vtkDataObject | None] = field(default_factory=list) block_geode_ids: list[str] = field(default_factory=list) - scalar_bar: vtkScalarBarActor = field(default_factory=vtkScalarBarActor) - scalar_bars: dict[str, ModelScalarBar] = field(default_factory=dict) - block_styles: dict[int, BlockStyle] = field(default_factory=dict) - # One lookup table per block, refilled in place: the composite mapper keys its - # per-block state on the table address, which a freed table could hand to a new one - block_lookup_tables: dict[int, vtkColorTransferFunction] = field(default_factory=dict) - pick_mapper: vtkMapper | None = None - points_mapper: vtkDataSetMapper | None = None - points_actor: vtkActor | None = None - points_scalar_bar: vtkScalarBarActor | None = None - points_visibility: bool = False - color_map_points: list[float] = field(default_factory=list) - # One points actor per distinct size, since point size is an actor property - points_size_actors: dict[float, PointsSizeActor] = field(default_factory=dict) - points_block_styles: dict[int, ModelPointsStyle] = field(default_factory=dict) - edges_mapper: vtkDataSetMapper | None = None - edges_actor: vtkActor | None = None - edges_scalar_bar: vtkScalarBarActor | None = None - edges_visibility: bool = False - # Attribute shown by the points and edges dedicated scalar bars, None when they have none - points_color_map_key: ColorMapKey | None = None - edges_color_map_key: ColorMapKey | None = None - # One edges actor per distinct width, since line width is an actor property - edges_width_actors: dict[float, EdgesWidthActor] = field(default_factory=dict) - edges_block_styles: dict[int, ModelEdgesStyle] = field(default_factory=dict) - - def connect_mappers(self) -> None: - self.mapper.SetInputConnection(self.filter.GetOutputPort()) - if self.points_mapper is not None: - self.points_mapper.SetInputConnection(self.filter.GetOutputPort()) - if self.edges_mapper is not None: - self.edges_mapper.SetInputConnection(self.filter.GetOutputPort()) def extract_blocks(self, multiblock: vtkDataObject | None) -> list[vtkDataObject | None]: if not isinstance(multiblock, vtkMultiBlockDataSet): @@ -664,93 +619,6 @@ def translate_blocks( translated_dataset.SetObjectName(dataset.GetObjectName()) return translated_dataset - def get_block_style(self, block_id: int) -> BlockStyle: - if block_id not in self.block_styles: - style = BlockStyle( - name="", - attribute_location="point", - points=[], - minimum=0.0, - maximum=1.0, - item=0, - no_data_color=None, - ) - self.block_styles[block_id] = style - return self.block_styles[block_id] - - def clear_block_scalars(self, block_id: int) -> None: - if block_id in self.block_styles: - self.block_styles[block_id]["name"] = "" - if block_id >= len(self.block_data_sets): - return - block = self.block_data_sets[block_id] - if not isinstance(block, vtkDataSet): - return - block.GetPointData().SetActiveScalars("") - block.GetCellData().SetActiveScalars("") - if isinstance(self.mapper, vtkCompositePolyDataMapper): - attributes = self.mapper.GetCompositeDataDisplayAttributes() - attributes.SetBlockScalarVisibility(block, False) # noqa: FBT003 VTK API - attributes.RemoveBlockLookupTable(block) - attributes.RemoveBlockArrayName(block) - attributes.RemoveBlockArrayComponent(block) - attributes.RemoveBlockScalarRange(block) - attributes.RemoveBlockScalarMode(block) - attributes.RemoveBlockInterpolateScalarsBeforeMapping(block) - - def clear_blocks_scalars(self) -> None: - self.block_styles.clear() - for block_id in range(len(self.block_data_sets)): - self.clear_block_scalars(block_id) - - def update_block_colors(self, block_id: int) -> None: - if block_id >= len(self.block_data_sets): - return - block = self.block_data_sets[block_id] - if not isinstance(block, vtkDataSet): - return - style = self.get_block_style(block_id) - if not style["name"]: - self.clear_block_scalars(block_id) - return - is_point = style["attribute_location"] == "point" - field_data = block.GetPointData() if is_point else block.GetCellData() - other_field_data = block.GetCellData() if is_point else block.GetPointData() - scalar_array = field_data.GetArray(style["name"]) - if not scalar_array: - return - item = style.get("item", 0) - no_data_color = style.get("no_data_color") - if block_id not in self.block_lookup_tables: - self.block_lookup_tables[block_id] = vtkColorTransferFunction() - lut = self.block_lookup_tables[block_id] - source_lut = create_color_transfer_function( - style["points"], style["minimum"], style["maximum"], item, no_data_color - ) - lut.DeepCopy(source_lut) - # DeepCopy leaves the no data color behind - lut.SetNanColor(source_lut.GetNanColor()) - lut.SetNanOpacity(source_lut.GetNanOpacity()) - field_data.SetActiveScalars(style["name"]) - other_field_data.SetActiveScalars("") - if isinstance(self.mapper, vtkCompositePolyDataMapper): - attributes = self.mapper.GetCompositeDataDisplayAttributes() - attributes.RemoveBlockColor(block) - attributes.SetBlockLookupTable(block, lut) - attributes.SetBlockArrayName(block, style["name"]) - attributes.SetBlockArrayComponent(block, item) - attributes.SetBlockScalarRange(block, vtkVector2d(style["minimum"], style["maximum"])) - attributes.SetBlockScalarMode( - block, - (VTK_SCALAR_MODE_USE_POINT_DATA if is_point else VTK_SCALAR_MODE_USE_CELL_DATA), - ) - attributes.SetBlockInterpolateScalarsBeforeMapping(block, is_point) - attributes.SetBlockScalarVisibility(block, True) # noqa: FBT003 VTK API - self.mapper.ScalarVisibilityOn() - self.mapper.SetColorModeToMapScalars() - self.mapper.InterpolateScalarsBeforeMappingOn() - self.mapper.Modified() - def block_component_types(self) -> dict[int, str]: component_types: dict[int, str] = {} component_type = "" @@ -766,124 +634,9 @@ def block_component_types(self) -> dict[int, str]: iterator.GoToNextItem() return component_types - def update_style_actor_attributes( - self, - mapper: vtkCompositePolyDataMapper, - styles: Mapping[int, ModelPointsStyle | ModelEdgesStyle], - actor_key: float, - ) -> None: - # A block shows in a style actor only when it is visible and its style matches the actor - main_mapper = cast("vtkCompositePolyDataMapper", self.mapper) - attributes = main_mapper.GetCompositeDataDisplayAttributes() - actor_attributes = vtkCompositeDataDisplayAttributes() - for block_id, block in enumerate(self.block_data_sets): - if not isinstance(block, vtkDataSet): - continue - style = styles.get(block_id) - block_visibility = not attributes.HasBlockVisibility( - block - ) or attributes.GetBlockVisibility(block) - visible = ( - style is not None - and style_actor_key(style) == actor_key - and style.visibility - and block_visibility - ) - actor_attributes.SetBlockVisibility(block, visible) - if not visible or style is None: - continue - if style.color is not None: - actor_attributes.SetBlockColor(block, list(style.color)) - actor_attributes.SetBlockOpacity(block, style.opacity) - self.set_block_point_attribute(actor_attributes, block, style.attribute) - mapper.SetCompositeDataDisplayAttributes(actor_attributes) - mapper.Modified() - - def update_points_size_actors(self) -> None: - for size, size_actor in self.points_size_actors.items(): - self.update_style_actor_attributes(size_actor.mapper, self.points_block_styles, size) - - def update_edges_width_actors(self) -> None: - for width, width_actor in self.edges_width_actors.items(): - self.update_style_actor_attributes(width_actor.mapper, self.edges_block_styles, width) - - @staticmethod - def set_block_point_attribute( - attributes: vtkCompositeDataDisplayAttributes, - block: vtkDataSet, - attribute: BlockStyle | None, - ) -> None: - if attribute is None or not block.GetPointData().GetArray(attribute["name"]): - attributes.SetBlockScalarVisibility(block, False) # noqa: FBT003 VTK API - return - lut = create_color_transfer_function( - attribute["points"], - attribute["minimum"], - attribute["maximum"], - attribute["item"], - attribute["no_data_color"], - ) - # Field data mode keeps the active scalars shared with the polygons untouched - attributes.SetBlockScalarMode(block, VTK_SCALAR_MODE_USE_POINT_FIELD_DATA) - attributes.SetBlockArrayAccessMode(block, VTK_GET_ARRAY_BY_NAME) - attributes.SetBlockArrayName(block, attribute["name"]) - attributes.SetBlockArrayComponent(block, attribute["item"]) - attributes.SetBlockLookupTable(block, lut) - attributes.SetBlockScalarRange( - block, vtkVector2d(attribute["minimum"], attribute["maximum"]) - ) - attributes.SetBlockInterpolateScalarsBeforeMapping(block, True) # noqa: FBT003 VTK API - attributes.SetBlockScalarVisibility(block, True) # noqa: FBT003 VTK API - - @staticmethod - def sync_mapper_display_attributes( - mapper: vtkCompositePolyDataMapper, - source_blocks: list[vtkDataObject | None], - new_blocks: list[vtkDataObject | None], - ) -> None: - attributes = mapper.GetCompositeDataDisplayAttributes() - synced_attributes = vtkCompositeDataDisplayAttributes() - color_rgb = [0.0, 0.0, 0.0] - for source_block, destination_block in zip(source_blocks, new_blocks, strict=False): - if source_block and destination_block: - if attributes.HasBlockColor(source_block): - attributes.GetBlockColor(source_block, color_rgb) - synced_attributes.SetBlockColor(destination_block, color_rgb) - if attributes.HasBlockVisibility(source_block): - synced_attributes.SetBlockVisibility( - destination_block, attributes.GetBlockVisibility(source_block) - ) - if attributes.HasBlockOpacity(source_block): - synced_attributes.SetBlockOpacity( - destination_block, attributes.GetBlockOpacity(source_block) - ) - mapper.SetCompositeDataDisplayAttributes(synced_attributes) - - def sync_block_display_attributes(self, new_blocks: list[vtkDataObject | None]) -> None: - mapper = cast("vtkCompositePolyDataMapper", self.mapper) - self.sync_mapper_display_attributes(mapper, self.block_data_sets, new_blocks) - self.block_data_sets = new_blocks - self.update_points_size_actors() - self.update_edges_width_actors() - for block_id in self.block_styles: - self.update_block_colors(block_id) - def restore_active_scalars(self, target: vtkDataSet) -> None: source = self.reader.GetOutputAsDataSet() if active_points := source.GetPointData().GetScalars(): target.GetPointData().SetActiveScalars(active_points.GetName()) if active_cells := source.GetCellData().GetScalars(): target.GetCellData().SetActiveScalars(active_cells.GetName()) - - def sync_composite_pipeline(self, dataset: vtkDataObject) -> None: - new_blocks = self.extract_blocks(dataset) - self.sync_block_display_attributes(new_blocks) - self.mapper.SetInputDataObject(dataset) - for size_actor in self.points_size_actors.values(): - size_actor.mapper.SetInputDataObject(dataset) - for width_actor in self.edges_width_actors.values(): - width_actor.mapper.SetInputDataObject(dataset) - if self.pick_mapper and isinstance(dataset, vtkMultiBlockDataSet): - mapper = cast("vtkCompositePolyDataMapper", self.mapper) - attributes = mapper.GetCompositeDataDisplayAttributes() - self.pick_mapper.SetInputDataObject(self.prune_hidden_blocks(dataset, attributes)) diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index 892dcf22..3cd45115 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -45,15 +45,11 @@ drape_planes, update_basemaps, ) -from opengeodeweb_viewer.orientation_marker import style_marker from opengeodeweb_viewer.rpc.viewer.schemas.threshold import Attribute, Location from opengeodeweb_viewer.text_style import ( - TextStyle, apply_text_property, - style_grid_scale, ) from opengeodeweb_viewer.vtk_pipeline import ( - RulerPipeline, ViewerData, VtkPipeline, ) @@ -62,9 +58,7 @@ from collections.abc import Iterable from collections.abc import Set as AbstractSet - from vtkmodules.vtkInteractionWidgets import vtkOrientationMarkerWidget from vtkmodules.vtkRenderingAnnotation import ( - vtkAxesActor, vtkCubeAxesActor, vtkScalarBarActor, ) @@ -72,6 +66,7 @@ from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane from opengeodeweb_viewer.rpc.viewer.schemas.slice import SliceElement + from opengeodeweb_viewer.scene import Scene, SceneObject logger = logging.getLogger(__name__) @@ -114,54 +109,38 @@ def __init__(self) -> None: super().__init__() self.DATA_FOLDER_PATH = os.getenv("DATA_FOLDER_PATH", ".") + def getView(self, view_id: str) -> vtkRenderWindow: # noqa: N802 VTK override + for scene in self.get_scenes().values(): + if scene.view_id == str(view_id): + return scene.render_window + return super().getView(view_id) + def get_data_base(self) -> dict[str, VtkPipeline]: return cast("dict[str, VtkPipeline]", self.getSharedObject("db")) def get_vtk_pipeline(self, data_id: str) -> VtkPipeline: return self.get_data_base()[data_id] - def get_grid_scale(self) -> vtkCubeAxesActor | None: - return cast("vtkCubeAxesActor | None", self.getSharedObject("grid_scale")) - - def set_grid_scale(self, grid_scale: vtkCubeAxesActor) -> None: - self.coreServer.setSharedObject("grid_scale", grid_scale) - - def get_axes(self) -> vtkAxesActor | None: - return cast("vtkAxesActor | None", self.getSharedObject("axes")) - - def set_axes(self, axes: vtkAxesActor) -> None: - self.coreServer.setSharedObject("axes", axes) - - def get_widget(self) -> vtkOrientationMarkerWidget | None: - return cast("vtkOrientationMarkerWidget | None", self.getSharedObject("widget")) - - def set_widget(self, widget: vtkOrientationMarkerWidget) -> None: - self.coreServer.setSharedObject("widget", widget) - - def get_ruler(self) -> RulerPipeline | None: - return cast("RulerPipeline | None", self.getSharedObject("ruler")) - - def set_ruler(self, ruler: RulerPipeline) -> None: - self.coreServer.setSharedObject("ruler", ruler) - - def get_scene_text_style(self) -> TextStyle: - style = self.getSharedObject("text_style") - return style if isinstance(style, TextStyle) else TextStyle() + def get_scenes(self) -> dict[str, Scene]: + return cast("dict[str, Scene]", self.getSharedObject("scenes")) + + def get_scene(self, scene_id: str) -> Scene: + scene = self.get_scenes().get(scene_id) + if scene is None: + raise ValueError( + { + "code": 404, + "name": "Not found", + "description": f"Scene {scene_id} not found", + } + ) + return scene - def set_scene_text_style(self, style: TextStyle) -> None: - self.coreServer.setSharedObject("text_style", style) + def get_scene_object(self, scene_id: str, data_id: str) -> SceneObject: + return self.get_scene(scene_id).objects[data_id] - def apply_scene_text_style(self) -> None: - style = self.get_scene_text_style() - grid_scale = self.get_grid_scale() - if grid_scale is not None: - style_grid_scale(grid_scale, style) - widget = self.get_widget() - if widget is not None: - style_marker(widget.GetOrientationMarker(), style) - ruler = self.get_ruler() - if ruler is not None: - ruler.set_text_color(None if style.is_default else style.rgb, style.opacity) + def apply_scene_text_style(self, scene_id: str) -> None: + self.get_scene(scene_id).apply_text_style() self.update_scalar_bars_layout() def get_viewer_data(self, data_id: str) -> ViewerData: @@ -202,9 +181,6 @@ def get_data_file_path(self, data_id: str, filename: str | None = None) -> str: return str(Path(data_folder_path) / data_id / filename) - def get_renderer(self) -> vtkRenderer: - return cast("vtkRenderer", self.getSharedObject("renderer")) - def reset_camera_clipping_range(self) -> None: renderer = self.get_renderer() grid_scale = self.get_grid_scale() diff --git a/tests/test_scene.py b/tests/test_scene.py new file mode 100644 index 00000000..9926a270 --- /dev/null +++ b/tests/test_scene.py @@ -0,0 +1,27 @@ +# Standard library imports + +# Third party imports +from vtkmodules.vtkRenderingCore import vtkActor +from vtkmodules.vtkWebCore import vtkWebApplication + +# Local application imports +from opengeodeweb_viewer.scene import Scene + + +def test_scenes_have_distinct_render_windows() -> None: + object_id_map = vtkWebApplication().GetObjectIdMap() + a = Scene.create("scene_1", object_id_map) + b = Scene.create("scene_2", object_id_map) + assert a.render_window is not b.render_window + assert a.view_id != b.view_id + assert a.renderer.GetActiveCamera() is not b.renderer.GetActiveCamera() + a.dispose() + b.dispose() + + +def test_dispose_removes_props() -> None: + object_id_map = vtkWebApplication().GetObjectIdMap() + scene = Scene.create("scene_1", object_id_map) + scene.renderer.AddActor(vtkActor()) + scene.dispose() + assert scene.renderer.GetViewProps().GetNumberOfItems() == 0 diff --git a/tests/test_vtk_pipeline.py b/tests/test_vtk_pipeline.py index c1bf9f3e..e6ec3c2e 100644 --- a/tests/test_vtk_pipeline.py +++ b/tests/test_vtk_pipeline.py @@ -12,29 +12,28 @@ from vtkmodules.vtkCommonExecutionModel import vtkTrivialProducer from vtkmodules.vtkFiltersGeneral import vtkShrinkFilter from vtkmodules.vtkFiltersSources import vtkCubeSource, vtkLineSource -from vtkmodules.vtkIOXML import vtkXMLMultiBlockDataReader from vtkmodules.vtkRenderingCore import ( vtkCompositeDataDisplayAttributes, vtkCompositePolyDataMapper, ) # Local application imports +from opengeodeweb_viewer.scene import SceneObject from opengeodeweb_viewer.vtk_pipeline import STACKING_GAP_RATIO, VtkPipeline def test_sync_block_display_attributes_drops_replaced_blocks() -> None: mapper = vtkCompositePolyDataMapper() mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) - pipeline = VtkPipeline(vtkXMLMultiBlockDataReader(), mapper) + scene_object = SceneObject(mapper) source_block = vtkPolyData() destination_block = vtkPolyData() - pipeline.block_data_sets = [source_block] attributes = mapper.GetCompositeDataDisplayAttributes() attributes.SetBlockVisibility(source_block, False) # noqa: FBT003 VTK API attributes.SetBlockOpacity(source_block, 0.5) attributes.SetBlockColor(source_block, [1.0, 0.0, 0.0]) - pipeline.sync_block_display_attributes([destination_block]) + scene_object.sync_block_display_attributes([source_block], [destination_block]) attributes = mapper.GetCompositeDataDisplayAttributes() assert not attributes.GetBlockVisibility(destination_block) @@ -113,7 +112,7 @@ def explode( model_source.SetOutput(model) mapper = vtkCompositePolyDataMapper() mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) - pipeline = VtkPipeline(model_source, mapper) # type: ignore[arg-type] + pipeline = VtkPipeline(model_source) # type: ignore[arg-type] shrink_filter = vtkShrinkFilter() shrink_filter.SetShrinkFactor(shrink_factor) shrink_filter.SetInputConnection(model_source.GetOutputPort()) @@ -229,7 +228,7 @@ def test_explode_blocks_shows_shared_lines_along_each_block() -> None: def test_exploded_bounds_follow_explode_factor() -> None: model_source = vtkTrivialProducer() model_source.SetOutput(stacked_model()) - pipeline = VtkPipeline(model_source, vtkCompositePolyDataMapper()) # type: ignore[arg-type] + pipeline = VtkPipeline(model_source) # type: ignore[arg-type] assert pipeline.exploded_bounds() == pytest.approx([0, 30, 0, 10, 0, 10]) pipeline.explode_factor = 0.5 assert pipeline.exploded_bounds() == pytest.approx([0, 30, 0, 10, 0, 10 + (4 + GAP) / 2]) From e88673c24953891e3ba463428b8ed4b515c5973f Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Mon, 30 Nov 2026 11:40:56 +0100 Subject: [PATCH 02/22] fix: colour shared blocks by array name per scene Field data scalar modes keep each scene's array on its own mapper and leave the shared datasets' active scalars untouched. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/scene/scene_object.py | 26 ++++--- tests/test_scene.py | 68 ++++++++++++++++++- 2 files changed, 84 insertions(+), 10 deletions(-) diff --git a/src/opengeodeweb_viewer/scene/scene_object.py b/src/opengeodeweb_viewer/scene/scene_object.py index c1ae55c5..b9af72ec 100644 --- a/src/opengeodeweb_viewer/scene/scene_object.py +++ b/src/opengeodeweb_viewer/scene/scene_object.py @@ -12,8 +12,7 @@ from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor from vtkmodules.vtkRenderingCore import ( VTK_GET_ARRAY_BY_NAME, - VTK_SCALAR_MODE_USE_CELL_DATA, - VTK_SCALAR_MODE_USE_POINT_DATA, + VTK_SCALAR_MODE_USE_CELL_FIELD_DATA, VTK_SCALAR_MODE_USE_POINT_FIELD_DATA, vtkActor, vtkColorTransferFunction, @@ -108,12 +107,11 @@ def clear_block_scalars(self, pipeline: VtkPipeline, block_id: int) -> None: block = pipeline.block_data_sets[block_id] if not isinstance(block, vtkDataSet): return - block.GetPointData().SetActiveScalars("") - block.GetCellData().SetActiveScalars("") if isinstance(self.mapper, vtkCompositePolyDataMapper): attributes = self.mapper.GetCompositeDataDisplayAttributes() attributes.SetBlockScalarVisibility(block, False) # noqa: FBT003 VTK API attributes.RemoveBlockLookupTable(block) + attributes.RemoveBlockArrayAccessMode(block) attributes.RemoveBlockArrayName(block) attributes.RemoveBlockArrayComponent(block) attributes.RemoveBlockScalarRange(block) @@ -137,7 +135,6 @@ def update_block_colors(self, pipeline: VtkPipeline, block_id: int) -> None: return is_point = style["attribute_location"] == "point" field_data = block.GetPointData() if is_point else block.GetCellData() - other_field_data = block.GetCellData() if is_point else block.GetPointData() scalar_array = field_data.GetArray(style["name"]) if not scalar_array: return @@ -153,18 +150,22 @@ def update_block_colors(self, pipeline: VtkPipeline, block_id: int) -> None: # DeepCopy leaves the no data color behind lut.SetNanColor(source_lut.GetNanColor()) lut.SetNanOpacity(source_lut.GetNanOpacity()) - field_data.SetActiveScalars(style["name"]) - other_field_data.SetActiveScalars("") if isinstance(self.mapper, vtkCompositePolyDataMapper): attributes = self.mapper.GetCompositeDataDisplayAttributes() attributes.RemoveBlockColor(block) attributes.SetBlockLookupTable(block, lut) + # Field data mode colours by name: the shared block active scalars stay untouched + attributes.SetBlockArrayAccessMode(block, VTK_GET_ARRAY_BY_NAME) attributes.SetBlockArrayName(block, style["name"]) attributes.SetBlockArrayComponent(block, item) attributes.SetBlockScalarRange(block, vtkVector2d(style["minimum"], style["maximum"])) attributes.SetBlockScalarMode( block, - (VTK_SCALAR_MODE_USE_POINT_DATA if is_point else VTK_SCALAR_MODE_USE_CELL_DATA), + ( + VTK_SCALAR_MODE_USE_POINT_FIELD_DATA + if is_point + else VTK_SCALAR_MODE_USE_CELL_FIELD_DATA + ), ) attributes.SetBlockInterpolateScalarsBeforeMapping(block, is_point) attributes.SetBlockScalarVisibility(block, True) # noqa: FBT003 VTK API @@ -173,6 +174,15 @@ def update_block_colors(self, pipeline: VtkPipeline, block_id: int) -> None: self.mapper.InterpolateScalarsBeforeMappingOn() self.mapper.Modified() + def color_by_array(self, name: str, item: int, *, is_point: bool) -> None: + """Colour a plain mapper by name: the shared data active scalars stay untouched.""" + self.mapper.ScalarVisibilityOn() + if is_point: + self.mapper.SetScalarModeToUsePointFieldData() + else: + self.mapper.SetScalarModeToUseCellFieldData() + self.mapper.ColorByArrayComponent(name, item) + def update_style_actor_attributes( self, pipeline: VtkPipeline, diff --git a/tests/test_scene.py b/tests/test_scene.py index 9926a270..3479210d 100644 --- a/tests/test_scene.py +++ b/tests/test_scene.py @@ -1,11 +1,21 @@ # Standard library imports # Third party imports -from vtkmodules.vtkRenderingCore import vtkActor +from vtkmodules.vtkCommonCore import vtkFloatArray +from vtkmodules.vtkCommonDataModel import vtkPolyData +from vtkmodules.vtkCommonExecutionModel import vtkTrivialProducer +from vtkmodules.vtkRenderingCore import ( + VTK_SCALAR_MODE_USE_POINT_FIELD_DATA, + vtkActor, + vtkCompositeDataDisplayAttributes, + vtkCompositePolyDataMapper, + vtkDataSetMapper, +) from vtkmodules.vtkWebCore import vtkWebApplication # Local application imports -from opengeodeweb_viewer.scene import Scene +from opengeodeweb_viewer.scene import Scene, SceneObject +from opengeodeweb_viewer.vtk_pipeline import BlockStyle, VtkPipeline def test_scenes_have_distinct_render_windows() -> None: @@ -25,3 +35,57 @@ def test_dispose_removes_props() -> None: scene.renderer.AddActor(vtkActor()) scene.dispose() assert scene.renderer.GetViewProps().GetNumberOfItems() == 0 + + +def block_with_arrays(names: list[str]) -> vtkPolyData: + block = vtkPolyData() + for name in names: + array = vtkFloatArray() + array.SetName(name) + block.GetPointData().AddArray(array) + return block + + +def composite_scene_object() -> SceneObject: + mapper = vtkCompositePolyDataMapper() + mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) + return SceneObject(mapper) + + +def test_scenes_colour_shared_block_by_their_own_array() -> None: + block = block_with_arrays(["first", "second"]) + pipeline = VtkPipeline(vtkTrivialProducer()) # type: ignore[arg-type] + pipeline.block_data_sets = [block] + scene_objects = {name: composite_scene_object() for name in ("first", "second")} + for name, scene_object in scene_objects.items(): + scene_object.block_styles[0] = BlockStyle( + name=name, + attribute_location="point", + points=[], + minimum=0.0, + maximum=1.0, + item=0, + no_data_color=None, + ) + scene_object.update_block_colors(pipeline, 0) + + for name, scene_object in scene_objects.items(): + mapper = scene_object.mapper + assert isinstance(mapper, vtkCompositePolyDataMapper) + attributes = mapper.GetCompositeDataDisplayAttributes() + assert attributes.GetBlockArrayName(block) == name + assert attributes.GetBlockScalarMode(block) == VTK_SCALAR_MODE_USE_POINT_FIELD_DATA + assert block.GetPointData().GetScalars() is None + + +def test_scenes_colour_shared_mesh_by_their_own_array() -> None: + mesh = block_with_arrays(["first", "second"]) + scene_objects = {name: SceneObject(vtkDataSetMapper()) for name in ("first", "second")} + for name, scene_object in scene_objects.items(): + scene_object.mapper.SetInputDataObject(mesh) + scene_object.color_by_array(name, 0, is_point=True) + + for name, scene_object in scene_objects.items(): + assert scene_object.mapper.GetArrayName() == name + assert scene_object.mapper.GetScalarMode() == VTK_SCALAR_MODE_USE_POINT_FIELD_DATA + assert mesh.GetPointData().GetScalars() is None From c59aa4771f8fb3e07eba1283836f1c31a79c7dcf Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Mon, 30 Nov 2026 11:44:40 +0100 Subject: [PATCH 03/22] feat: add scene lifecycle RPCs create_scene, delete_scene, add_to_scene and remove_from_scene. register_* now only create the shared db pipeline, deregister_* drop the data from every scene, import_project disposes the scenes and render targets one scene. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 111 +++++++++++++++++- opengeodeweb_viewer_typed_schemas.d.ts | 36 ++++++ .../object/object_methods.py | 109 ++++++++++------- .../rpc/image/image_protocols.py | 14 +-- .../rpc/mesh/mesh_protocols.py | 2 +- .../rpc/model/model_protocols.py | 11 +- .../rpc/utils_protocols.py | 5 +- .../rpc/viewer/schemas/__init__.py | 4 + .../rpc/viewer/schemas/add_to_scene.json | 13 ++ .../rpc/viewer/schemas/add_to_scene.py | 32 +++++ .../rpc/viewer/schemas/create_scene.json | 13 ++ .../rpc/viewer/schemas/create_scene.py | 30 +++++ .../rpc/viewer/schemas/delete_scene.json | 13 ++ .../rpc/viewer/schemas/delete_scene.py | 30 +++++ .../rpc/viewer/schemas/remove_from_scene.json | 13 ++ .../rpc/viewer/schemas/remove_from_scene.py | 32 +++++ .../rpc/viewer/schemas/render.json | 7 +- .../rpc/viewer/schemas/render.py | 3 +- .../rpc/viewer/viewer_protocols.py | 41 ++++++- src/opengeodeweb_viewer/vtk_protocol.py | 63 +++++----- tests/conftest.py | 23 +++- tests/data/images/viewer/add_to_scene.jpeg | Bin 0 -> 10754 bytes tests/test_viewer_protocols.py | 69 +++++++++++ 23 files changed, 562 insertions(+), 112 deletions(-) create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py create mode 100644 tests/data/images/viewer/add_to_scene.jpeg diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index ae66e43c..dda09032 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -5626,7 +5626,12 @@ "$id": "opengeodeweb_viewer.viewer.render", "rpc": "render", "type": "object", - "properties": {}, + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, "required": [], "additionalProperties": false, "response": { @@ -5636,6 +5641,34 @@ "additionalProperties": false } }, + "remove_from_scene": { + "$id": "opengeodeweb_viewer.viewer.remove_from_scene", + "rpc": "remove_from_scene", + "type": "object", + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, + "id": { + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 + } + }, + "required": [ + "scene_id", + "id" + ], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, "preview_points": { "$id": "opengeodeweb_viewer.viewer.preview_points", "rpc": "preview_points", @@ -5975,6 +6008,54 @@ "additionalProperties": false } }, + "delete_scene": { + "$id": "opengeodeweb_viewer.viewer.delete_scene", + "rpc": "delete_scene", + "type": "object", + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, + "create_scene": { + "$id": "opengeodeweb_viewer.viewer.create_scene", + "rpc": "create_scene", + "type": "object", + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], + "additionalProperties": false, + "response": { + "type": "object", + "properties": { + "view_id": { + "type": "string" + } + }, + "required": [ + "view_id" + ], + "additionalProperties": false + } + }, "clipping_planes": { "$id": "opengeodeweb_viewer.viewer.clipping_planes", "rpc": "clipping_planes", @@ -6084,6 +6165,34 @@ "required": [], "additionalProperties": false } + }, + "add_to_scene": { + "$id": "opengeodeweb_viewer.viewer.add_to_scene", + "rpc": "add_to_scene", + "type": "object", + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, + "id": { + "title": "DataId", + "type": "string", + "minLength": 32, + "maxLength": 32 + } + }, + "required": [ + "scene_id", + "id" + ], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } } } } diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index da71c1b6..e48fb81e 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1072,11 +1072,20 @@ export interface ViewerResetCameraResponse { } export interface ViewerRenderParams { + scene_id?: string; } export interface ViewerRenderResponse { } +export interface ViewerRemoveFromSceneParams { + id: DataId; + scene_id: string; +} + +export interface ViewerRemoveFromSceneResponse { +} + export interface ViewerPreviewPointsParams { closed?: boolean; points: Point3D[]; @@ -1155,6 +1164,21 @@ export interface ExplodedBound { id: DataId; } +export interface ViewerDeleteSceneParams { + scene_id: string; +} + +export interface ViewerDeleteSceneResponse { +} + +export interface ViewerCreateSceneParams { + scene_id: string; +} + +export interface ViewerCreateSceneResponse { + view_id: string; +} + export interface ViewerClippingPlanesParams { ids: DataId[]; planes: Plane[]; @@ -1176,6 +1200,14 @@ export interface ViewerAxesParams { export interface ViewerAxesResponse { } +export interface ViewerAddToSceneParams { + id: DataId; + scene_id: string; +} + +export interface ViewerAddToSceneResponse { +} + export interface ErrorResponse { code: number; description: string; @@ -1407,6 +1439,7 @@ export interface Schemas { readonly reset_ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_ruler"] & TypedSchema; readonly reset_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_camera"] & TypedSchema; readonly render: (typeof json)["opengeodeweb_viewer"]["viewer"]["render"] & TypedSchema; + readonly remove_from_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["remove_from_scene"] & TypedSchema; readonly preview_points: (typeof json)["opengeodeweb_viewer"]["viewer"]["preview_points"] & TypedSchema; readonly picked_ids: (typeof json)["opengeodeweb_viewer"]["viewer"]["picked_ids"] & TypedSchema; readonly pick_colormap: (typeof json)["opengeodeweb_viewer"]["viewer"]["pick_colormap"] & TypedSchema; @@ -1414,8 +1447,11 @@ export interface Schemas { readonly grid_scale: (typeof json)["opengeodeweb_viewer"]["viewer"]["grid_scale"] & TypedSchema; readonly get_point_position: (typeof json)["opengeodeweb_viewer"]["viewer"]["get_point_position"] & TypedSchema; readonly explode: (typeof json)["opengeodeweb_viewer"]["viewer"]["explode"] & TypedSchema; + readonly delete_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["delete_scene"] & TypedSchema; + readonly create_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["create_scene"] & TypedSchema; readonly clipping_planes: (typeof json)["opengeodeweb_viewer"]["viewer"]["clipping_planes"] & TypedSchema; readonly axes: (typeof json)["opengeodeweb_viewer"]["viewer"]["axes"] & TypedSchema; + readonly add_to_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["add_to_scene"] & TypedSchema; }; }; } diff --git a/src/opengeodeweb_viewer/object/object_methods.py b/src/opengeodeweb_viewer/object/object_methods.py index 98c8a08b..18033eb2 100644 --- a/src/opengeodeweb_viewer/object/object_methods.py +++ b/src/opengeodeweb_viewer/object/object_methods.py @@ -11,18 +11,21 @@ from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor from vtkmodules.vtkRenderingCore import ( vtkActor, + vtkCompositeDataDisplayAttributes, vtkCompositePolyDataMapper, vtkDataSetMapper, vtkMapper, ) # Local application imports +from opengeodeweb_viewer.scene import SceneObject from opengeodeweb_viewer.vtk_pipeline import VtkPipeline from opengeodeweb_viewer.vtk_protocol import VtkView if TYPE_CHECKING: from vtkmodules.vtkIOXML import vtkXMLReader + from opengeodeweb_viewer.scene import Scene from opengeodeweb_viewer.utils_functions import ColorClassProtocol from opengeodeweb_viewer.vtk_pipeline import ColorMapKey @@ -43,68 +46,92 @@ def register_dataset(self, data_id: str, name: str, reader: vtkXMLReader) -> Non reader.SetFileName(str(Path(self.DATA_FOLDER_PATH) / data_id / file_name)) reader.Update() - data = VtkPipeline(reader, vtkDataSetMapper()) + data = VtkPipeline(reader) self.setup_pipeline(data, name) - self.highlight(data) - self.add_object(data_id, data) + self.register_object(data_id, data) except Exception: logger.exception("Error registering %s (%s)", data_id, type(self).__name__) raise - def configure_actor(self, pipeline: VtkPipeline) -> None: - pipeline.mapper.SetColorModeToMapScalars() + def configure_actor(self, scene_object: SceneObject, data_id: str) -> None: + if self.get_viewer_data(data_id).viewer_object_type == "image": + # The scalars are the colors of the image, shown as they are + scene_object.mapper.ScalarVisibilityOn() + scene_object.mapper.SetColorModeToDirectScalars() + scene_object.actor.GetProperty().LightingOff() + scene_object.actor.PickableOff() + else: + scene_object.mapper.SetColorModeToMapScalars() - def add_object(self, data_id: str, data: VtkPipeline) -> None: - self.register_object(data_id, data) - data.actor.SetMapper(data.mapper) - self.configure_actor(data) - data.mapper.SetResolveCoincidentTopologyLineOffsetParameters(1, -0.1) - data.mapper.SetResolveCoincidentTopologyPolygonOffsetParameters(2, 0) - data.mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) - data.scalar_bar.VisibilityOff() + def add_object(self, scene: Scene, data_id: str) -> None: + if data_id in scene.objects: + return + pipeline = self.get_vtk_pipeline(data_id) + geometry_output = pipeline.filter.GetOutputDataObject(0) + mapper: vtkMapper + if isinstance(geometry_output, vtkMultiBlockDataSet): + mapper = vtkCompositePolyDataMapper() + mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) + mapper.SetInputDataObject(geometry_output) + else: + mapper = vtkDataSetMapper() + scene_object = SceneObject(mapper) + if not isinstance(geometry_output, vtkMultiBlockDataSet): + scene_object.connect_mappers(pipeline) + self.highlight(pipeline, scene_object) + scene.objects[data_id] = scene_object + scene_object.actor.SetMapper(mapper) + self.configure_actor(scene_object, data_id) + mapper.SetResolveCoincidentTopologyLineOffsetParameters(1, -0.1) + mapper.SetResolveCoincidentTopologyPolygonOffsetParameters(2, 0) + mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) + scene_object.scalar_bar.VisibilityOff() - render_window = self.getView("-1") - renderer = render_window.GetRenderers().GetFirstRenderer() + renderer = scene.renderer should_reset_camera = True actors = renderer.GetActors() actors.InitTraversal() while (actor := actors.GetNextItem()) is not None: if actor.visibility: should_reset_camera = False - renderer.AddActor(data.actor) - renderer.AddActor(data.highlight.actor) - renderer.AddViewProp(data.scalar_bar) + renderer.AddActor(scene_object.actor) + renderer.AddActor(scene_object.highlight.actor) + renderer.AddViewProp(scene_object.scalar_bar) if should_reset_camera: renderer.ResetCamera() self.mark_basemaps_dirty([data_id]) - def remove_object(self, data_id: str) -> None: - pipeline = self.get_vtk_pipeline(data_id) - render_window = self.getView("-1") - renderer = render_window.GetRenderers().GetFirstRenderer() - renderer.RemoveActor(pipeline.actor) - renderer.RemoveActor(pipeline.highlight.actor) - if pipeline.points_actor is not None: - renderer.RemoveActor(pipeline.points_actor) - if pipeline.points_scalar_bar is not None: - renderer.RemoveViewProp(pipeline.points_scalar_bar) - for size_actor in pipeline.points_size_actors.values(): + def remove_object(self, scene: Scene, data_id: str) -> None: + scene_object = scene.objects.pop(data_id) + renderer = scene.renderer + renderer.RemoveActor(scene_object.actor) + renderer.RemoveActor(scene_object.highlight.actor) + if scene_object.points_actor is not None: + renderer.RemoveActor(scene_object.points_actor) + if scene_object.points_scalar_bar is not None: + renderer.RemoveViewProp(scene_object.points_scalar_bar) + for size_actor in scene_object.points_size_actors.values(): renderer.RemoveActor(size_actor.actor) - if pipeline.edges_actor is not None: - renderer.RemoveActor(pipeline.edges_actor) - for width_actor in pipeline.edges_width_actors.values(): + if scene_object.edges_actor is not None: + renderer.RemoveActor(scene_object.edges_actor) + for width_actor in scene_object.edges_width_actors.values(): renderer.RemoveActor(width_actor.actor) - if pipeline.edges_scalar_bar is not None: - renderer.RemoveViewProp(pipeline.edges_scalar_bar) - renderer.RemoveViewProp(pipeline.scalar_bar) - for scalar_bar in pipeline.scalar_bars.values(): + if scene_object.edges_scalar_bar is not None: + renderer.RemoveViewProp(scene_object.edges_scalar_bar) + renderer.RemoveViewProp(scene_object.scalar_bar) + for scalar_bar in scene_object.scalar_bars.values(): renderer.RemoveViewProp(scalar_bar.actor) - if pipeline.basemap is not None and pipeline.basemap.drape_actor is not None: - renderer.RemoveActor(pipeline.basemap.drape_actor) + if scene_object.drape_actor is not None: + renderer.RemoveActor(scene_object.drape_actor) # Before the deregistration: an unknown id always marks them dirty self.mark_basemaps_dirty([data_id]) + + def deregister_dataset(self, data_id: str) -> None: + for scene in self.get_scenes().values(): + if data_id in scene.objects: + self.remove_object(scene, data_id) + self.mark_basemaps_dirty([data_id]) self.deregister_object(data_id) - self.update_scalar_bars_layout() def set_visibility(self, data_id: str, *, visibility: bool) -> None: pipeline = self.get_vtk_pipeline(data_id) @@ -426,8 +453,8 @@ def _apply_highlight_style(self, actor: vtkActor, mapper: vtkDataSetMapper) -> N actor.VisibilityOff() actor.UseBoundsOff() - def highlight(self, pipeline: VtkPipeline) -> None: - highlight = pipeline.highlight + def highlight(self, pipeline: VtkPipeline, scene_object: SceneObject) -> None: + highlight = scene_object.highlight self._apply_highlight_style(highlight.actor, highlight.mapper) if pipeline.filter.GetNumberOfInputConnections(0) == 0: pipeline.filter.SetInputConnection(pipeline.reader.GetOutputPort()) diff --git a/src/opengeodeweb_viewer/rpc/image/image_protocols.py b/src/opengeodeweb_viewer/rpc/image/image_protocols.py index b31e1648..23e4d21c 100644 --- a/src/opengeodeweb_viewer/rpc/image/image_protocols.py +++ b/src/opengeodeweb_viewer/rpc/image/image_protocols.py @@ -1,6 +1,5 @@ # Standard library imports from pathlib import Path -from typing import TYPE_CHECKING, override # Third party imports from opengeodeweb_microservice.schemas import get_schemas_dict @@ -12,9 +11,6 @@ from . import schemas -if TYPE_CHECKING: - from opengeodeweb_viewer.vtk_pipeline import VtkPipeline - class VtkImageView(VtkObjectView): image_prefix = "opengeodeweb_viewer.image." @@ -23,14 +19,6 @@ class VtkImageView(VtkObjectView): def __init__(self) -> None: super().__init__() - @override - def configure_actor(self, pipeline: VtkPipeline) -> None: - # The scalars are the colors of the image, shown as they are - pipeline.mapper.ScalarVisibilityOn() - pipeline.mapper.SetColorModeToDirectScalars() - pipeline.actor.GetProperty().LightingOff() - pipeline.actor.PickableOff() - @typed_rpc(image_prefix, schemas.register_route) def register_image(self, params: schemas.Register) -> schemas.RegisterResponse: self.register_dataset(params.id, params.name, vtkXMLImageDataReader()) @@ -38,7 +26,7 @@ def register_image(self, params: schemas.Register) -> schemas.RegisterResponse: @typed_rpc(image_prefix, schemas.deregister_route) def deregister_image(self, params: schemas.Deregister) -> schemas.DeregisterResponse: - self.remove_object(params.id) + self.deregister_dataset(params.id) return schemas.DeregisterResponse() @typed_rpc(image_prefix, schemas.visibility_route) diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py index 87eeae78..4ced59e8 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py @@ -74,7 +74,7 @@ def register_mesh(self, params: schemas.Register) -> schemas.RegisterResponse: @typed_rpc(mesh_prefix, schemas.deregister_route) def deregister_mesh(self, params: schemas.Deregister) -> schemas.DeregisterResponse: - self.remove_object(params.id) + self.deregister_dataset(params.id) return schemas.DeregisterResponse() @typed_rpc(mesh_prefix, schemas.visibility_route) diff --git a/src/opengeodeweb_viewer/rpc/model/model_protocols.py b/src/opengeodeweb_viewer/rpc/model/model_protocols.py index 3e762160..f86c4b01 100644 --- a/src/opengeodeweb_viewer/rpc/model/model_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/model_protocols.py @@ -16,7 +16,6 @@ from vtkmodules.vtkIOXML import vtkXMLMultiBlockDataReader from vtkmodules.vtkRenderingCore import ( vtkActor, - vtkCompositeDataDisplayAttributes, vtkCompositePolyDataMapper, ) @@ -494,12 +493,8 @@ def register_model(self, params: schemas.Register) -> schemas.RegisterResponse: reader.SetFileName(str(vtm_path)) prefetch_vtm_pieces(vtm_path) reader.Update() - mapper = vtkCompositePolyDataMapper() - attributes = vtkCompositeDataDisplayAttributes() - mapper.SetCompositeDataDisplayAttributes(attributes) - data = VtkPipeline(reader, mapper) + data = VtkPipeline(reader) geometry_output = cast("vtkMultiBlockDataSet", self.setup_pipeline(data, params.name)) - self.highlight(data) iterator = geometry_output.NewTreeIterator() iterator.InitTraversal() while not iterator.IsDoneWithTraversal(): @@ -514,7 +509,7 @@ def register_model(self, params: schemas.Register) -> schemas.RegisterResponse: name = meta.Get(vtkCompositeDataSet.NAME()) data.block_geode_ids.append(name) iterator.GoToNextItem() - self.add_object(data_id, data) + self.register_object(data_id, data) except Exception: logger.exception("Error registering model %s", data_id) raise @@ -522,7 +517,7 @@ def register_model(self, params: schemas.Register) -> schemas.RegisterResponse: @typed_rpc(model_prefix, schemas.deregister_route) def deregister_model(self, params: schemas.Deregister) -> schemas.DeregisterResponse: - self.remove_object(params.id) + self.deregister_dataset(params.id) return schemas.DeregisterResponse() @typed_rpc(model_prefix, schemas.visibility_route) diff --git a/src/opengeodeweb_viewer/rpc/utils_protocols.py b/src/opengeodeweb_viewer/rpc/utils_protocols.py index 8eb38adf..42d076a8 100644 --- a/src/opengeodeweb_viewer/rpc/utils_protocols.py +++ b/src/opengeodeweb_viewer/rpc/utils_protocols.py @@ -41,8 +41,9 @@ def rendering_warnings( @typed_rpc(utils_prefix, schemas.import_project_route) def import_project(self, _params: schemas.ImportProject) -> schemas.ImportProjectResponse: - # Keep the widget and grid scale from the preceding reset_visualization: - # the scene style is applied to them after the import + for scene in self.get_scenes().values(): + scene.dispose() + self.get_scenes().clear() self.get_data_base().clear() self._release_database() diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py index e16c1379..312f545a 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py @@ -13,6 +13,7 @@ from .reset_ruler import * from .reset_camera import * from .render import * +from .remove_from_scene import * from .preview_points import * from .picked_ids import * from .pick_colormap import * @@ -20,5 +21,8 @@ from .grid_scale import * from .get_point_position import * from .explode import * +from .delete_scene import * +from .create_scene import * from .clipping_planes import * from .axes import * +from .add_to_scene import * diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json new file mode 100644 index 00000000..58bbb0b1 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json @@ -0,0 +1,13 @@ +{ + "rpc": "add_to_scene", + "type": "object", + "properties": {"scene_id": { "type": "string", "minLength": 1 }, "id": {"title": "DataId"}}, + "required": ["scene_id", "id"], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } +} diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py new file mode 100644 index 00000000..bf78ade8 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py @@ -0,0 +1,32 @@ +from opengeodeweb_microservice.schema_types import DataId +from pathlib import Path +from opengeodeweb_microservice.schemas import Route, load_schema +from dataclasses_json import DataClassJsonMixin +from opengeodeweb_microservice.schemas import print_dataclass +from dataclasses import dataclass + + +@dataclass +class AddToScene(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + id: DataId + scene_id: str + + +@dataclass +class AddToSceneResponse(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + pass + + +add_to_scene_route = Route( + schema=load_schema(Path(__file__)), + params=AddToScene, + response=AddToSceneResponse, +) + +__all__ = ["AddToScene", "AddToSceneResponse", "add_to_scene_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json new file mode 100644 index 00000000..05bec578 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json @@ -0,0 +1,13 @@ +{ + "rpc": "create_scene", + "type": "object", + "properties": {"scene_id": { "type": "string", "minLength": 1 }}, + "required": ["scene_id"], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {"view_id": {"type": "string"}}, + "required": ["view_id"], + "additionalProperties": false + } +} diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py new file mode 100644 index 00000000..c682d176 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py @@ -0,0 +1,30 @@ +from pathlib import Path +from opengeodeweb_microservice.schemas import Route, load_schema +from dataclasses_json import DataClassJsonMixin +from opengeodeweb_microservice.schemas import print_dataclass +from dataclasses import dataclass + + +@dataclass +class CreateScene(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + scene_id: str + + +@dataclass +class CreateSceneResponse(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + view_id: str + + +create_scene_route = Route( + schema=load_schema(Path(__file__)), + params=CreateScene, + response=CreateSceneResponse, +) + +__all__ = ["CreateScene", "CreateSceneResponse", "create_scene_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json new file mode 100644 index 00000000..81a9498f --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json @@ -0,0 +1,13 @@ +{ + "rpc": "delete_scene", + "type": "object", + "properties": {"scene_id": { "type": "string", "minLength": 1 }}, + "required": ["scene_id"], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } +} diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py new file mode 100644 index 00000000..efbe1716 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py @@ -0,0 +1,30 @@ +from pathlib import Path +from opengeodeweb_microservice.schemas import Route, load_schema +from dataclasses_json import DataClassJsonMixin +from opengeodeweb_microservice.schemas import print_dataclass +from dataclasses import dataclass + + +@dataclass +class DeleteScene(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + scene_id: str + + +@dataclass +class DeleteSceneResponse(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + pass + + +delete_scene_route = Route( + schema=load_schema(Path(__file__)), + params=DeleteScene, + response=DeleteSceneResponse, +) + +__all__ = ["DeleteScene", "DeleteSceneResponse", "delete_scene_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json new file mode 100644 index 00000000..faefcb5e --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json @@ -0,0 +1,13 @@ +{ + "rpc": "remove_from_scene", + "type": "object", + "properties": {"scene_id": { "type": "string", "minLength": 1 }, "id": {"title": "DataId"}}, + "required": ["scene_id", "id"], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } +} diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py new file mode 100644 index 00000000..ebc848cc --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py @@ -0,0 +1,32 @@ +from opengeodeweb_microservice.schema_types import DataId +from pathlib import Path +from opengeodeweb_microservice.schemas import Route, load_schema +from dataclasses_json import DataClassJsonMixin +from opengeodeweb_microservice.schemas import print_dataclass +from dataclasses import dataclass + + +@dataclass +class RemoveFromScene(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + id: DataId + scene_id: str + + +@dataclass +class RemoveFromSceneResponse(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + pass + + +remove_from_scene_route = Route( + schema=load_schema(Path(__file__)), + params=RemoveFromScene, + response=RemoveFromSceneResponse, +) + +__all__ = ["RemoveFromScene", "RemoveFromSceneResponse", "remove_from_scene_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json index 83b80416..9985205b 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json @@ -1,7 +1,12 @@ { "rpc": "render", "type": "object", - "properties": {}, + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, "required": [], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py index fcfb8b4d..ddff501c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py @@ -3,6 +3,7 @@ from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass +from typing import Optional @dataclass @@ -10,7 +11,7 @@ class Render(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - pass + scene_id: Optional[str] = None @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index bf200f16..adb37b5b 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -36,21 +36,22 @@ ) from vtkmodules.vtkRenderingUI import vtkGenericRenderWindowInteractor +from opengeodeweb_viewer.object.object_methods import VtkObjectView from opengeodeweb_viewer.orientation_marker import NO_MARKER, build_marker, style_marker from opengeodeweb_viewer.rpc.viewer import schemas from opengeodeweb_viewer.rpc.viewer.schemas.explode import ExplodedBound +from opengeodeweb_viewer.scene import Scene from opengeodeweb_viewer.text_style import TextStyle from opengeodeweb_viewer.typed_rpc import typed_rpc # Local application imports from opengeodeweb_viewer.vtk_pipeline import ClippingPlanePreview, RulerPipeline -from opengeodeweb_viewer.vtk_protocol import VtkView MIN_CLOSED_CURVE_POINTS = 2 MIN_SURFACE_POINTS = 3 -class VtkViewerView(VtkView): +class VtkViewerView(VtkObjectView): viewer_prefix = "opengeodeweb_viewer.viewer." viewer_schemas_dict = get_schemas_dict(Path(__file__).parent / "schemas") @@ -59,6 +60,38 @@ def __init__(self) -> None: self._preview_actor: vtkActor | None = None self._clipping_plane_previews: list[ClippingPlanePreview] = [] + @typed_rpc(viewer_prefix, schemas.create_scene_route) + def create_scene(self, params: schemas.CreateScene) -> schemas.CreateSceneResponse: + scenes = self.get_scenes() + if params.scene_id in scenes: + raise ValueError( + { + "code": 409, + "name": "Conflict", + "description": f"Scene {params.scene_id} already exists", + } + ) + scene = Scene.create(params.scene_id, self.getApplication().GetObjectIdMap()) + scenes[params.scene_id] = scene + return schemas.CreateSceneResponse(view_id=scene.view_id) + + @typed_rpc(viewer_prefix, schemas.delete_scene_route) + def delete_scene(self, params: schemas.DeleteScene) -> schemas.DeleteSceneResponse: + # The data pipelines stay in the db: only the scene and its objects go + self.get_scene(params.scene_id).dispose() + del self.get_scenes()[params.scene_id] + return schemas.DeleteSceneResponse() + + @typed_rpc(viewer_prefix, schemas.add_to_scene_route) + def add_to_scene(self, params: schemas.AddToScene) -> schemas.AddToSceneResponse: + self.add_object(self.get_scene(params.scene_id), params.id) + return schemas.AddToSceneResponse() + + @typed_rpc(viewer_prefix, schemas.remove_from_scene_route) + def remove_from_scene(self, params: schemas.RemoveFromScene) -> schemas.RemoveFromSceneResponse: + self.remove_object(self.get_scene(params.scene_id), params.id) + return schemas.RemoveFromSceneResponse() + @typed_rpc(viewer_prefix, schemas.reset_visualization_route) def reset_visualization( self, _params: schemas.ResetVisualization @@ -347,8 +380,8 @@ def update_camera(self, params: schemas.UpdateCamera) -> schemas.UpdateCameraRes return schemas.UpdateCameraResponse() @typed_rpc(viewer_prefix, schemas.render_route) - def render_now(self, _params: schemas.Render) -> schemas.RenderResponse: - self.render() + def render_now(self, params: schemas.Render) -> schemas.RenderResponse: + self.render(params.scene_id) return schemas.RenderResponse() @typed_rpc(viewer_prefix, schemas.highlight_route) diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index 3cd45115..6d0a953d 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -181,14 +181,10 @@ def get_data_file_path(self, data_id: str, filename: str | None = None) -> str: return str(Path(data_folder_path) / data_id / filename) - def reset_camera_clipping_range(self) -> None: - renderer = self.get_renderer() - grid_scale = self.get_grid_scale() - if grid_scale is not None and grid_scale.GetVisibility(): - grid_scale.UseBoundsOn() - renderer.ResetCameraClippingRange() - else: - renderer.ResetCameraClippingRange() + def reset_camera_clipping_range(self, scene: Scene) -> None: + if scene.grid_scale.GetVisibility(): + scene.grid_scale.UseBoundsOn() + scene.renderer.ResetCameraClippingRange() def setup_pipeline(self, pipeline: VtkPipeline, name: str) -> vtkDataObject | None: pipeline.filter.SetInputConnection(pipeline.reader.GetOutputPort()) @@ -196,10 +192,6 @@ def setup_pipeline(self, pipeline: VtkPipeline, name: str) -> vtkDataObject | No geometry_output: vtkDataObject | None = pipeline.filter.GetOutputDataObject(0) if geometry_output: geometry_output.SetObjectName(name) - if isinstance(pipeline.mapper, vtkCompositePolyDataMapper): - pipeline.mapper.SetInputDataObject(geometry_output) - else: - pipeline.connect_mappers() return geometry_output def update_highlight( @@ -481,26 +473,24 @@ def extract_picked_attributes( attributes["coordinates"] = list(coords) return attributes - def update_grid_scale_and_clipping_range(self) -> None: - grid_scale = self.get_grid_scale() - if grid_scale is not None: - renderer = self.get_renderer() - if not grid_scale.GetVisibility(): - self.fit_grid_scale_to_visible_props( - grid_scale, renderer, basemap_actors(self.get_data_base()) - ) - final_bounds = list(grid_scale.GetBounds()) - if final_bounds[0] <= final_bounds[1]: - for axis in range(3): - dist = self._axis_display_length(renderer, final_bounds, axis) - self._update_grid_scale_axis_labels(grid_scale, final_bounds, axis, dist) - self.reset_camera_clipping_range() + def update_grid_scale_and_clipping_range(self, scene: Scene) -> None: + grid_scale = scene.grid_scale + renderer = scene.renderer + if not grid_scale.GetVisibility(): + self.fit_grid_scale_to_visible_props( + grid_scale, renderer, basemap_actors(self.get_data_base()) + ) + final_bounds = list(grid_scale.GetBounds()) + if final_bounds[0] <= final_bounds[1]: + for axis in range(3): + dist = self._axis_display_length(renderer, final_bounds, axis) + self._update_grid_scale_axis_labels(grid_scale, final_bounds, axis, dist) + self.reset_camera_clipping_range(scene) def fit_grid_scale(self) -> None: - grid_scale = self.get_grid_scale() - if grid_scale is not None: + for scene in self.get_scenes().values(): self.fit_grid_scale_to_visible_props( - grid_scale, self.get_renderer(), basemap_actors(self.get_data_base()) + scene.grid_scale, scene.renderer, basemap_actors(self.get_data_base()) ) @staticmethod @@ -684,12 +674,15 @@ def update_scalar_bars_layout(self) -> None: bar.SetWidth(actual_width) bar.SetHeight(bar_height) - def render(self, view: int = -1) -> None: - if self.getSharedObject("basemaps_dirty"): - self.coreServer.setSharedObject("basemaps_dirty", False) # noqa: FBT003 VTK API - update_basemaps(self.get_data_base(), self.get_renderer()) - self.update_grid_scale_and_clipping_range() - self.getSharedObject("publisher").imagePush({"view": view}) + def render(self, scene_id: str | None = None) -> None: + """Push the image of a scene, of every scene when none is given.""" + scenes = [self.get_scene(scene_id)] if scene_id is not None else self.get_scenes().values() + for scene in scenes: + if self.getSharedObject("basemaps_dirty"): + self.coreServer.setSharedObject("basemaps_dirty", False) # noqa: FBT003 VTK API + update_basemaps(self.get_data_base(), scene.renderer) + self.update_grid_scale_and_clipping_range(scene) + self.getSharedObject("publisher").imagePush({"view": scene.view_id}) def register_object(self, data_id: str, data: VtkPipeline) -> None: self.get_data_base()[data_id] = data diff --git a/tests/conftest.py b/tests/conftest.py index 5ec82428..9591ddb2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -42,8 +42,8 @@ def __init__(self, log: str, port: str = "1234") -> None: self.images_dir_path = Path(__file__).parent.resolve() / "data" / "images" self.test_output_dir = Path(__file__).parent.resolve() / "tests_output" self.test_output_dir.mkdir(exist_ok=True) + self.view_ids: dict[str, str] = {} self._init_ws() - self._drain_initial_messages() def send(self, message: dict[str, Any]) -> None: # wslink 2 messages are msgpack-encoded and sent as (here, a single) binary chunk @@ -114,14 +114,28 @@ def images_diff(self, first_image_path: Path, second_image_path: Path) -> float: logger.info("thresholded error=%s", images_diff.GetThresholdedError()) return images_diff.GetThresholdedError() - def compare_image(self, filename: str) -> bool: - self.call(VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["render"]["rpc"]) + def create_scene(self, scene_id: str = "scene_1") -> str: + self.call("opengeodeweb_viewer.viewer.create_scene", [{"scene_id": scene_id}]) + view_id = str(self.get_result("opengeodeweb_viewer.viewer.create_scene")["view_id"]) + self.view_ids[scene_id] = view_id + self.call("viewport.image.push.observer.add", [view_id]) + self._drain_initial_messages() + return view_id + + def compare_image(self, filename: str, scene_id: str = "scene_1") -> bool: + view_id = self.view_ids[scene_id] + self.call( + VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["render"]["rpc"], + [{"scene_id": scene_id}], + ) while True: response = self.get_response() result = response.get("result") if not isinstance(result, dict) or "image" not in result: logger.info("response = %s", response) continue + if str(result.get("id")) != view_id: + continue logger.info("response=%s", {**result, "image": f"<{len(result['image'])} bytes>"}) if result["stale"]: continue @@ -138,12 +152,11 @@ def _init_ws(self) -> None: "args": [{"secret": "wslink-secret"}], } ) - self.call("viewport.image.push.observer.add", [-1]) def _drain_initial_messages(self, timeout: float = 10.0) -> None: self.ws.settimeout(timeout) self.get_result("viewport.image.push.observer.add") - # A fresh viewer then publishes its initial image, a reused one may not + # A fresh view then publishes its initial image, a reused one may not self.ws.settimeout(INITIAL_IMAGE_TIMEOUT) try: while True: diff --git a/tests/data/images/viewer/add_to_scene.jpeg b/tests/data/images/viewer/add_to_scene.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ccc6207cccb1d00cda3f869ec6106e370ff722fe GIT binary patch literal 10754 zcmb_?bx<8$llR<NyH)$w zerM{|OyBO)r)R3Wr%(UpW#MHVK$Vr0kpw^>006xnz{@fq_DcQV#vdjBHw~||UwQyE zSP%n<0Rlt@fYCq@XrPxqfaujoFc{*M5Bwc4uu#wtkZ@oS{3{>#mGR2`%lmT%LqI}7 zzbpZW5U*2FAy8lMwEe&G|Bu&DwhZ=IN?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qOqRsc%7MOe$I8-}mC{2=kiRZ`{lB8xC@8V3vLnT?M)po@l*^(Lfvc2}L<@q|f-zuy zX#@kHM8Xjm*aDG9aI!a56U?&36plR;1Kw3-%uDo|G@gA|D*+2Z0W?_E|4 zMe$1ttl-42;u?;WlCa=kfvrz5KblfoY>vLs2Kc}A=nN?>y None: + server.create_scene() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"] @@ -637,3 +638,71 @@ def test_ruler(server: ServerMonitor) -> None: ], ) assert server.compare_image("viewer/ruler.jpeg") + + +def register_hat(server: ServerMonitor, dataset_factory: Callable[..., str]) -> str: + data_id = "00000000000000000000000123456789" + dataset_factory(data_id=data_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.call( + VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], + [{"id": data_id, "name": "hat.vtp"}], + ) + server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) + return data_id + + +def scene_rpc(server: ServerMonitor, name: str, params: dict[str, str]) -> dict[str, object]: + rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict[name]["rpc"] + server.call(rpc, [params]) + return server.get_rpc_response(rpc) + + +def test_create_scene(server: ServerMonitor) -> None: + first_view_id = server.create_scene() + second_view_id = server.create_scene("scene_2") + assert first_view_id != second_view_id + + +def test_add_to_scene_shares_pipeline( + server: ServerMonitor, dataset_factory: Callable[..., str] +) -> None: + server.create_scene() + server.create_scene("scene_2") + data_id = register_hat(server, dataset_factory) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) + assert server.compare_image("viewer/add_to_scene.jpeg", "scene_1") + assert server.compare_image("viewer/add_to_scene.jpeg", "scene_2") + + +def test_empty_scene_stays_empty( + server: ServerMonitor, dataset_factory: Callable[..., str] +) -> None: + server.create_scene() + server.create_scene("scene_2") + data_id = register_hat(server, dataset_factory) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) + assert server.compare_image("viewer/add_to_scene.jpeg", "scene_1") + assert server.compare_image("viewer/reset_visualization.jpeg", "scene_2") + + +def test_remove_from_scene_keeps_data( + server: ServerMonitor, dataset_factory: Callable[..., str] +) -> None: + server.create_scene() + server.create_scene("scene_2") + data_id = register_hat(server, dataset_factory) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) + scene_rpc(server, "remove_from_scene", {"scene_id": "scene_1", "id": data_id}) + assert server.compare_image("viewer/reset_visualization.jpeg", "scene_1") + assert server.compare_image("viewer/add_to_scene.jpeg", "scene_2") + + +def test_delete_scene(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: + server.create_scene() + server.create_scene("scene_2") + data_id = register_hat(server, dataset_factory) + scene_rpc(server, "delete_scene", {"scene_id": "scene_2"}) + response = scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) + assert "error" in response From c1817234ce947e6ce590bc6cf26f3766f356578b Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Mon, 30 Nov 2026 11:57:33 +0100 Subject: [PATCH 04/22] feat: target viewer RPCs at a scene Camera, picking, widgets, filters, ruler, preview and render RPCs require a scene_id and act on that scene only. render is per scene, basemaps_dirty is a per-scene flag and the basemap update reads the scene objects. remove_from_scene and deregistration relayout the scalar bars of the scene. Removing a data absent from a scene is a structured 404. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 137 ++++++++- opengeodeweb_viewer_typed_schemas.d.ts | 63 +++-- src/opengeodeweb_viewer/basemap_pipeline.py | 128 +++++---- .../object/object_methods.py | 7 +- .../rpc/viewer/schemas/axes.json | 5 + .../rpc/viewer/schemas/axes.py | 1 + .../rpc/viewer/schemas/clipping_planes.json | 5 + .../rpc/viewer/schemas/clipping_planes.py | 1 + .../rpc/viewer/schemas/explode.json | 5 + .../rpc/viewer/schemas/explode.py | 1 + .../viewer/schemas/get_point_position.json | 5 + .../rpc/viewer/schemas/get_point_position.py | 1 + .../rpc/viewer/schemas/grid_scale.json | 5 + .../rpc/viewer/schemas/grid_scale.py | 1 + .../rpc/viewer/schemas/highlight.json | 5 + .../rpc/viewer/schemas/highlight.py | 1 + .../rpc/viewer/schemas/pick_colormap.json | 5 + .../rpc/viewer/schemas/pick_colormap.py | 1 + .../rpc/viewer/schemas/picked_ids.json | 5 + .../rpc/viewer/schemas/picked_ids.py | 1 + .../rpc/viewer/schemas/preview_points.json | 5 + .../rpc/viewer/schemas/preview_points.py | 1 + .../rpc/viewer/schemas/render.json | 4 +- .../rpc/viewer/schemas/render.py | 3 +- .../rpc/viewer/schemas/reset_camera.json | 11 +- .../rpc/viewer/schemas/reset_camera.py | 2 +- .../rpc/viewer/schemas/reset_ruler.json | 11 +- .../rpc/viewer/schemas/reset_ruler.py | 2 +- .../viewer/schemas/reset_visualization.json | 11 +- .../rpc/viewer/schemas/reset_visualization.py | 2 +- .../rpc/viewer/schemas/ruler.json | 5 + .../rpc/viewer/schemas/ruler.py | 1 + .../viewer/schemas/set_background_color.json | 5 + .../viewer/schemas/set_background_color.py | 1 + .../schemas/set_orientation_widget.json | 5 + .../viewer/schemas/set_orientation_widget.py | 1 + .../rpc/viewer/schemas/set_text_style.json | 5 + .../rpc/viewer/schemas/set_text_style.py | 1 + .../rpc/viewer/schemas/set_z_scaling.json | 5 + .../rpc/viewer/schemas/set_z_scaling.py | 1 + .../rpc/viewer/schemas/shrink.json | 5 + .../rpc/viewer/schemas/shrink.py | 1 + .../rpc/viewer/schemas/slice.json | 5 + .../rpc/viewer/schemas/slice.py | 1 + .../rpc/viewer/schemas/take_screenshot.json | 5 + .../rpc/viewer/schemas/take_screenshot.py | 1 + .../rpc/viewer/schemas/threshold.json | 5 + .../rpc/viewer/schemas/threshold.py | 1 + .../rpc/viewer/schemas/update_camera.json | 5 + .../rpc/viewer/schemas/update_camera.py | 1 + .../rpc/viewer/schemas/update_data.json | 5 + .../rpc/viewer/schemas/update_data.py | 1 + .../rpc/viewer/viewer_protocols.py | 265 +++++++----------- src/opengeodeweb_viewer/scene/scene.py | 3 + src/opengeodeweb_viewer/scene/scene_object.py | 3 + src/opengeodeweb_viewer/vtk_pipeline.py | 2 - src/opengeodeweb_viewer/vtk_protocol.py | 172 +++++++----- tests/conftest.py | 19 +- tests/data/images/viewer/clipping_planes.jpeg | Bin 9200 -> 10095 bytes .../images/viewer/clipping_then_shrink.jpeg | Bin 7139 -> 8302 bytes .../data/images/viewer/polygon_attribute.jpeg | Bin 6217 -> 6001 bytes tests/data/images/viewer/render.jpeg | Bin 14567 -> 15300 bytes tests/data/images/viewer/reset_camera.jpeg | Bin 1072 -> 2119 bytes .../images/viewer/set_background_color.jpeg | Bin 1076 -> 2356 bytes tests/data/images/viewer/set_z_scaling.jpeg | Bin 9927 -> 10137 bytes tests/data/images/viewer/shrink.jpeg | Bin 12477 -> 13749 bytes .../take_screenshot_with_background.jpg | Bin 6339 -> 7160 bytes .../take_screenshot_with_background.png | Bin 8873 -> 10371 bytes .../take_screenshot_without_background.png | Bin 10335 -> 12088 bytes tests/data/images/viewer/update_camera.jpeg | Bin 14567 -> 15300 bytes .../viewer/vertex_and_polygon_attribute.jpeg | Bin 8640 -> 8747 bytes tests/test_basemap_drape.py | 10 +- tests/test_viewer_protocols.py | 228 ++++++++++----- 73 files changed, 800 insertions(+), 403 deletions(-) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index dda09032..0889ec78 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -5090,6 +5090,10 @@ "rpc": "update_data", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -5098,6 +5102,7 @@ } }, "required": [ + "scene_id", "id" ], "additionalProperties": false, @@ -5113,6 +5118,10 @@ "rpc": "update_camera", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "camera_options": { "type": "object", "properties": { @@ -5162,6 +5171,7 @@ } }, "required": [ + "scene_id", "camera_options" ], "response": { @@ -5176,6 +5186,10 @@ "rpc": "threshold", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -5227,6 +5241,7 @@ } }, "required": [ + "scene_id", "ids", "attributes" ], @@ -5243,6 +5258,10 @@ "rpc": "take_screenshot", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "filename": { "title": "Filename", "type": "string", @@ -5271,6 +5290,7 @@ } }, "required": [ + "scene_id", "filename", "output_extension", "include_background" @@ -5294,6 +5314,10 @@ "rpc": "slice", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -5327,6 +5351,7 @@ } }, "required": [ + "scene_id", "ids", "slices" ], @@ -5354,6 +5379,10 @@ "rpc": "shrink", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -5370,6 +5399,7 @@ } }, "required": [ + "scene_id", "ids", "shrink_factor" ], @@ -5386,12 +5416,17 @@ "rpc": "set_z_scaling", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "z_scale": { "type": "number", "minimum": 1 } }, "required": [ + "scene_id", "z_scale" ], "additionalProperties": false, @@ -5407,6 +5442,10 @@ "rpc": "set_text_style", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "color": { "title": "ColorRGB", "type": "object", @@ -5450,6 +5489,7 @@ } }, "required": [ + "scene_id", "color", "font_family", "opacity" @@ -5467,6 +5507,10 @@ "rpc": "set_orientation_widget", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "marker": { "type": "string", "enum": [ @@ -5477,6 +5521,7 @@ } }, "required": [ + "scene_id", "marker" ], "additionalProperties": false, @@ -5492,6 +5537,10 @@ "rpc": "set_background_color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "color": { "title": "ColorRGB", "type": "object", @@ -5521,6 +5570,7 @@ } }, "required": [ + "scene_id", "color" ], "additionalProperties": false, @@ -5536,6 +5586,10 @@ "rpc": "ruler", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "points": { "type": "array", "items": { @@ -5551,6 +5605,7 @@ } }, "required": [ + "scene_id", "points" ], "additionalProperties": false, @@ -5584,8 +5639,15 @@ "$id": "opengeodeweb_viewer.viewer.reset_visualization", "rpc": "reset_visualization", "type": "object", - "properties": {}, - "required": [], + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", @@ -5598,8 +5660,15 @@ "$id": "opengeodeweb_viewer.viewer.reset_ruler", "rpc": "reset_ruler", "type": "object", - "properties": {}, - "required": [], + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", @@ -5612,8 +5681,15 @@ "$id": "opengeodeweb_viewer.viewer.reset_camera", "rpc": "reset_camera", "type": "object", - "properties": {}, - "required": [], + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", @@ -5632,7 +5708,9 @@ "minLength": 1 } }, - "required": [], + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", @@ -5674,6 +5752,10 @@ "rpc": "preview_points", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "points": { "type": "array", "items": { @@ -5711,6 +5793,7 @@ } }, "required": [ + "scene_id", "points", "style" ], @@ -5727,6 +5810,10 @@ "rpc": "picked_ids", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "number" }, @@ -5744,6 +5831,7 @@ } }, "required": [ + "scene_id", "x", "y", "ids" @@ -5778,6 +5866,10 @@ "rpc": "pick_colormap", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "number" }, @@ -5786,6 +5878,7 @@ } }, "required": [ + "scene_id", "x", "y" ], @@ -5812,6 +5905,10 @@ "rpc": "highlight", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "number" }, @@ -5835,6 +5932,7 @@ } }, "required": [ + "scene_id", "x", "y", "field_type", @@ -5892,12 +5990,17 @@ "rpc": "grid_scale", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "visibility": { "title": "Visibility", "type": "boolean" } }, "required": [ + "scene_id", "visibility" ], "additionalProperties": false, @@ -5913,6 +6016,10 @@ "rpc": "get_point_position", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "integer" }, @@ -5921,6 +6028,7 @@ } }, "required": [ + "scene_id", "x", "y" ], @@ -5951,6 +6059,10 @@ "rpc": "explode", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -5967,6 +6079,7 @@ } }, "required": [ + "scene_id", "ids", "explode_factor" ], @@ -6061,6 +6174,10 @@ "rpc": "clipping_planes", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -6134,6 +6251,7 @@ } }, "required": [ + "scene_id", "ids", "planes" ], @@ -6150,12 +6268,17 @@ "rpc": "axes", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "visibility": { "title": "Visibility", "type": "boolean" } }, "required": [ + "scene_id", "visibility" ], "additionalProperties": false, diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index e48fb81e..ce87f15b 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -932,7 +932,8 @@ export interface ImportProjectResponse { } export interface ViewerUpdateDataParams { - id: DataId; + id: DataId; + scene_id: string; } export interface ViewerUpdateDataResponse { @@ -940,6 +941,7 @@ export interface ViewerUpdateDataResponse { export interface ViewerUpdateCameraParams { camera_options: CameraOptions; + scene_id: string; [property: string]: any; } @@ -958,6 +960,7 @@ export interface ViewerUpdateCameraResponse { export interface ViewerThresholdParams { attributes: AttributeElement[]; ids: DataId[]; + scene_id: string; } export interface AttributeElement { @@ -978,6 +981,7 @@ export interface ViewerTakeScreenshotParams { height?: number; include_background: boolean; output_extension: OutputExtension; + scene_id: string; width?: number; } @@ -988,8 +992,9 @@ export interface ViewerTakeScreenshotResponse { } export interface ViewerSliceParams { - ids: DataId[]; - slices: Slice[]; + ids: DataId[]; + scene_id: string; + slices: Slice[]; } export interface Slice { @@ -1003,6 +1008,7 @@ export interface ViewerSliceResponse { export interface ViewerShrinkParams { ids: DataId[]; + scene_id: string; shrink_factor: number; } @@ -1010,7 +1016,8 @@ export interface ViewerShrinkResponse { } export interface ViewerSetZScalingParams { - z_scale: number; + scene_id: string; + z_scale: number; } export interface ViewerSetZScalingResponse { @@ -1020,6 +1027,7 @@ export interface ViewerSetTextStyleParams { color: ColorRGB; font_family: FontFamily; opacity: Opacity; + scene_id: string; } export type FontFamily = "arial" | "courier" | "times"; @@ -1028,7 +1036,8 @@ export interface ViewerSetTextStyleResponse { } export interface ViewerSetOrientationWidgetParams { - marker: Marker; + marker: Marker; + scene_id: string; } export type Marker = "axes" | "compass" | "none"; @@ -1037,14 +1046,16 @@ export interface ViewerSetOrientationWidgetResponse { } export interface ViewerSetBackgroundColorParams { - color: ColorRGB; + color: ColorRGB; + scene_id: string; } export interface ViewerSetBackgroundColorResponse { } export interface ViewerRulerParams { - points: Array; + points: Array; + scene_id: string; } export interface ViewerRulerResponse { @@ -1054,25 +1065,28 @@ export interface ViewerRulerResponse { } export interface ViewerResetVisualizationParams { + scene_id: string; } export interface ViewerResetVisualizationResponse { } export interface ViewerResetRulerParams { + scene_id: string; } export interface ViewerResetRulerResponse { } export interface ViewerResetCameraParams { + scene_id: string; } export interface ViewerResetCameraResponse { } export interface ViewerRenderParams { - scene_id?: string; + scene_id: string; } export interface ViewerRenderResponse { @@ -1087,9 +1101,10 @@ export interface ViewerRemoveFromSceneResponse { } export interface ViewerPreviewPointsParams { - closed?: boolean; - points: Point3D[]; - style: Style; + closed?: boolean; + points: Point3D[]; + scene_id: string; + style: Style; } export type Style = "points" | "curve" | "surface"; @@ -1098,9 +1113,10 @@ export interface ViewerPreviewPointsResponse { } export interface ViewerPickedIDSParams { - ids: DataId[]; - x: number; - y: number; + ids: DataId[]; + scene_id: string; + x: number; + y: number; } export interface ViewerPickedIDSResponse { @@ -1109,8 +1125,9 @@ export interface ViewerPickedIDSResponse { } export interface ViewerPickColormapParams { - x: number; - y: number; + scene_id: string; + x: number; + y: number; [property: string]: any; } @@ -1122,6 +1139,7 @@ export interface ViewerPickColormapResponse { export interface ViewerHighlightParams { field_type: PickedFieldType; ids: DataId[]; + scene_id: string; x: number; y: number; } @@ -1137,6 +1155,7 @@ export interface ViewerHighlightResponse { } export interface ViewerGridScaleParams { + scene_id: string; visibility: Visibility; } @@ -1144,8 +1163,9 @@ export interface ViewerGridScaleResponse { } export interface ViewerGetPointPositionParams { - x: number; - y: number; + scene_id: string; + x: number; + y: number; } export type ViewerGetPointPositionResponse = Point3D; @@ -1153,6 +1173,7 @@ export type ViewerGetPointPositionResponse = Point3D; export interface ViewerExplodeParams { explode_factor: number; ids: DataId[]; + scene_id: string; } export interface ViewerExplodeResponse { @@ -1180,8 +1201,9 @@ export interface ViewerCreateSceneResponse { } export interface ViewerClippingPlanesParams { - ids: DataId[]; - planes: Plane[]; + ids: DataId[]; + planes: Plane[]; + scene_id: string; } export interface Plane { @@ -1194,6 +1216,7 @@ export interface ViewerClippingPlanesResponse { } export interface ViewerAxesParams { + scene_id: string; visibility: Visibility; } diff --git a/src/opengeodeweb_viewer/basemap_pipeline.py b/src/opengeodeweb_viewer/basemap_pipeline.py index 090f2778..ecd0ba76 100644 --- a/src/opengeodeweb_viewer/basemap_pipeline.py +++ b/src/opengeodeweb_viewer/basemap_pipeline.py @@ -20,9 +20,10 @@ if TYPE_CHECKING: from collections.abc import Iterable, Mapping - from vtkmodules.vtkRenderingCore import vtkProp, vtkRenderer + from vtkmodules.vtkRenderingCore import vtkProp from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane + from opengeodeweb_viewer.scene import Scene, SceneObject from opengeodeweb_viewer.vtk_pipeline import BasemapState, VtkPipeline @@ -47,16 +48,18 @@ def basemaps( ] -def pipeline_surfaces(pipeline: VtkPipeline) -> list[vtkPolyData]: - """Visible surfaces of a data, after clipping, threshold, shrink and explosion.""" - return [shown for shown, _ in pipeline_surface_pairs(pipeline)] +def pipeline_surfaces(pipeline: VtkPipeline, scene_object: SceneObject) -> list[vtkPolyData]: + """Visible surfaces of a data in a scene, after clipping, threshold, shrink and explosion.""" + return [shown for shown, _ in pipeline_surface_pairs(pipeline, scene_object)] -def pipeline_surface_pairs(pipeline: VtkPipeline) -> list[tuple[vtkPolyData, vtkPolyData]]: +def pipeline_surface_pairs( + pipeline: VtkPipeline, scene_object: SceneObject +) -> list[tuple[vtkPolyData, vtkPolyData]]: """Visible surfaces of a data as shown, each with its geometry before explosion.""" - if not pipeline.actor.GetVisibility(): + if not scene_object.actor.GetVisibility(): return [] - mapper = pipeline.mapper + mapper = scene_object.mapper if isinstance(mapper, vtkCompositePolyDataMapper): attributes = mapper.GetCompositeDataDisplayAttributes() types = pipeline.block_component_types() @@ -107,106 +110,129 @@ def basemaps_follow(database: Mapping[str, VtkPipeline], data_ids: Iterable[str] ) -def basemap_actors(database: Mapping[str, VtkPipeline]) -> set[vtkProp]: +def basemap_actors(database: Mapping[str, VtkPipeline], scene: Scene) -> set[vtkProp]: """The basemap spans a margin around the data: the grid measures the data.""" return { actor - for pipeline, basemap in basemaps(database) - for actor in (pipeline.actor, basemap.drape_actor) + for data_id, _ in scene_basemaps(database, scene) + for actor in (scene.objects[data_id].actor, scene.objects[data_id].drape_actor) if actor is not None } -def update_basemaps(database: Mapping[str, VtkPipeline], renderer: vtkRenderer) -> None: +def scene_basemaps( + database: Mapping[str, VtkPipeline], scene: Scene +) -> list[tuple[str, BasemapState]]: + """The basemaps shown by a scene.""" + return [ + (data_id, pipeline.basemap) + for data_id, pipeline in database.items() + if pipeline.basemap is not None and data_id in scene.objects + ] + + +def update_basemaps(database: Mapping[str, VtkPipeline], scene: Scene) -> None: exploded_tops = [ - pipeline.actor.GetBounds()[5] - for pipeline in database.values() - if pipeline.basemap is None - and pipeline.explode_factor > 0 - and pipeline.actor.GetVisibility() + scene_object.actor.GetBounds()[5] + for data_id, scene_object in scene.objects.items() + if database[data_id].basemap is None + and database[data_id].explode_factor > 0 + and scene_object.actor.GetVisibility() ] # A detail reads what its base just drew - for pipeline, basemap in sorted(basemaps(database), key=lambda p: p[1].detail_of is not None): - if basemap.drape_actor is not None: - renderer.RemoveActor(basemap.drape_actor) - basemap.drape_actor = None + for data_id, basemap in sorted( + scene_basemaps(database, scene), key=lambda item: item[1].detail_of is not None + ): + scene_object = scene.objects[data_id] + if scene_object.drape_actor is not None: + scene.renderer.RemoveActor(scene_object.drape_actor) + scene_object.drape_actor = None if basemap.detail_of is None: - _update_base(database, renderer, pipeline, exploded_tops) + _update_base(database, scene, data_id, exploded_tops) else: - _update_detail(database, renderer, pipeline) + _update_detail(database, scene, data_id) def _update_base( database: Mapping[str, VtkPipeline], - renderer: vtkRenderer, - pipeline: VtkPipeline, + scene: Scene, + data_id: str, exploded_tops: list[float], ) -> None: + pipeline = database[data_id] + scene_object = scene.objects[data_id] basemap = cast("BasemapState", pipeline.basemap) if basemap.full_texture is None: return # Only georeferenced data: the front sends their ids data = [ - database[data_id] - for data_id in basemap.drape_ids - if data_id in database and database[data_id].actor.GetVisibility() + (database[drape_id], scene.objects[drape_id]) + for drape_id in basemap.drape_ids + if drape_id in database + and drape_id in scene.objects + and scene.objects[drape_id].actor.GetVisibility() ] draped: list[vtkPolyData] = [] if data: # Chosen before explosion, which may lift a horizon above the topography surfaces = [ - pair for data_pipeline in data for pair in pipeline_surface_pairs(data_pipeline) + pair + for data_pipeline, data_object in data + for pair in pipeline_surface_pairs(data_pipeline, data_object) ] draped = shown_top_surfaces(surfaces) dataset = cast("vtkPolyData", pipeline.reader.GetOutputAsDataSet()) basemap_top = dataset.GetBounds()[5] if draped: - basemap.drape_actor = drape_actor(drape_polydata(draped, dataset), basemap.full_texture) - renderer.AddActor(basemap.drape_actor) + scene_object.drape_actor = drape_actor( + drape_polydata(draped, dataset), basemap.full_texture + ) + scene.renderer.AddActor(scene_object.drape_actor) # The flat map goes under the draped relief lift = min(surface.GetBounds()[4] for surface in draped) - basemap_top else: # Exploded blocks only move up: the flat map rises above the highest one lift = max([0.0, *(top - basemap_top for top in exploded_tops)]) - pipeline.actor.SetPosition(0.0, 0.0, lift) - basemap.draped_surfaces = draped - retexture(database, pipeline) + scene_object.actor.SetPosition(0.0, 0.0, lift) + scene_object.draped_surfaces = draped + retexture(pipeline, scene_object, scene) -def _update_detail( - database: Mapping[str, VtkPipeline], renderer: vtkRenderer, pipeline: VtkPipeline -) -> None: +def _update_detail(database: Mapping[str, VtkPipeline], scene: Scene, data_id: str) -> None: + pipeline = database[data_id] + scene_object = scene.objects[data_id] detail = cast("BasemapState", pipeline.basemap) base = database.get(detail.detail_of or "") - if base is None or base.basemap is None or detail.full_texture is None: - pipeline.actor.SetVisibility(False) # noqa: FBT003 VTK API + base_object = scene.objects.get(detail.detail_of or "") + if base is None or base.basemap is None or base_object is None or detail.full_texture is None: + scene_object.actor.SetVisibility(False) # noqa: FBT003 VTK API return dataset = cast("vtkPolyData", pipeline.reader.GetOutputAsDataSet()) - draped = clipped_to_bounds(base.basemap.draped_surfaces, dataset.GetBounds()) + draped = clipped_to_bounds(base_object.draped_surfaces, dataset.GetBounds()) if draped: - detail.drape_actor = drape_actor( + scene_object.drape_actor = drape_actor( drape_polydata(draped, dataset), detail.full_texture, DETAIL_DRAPE_POLYGON_OFFSET_UNITS, ) - renderer.AddActor(detail.drape_actor) + scene.renderer.AddActor(scene_object.drape_actor) # Coplanar with its base: the same height, the same crop rule - pipeline.actor.SetPosition(0.0, 0.0, base.actor.GetPosition()[2]) - retexture(database, pipeline) + scene_object.actor.SetPosition(0.0, 0.0, base_object.actor.GetPosition()[2]) + retexture(pipeline, scene_object, scene) -def retexture(database: Mapping[str, VtkPipeline], pipeline: VtkPipeline) -> None: +def retexture(pipeline: VtkPipeline, scene_object: SceneObject, scene: Scene) -> None: basemap = pipeline.basemap if basemap is None or basemap.full_texture is None: return - base = database.get(basemap.detail_of or "", pipeline).basemap + base_object = scene.objects.get(basemap.detail_of or "", scene_object) # Without draped surface, cropping would hide the whole map: the flat map shows every map around = basemap.around_texture - draped = base is not None and bool(base.draped_surfaces) - pipeline.actor.SetTexture(around if draped and around is not None else basemap.full_texture) + draped = bool(base_object.draped_surfaces) + scene_object.actor.SetTexture(around if draped and around is not None else basemap.full_texture) # Hiding the flat map with nothing draped would hide the whole map flat_visible = around is not None or not draped - pipeline.actor.SetVisibility(pipeline.visibility and flat_visible) - if basemap.drape_actor is not None: - basemap.drape_actor.SetTexture(basemap.full_texture) - basemap.drape_actor.SetVisibility(pipeline.visibility) + scene_object.actor.SetVisibility(scene_object.visibility and flat_visible) + if scene_object.drape_actor is not None: + scene_object.drape_actor.SetTexture(basemap.full_texture) + scene_object.drape_actor.SetVisibility(scene_object.visibility) diff --git a/src/opengeodeweb_viewer/object/object_methods.py b/src/opengeodeweb_viewer/object/object_methods.py index 18033eb2..f80e38b8 100644 --- a/src/opengeodeweb_viewer/object/object_methods.py +++ b/src/opengeodeweb_viewer/object/object_methods.py @@ -20,7 +20,7 @@ # Local application imports from opengeodeweb_viewer.scene import SceneObject from opengeodeweb_viewer.vtk_pipeline import VtkPipeline -from opengeodeweb_viewer.vtk_protocol import VtkView +from opengeodeweb_viewer.vtk_protocol import VtkView, scene_object_of if TYPE_CHECKING: from vtkmodules.vtkIOXML import vtkXMLReader @@ -102,7 +102,8 @@ def add_object(self, scene: Scene, data_id: str) -> None: self.mark_basemaps_dirty([data_id]) def remove_object(self, scene: Scene, data_id: str) -> None: - scene_object = scene.objects.pop(data_id) + scene_object = scene_object_of(scene, data_id) + del scene.objects[data_id] renderer = scene.renderer renderer.RemoveActor(scene_object.actor) renderer.RemoveActor(scene_object.highlight.actor) @@ -125,8 +126,10 @@ def remove_object(self, scene: Scene, data_id: str) -> None: renderer.RemoveActor(scene_object.drape_actor) # Before the deregistration: an unknown id always marks them dirty self.mark_basemaps_dirty([data_id]) + self.update_scalar_bars_layout(scene) def deregister_dataset(self, data_id: str) -> None: + # remove_object already lays out the scalar bars of each scene it removes the data from for scene in self.get_scenes().values(): if data_id in scene.objects: self.remove_object(scene, data_id) diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json index c5b93464..cbd82d12 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json @@ -2,11 +2,16 @@ "rpc": "axes", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "visibility": { "title": "Visibility" } }, "required": [ + "scene_id", "visibility" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py index 8f2eeb8b..6754f83b 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py @@ -11,6 +11,7 @@ class Axes(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + scene_id: str visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json index ad6cb406..3727e73c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json @@ -2,6 +2,10 @@ "rpc": "clipping_planes", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -42,6 +46,7 @@ } }, "required": [ + "scene_id", "ids", "planes" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py index c3ac3988..556b1826 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py @@ -25,6 +25,7 @@ def __post_init__(self) -> None: ids: List[DataId] planes: List[Plane] + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json index 70e3e53a..114b4a92 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json @@ -2,6 +2,10 @@ "rpc": "explode", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -15,6 +19,7 @@ } }, "required": [ + "scene_id", "ids", "explode_factor" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py index 4ac2456a..59b9a9f1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: explode_factor: float ids: List[DataId] + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json index c21a3675..5f42839d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json @@ -2,6 +2,10 @@ "rpc": "get_point_position", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "integer" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "x", "y" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py index 90e1a27c..32210300 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py @@ -10,6 +10,7 @@ class GetPointPosition(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + scene_id: str x: int y: int diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json index 32fcb4f6..e79e7b42 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json @@ -2,11 +2,16 @@ "rpc": "grid_scale", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "visibility": { "title": "Visibility" } }, "required": [ + "scene_id", "visibility" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py index 79282630..cf41dfd2 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py @@ -11,6 +11,7 @@ class GridScale(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + scene_id: str visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json index 46264c19..e3538b86 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json @@ -2,6 +2,10 @@ "rpc": "highlight", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "number" }, @@ -22,6 +26,7 @@ } }, "required": [ + "scene_id", "x", "y", "field_type", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py index efa6b23e..7763703c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py @@ -21,6 +21,7 @@ def __post_init__(self) -> None: field_type: FieldType ids: List[DataId] + scene_id: str x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json index 2c7a1a31..f632f03d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json @@ -3,6 +3,10 @@ "rpc": "pick_colormap", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "number" }, @@ -11,6 +15,7 @@ } }, "required": [ + "scene_id", "x", "y" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py index 2abd49ff..87603569 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py @@ -12,6 +12,7 @@ class PickColormap(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + scene_id: str x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json index 39f295f8..c14e7373 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json @@ -2,6 +2,10 @@ "rpc": "picked_ids", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "x": { "type": "number" }, @@ -16,6 +20,7 @@ } }, "required": [ + "scene_id", "x", "y", "ids" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index 290b6083..982f8160 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -15,6 +15,7 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] + scene_id: str x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json index 35132b78..db8196ac 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json @@ -2,6 +2,10 @@ "rpc": "preview_points", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "points": { "type": "array", "items": { @@ -21,6 +25,7 @@ } }, "required": [ + "scene_id", "points", "style" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py index e2df98fa..805796a1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py @@ -20,6 +20,7 @@ def __post_init__(self) -> None: print_dataclass(self) points: List[Point3D] + scene_id: str style: Style closed: Optional[bool] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json index 9985205b..c285dc9e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json @@ -7,7 +7,9 @@ "minLength": 1 } }, - "required": [], + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py index ddff501c..f147642c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py @@ -3,7 +3,6 @@ from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass from dataclasses import dataclass -from typing import Optional @dataclass @@ -11,7 +10,7 @@ class Render(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: Optional[str] = None + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json index 7f4d747b..7f1786d9 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json @@ -1,8 +1,15 @@ { "rpc": "reset_camera", "type": "object", - "properties": {}, - "required": [], + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py index bffb004c..6ad616d9 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py @@ -10,7 +10,7 @@ class ResetCamera(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - pass + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json index 8f527bed..c99a60c1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json @@ -1,8 +1,15 @@ { "rpc": "reset_ruler", "type": "object", - "properties": {}, - "required": [], + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py index 326be276..bf3a98a6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py @@ -10,7 +10,7 @@ class ResetRuler(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - pass + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json index 5c8ec61a..ad6af7f6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json @@ -1,8 +1,15 @@ { "rpc": "reset_visualization", "type": "object", - "properties": {}, - "required": [], + "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "scene_id" + ], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py index ceec32f2..be3a181c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py @@ -10,7 +10,7 @@ class ResetVisualization(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - pass + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json index e4ab6fad..fe2c973e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json @@ -2,6 +2,10 @@ "rpc": "ruler", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "points": { "type": "array", "items": { @@ -17,6 +21,7 @@ } }, "required": [ + "scene_id", "points" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py index 3efb6adc..605688d1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) points: List[List[float]] + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json index 93a39cb9..64c14185 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json @@ -2,11 +2,16 @@ "rpc": "set_background_color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "color": { "title": "ColorRGB" } }, "required": [ + "scene_id", "color" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py index 4153a3b7..2915cfbd 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py @@ -12,6 +12,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGB + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json index 3f2669fd..9f5851da 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json @@ -2,6 +2,10 @@ "rpc": "set_orientation_widget", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "marker": { "type": "string", "enum": [ @@ -12,6 +16,7 @@ } }, "required": [ + "scene_id", "marker" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py index 663c2604..88e4a139 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py @@ -18,6 +18,7 @@ def __post_init__(self) -> None: print_dataclass(self) marker: Marker + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json index a143e39d..e8292104 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json @@ -2,6 +2,10 @@ "rpc": "set_text_style", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "color": { "title": "ColorRGB" }, @@ -18,6 +22,7 @@ } }, "required": [ + "scene_id", "color", "font_family", "opacity" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py index 966083be..d8e070ba 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py @@ -21,6 +21,7 @@ def __post_init__(self) -> None: color: ColorRGB font_family: FontFamily opacity: Opacity + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json index fffb99fa..e3554043 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json @@ -2,12 +2,17 @@ "rpc": "set_z_scaling", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "z_scale": { "type": "number", "minimum": 1 } }, "required": [ + "scene_id", "z_scale" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py index 208ff53c..013da681 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py @@ -10,6 +10,7 @@ class SetZScaling(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + scene_id: str z_scale: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json index f94a3034..977768f4 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json @@ -2,6 +2,10 @@ "rpc": "shrink", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -15,6 +19,7 @@ } }, "required": [ + "scene_id", "ids", "shrink_factor" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py index 42c27167..1bee6b18 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] + scene_id: str shrink_factor: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json index 829c8694..09cc08c6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json @@ -2,6 +2,10 @@ "rpc": "slice", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -32,6 +36,7 @@ } }, "required": [ + "scene_id", "ids", "slices" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py index 8909155e..4313c21e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py @@ -22,6 +22,7 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] + scene_id: str slices: List[SliceElement] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json index 23fccf3f..519870a3 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json @@ -2,6 +2,10 @@ "rpc": "take_screenshot", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "filename": { "title": "Filename" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "filename", "output_extension", "include_background" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py index 6daecf75..ec65c316 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py @@ -22,6 +22,7 @@ def __post_init__(self) -> None: filename: Filename include_background: bool output_extension: OutputExtension + scene_id: str height: Optional[int] = None width: Optional[int] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json index f57b5613..831f1592 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json @@ -2,6 +2,10 @@ "rpc": "threshold", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "ids": { "type": "array", "items": { @@ -46,6 +50,7 @@ } }, "required": [ + "scene_id", "ids", "attributes" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py index cbe415ac..238155c0 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py @@ -33,6 +33,7 @@ def __post_init__(self) -> None: attributes: List[Attribute] ids: List[DataId] + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json index 1daeef7b..8acb8adf 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json @@ -2,6 +2,10 @@ "rpc": "update_camera", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "camera_options": { "type": "object", "properties": { @@ -51,6 +55,7 @@ } }, "required": [ + "scene_id", "camera_options" ], "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py index 1bc6a67f..7d3f0f45 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py @@ -24,6 +24,7 @@ def __post_init__(self) -> None: print_dataclass(self) camera_options: CameraOptions + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json index c31da78c..e2aad745 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json @@ -2,11 +2,16 @@ "rpc": "update_data", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" } }, "required": [ + "scene_id", "id" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py index c1d02946..2ef31227 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py @@ -12,6 +12,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index adb37b5b..737a0735 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -1,7 +1,7 @@ # Standard library imports import math from pathlib import Path -from typing import Any +from typing import TYPE_CHECKING, Any, cast from opengeodeweb_microservice.schemas import get_schemas_dict from vtkmodules.vtkCommonCore import reference, vtkPoints, vtkUnsignedCharArray @@ -13,16 +13,9 @@ vtkPolyData, ) from vtkmodules.vtkCommonTransforms import vtkTransform -from vtkmodules.vtkInteractionStyle import vtkInteractorStyleTrackball -from vtkmodules.vtkInteractionWidgets import vtkOrientationMarkerWidget # Third party imports from vtkmodules.vtkIOImage import vtkJPEGWriter, vtkPNGWriter -from vtkmodules.vtkRenderingAnnotation import ( - vtkAxesActor, - vtkCubeAxesActor, - vtkScalarBarActor, -) from vtkmodules.vtkRenderingCore import ( vtkAbstractMapper, vtkActor, @@ -34,7 +27,6 @@ vtkWindowToImageFilter, vtkWorldPointPicker, ) -from vtkmodules.vtkRenderingUI import vtkGenericRenderWindowInteractor from opengeodeweb_viewer.object.object_methods import VtkObjectView from opengeodeweb_viewer.orientation_marker import NO_MARKER, build_marker, style_marker @@ -45,7 +37,10 @@ from opengeodeweb_viewer.typed_rpc import typed_rpc # Local application imports -from opengeodeweb_viewer.vtk_pipeline import ClippingPlanePreview, RulerPipeline +from opengeodeweb_viewer.vtk_pipeline import ClippingPlanePreview + +if TYPE_CHECKING: + from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor MIN_CLOSED_CURVE_POINTS = 2 MIN_SURFACE_POINTS = 3 @@ -57,8 +52,6 @@ class VtkViewerView(VtkObjectView): def __init__(self) -> None: super().__init__() - self._preview_actor: vtkActor | None = None - self._clipping_plane_previews: list[ClippingPlanePreview] = [] @typed_rpc(viewer_prefix, schemas.create_scene_route) def create_scene(self, params: schemas.CreateScene) -> schemas.CreateSceneResponse: @@ -94,54 +87,9 @@ def remove_from_scene(self, params: schemas.RemoveFromScene) -> schemas.RemoveFr @typed_rpc(viewer_prefix, schemas.reset_visualization_route) def reset_visualization( - self, _params: schemas.ResetVisualization + self, params: schemas.ResetVisualization ) -> schemas.ResetVisualizationResponse: - render_window = self.getView("-1") - renderer = render_window.GetRenderers().GetFirstRenderer() - renderer.RemoveAllViewProps() - self._clipping_plane_previews = [] - - grid_scale = vtkCubeAxesActor() - grid_scale.SetCamera(renderer.GetActiveCamera()) - grid_scale.DrawXGridlinesOn() - grid_scale.DrawYGridlinesOn() - grid_scale.DrawZGridlinesOn() - grid_scale.SetGridLineLocation(grid_scale.VTK_GRID_LINES_FURTHEST) - grid_scale.SetFlyModeToOuterEdges() - grid_scale.SetXTitle("X") - grid_scale.SetYTitle("Y") - grid_scale.SetZTitle("Z") - - grid_scale.VisibilityOff() - self.set_grid_scale(grid_scale) - - renderer.AddActor(grid_scale) - - render_window_interactor = vtkGenericRenderWindowInteractor() - render_window_interactor.SetRenderWindow(render_window) - style = vtkInteractorStyleTrackball() - render_window_interactor.SetInteractorStyle(style) - render_window_interactor.EnableRenderOff() - widget = vtkOrientationMarkerWidget() - widget.SetInteractor(render_window_interactor) - widget.SetViewport(0.8, 0.0, 1, 0.2) - axes = vtkAxesActor() - widget.SetOrientationMarker(axes) - widget.EnabledOn() - widget.InteractiveOff() - - self.set_axes(axes) - self.set_widget(widget) - ruler = RulerPipeline() - ruler.add_to_renderer(renderer) - self.set_ruler(ruler) - - self.set_scene_text_style(TextStyle()) - self.apply_scene_text_style() - - renderer.SetBackground([180 / 255, 180 / 255, 180 / 255]) - - renderer.ResetCamera() + self.get_scene(params.scene_id).reset() return schemas.ResetVisualizationResponse() @typed_rpc(viewer_prefix, schemas.set_background_color_route) @@ -149,32 +97,28 @@ def set_background_color( self, params: schemas.SetBackgroundColor ) -> schemas.SetBackgroundColorResponse: color = params.color - render_window = self.getView("-1") - renderer = render_window.GetRenderers().GetFirstRenderer() - + renderer = self.get_scene(params.scene_id).renderer renderer.SetBackground([color.red / 255, color.green / 255, color.blue / 255]) return schemas.SetBackgroundColorResponse() @typed_rpc(viewer_prefix, schemas.set_text_style_route) def update_text_style(self, params: schemas.SetTextStyle) -> schemas.SetTextStyleResponse: color = params.color - self.set_scene_text_style( - TextStyle( - color=(color.red, color.green, color.blue), - font_family=params.font_family.value, - opacity=params.opacity, - ) + scene = self.get_scene(params.scene_id) + scene.text_style = TextStyle( + color=(color.red, color.green, color.blue), + font_family=params.font_family.value, + opacity=params.opacity, ) - self.apply_scene_text_style() + self.apply_scene_text_style(params.scene_id) return schemas.SetTextStyleResponse() @typed_rpc(viewer_prefix, schemas.set_orientation_widget_route) def update_orientation_widget( self, params: schemas.SetOrientationWidget ) -> schemas.SetOrientationWidgetResponse: - widget = self.get_widget() - if widget is None: - return schemas.SetOrientationWidgetResponse() + scene = self.get_scene(params.scene_id) + widget = scene.widget visibility = widget.GetOrientationMarker().GetVisibility() widget.EnabledOff() if params.marker.value == NO_MARKER: @@ -184,7 +128,7 @@ def update_orientation_widget( widget.GetOrientationMarker().SetVisibility(visibility) return schemas.SetOrientationWidgetResponse() marker = build_marker(params.marker.value) - style_marker(marker, self.get_scene_text_style()) + style_marker(marker, scene.text_style) widget.SetOrientationMarker(marker) widget.EnabledOn() widget.InteractiveOff() @@ -192,14 +136,13 @@ def update_orientation_widget( return schemas.SetOrientationWidgetResponse() @typed_rpc(viewer_prefix, schemas.reset_camera_route) - def reset_camera(self, _params: schemas.ResetCamera) -> schemas.ResetCameraResponse: - render_window = self.getView("-1") - render_window.GetRenderers().GetFirstRenderer().ResetCamera() + def reset_camera(self, params: schemas.ResetCamera) -> schemas.ResetCameraResponse: + self.get_scene(params.scene_id).renderer.ResetCamera() return schemas.ResetCameraResponse() @typed_rpc(viewer_prefix, schemas.take_screenshot_route) def take_screenshot(self, params: schemas.TakeScreenshot) -> schemas.TakeScreenshotResponse: - render_window = self.getView("-1") + render_window = self.get_scene(params.scene_id).render_window w2if = vtkWindowToImageFilter() include_background = params.include_background @@ -255,7 +198,7 @@ def update_data(self, params: schemas.UpdateData) -> schemas.UpdateDataResponse: data = self.get_vtk_pipeline(params.id) reader = data.reader reader.Update() - mapper = data.mapper + mapper = self.get_scene_object(params.scene_id, params.id).mapper tag: Any = reference(0) output = reader.GetOutputDataObject(0) if not isinstance(output, vtkDataSet): @@ -277,7 +220,7 @@ def update_data(self, params: schemas.UpdateData) -> schemas.UpdateDataResponse: def get_point_position( self, params: schemas.GetPointPosition ) -> schemas.GetPointPositionResponse: - renderer = self.get_renderer() + renderer = self.get_scene(params.scene_id).renderer # If clicking on an object prop_picker = vtkPropPicker() if prop_picker.Pick(params.x, params.y, 0.0, renderer): @@ -291,21 +234,20 @@ def get_point_position( @typed_rpc(viewer_prefix, schemas.pick_colormap_route) def pick_colormap(self, params: schemas.PickColormap) -> schemas.PickColormapResponse: - - render_window = self.getView("-1") - size = render_window.GetSize() + scene = self.get_scene(params.scene_id) + size = scene.render_window.GetSize() nx = params.x / size[0] ny = 1.0 - (params.y / size[1]) - for data_id, pipeline in self.get_data_base().items(): + for data_id, scene_object in scene.objects.items(): # A model has one scalar bar per attribute, each coloring some of its blocks - if isinstance(pipeline.mapper, vtkCompositePolyDataMapper): - for scalar_bar in pipeline.scalar_bars.values(): + if isinstance(scene_object.mapper, vtkCompositePolyDataMapper): + for scalar_bar in scene_object.scalar_bars.values(): if self.is_scalar_bar_clicked(scalar_bar.actor, nx, ny): return schemas.PickColormapResponse( data_id=data_id, block_ids=scalar_bar.block_ids ) - elif self.is_scalar_bar_clicked(pipeline.scalar_bar, nx, ny): + elif self.is_scalar_bar_clicked(scene_object.scalar_bar, nx, ny): return schemas.PickColormapResponse(data_id=data_id) return schemas.PickColormapResponse() @@ -335,13 +277,16 @@ def compute_epsilon(self, renderer: vtkRenderer, z: float) -> float: @typed_rpc(viewer_prefix, schemas.picked_ids_route) def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: picker = vtkCellPicker(tolerance=0.005) + scene = self.get_scene(params.scene_id) # Retrieve all actors under the clicked coordinates actors, flat_index = self.pick_actors_under_coordinate( - params.ids, params.x, params.y, picker + scene, params.ids, params.x, params.y, picker ) # Filter pipeline IDs whose actors are in the picked list array_ids = [ - data_id for data_id in params.ids if self.get_vtk_pipeline(data_id).actor in actors + data_id + for data_id in params.ids + if self.get_scene_object(params.scene_id, data_id).actor in actors ] if not array_ids: return schemas.PickedIDSResponse(array_ids=[]) @@ -350,33 +295,28 @@ def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: @typed_rpc(viewer_prefix, schemas.grid_scale_route) def toggle_grid_scale(self, params: schemas.GridScale) -> schemas.GridScaleResponse: - grid_scale = self.get_grid_scale() - if grid_scale is not None: - grid_scale.SetVisibility(params.visibility) + self.get_scene(params.scene_id).grid_scale.SetVisibility(params.visibility) return schemas.GridScaleResponse() @typed_rpc(viewer_prefix, schemas.axes_route) def toggle_axes(self, params: schemas.Axes) -> schemas.AxesResponse: - widget = self.get_widget() - if widget is not None: - widget.GetOrientationMarker().SetVisibility(params.visibility) + self.get_scene(params.scene_id).widget.GetOrientationMarker().SetVisibility( + params.visibility + ) return schemas.AxesResponse() @typed_rpc(viewer_prefix, schemas.update_camera_route) def update_camera(self, params: schemas.UpdateCamera) -> schemas.UpdateCameraResponse: camera_options = params.camera_options - - render_window = self.getView("-1") - camera = render_window.GetRenderers().GetFirstRenderer().GetActiveCamera() + scene = self.get_scene(params.scene_id) + camera = scene.renderer.GetActiveCamera() camera.SetFocalPoint(camera_options.focal_point) camera.SetViewUp(camera_options.view_up) camera.SetPosition(camera_options.position) camera.SetViewAngle(camera_options.view_angle) camera.SetClippingRange(camera_options.clipping_range) - ruler = self.get_ruler() - if ruler is not None: - ruler.update_scale(self.get_renderer()) + scene.ruler.update_scale(scene.renderer) return schemas.UpdateCameraResponse() @typed_rpc(viewer_prefix, schemas.render_route) @@ -386,24 +326,26 @@ def render_now(self, params: schemas.Render) -> schemas.RenderResponse: @typed_rpc(viewer_prefix, schemas.highlight_route) def set_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: + scene = self.get_scene(params.scene_id) # Clear previous highlights - self.clear_highlights(params.ids) + self.clear_highlights(scene, params.ids) picker = vtkCellPicker(tolerance=0.005) # Perform pick operation to identify clicked pipeline and primitive ID data_id, id_to_select = self.pick_cell_or_point( - params.ids, params.x, params.y, params.field_type.value, picker + scene, params.ids, (params.x, params.y), params.field_type.value, picker ) if not data_id or id_to_select == -1: - self.render(-1) + self.render(params.scene_id) return schemas.HighlightResponse() # Retrieve picked composite block information pipeline = self.get_vtk_pipeline(data_id) - dataset, geode_id = self.get_composite_block_info(pipeline, picker) + scene_object = self.get_scene_object(params.scene_id, data_id) + dataset, geode_id = self.get_composite_block_info(pipeline, scene_object, picker) # Update highlight visibility and extract attributes from the picked element - self.update_highlight(pipeline, id_to_select, params.field_type.value, dataset) - self.render(-1) + self.update_highlight(scene_object, id_to_select, params.field_type.value, dataset) + self.render(params.scene_id) data_attributes = self.extract_picked_attributes( - pipeline, id_to_select, params.field_type.value, dataset + scene_object, id_to_select, params.field_type.value, dataset ) return schemas.HighlightResponse( id=data_id, @@ -417,17 +359,20 @@ def set_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: def set_clipping_planes_rpc( self, params: schemas.ClippingPlanes ) -> schemas.ClippingPlanesResponse: + scene = self.get_scene(params.scene_id) self.set_clipping_planes(params.ids, params.planes) - self._update_clipping_plane_previews(params.ids, params.planes) + self._update_clipping_plane_previews(scene, params.ids, params.planes) return schemas.ClippingPlanesResponse() @typed_rpc(viewer_prefix, schemas.shrink_route) def set_shrink_rpc(self, params: schemas.Shrink) -> schemas.ShrinkResponse: + self.get_scene(params.scene_id) self.set_shrink(params.ids, params.shrink_factor) return schemas.ShrinkResponse() @typed_rpc(viewer_prefix, schemas.explode_route) def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: + self.get_scene(params.scene_id) exploded_bounds = self.set_explode(params.ids, params.explode_factor) return schemas.ExplodeResponse( exploded_bounds=[ @@ -438,75 +383,77 @@ def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: @typed_rpc(viewer_prefix, schemas.slice_route) def set_slice_rpc(self, params: schemas.Slice) -> schemas.SliceResponse: + self.get_scene(params.scene_id) return schemas.SliceResponse(max_indices=self.set_slice(params.ids, params.slices)) @typed_rpc(viewer_prefix, schemas.threshold_route) def set_threshold_rpc(self, params: schemas.Threshold) -> schemas.ThresholdResponse: + self.get_scene(params.scene_id) self.set_threshold(params.ids, params.attributes) return schemas.ThresholdResponse() @typed_rpc(viewer_prefix, schemas.set_z_scaling_route) def set_z_scaling(self, params: schemas.SetZScaling) -> schemas.SetZScalingResponse: - render_window = self.getView("-1") - renderer = render_window.GetRenderers().GetFirstRenderer() - cam = renderer.GetActiveCamera() + scene = self.get_scene(params.scene_id) + cam = scene.renderer.GetActiveCamera() transform = vtkTransform() transform.Scale(1, 1, params.z_scale) cam.SetModelTransformMatrix(transform.GetMatrix()) - grid_scale = self.get_grid_scale() - if grid_scale is not None: - grid_scale.SetUse2DMode(True) # noqa: FBT003 VTK API + scene.grid_scale.SetUse2DMode(True) # noqa: FBT003 VTK API return schemas.SetZScalingResponse() @typed_rpc(viewer_prefix, schemas.preview_points_route) def preview_points(self, params: schemas.PreviewPoints) -> schemas.PreviewPointsResponse: + scene = self.get_scene(params.scene_id) points_data = params.points style_name = params.style.value if hasattr(params.style, "value") else params.style if not points_data: - if self._preview_actor is not None: - self.get_renderer().RemoveActor(self._preview_actor) - self._preview_actor = None - self.render(-1) + if scene.preview_actor is not None: + scene.renderer.RemoveActor(scene.preview_actor) + scene.preview_actor = None + self.render(params.scene_id) return schemas.PreviewPointsResponse() - self._ensure_preview_actor() - self._preview_points.Reset() - self._preview_verts.Reset() + polydata = self._ensure_preview_polydata(scene) + points = polydata.GetPoints() + verts = polydata.GetVerts() + points.Reset() + verts.Reset() colors = vtkUnsignedCharArray() colors.SetName("Colors") colors.SetNumberOfComponents(3) for i, pt in enumerate(points_data): - self._preview_points.InsertNextPoint(pt.x, pt.y, pt.z) - self._preview_verts.InsertNextCell(1, [i]) + points.InsertNextPoint(pt.x, pt.y, pt.z) + verts.InsertNextCell(1, [i]) if style_name in ["curve", "surface"] and i == 0: colors.InsertNextTuple3(60, 153, 131) else: colors.InsertNextTuple3(102, 102, 102) - self._preview_polydata.GetPointData().SetScalars(colors) - self._preview_polydata.GetPointData().SetActiveScalars("Colors") + polydata.GetPointData().SetScalars(colors) + polydata.GetPointData().SetActiveScalars("Colors") lines, polys = self._preview_cells(style_name, len(points_data), closed=bool(params.closed)) - self._preview_polydata.SetLines(lines) - self._preview_polydata.SetPolys(polys) - self._preview_polydata.Modified() - self.render(-1) + polydata.SetLines(lines) + polydata.SetPolys(polys) + polydata.Modified() + self.render(params.scene_id) return schemas.PreviewPointsResponse() def _update_clipping_plane_previews( - self, data_ids: list[str], planes_data: list[schemas.Plane] + self, scene: Scene, data_ids: list[str], planes_data: list[schemas.Plane] ) -> None: # Unclipping some data must keep the previews of the data still clipped if not planes_data and any( - pipeline.clipping_filter is not None for pipeline in self.get_data_base().values() + self.get_vtk_pipeline(data_id).clipping_filter is not None for data_id in scene.objects ): return - renderer = self.get_renderer() - for preview in self._clipping_plane_previews: + renderer = scene.renderer + for preview in scene.clipping_plane_previews: renderer.RemoveActor(preview.actor) - self._clipping_plane_previews = [] + scene.clipping_plane_previews = [] # Unclipped bounds of the targets, so successive calls do not shrink the previews bounding_box = vtkBoundingBox() bounds = [0.0] * 6 @@ -526,25 +473,25 @@ def _update_clipping_plane_previews( color=plane_info.color, ) renderer.AddActor(preview.actor) - self._clipping_plane_previews.append(preview) - - def _ensure_preview_actor(self) -> None: - if self._preview_actor is None: - self._preview_points = vtkPoints() - self._preview_verts = vtkCellArray() - self._preview_polydata = vtkPolyData() - self._preview_polydata.SetPoints(self._preview_points) - self._preview_polydata.SetVerts(self._preview_verts) - self._preview_mapper = vtkDataSetMapper() - self._preview_mapper.SetInputData(self._preview_polydata) - self._preview_mapper.ScalarVisibilityOn() - self._preview_mapper.SetColorModeToDirectScalars() - self._preview_actor = vtkActor() - self._preview_actor.SetMapper(self._preview_mapper) - prop = self._preview_actor.GetProperty() + scene.clipping_plane_previews.append(preview) + + @staticmethod + def _ensure_preview_polydata(scene: Scene) -> vtkPolyData: + if scene.preview_actor is None: + polydata = vtkPolyData() + polydata.SetPoints(vtkPoints()) + polydata.SetVerts(vtkCellArray()) + mapper = vtkDataSetMapper() + mapper.SetInputData(polydata) + mapper.ScalarVisibilityOn() + mapper.SetColorModeToDirectScalars() + scene.preview_actor = vtkActor() + scene.preview_actor.SetMapper(mapper) + prop = scene.preview_actor.GetProperty() prop.SetPointSize(10) prop.SetLineWidth(2) - self.get_renderer().AddActor(self._preview_actor) + scene.renderer.AddActor(scene.preview_actor) + return cast("vtkPolyData", scene.preview_actor.GetMapper().GetInput()) @staticmethod def _preview_cells( @@ -563,23 +510,15 @@ def _preview_cells( polys.InsertNextCell(point_count, list(range(point_count))) return lines, polys - def _get_initialized_ruler(self) -> RulerPipeline: - ruler = self.get_ruler() - if ruler is None: - msg = "Ruler is not initialized" - raise RuntimeError(msg) - return ruler - @typed_rpc(viewer_prefix, schemas.ruler_route) def set_ruler_rpc(self, params: schemas.Ruler) -> schemas.RulerResponse: - ruler = self._get_initialized_ruler() + scene = self.get_scene(params.scene_id) point1 = params.points[0] point2 = params.points[1] if len(params.points) > 1 else None - distance = ruler.set_endpoints(point1, point2, renderer=self.get_renderer()) + distance = scene.ruler.set_endpoints(point1, point2, renderer=scene.renderer) return schemas.RulerResponse(distance=distance, point1=point1, point2=point2) @typed_rpc(viewer_prefix, schemas.reset_ruler_route) - def reset_ruler(self, _params: schemas.ResetRuler) -> schemas.ResetRulerResponse: - ruler = self._get_initialized_ruler() - ruler.reset() + def reset_ruler(self, params: schemas.ResetRuler) -> schemas.ResetRulerResponse: + self.get_scene(params.scene_id).ruler.reset() return schemas.ResetRulerResponse() diff --git a/src/opengeodeweb_viewer/scene/scene.py b/src/opengeodeweb_viewer/scene/scene.py index 2fffe4d4..79ea9925 100644 --- a/src/opengeodeweb_viewer/scene/scene.py +++ b/src/opengeodeweb_viewer/scene/scene.py @@ -70,6 +70,9 @@ def dispose(self) -> None: def reset(self) -> None: renderer = self.renderer renderer.RemoveAllViewProps() + # The props of the objects went with them + self.objects.clear() + self.preview_actor = None self.clipping_plane_previews = [] grid_scale = vtkCubeAxesActor() diff --git a/src/opengeodeweb_viewer/scene/scene_object.py b/src/opengeodeweb_viewer/scene/scene_object.py index b9af72ec..82100654 100644 --- a/src/opengeodeweb_viewer/scene/scene_object.py +++ b/src/opengeodeweb_viewer/scene/scene_object.py @@ -7,6 +7,7 @@ vtkDataObject, vtkDataSet, vtkMultiBlockDataSet, + vtkPolyData, vtkVector2d, ) from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor @@ -77,6 +78,8 @@ class SceneObject: edges_block_styles: dict[int, ModelEdgesStyle] = field(default_factory=dict) # Set by apply_basemap on a basemap: its drape over the georeferenced data drape_actor: vtkActor | None = None + # Base only: the top surfaces it drapes in this scene, for its detail + draped_surfaces: list[vtkPolyData] = field(default_factory=list) def connect_mappers(self, pipeline: VtkPipeline) -> None: self.mapper.SetInputConnection(pipeline.filter.GetOutputPort()) diff --git a/src/opengeodeweb_viewer/vtk_pipeline.py b/src/opengeodeweb_viewer/vtk_pipeline.py index c16cd5ea..1f00dcf0 100644 --- a/src/opengeodeweb_viewer/vtk_pipeline.py +++ b/src/opengeodeweb_viewer/vtk_pipeline.py @@ -337,8 +337,6 @@ class BasemapState: detail_of: str | None = None # The georeferenced data it drapes, its drape actor is per scene drape_ids: list[str] = field(default_factory=list) - # Base only: the top surfaces it drapes, for its detail - draped_surfaces: list[vtkPolyData] = field(default_factory=list) # Every visible map (drape), and the visible maps not cropped (flat map around) full_texture: vtkTexture | None = None around_texture: vtkTexture | None = None diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index 6d0a953d..b3dbc213 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -46,6 +46,7 @@ update_basemaps, ) from opengeodeweb_viewer.rpc.viewer.schemas.threshold import Attribute, Location +from opengeodeweb_viewer.scene import sync_composite_pipeline from opengeodeweb_viewer.text_style import ( apply_text_property, ) @@ -73,6 +74,18 @@ MAX_DATA_NAME_LENGTH = 22 +def not_found(description: str) -> ValueError: + return ValueError({"code": 404, "name": "Not found", "description": description}) + + +def scene_object_of(scene: Scene, data_id: str) -> SceneObject: + scene_object = scene.objects.get(data_id) + if scene_object is None: + msg = f"Data {data_id} is not in scene {scene.scene_id}" + raise not_found(msg) + return scene_object + + def _clipping_function(planes_data: list[Plane]) -> vtkImplicitBoolean: implicit_boolean = vtkImplicitBoolean() implicit_boolean.SetOperationTypeToIntersection() @@ -127,21 +140,17 @@ def get_scenes(self) -> dict[str, Scene]: def get_scene(self, scene_id: str) -> Scene: scene = self.get_scenes().get(scene_id) if scene is None: - raise ValueError( - { - "code": 404, - "name": "Not found", - "description": f"Scene {scene_id} not found", - } - ) + msg = f"Scene {scene_id} not found" + raise not_found(msg) return scene def get_scene_object(self, scene_id: str, data_id: str) -> SceneObject: - return self.get_scene(scene_id).objects[data_id] + return scene_object_of(self.get_scene(scene_id), data_id) def apply_scene_text_style(self, scene_id: str) -> None: - self.get_scene(scene_id).apply_text_style() - self.update_scalar_bars_layout() + scene = self.get_scene(scene_id) + scene.apply_text_style() + self.update_scalar_bars_layout(scene) def get_viewer_data(self, data_id: str) -> ViewerData: if Data is None: @@ -196,28 +205,38 @@ def setup_pipeline(self, pipeline: VtkPipeline, name: str) -> vtkDataObject | No def update_highlight( self, - pipeline: VtkPipeline, + scene_object: SceneObject, id_to_select: int, field_type: str, dataset: vtkDataObject | None = None, ) -> None: - node = pipeline.highlight.selection_node + highlight = scene_object.highlight + node = highlight.selection_node node.SetContentType(vtkSelectionNode.INDICES) node.SetFieldType(vtkSelectionNode.CELL if field_type == "CELL" else vtkSelectionNode.POINT) selection_list = vtkIdTypeArray() selection_list.SetNumberOfComponents(1) selection_list.InsertNextValue(id_to_select) node.SetSelectionList(selection_list) - target_dataset = dataset or pipeline.mapper.GetInputDataObject(0, 0) - pipeline.highlight.extract_selection.SetInputData(0, target_dataset) - pipeline.highlight.extract_selection.Modified() - pipeline.highlight.extract_selection.Update() - pipeline.highlight.actor.VisibilityOn() + target_dataset = dataset or scene_object.mapper.GetInputDataObject(0, 0) + highlight.extract_selection.SetInputData(0, target_dataset) + highlight.extract_selection.Modified() + highlight.extract_selection.Update() + highlight.actor.VisibilityOn() - def clear_highlights(self, data_ids: list[str]) -> None: + def clear_highlights(self, scene: Scene, data_ids: list[str]) -> None: for data_id in data_ids: - pipeline = self.get_vtk_pipeline(data_id) - pipeline.highlight.actor.VisibilityOff() + scene_object_of(scene, data_id).highlight.actor.VisibilityOff() + + def scene_objects_of(self, pipeline: VtkPipeline) -> list[SceneObject]: + """The render side of a data, in every scene showing it.""" + data_ids = [data_id for data_id, other in self.get_data_base().items() if other is pipeline] + return [ + scene.objects[data_id] + for scene in self.get_scenes().values() + for data_id in data_ids + if data_id in scene.objects + ] def update_pipeline_filter(self, pipeline: VtkPipeline) -> None: current_input_port = ( @@ -243,12 +262,14 @@ def update_pipeline_filter(self, pipeline: VtkPipeline) -> None: if isinstance(filtered_dataset, vtkPointSet) and (points := filtered_dataset.GetPoints()): # Unfiltered input points are passed through, older than the cached filtered bounds points.Modified() - if isinstance(pipeline.mapper, vtkCompositePolyDataMapper): - if pipeline.explode_factor > 0 and isinstance(filtered_dataset, vtkMultiBlockDataSet): + scene_objects = self.scene_objects_of(pipeline) + if isinstance(filtered_dataset, vtkMultiBlockDataSet): + if pipeline.explode_factor > 0: filtered_dataset = pipeline.explode_blocks(filtered_dataset) - pipeline.sync_composite_pipeline(filtered_dataset) + sync_composite_pipeline(pipeline, scene_objects, filtered_dataset) else: - pipeline.connect_mappers() + for scene_object in scene_objects: + scene_object.connect_mappers(pipeline) target_dataset = ( cast("vtkDataSet", filtered_dataset) if active_filters or pipeline.slice_filter is not None @@ -287,9 +308,11 @@ def clip_basemap(self, pipeline: VtkPipeline) -> None: self.update_pipeline_filter(pipeline) def mark_basemaps_dirty(self, data_ids: Iterable[str] | None = None) -> None: - """The drapes are rebuilt once, at the next render, when a change on data_ids moves them.""" + """The drapes of every scene are rebuilt once, at its next render, when a change on + data_ids moves them.""" if data_ids is None or basemaps_follow(self.get_data_base(), data_ids): - self.coreServer.setSharedObject("basemaps_dirty", True) # noqa: FBT003 VTK API + for scene in self.get_scenes().values(): + scene.basemaps_dirty = True def set_threshold(self, data_ids: list[str], attributes: list[Attribute]) -> None: for data_id in data_ids: @@ -332,7 +355,7 @@ def set_explode(self, data_ids: list[str], explode_factor: float) -> dict[str, l exploded_bounds: dict[str, list[float]] = {} for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) - if not isinstance(pipeline.mapper, vtkCompositePolyDataMapper): + if not isinstance(pipeline.filter.GetOutputDataObject(0), vtkMultiBlockDataSet): continue pipeline.explode_factor = explode_factor self.update_pipeline_filter(pipeline) @@ -373,35 +396,37 @@ def set_slice(self, data_ids: list[str], slices: list[SliceElement]) -> list[int self.update_pipeline_filter(pipeline) return max_indices - def swap_pick_mappers(self, data_ids: list[str], *, use_pick_mapper: bool) -> None: + def swap_pick_mappers( + self, scene: Scene, data_ids: list[str], *, use_pick_mapper: bool + ) -> None: # Swap actor mappers between the default and the pick_mapper # (where hidden blocks are pruned). for data_id in data_ids: - pipeline = self.get_vtk_pipeline(data_id) - if pipeline.pick_mapper: - mapper = pipeline.pick_mapper if use_pick_mapper else pipeline.mapper - pipeline.actor.SetMapper(mapper) + scene_object = scene_object_of(scene, data_id) + if scene_object.pick_mapper: + mapper = scene_object.pick_mapper if use_pick_mapper else scene_object.mapper + scene_object.actor.SetMapper(mapper) def pick_cell_or_point( self, + scene: Scene, data_ids: list[str], - x: float, - y: float, + position: tuple[float, float], field_type: str, picker: vtkCellPicker, ) -> tuple[str | None, int]: - self.swap_pick_mappers(data_ids, use_pick_mapper=True) + self.swap_pick_mappers(scene, data_ids, use_pick_mapper=True) try: - picker.Pick(x, y, 0, self.get_renderer()) + picker.Pick(position[0], position[1], 0, scene.renderer) finally: - self.swap_pick_mappers(data_ids, use_pick_mapper=False) + self.swap_pick_mappers(scene, data_ids, use_pick_mapper=False) actor = picker.GetActor() # Find which pipeline owns the picked actor data_id = next( ( current_data_id for current_data_id in data_ids - if self.get_vtk_pipeline(current_data_id).actor == actor + if scene_object_of(scene, current_data_id).actor == actor ), None, ) @@ -409,10 +434,10 @@ def pick_cell_or_point( return data_id, id_to_select def pick_actors_under_coordinate( - self, data_ids: list[str], x: float, y: float, picker: vtkCellPicker + self, scene: Scene, data_ids: list[str], x: float, y: float, picker: vtkCellPicker ) -> tuple[list[vtkActor], int]: - renderer = self.get_renderer() - self.swap_pick_mappers(data_ids, use_pick_mapper=True) + renderer = scene.renderer + self.swap_pick_mappers(scene, data_ids, use_pick_mapper=True) actors = [] viewer_id = -1 try: @@ -425,14 +450,14 @@ def pick_actors_under_coordinate( finally: for actor in actors: actor.PickableOn() - self.swap_pick_mappers(data_ids, use_pick_mapper=False) + self.swap_pick_mappers(scene, data_ids, use_pick_mapper=False) return actors, viewer_id def get_composite_block_info( - self, pipeline: VtkPipeline, picker: vtkCellPicker + self, pipeline: VtkPipeline, scene_object: SceneObject, picker: vtkCellPicker ) -> tuple[vtkDataObject | None, str | None]: # Extract the specific block dataset and metadata from a picked composite flat index - if not isinstance(pipeline.mapper, vtkCompositePolyDataMapper): + if not isinstance(scene_object.mapper, vtkCompositePolyDataMapper): return None, None flat_index = picker.GetFlatBlockIndex() if not (0 <= flat_index < len(pipeline.block_data_sets)): @@ -453,12 +478,12 @@ def get_array_values(self, array: vtkDataArray, id_to_select: int) -> list[float def extract_picked_attributes( self, - pipeline: VtkPipeline, + scene_object: SceneObject, id_to_select: int, field_type: str, dataset: vtkDataObject | None, ) -> dict[str, list[float] | float]: - data_object = dataset or pipeline.mapper.GetInputDataObject(0, 0) + data_object = dataset or scene_object.mapper.GetInputDataObject(0, 0) if not isinstance(data_object, vtkDataSet): return {} field_data = ( @@ -478,7 +503,7 @@ def update_grid_scale_and_clipping_range(self, scene: Scene) -> None: renderer = scene.renderer if not grid_scale.GetVisibility(): self.fit_grid_scale_to_visible_props( - grid_scale, renderer, basemap_actors(self.get_data_base()) + grid_scale, renderer, basemap_actors(self.get_data_base(), scene) ) final_bounds = list(grid_scale.GetBounds()) if final_bounds[0] <= final_bounds[1]: @@ -490,7 +515,7 @@ def update_grid_scale_and_clipping_range(self, scene: Scene) -> None: def fit_grid_scale(self) -> None: for scene in self.get_scenes().values(): self.fit_grid_scale_to_visible_props( - scene.grid_scale, scene.renderer, basemap_actors(self.get_data_base()) + scene.grid_scale, scene.renderer, basemap_actors(self.get_data_base(), scene) ) @staticmethod @@ -574,10 +599,11 @@ def _update_grid_scale_axis_labels( grid_scale.SetAxisLabels(axis, None) def visible_scalar_bars( - self, data_id: str, pipeline: VtkPipeline + self, data_id: str, pipeline: VtkPipeline, scene_object: SceneObject ) -> list[tuple[vtkScalarBarActor, str, str, VtkPipeline]]: visible_bars: list[tuple[vtkScalarBarActor, str, str, VtkPipeline]] = [] - if pipeline.scalar_bar.GetVisibility() and pipeline.scalar_bar.GetLookupTable() is not None: + scalar_bar = scene_object.scalar_bar + if scalar_bar.GetVisibility() and scalar_bar.GetLookupTable() is not None: dataset = pipeline.filter.GetOutputDataObject(0) scalars = ( dataset.GetPointData().GetScalars() or dataset.GetCellData().GetScalars() @@ -585,38 +611,39 @@ def visible_scalar_bars( else None ) attr_name = scalars.GetName() if scalars else "Attribute" - visible_bars.append((pipeline.scalar_bar, attr_name, data_id, pipeline)) + visible_bars.append((scalar_bar, attr_name, data_id, pipeline)) - points_bar = pipeline.points_scalar_bar + points_bar = scene_object.points_scalar_bar if ( points_bar is not None - and pipeline.points_mapper is not None + and scene_object.points_mapper is not None and points_bar.GetVisibility() and points_bar.GetLookupTable() is not None ): - points_attr_name = pipeline.points_mapper.GetArrayName() + points_attr_name = scene_object.points_mapper.GetArrayName() visible_bars.append((points_bar, points_attr_name, data_id, pipeline)) - edges_bar = pipeline.edges_scalar_bar + edges_bar = scene_object.edges_scalar_bar if ( edges_bar is not None - and pipeline.edges_mapper is not None + and scene_object.edges_mapper is not None and edges_bar.GetVisibility() and edges_bar.GetLookupTable() is not None ): - edges_attr_name = pipeline.edges_mapper.GetArrayName() + edges_attr_name = scene_object.edges_mapper.GetArrayName() visible_bars.append((edges_bar, edges_attr_name, data_id, pipeline)) - for attr_name, scalar_bar in pipeline.scalar_bars.items(): - if scalar_bar.actor.GetVisibility() and scalar_bar.actor.GetLookupTable() is not None: - visible_bars.append((scalar_bar.actor, attr_name, data_id, pipeline)) + for attr_name, model_bar in scene_object.scalar_bars.items(): + if model_bar.actor.GetVisibility() and model_bar.actor.GetLookupTable() is not None: + visible_bars.append((model_bar.actor, attr_name, data_id, pipeline)) return visible_bars - def update_scalar_bars_layout(self) -> None: + def update_scalar_bars_layout(self, scene: Scene) -> None: + database = self.get_data_base() visible_bars = [ bar - for data_id, pipeline in self.get_data_base().items() - for bar in self.visible_scalar_bars(data_id, pipeline) + for data_id, scene_object in scene.objects.items() + for bar in self.visible_scalar_bars(data_id, database[data_id], scene_object) ] if not visible_bars: @@ -630,7 +657,7 @@ def update_scalar_bars_layout(self) -> None: cols = 5 actual_width = 0.10 row_height = 0.12 - text_style = self.get_scene_text_style() + text_style = scene.text_style for i, (bar, attr_name, data_id, pipeline) in enumerate(visible_bars): dataset = pipeline.filter.GetOutputDataObject(0) @@ -674,15 +701,14 @@ def update_scalar_bars_layout(self) -> None: bar.SetWidth(actual_width) bar.SetHeight(bar_height) - def render(self, scene_id: str | None = None) -> None: - """Push the image of a scene, of every scene when none is given.""" - scenes = [self.get_scene(scene_id)] if scene_id is not None else self.get_scenes().values() - for scene in scenes: - if self.getSharedObject("basemaps_dirty"): - self.coreServer.setSharedObject("basemaps_dirty", False) # noqa: FBT003 VTK API - update_basemaps(self.get_data_base(), scene.renderer) - self.update_grid_scale_and_clipping_range(scene) - self.getSharedObject("publisher").imagePush({"view": scene.view_id}) + def render(self, scene_id: str) -> None: + """Push the image of a scene.""" + scene = self.get_scene(scene_id) + if scene.basemaps_dirty: + scene.basemaps_dirty = False + update_basemaps(self.get_data_base(), scene) + self.update_grid_scale_and_clipping_range(scene) + self.getSharedObject("publisher").imagePush({"view": scene.view_id}) def register_object(self, data_id: str, data: VtkPipeline) -> None: self.get_data_base()[data_id] = data diff --git a/tests/conftest.py b/tests/conftest.py index 9591ddb2..ca128c7f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -119,17 +119,20 @@ def create_scene(self, scene_id: str = "scene_1") -> str: view_id = str(self.get_result("opengeodeweb_viewer.viewer.create_scene")["view_id"]) self.view_ids[scene_id] = view_id self.call("viewport.image.push.observer.add", [view_id]) - self._drain_initial_messages() + self._drain_initial_messages(view_id) return view_id def compare_image(self, filename: str, scene_id: str = "scene_1") -> bool: view_id = self.view_ids[scene_id] - self.call( - VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["render"]["rpc"], - [{"scene_id": scene_id}], + render_rpc = ( + VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["render"]["rpc"] ) + self.call(render_rpc, [{"scene_id": scene_id}]) while True: response = self.get_response() + if response.get("id") == "rpc:" + render_rpc and "error" in response: + msg = f"{render_rpc} failed: {response['error']}" + raise RuntimeError(msg) result = response.get("result") if not isinstance(result, dict) or "image" not in result: logger.info("response = %s", response) @@ -153,7 +156,7 @@ def _init_ws(self) -> None: } ) - def _drain_initial_messages(self, timeout: float = 10.0) -> None: + def _drain_initial_messages(self, view_id: str, timeout: float = 10.0) -> None: self.ws.settimeout(timeout) self.get_result("viewport.image.push.observer.add") # A fresh view then publishes its initial image, a reused one may not @@ -161,7 +164,11 @@ def _drain_initial_messages(self, timeout: float = 10.0) -> None: try: while True: result = self.get_response().get("result") - if isinstance(result, dict) and "image" in result: + if ( + isinstance(result, dict) + and "image" in result + and str(result.get("id")) == view_id + ): return except WebSocketTimeoutException: logger.info("No initial image received") diff --git a/tests/data/images/viewer/clipping_planes.jpeg b/tests/data/images/viewer/clipping_planes.jpeg index dd71e7846fa429edc26bc14569e91b4252b61275..07955857d995de7340a659133272f60760ed6e3e 100644 GIT binary patch literal 10095 zcmb_>by$?&^XR*~EG#KYNq2V(2uKS{EnU)$bP9qj-AIRkbcj+?f`D`i(%lV;q)I6l zKJoqCd!PH<`^WFT`#ihvoQX4M&dfQpGdHt0s{lSiK}i7sfdBw>`vGni0NGpUzxUh; z`R_@%<-X|z;4ly;h!X;$2f%O;1P;3C2B>b81VaGGt*ZY%=on~F7zhl(yhT&qE(8p@ z<^C5501zk`9fk(NxS0oVZrQ;25d7P<9{d-cR2bknz0H8#s{n$R5}Uz~d@St#<)%tagSip!}J($M#y zN2A#nH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5rds{!qv(X z<2a^tr3Jwf`eQM|c%RV+;KNWZZk1zD+R$BK6O>f%QTKVfF{igkx4|@og-t(37|1wG z+XZM~+U!(BQ`oi{FRY%Gd4)eoB^oiH5o=+BOJVn;P4=15jwKMV=VZOf>nccj8nD<3 zdQPu7Fu6t4#Dk_3&F3n{O>iR6y>TccW3N)PBAc%Fmms z;=ZGSU6Rw{r)o;4nN>k}0mwgt-BnW%0xN9`Zgr;1TLPX2{lHR*@thAYk7pp?!sTQ| z6{{Fe32a7uGTxaH%+~;Y7vO-y6F`rc*n5~ZS1=6%~9zy8mkkhgE zN(9xPxdNm32uY)zXeWnFu!elF>z1a83M9~sA;A%&m84OWgout1fDrKdr}XcF$1_h5 z6ed{~wfJV#7d@Bl<>8JmM5cAeW6FshC-IV5tx@tCw=h~f`}!2uJKxNIIcjHbGh$+cBS`e_FP z1Ni7baWR1JYPzkx*N%$~w^z?5`M@pa6DM2nT|ABtdMCT`xzw3wKI&2}Gfz#R;UvnwtpyY})A`FapM!2zWZ$uY z=8jAb3j>|HeX)@hbzZxoBzED(gZw=6eEFsoP4|^|O6rRa+-RV5W*A|)0K2###$dd# zH*1J&a1j7#`lG7@mf`(k@}n1mett@!W7upjVMHroBRc^4!sykJw7P zSG>-l*ehWAm5(6#?4*W@y?Np;b?%R3E!+McTPa!CK7lhUYV)g!e&@Z-96~@bPFX`A z+vB*)d6|TYYEM$e97(5~aYFx7FfWV~B!(xd@e-06D32LZ{I(7mTG8p@?|}B~X-7#J j{|9hgfZc}^IZhn-7B*gkkvtKOyzLudRIH7vhuQxFTgVay diff --git a/tests/data/images/viewer/polygon_attribute.jpeg b/tests/data/images/viewer/polygon_attribute.jpeg index f0849e56b3ae50a9a97dbdd70b9aa25be368864f..7dae0aa2054496feb20f682ea8bfc018f31d8047 100644 GIT binary patch literal 6001 zcmb_g2{=^k+dng7>@s5~>sVqCvLs7}>>&o(B726&zC<;4A|cDzN{leFW+(feeP5!Y zs6-}`>ocYXi=b^X74&Na{P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l3OU(h2wemq{d3d<^()V+t+Ldel!g_ KLU9LQ&ixlene^cR diff --git a/tests/data/images/viewer/render.jpeg b/tests/data/images/viewer/render.jpeg index 756910b6dab4ed077a8edbfcc3d5de6d9d7324e5..db5078d874efdb9e3b06ef45374fd9082af9eb55 100644 GIT binary patch delta 14534 zcmY*=b6{l8()PsOI2+q`HnwdW8{624la0NxZQHhO+xC9>-Fx5re((G-eX6Uwrl#kd z?s}@8IdbTCi>VjG1AqWPLBT*k0RMeKLP0=-fPsU;{Ot!|eJTEr5&!@Jg#d^Ay9$5@ z`qAG`&orT7vOS=@M2MWQ3<+FI z|5oXWLo-+T>Hl_;?*q}Zpz;a_=EBd@CH$X{0AjxTzE>sx{0yBEJ&UG7q-*JseONQf zu@*^RfV|ZVIm`%u4OdS+L0GGhWYnH1Xv_bPYmi-*e*wouhdnjyy6EmHR$O^?Q?|y) z7v#Dfnj}+)4<_T8E$3{YZWe{RXPn@hHu#&y#s8Vg`qQI<@JW`$73+ox_+SDbz38=_ zV8ZQlh^;$m5+q<}IUjX$xnfzP_^bMp>$3-Gbk|7=)&5_T!2&o$&&jJ}QF$;FE}@YC=T*n6i*g`!tVRpz}G3#uZ=Z|--)5jjh|wA_6EnNQU^q)`!I z?K0L0ug?*L-i3(NFx>wA_J4tObvSc*LFWBMbR2y`AeF&#K z6giCCVpnToSPKMFh*8wRsz0x*75{;pFm1@Zl3qu|Ble2xi0^-f{!ar|N;BllC(Zuwj{^8Vy&wcJB2LUK z&8xj`r%kuDl-_+L>Hnkqr-fu8uZJ-C|9b#{uiKp&2>=2P3IGR#1_eOskW@J)eX8le=O2%g3`}G_^e?1}~5TJhn<9@$^o$Jck&V>GHgj0k z@TTcMjp2z6B_f7^i7f4;Q_MVfl9?7Ohmsk)M``Ybud*{6*jN1pmd5$~JpB=pj>;&` z5t0Y}nKF{WQye6a9wr*bOi%if^o)fA71qgfxJw*867vHzf6yJ&v-%f#!l9JgGZJ6H z1x?G{Z>(K*o|=E3xcfm^y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<_qm=&oM6P^Go=vdray!;0);wRfMyrEYuT}Ccr&(-tSJ4zf^#f@~%|S;E zC>3T=0t9eHu^2g#rUl7b{V-!euWm3Ubp zrtiCL_4#u*V-V_md;Ygm;k^joTky;cM?mt;_AwXt@3*gqRoz6f z!%c08G(|=}tEvLfFN4U?!7}i`WO}|GK*kj9o>x|~b?imI5i&W%qpcE{u8Q4(Yf7gC z4N5>t_K%ZHT6c~}j#_8GHr%>6HW~MARq#i}BVt#C8zsID z4-gP9OH7GCnlAh@$)Sp_7Frcn7cK+icRPQRV5WPfYurN^J$F!F&Y;fH{v@tfCVNmR zlxCpLOi{%g!LO$;U6=cPh|%Oc`vkb&NZbwQU#gvJBnu((!;9@-(L_ZI?nYxsN=1p} z3w3>mxW?_P1_yJxl9kc=N*2?APgfse<1ctk`KJ+K{tlEE!a=j>c3zKt78O%kbt?aC zp8!P=5)dUP^icc_OGsFV@$--r8ZS`^Df&?LuwkZycHstr4NGtzItWlv0aXl52I{mG zkPQPju<1dj<-#j#<}spnWH7Z|oxwW&8O0j+qZ^HC#cUhCg^hM2kB%qN)%@VUZKK8oOYu6zinv}hBztA))Kt?4y?;NHd z9wMGm#g4I4A`{rh=-v7F2HMu>%S= zw2oD(KCv-TXp1r;e<=@Xgpbq)-i{*X` zQ(%KoGCwQ^=Wprr8`Vo3@GnEF1;jvU^Eh6EUhCB}0<151$v)b_ih-a}hX$9%2I+td rK~!)O5=*KJ4a73lj(>uKYAkT5!+fX_Ht6k5a~%SVa%f+L-hTWa0_`FW diff --git a/tests/data/images/viewer/reset_camera.jpeg b/tests/data/images/viewer/reset_camera.jpeg index 35b6a3d48a33a5b247cedb58137770255ba7d5f3..f244991248e350148f3a7e6f5ff485abd9920960 100644 GIT binary patch literal 2119 zcmex=qb(k5I7?=bZ znFSgDA7PLJIgWuD=u$XfV`XMx=K#t{f@P4U7?_w@SlRyHV&DPlU=m;!0Q&N`16=2D zWiT(~`u2Qd_VWZ}5AxLZs~$hKbMdF%m(|jC9;;(x43MSK*}(9W7hqswVq{@PNU^Xo zvjGEAB*3s>0WefKfC0|P%JgH}><$Hospt3?&zZq?`NHx%bB`E9-_^{SlUE&|tx&!rRgFjTZMvS&21%=^p>$bw#w|d_h^4&aJZk-!FEmwT*DsH(0|CAxF0D6*v znG@y+2B<59l?)kJ9UOs%JO=oZ@PqJ?pCegk=Re_k>tkg^G0?T>nfLi4C_6yY#KW_*ef0r_u`Dqz`H>%tngy zHrj}kSSC$>w)e83{UYwO70c%wX4v^JXwnVugbP}xpbImX|mlOo@=v?*1N=UDNfTmu|8f^yY9BTO_cSb ziY@h={WE@rcrKiA?|s0=oO837%PxMp**Hb@+MOb?3Z@>td1pVxcC3ECYjXc^QC*{oS(7v-;Fg<*)qpVuJ^q}@UY23@$Kc)X8VOb<|(aYw$D|wtxt(c zImN;?|t$I_GilF^L<)+ zDyezTp%wPN+P+i%Gr)>PU?yZ>0G5oy9R#6x(8&UYi^gFF#+-~GFya{DWfM>ZqoATA zgP}tJqEHg}n3vz=ac0XU57yOP4y(DoqC;~WtMg;X6Bh}#voCthF!B?*@Fxc03{_v zN&?l{f{Mt6vAw`Y9ktpeYd5E-{tRRMv-i;_q4mB}jERnx0e&S?R=HF9l_~-hYzws_ zg#I)5sB;PNFzgn1A$C(%)u5u~$bnUX;#@is)(@`ETpXjEJfSdE=iut&x~n&y*qL`# fh@I>C-($0`-tSv4BVs5pspQ%+|8r^<|8D{Sg_t3i literal 1072 zcmeH^I}XAy5JYFZ0!4_zmf!$Tr%ay$DH2=?ZW7LdI0T=DBXEOd9R-m@N+?pox>|d@ zpLu%G2mG$s79auIf!?vPY+S@5<0{y1Js~7anF`l%ffA@^EUQt`jG0|8;sWi^8|Fed zFWz=5pY7LQ&-T$Y-!<)MrX^-2CoU_aB6JmpN+D#kGx3MEd{$ diff --git a/tests/data/images/viewer/set_background_color.jpeg b/tests/data/images/viewer/set_background_color.jpeg index 176dc5f1b6e8945c9cd77b04b3a254b0836841d8..497a6d4f6b03ece643b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ek&A&p&>dapaSIp0idr{Xv^czIP9-1ejkr&pd z#Fx$2x5gDlcX_>ez8qY2Wmq0gZ1@VKBYgnEuQ#bt;Y+NS)#FUzF$F4@6T;=Zl4;iq zyu;@P^CnC8r#bX&mYDSHH;*jv5+k6N0UrP+<)v-`@Uk8>s7{E@ ze$|6|)&$1X;G<#;Ot3s304uaN*a$Lmv{`C0moLBoR6wZ#l!h{(qL5l{$PADcUg%T| zm>;Nt7TF}yi z2+<;n`wW!bHrVMil!jdA1>o8|EOCM|Xe5m#GL*cp#5g6GeC+GuXz)xTqkK%3{C7-} z3o2|?4T(MJn7dccI+k(enY_%TC;bpmBEab9v3F<<7bKF2D9V0iJ*9=TA3dJ4LaaL^ zobC`F1n^9es-f8IYr}fhnexoYOCZX5%NRqC44)D0VC)3t^DcAiwJ`b`#?A#m!PpK>%R|s309yZcYR}>0l+!laqK5 z;DKYE+3I6@hP=FKJmr?{?o!Pzsbn*K#Z5@8z(hR5SW-!SMF&q3UAbnH{iYCypt>)r zwAs3zQr!BRfMFZMTRzn^bemka7F{&I7>XaEp{Uz->nTvSmD-xp7rp{9FH>GuKAi|4 zeV^1cg&vG(K-Kajv8L=+2jJb|7yME` zKhat5-Z85jfWZcNZr%CFm@AKiy988il%N2T_8-6ysaG)C9-=0g?T<$U)&+C7-$LE% zhn{kr;7MzEL{zcEH7Jie#Z!+2AA}fM*i{!6k5ddN|W0Mc%eV{W0he{Xo6BmMqZ`Coz8QkMV# diff --git a/tests/data/images/viewer/take_screenshot_with_background.jpg b/tests/data/images/viewer/take_screenshot_with_background.jpg index b490cfc531dea2276a37cc744dc653f6eae4dafe..e9cbb06b2063ffc4ceb83d717b86b43aff1bf1ad 100644 GIT binary patch literal 7160 zcmb_=bx>T(v;Wy$*j)%N!QBZ-aDoPRcL)+RxI^&Z7Tg^chadrhdmw0V36=l>f(3$W z0>90@H@|nkuj>8rs@|MBGt<-k>C>mGXL`Et=I>Sk9C>LuX#fNQ01)y4?v?-v01W!w ze)r(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mnam%c zJ{0db8=+9K>UPIPbQ5Clc;y_F0jMBQww6Pj!@uL+k~_5;a3wcHUt*7m2nLDe9q6cj%Os(eq_AYWoS2r?@i>F2`=?g8eF zCDLRM&xeCIE-!zv^5Bi+0>Lq?fXz9%&+%n6chtU*b7Cv69;n8$DO<{nGjQs!-M=(RtT@Zb(@H}E6{GRquSw>k-20l&tmjOa#Jq5Z?A6R0?;}ZT&5I) z^OXth>j-+P4j>1GwjGAqCBrhD9xvoQR`l){;Yk%2Z7_EQ;lv8UOojy*+R{1FQ`}-c zIX=jDWsSP-{aF`mXeV#_-d8F}m?Sw;2P)F6E>zT$mV|p-c~z<5ej-r-OIih2=1s+1 zP9?A;iCA7GD;j?-Om|BtOukIWgZOi{n|tFa-m8r8iZ%EPViP@G0q>l$CtsKXdawnV z*twOo1XBeO)zqD9o8$%~v>VtRsW%=|Q3=$fppUAEgtf6-y&x)v%|oQKVGc-^$h5i= z7FR6~5@+VTCKYX+mz4Tg`~%btUp}d-J_8!XjcxCGYR=0v$@Nc;?&9ComqRlK7bJSt(3#gT@*{ zIV#V>UxX|&r*r3HEP)59{u?)!401e2`1>9e^ky403C?E~k+JMuF}S2haunhNB_xx~ zI>^OdDdV;@_5Z55K*KVO4Jiew2Z1<>Q|Q=q4Tt3o(m8HEOL;F@)IoT|?uY6$JPJmB z+d-y%dA(<*c#_Y8SNKzC7X1r70=I~~a+rf~r!L^u1aiRq%#sUD55;*-rUc@e{}Fw_ zeJm!9K+o7v}ySm^p-PCd!iN~H61j-7)EMBIe`qX4r2`u`Kp%@~X6k>1~%D-%vpJoZnqESV5 zBh^9`W)bxKc8iH=1}r!kpIQ@@XioqP>Ji;!Zr6a{RiJbiz>3`bZZqA2SKd)6>5FrDjV?|E6h c!eLdvk|p1G^U8cGX0fda3ttHNv~)4^KN$&m-T(jq diff --git a/tests/data/images/viewer/take_screenshot_with_background.png b/tests/data/images/viewer/take_screenshot_with_background.png index 6dcfc0baa41a2bc42fdd63ba455d75aa2ef90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OEkKq22PZY`zS8#;Vebf1WYMP7zE0pr3pIhT#^#aWsr--0R+cZ$UjcCK$Gvk?@= z15IF3JM-$P1Camr_KweChkQ%LaX6DVq!PV9Z!oW(Z{)4d+2;Bw%oh_9@1Jr$Q?vqA z794D9+rU^RPtFqi@-yfWnDS5qn{QVTFOn;=Vi~V2fZ5~3H#Lmx*^)@amiR72EBOBQ zkoXHw;CaLcX_7#)N4D}$Se~(GBbY9x^^7yOl&h%i*SvBfAE}%r5qM*7zb@FIe*?J< zRbZwzZ+4x6X9I1H<=8H`gR?ZHd>fk93)(Gb^D$PG*zhN?73^BiunMmj>~ZM$j2J9! zHs`n#9D3nmp74dkN~5X0KI|4e$5~1t?;Pd$Zbl+N?r*GI)W!uOwP>35>Hps^Eo5}C Z_%9yax{W>=r2DrzsFJ2)oxD}#{{XrNA&&q6 diff --git a/tests/data/images/viewer/take_screenshot_without_background.png b/tests/data/images/viewer/take_screenshot_without_background.png index d67f309cd8e9302deeafa8c155c0d6f007241895..a25f22fa108ff7c661832d2daed88a529c293522 100644 GIT binary patch literal 12088 zcmeHt`8(8K`1i%OLj41 z3!$-$eHpSp$M^dF4bSt-<9fTeT;qMtxzD}4Ua$L()YH|xOv6C~fj};6JyJ7(K*&VT zzb{gOzxciR;01x)fM}^bH1suJn{smJT6}YBv(SH?S^CCi+a^Vu>K8E+MyDj2ZVRHH+~zSbaS+KExn;MJ(!-i5?EhwDBEkL(-01Nz zOd&WD21X{>;9`8q+Uhi6ZJ6O@1)ARsw-|LzqdNJH1C@^ho6VEbeHFNO_xCxW!$$0g z77vUOm4O{w+N+IeMcXQqJbNSAOkK040CxHa)t%FBNRr*bUR&D*m7GD5z-Hx=+AAm# zDp*p!LGdHG%nvcKv5MECJHv;UJ@f19IaO6vHKK*1I&<}zRS6#K1ds6|6QksZhT^HS zBqV>Lz_O@SmhY$7a>>-5*2NvC>B9BSsL5NmZn^KTPcbWH->LIj!6&_V@q+*SJ6+^6 z^hb-SL$RT-$NcwL=K1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M#U7k{&z7zoXY zKRtr=K5NzJnF!S?uRXjkhSF%dp5$s^Vq)TZbeRhdNtg*F>^6+_m|K|3g#n%foc|F9 z49!1~Y=lA45cQ=)tkknLW~j_ZQs3GMkr|y zSTDm74qtka^EV5#V2cz%reFV}$|ETu;VufwPMU@pPzdb09H;0o_W4T$au=$KTH_rA zG~jznZ4oA1he)Nd&_8{BeI~F%?x3=(fOhG-FM$#O^%-u*b=WR|r_vQCon(^fe!!j^uXJgXRIap2tu6BGg`m2xaf zYkoU>yNDvAuir2SlJP0L+_zl!78}EW@eBsO{Pf`~IOss&Ekx@iUuxg+ZYJ^A&XkRD zd_O)kEJ_5UU)qoeRPODtASK8_vD6z6A0E01a4e%tBZkQ>_1?{KEa`e^99|;VD&ph+ e_7~y)B|$riC23arE;%?j2vJkgP%Kt35B`5aS3L*- diff --git a/tests/data/images/viewer/update_camera.jpeg b/tests/data/images/viewer/update_camera.jpeg index 756910b6dab4ed077a8edbfcc3d5de6d9d7324e5..db5078d874efdb9e3b06ef45374fd9082af9eb55 100644 GIT binary patch delta 14534 zcmY*=b6{l8()PsOI2+q`HnwdW8{624la0NxZQHhO+xC9>-Fx5re((G-eX6Uwrl#kd z?s}@8IdbTCi>VjG1AqWPLBT*k0RMeKLP0=-fPsU;{Ot!|eJTEr5&!@Jg#d^Ay9$5@ z`qAG`&orT7vOS=@M2MWQ3<+FI z|5oXWLo-+T>Hl_;?*q}Zpz;a_=EBd@CH$X{0AjxTzE>sx{0yBEJ&UG7q-*JseONQf zu@*^RfV|ZVIm`%u4OdS+L0GGhWYnH1Xv_bPYmi-*e*wouhdnjyy6EmHR$O^?Q?|y) z7v#Dfnj}+)4<_T8E$3{YZWe{RXPn@hHu#&y#s8Vg`qQI<@JW`$73+ox_+SDbz38=_ zV8ZQlh^;$m5+q<}IUjX$xnfzP_^bMp>$3-Gbk|7=)&5_T!2&o$&&jJ}QF$;FE}@YC=T*n6i*g`!tVRpz}G3#uZ=Z|--)5jjh|wA_6EnNQ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(KCv-TXp1r;e<=@Xgpbq)-i{*X` zQ(%KoGCwQ^=Wprr8`Vo3@GnEF1;jvU^Eh6EUhCB}0<151$v)b_ih-a}hX$9%2I+td rK~!)O5=*KJ4a73lj(>uKYAkT5!+fX_Ht6k5a~%SVa%f+L-hTWa0_`FW diff --git a/tests/data/images/viewer/vertex_and_polygon_attribute.jpeg b/tests/data/images/viewer/vertex_and_polygon_attribute.jpeg index f460a12eac20460ffcba879f6089bd68362b8c47..41c1c4f71ecbaa80b514098635a59a7cf98b4cad 100644 GIT binary patch literal 8747 zcmb_>1z1$w_V<}&=ph9phm=r;5u_Plq@+VYLK-Or1eES>Bo*mYkVaA|DG5OgS{kH7 zKmqxK`o8!3-}`*ecc16|*36l`*4k_TcAT~MnX}gE=hH6$Qb|rx4gi4w0Ce^NPR9Y+ zGwGkvImkalIBR{{29O~@ydYi(2nB%2KoBy}X$Qb~Hb^k!7dY^T@DMOKJ`_R#0-x2> zp3UT}`meh45)6UD;HP5%5#+2X5`sLNX~X|n|NrJyDy*^H8WISq|NHj>zNH<=(C-{; z^aj4k@y}oEnS@S1s1Qs%*TWiL9E|)p=gtT(a{M;IWav2y4bm$P{C;xIo)M&fu#r#G z@0`{9F=G;`ea@W`lT;qp&FEheNVHW;+Ud6%0EbL-t6nz&Kywn&8-0l-0DE16>gBCJ zwYuZ5B1!~a03~NBdCnbnzfUO1vE*x_^zQ+Dxa1_^UuJY9Cq@zV1?x>a{F%hQCh)Jf zVp_jme290o1!DE_zC6zFHyk)=l0*Y(q;PZ$?=M*(>M}1@vju>~RKODLdFh?wZzB-h zPaj{|G57DI)4p<}T7H#fHn;~U0JyIVTzg8Va{2JL*{@#`8$W0}scQa9;E>4$14@Zx zcuOO`A(b01aaZCmvojl5*o$q`_gsV-sGe3Deh5Q+Yy4zeVeX#k^1PZsEcTbBiK+1g zG+n<|`8lQ-S~gFArDK6~51@NBl>a#O0zpRXQ0U*dAjWQ;GA5pBQ(N)OE9Uc0S;8}Q zNgtblNc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vt<7opp0LWy&OfSi9~pda*tzR^Iehu7{d$S zwrNXm>wl4ji7?k)wZp;9y)Qo zL9}$mFkcTENlWyJ;|%y7bVQ1_L8kEFfHv6jnWPO_xjo@H-WWJo8;FK933=jLqO_Wm zN{W^M89lhF-EwI#&x-N*ukdb`a3#tgRi(Sl!z-|2@L0AxCxP&zf-kHxngpm)-V&x` zXd&}q=Q0q-R z{5io3&%Ns3am^*H}_uc}t^eQXlMn4I@i;|BjDf@bG9xr`1Q6itm2Vqx^ z+cZ)8m?~CFIjZX4X&GdpWYICr88i!Wh-~JNuYTlW*29|-udvzJA{Lk)P|p23@xUDR z)Fr2c*60Uy;bj-ZHDE0vIr= None: reader = vtkXMLPolyDataReader() reader.SetFileName(str(path)) reader.Update() - pipeline = VtkPipeline(reader, vtkDataSetMapper()) + pipeline = VtkPipeline(reader) + scene_object = SceneObject(vtkDataSetMapper()) pipeline.filter.SetInputConnection(reader.GetOutputPort()) pipeline.filter.Update() - [surface] = pipeline_surfaces(pipeline) + [surface] = pipeline_surfaces(pipeline, scene_object) assert surface.GetNumberOfPolys() == 1 # Hidden data is never draped - pipeline.actor.VisibilityOff() - assert pipeline_surfaces(pipeline) == [] + scene_object.actor.VisibilityOff() + assert pipeline_surfaces(pipeline, scene_object) == [] def test_surfaces_clipped_to_the_detail_bounds() -> None: diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index e61960ef..c5909de9 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -20,7 +20,6 @@ from tests.mesh.points.attribute.vertex.test_points_attribute_vertex_protocols import ( test_register as test_register_points, ) -from tests.mesh.test_mesh_protocols import test_register_mesh if TYPE_CHECKING: from collections.abc import Callable @@ -34,27 +33,37 @@ mesh_id = "12345678901234567890123456789012" +def show_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: + server.create_scene() + register_hat(server, dataset_factory, mesh_id) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": mesh_id}) + + def test_reset_visualization(server: ServerMonitor) -> None: server.create_scene() server.call( VtkViewerView.viewer_prefix - + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"] + + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], + [{"scene_id": "scene_1"}], ) assert server.compare_image("viewer/reset_visualization.jpeg") def test_reset_camera(server: ServerMonitor) -> None: + server.create_scene() server.call( - VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_camera"]["rpc"] + VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_camera"]["rpc"], + [{"scene_id": "scene_1"}], ) assert server.compare_image("viewer/reset_camera.jpeg") def test_set_viewer_background_color(server: ServerMonitor) -> None: + server.create_scene() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_background_color"]["rpc"], - [{"color": {"red": 0, "green": 0, "blue": 255}}], + [{"scene_id": "scene_1", "color": {"red": 0, "green": 0, "blue": 255}}], ) assert server.compare_image("viewer/set_background_color.jpeg") @@ -63,7 +72,14 @@ def test_set_text_style(server: ServerMonitor, dataset_factory: Callable[..., st test_grid_scale(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "courier", "opacity": 0.5}], + [ + { + "scene_id": "scene_1", + "color": {"red": 255, "green": 0, "blue": 0}, + "font_family": "courier", + "opacity": 0.5, + } + ], ) assert server.compare_image("viewer/set_text_style.jpeg") @@ -74,7 +90,14 @@ def test_set_text_style_then_attribute( test_reset_visualization(server) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "times", "opacity": 1.0}], + [ + { + "scene_id": "scene_1", + "color": {"red": 255, "green": 0, "blue": 0}, + "font_family": "times", + "opacity": 1.0, + } + ], ) test_register_points(server, dataset_factory) server.call( @@ -98,12 +121,12 @@ def test_set_text_style_then_attribute( def test_get_point_position(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["get_point_position"]["rpc"], - [{"x": 0, "y": 0}], + [{"scene_id": "scene_1", "x": 0, "y": 0}], ) result = server.get_result( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["get_point_position"]["rpc"] @@ -124,13 +147,14 @@ def test_get_point_position(server: ServerMonitor, dataset_factory: Callable[... def test_take_screenshot(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) # Take a screenshot with background jpg server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"], [ { + "scene_id": "scene_1", "filename": "take_screenshot_with_background", "output_extension": "jpg", "include_background": True, @@ -154,6 +178,7 @@ def test_take_screenshot(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"], [ { + "scene_id": "scene_1", "filename": "take_screenshot_without_background", "output_extension": "png", "include_background": False, @@ -177,6 +202,7 @@ def test_take_screenshot(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"], [ { + "scene_id": "scene_1", "filename": "take_screenshot_with_background", "output_extension": "png", "include_background": True, @@ -203,7 +229,7 @@ def _png_size(blob: bytes) -> tuple[int, int]: def test_take_screenshot_custom_size( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"] def screenshot(**size: int) -> bytes: @@ -211,6 +237,7 @@ def screenshot(**size: int) -> bytes: rpc, [ { + "scene_id": "scene_1", "filename": "take_screenshot_size", "output_extension": "png", "include_background": True, @@ -235,11 +262,11 @@ def screenshot(**size: int) -> bytes: def test_picked_ids(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["picked_ids"]["rpc"], - [{"x": 0, "y": 0, "ids": ["00000000000000000000000123456789"]}], + [{"scene_id": "scene_1", "x": 0, "y": 0, "ids": ["00000000000000000000000123456789"]}], ) response = server.get_rpc_response( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["picked_ids"]["rpc"] @@ -262,21 +289,20 @@ def test_picked_ids(server: ServerMonitor, dataset_factory: Callable[..., str]) def test_grid_scale(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: data_id = "00000000000000000000000123456789" - dataset_factory(data_id=data_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_scene() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], + [{"scene_id": "scene_1"}], ) assert server.compare_image("viewer/reset_visualization.jpeg") - server.call( - VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], - [{"id": data_id, "name": "hat.vtp"}], - ) + register_hat(server, dataset_factory, data_id) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) assert server.compare_image("viewer/register_hat.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["grid_scale"]["rpc"], - [{"visibility": True}], + [{"scene_id": "scene_1", "visibility": True}], ) assert server.compare_image("viewer/grid_scale_on.jpeg") @@ -285,15 +311,14 @@ def test_grid_scale_after_clipping_removal( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: data_id = "00000000000000000000000123456789" - dataset_factory(data_id=data_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_scene() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], + [{"scene_id": "scene_1"}], ) - server.call( - VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], - [{"id": data_id, "name": "hat.vtp"}], - ) + register_hat(server, dataset_factory, data_id) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) assert server.compare_image("viewer/register_hat.jpeg") clipping_planes_rpc = ( @@ -301,16 +326,22 @@ def test_grid_scale_after_clipping_removal( ) server.call( clipping_planes_rpc, - [{"ids": [data_id], "planes": [{"origin": [0.0, 0.0, 0.0], "normal": [1.0, 0.0, 0.0]}]}], + [ + { + "scene_id": "scene_1", + "ids": [data_id], + "planes": [{"origin": [0.0, 0.0, 0.0], "normal": [1.0, 0.0, 0.0]}], + } + ], ) assert not server.compare_image("viewer/register_hat.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["grid_scale"]["rpc"], - [{"visibility": True}], + [{"scene_id": "scene_1", "visibility": True}], ) assert not server.compare_image("viewer/grid_scale_on.jpeg") - server.call(clipping_planes_rpc, [{"ids": [data_id], "planes": []}]) + server.call(clipping_planes_rpc, [{"scene_id": "scene_1", "ids": [data_id], "planes": []}]) assert server.compare_image("viewer/grid_scale_on.jpeg") @@ -320,7 +351,7 @@ def test_axes(server: ServerMonitor) -> None: server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["axes"]["rpc"], - [{"visibility": False}], + [{"scene_id": "scene_1", "visibility": False}], ) assert server.compare_image("viewer/axes_off.jpeg") @@ -330,44 +361,54 @@ def test_set_orientation_widget_compass(server: ServerMonitor) -> None: test_reset_visualization(server) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0}], + [ + { + "scene_id": "scene_1", + "color": {"red": 255, "green": 0, "blue": 0}, + "font_family": "arial", + "opacity": 1.0, + } + ], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"marker": "compass"}], + [{"scene_id": "scene_1", "marker": "compass"}], ) assert server.compare_image("viewer/orientation_widget_compass.jpeg") - test_reset_visualization(server) - def test_set_text_style_after_compass(server: ServerMonitor) -> None: test_reset_visualization(server) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"marker": "compass"}], + [{"scene_id": "scene_1", "marker": "compass"}], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0}], + [ + { + "scene_id": "scene_1", + "color": {"red": 255, "green": 0, "blue": 0}, + "font_family": "arial", + "opacity": 1.0, + } + ], ) assert server.compare_image("viewer/orientation_widget_compass.jpeg") - test_reset_visualization(server) - def test_orientation_widget_keeps_visibility(server: ServerMonitor) -> None: test_reset_visualization(server) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["axes"]["rpc"], - [{"visibility": False}], + [{"scene_id": "scene_1", "visibility": False}], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"marker": "compass"}], + [{"scene_id": "scene_1", "marker": "compass"}], ) assert server.compare_image("viewer/axes_off.jpeg") @@ -378,10 +419,10 @@ def test_set_orientation_widget_none(server: ServerMonitor) -> None: VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"] ) - server.call(orientation_widget_rpc, [{"marker": "none"}]) + server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "none"}]) assert server.compare_image("viewer/axes_off.jpeg") - server.call(orientation_widget_rpc, [{"marker": "axes"}]) + server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "axes"}]) assert server.compare_image("viewer/reset_visualization.jpeg") @@ -391,19 +432,19 @@ def test_orientation_widget_none_keeps_visibility(server: ServerMonitor) -> None VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"] ) - server.call(orientation_widget_rpc, [{"marker": "none"}]) + server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "none"}]) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["axes"]["rpc"], - [{"visibility": False}], + [{"scene_id": "scene_1", "visibility": False}], ) assert server.compare_image("viewer/axes_off.jpeg") - server.call(orientation_widget_rpc, [{"marker": "axes"}]) + server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "axes"}]) assert server.compare_image("viewer/axes_off.jpeg") def test_update_camera(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) camera_options = { "focal_point": [-0.034399999999999986, 2.4513515, -0.10266900000000012], @@ -417,6 +458,7 @@ def test_update_camera(server: ServerMonitor, dataset_factory: Callable[..., str VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { + "scene_id": "scene_1", "camera_options": camera_options, } ], @@ -425,7 +467,7 @@ def test_update_camera(server: ServerMonitor, dataset_factory: Callable[..., str def test_render(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) camera_options = { "focal_point": [-0.034399999999999986, 2.4513515, -0.10266900000000012], @@ -439,6 +481,7 @@ def test_render(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { + "scene_id": "scene_1", "camera_options": camera_options, } ], @@ -446,22 +489,27 @@ def test_render(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["render"]["rpc"], + [{"scene_id": "scene_1"}], ) assert server.compare_image("viewer/render.jpeg") def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: + server.create_scene() dataset_factory( data_id="00000000000000000000000123456789", viewable_file="polygon_attribute.vtp", viewer_elements_type="polygons", ) - server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": "00000000000000000000000123456789", "name": "hat.vtp"}], ) + server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) + scene_rpc( + server, "add_to_scene", {"scene_id": "scene_1", "id": "00000000000000000000000123456789"} + ) assert server.compare_image("viewer/polygon_attribute.jpeg") dataset_factory( @@ -473,6 +521,10 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": "00000000000000000000000987654321", "name": "vertex_attribute.vtp"}], ) + server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) + scene_rpc( + server, "add_to_scene", {"scene_id": "scene_1", "id": "00000000000000000000000987654321"} + ) assert server.compare_image("viewer/vertex_and_polygon_attribute.jpeg") camera_options = { @@ -487,6 +539,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { + "scene_id": "scene_1", "camera_options": camera_options, } ], @@ -494,7 +547,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_z_scaling"]["rpc"], - [{"z_scale": 2.5}], + [{"scene_id": "scene_1", "z_scale": 2.5}], ) assert server.compare_image("viewer/set_z_scaling.jpeg") @@ -502,35 +555,35 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str def test_combined_scaling_and_grid( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: + server.create_scene() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], + [{"scene_id": "scene_1"}], ) assert server.compare_image("viewer/reset_visualization.jpeg") - dataset_factory(data_id=mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.call( - VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], - [{"id": mesh_id, "name": "hat.vtp"}], - ) + register_hat(server, dataset_factory, mesh_id) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": mesh_id}) assert server.compare_image("viewer/register_hat.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["grid_scale"]["rpc"], - [{"visibility": True}], + [{"scene_id": "scene_1", "visibility": True}], ) assert server.compare_image("viewer/grid_scale_on.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_z_scaling"]["rpc"], - [{"z_scale": 2.5}], + [{"scene_id": "scene_1", "z_scale": 2.5}], ) assert server.compare_image("viewer/combined_scaling_and_grid.jpeg") def test_clipping_planes(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "planes": [ { @@ -546,11 +599,12 @@ def test_clipping_planes(server: ServerMonitor, dataset_factory: Callable[..., s def test_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -560,20 +614,21 @@ def test_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N def test_explode_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"ids": [mesh_id], "explode_factor": 0.5}], + [{"scene_id": "scene_1", "ids": [mesh_id], "explode_factor": 0.5}], ) - assert server.compare_image("mesh/register.jpeg") + assert server.compare_image("viewer/add_to_scene.jpeg") def test_clipping_then_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "planes": [ { @@ -588,6 +643,7 @@ def test_clipping_then_shrink(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -597,11 +653,12 @@ def test_clipping_then_shrink(server: ServerMonitor, dataset_factory: Callable[. def test_shrink_then_clipping(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - test_register_mesh(server, dataset_factory) + show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -611,6 +668,7 @@ def test_shrink_then_clipping(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "planes": [ { @@ -625,14 +683,17 @@ def test_shrink_then_clipping(server: ServerMonitor, dataset_factory: Callable[. def test_ruler(server: ServerMonitor) -> None: + server.create_scene() server.call( VtkViewerView.viewer_prefix - + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"] + + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], + [{"scene_id": "scene_1"}], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["ruler"]["rpc"], [ { + "scene_id": "scene_1", "points": [[-0.2, -0.2, 0.0], [0.2, 0.2, 0.0]], } ], @@ -640,8 +701,11 @@ def test_ruler(server: ServerMonitor) -> None: assert server.compare_image("viewer/ruler.jpeg") -def register_hat(server: ServerMonitor, dataset_factory: Callable[..., str]) -> str: - data_id = "00000000000000000000000123456789" +def register_hat( + server: ServerMonitor, + dataset_factory: Callable[..., str], + data_id: str = "00000000000000000000000123456789", +) -> str: dataset_factory(data_id=data_id, viewable_file="hat.vtp", viewer_elements_type="polygons") server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], @@ -706,3 +770,41 @@ def test_delete_scene(server: ServerMonitor, dataset_factory: Callable[..., str] scene_rpc(server, "delete_scene", {"scene_id": "scene_2"}) response = scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) assert "error" in response + + +def test_update_camera_only_moves_its_scene( + server: ServerMonitor, dataset_factory: Callable[..., str] +) -> None: + server.create_scene() + server.create_scene("scene_2") + data_id = register_hat(server, dataset_factory) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) + scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) + camera_options = { + "focal_point": [-0.034399999999999986, 2.4513515, -0.10266900000000012], + "view_up": [0.48981180389508683, 0.8647097694977263, -0.11118188386706776], + "position": [-17.277630202755162, 13.419047188880267, 9.232808007244259], + "view_angle": 30.0, + "clipping_range": [11.403438348232822, 36.44815678922037], + } + server.call( + VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], + [{"scene_id": "scene_2", "camera_options": camera_options}], + ) + assert server.compare_image("viewer/add_to_scene.jpeg", "scene_1") + assert server.compare_image("viewer/update_camera.jpeg", "scene_2") + + +def test_remove_from_scene_unknown_data_is_not_found(server: ServerMonitor) -> None: + server.create_scene() + response = scene_rpc( + server, + "remove_from_scene", + {"scene_id": "scene_1", "id": "00000000000000000000000123456789"}, + ) + assert "Data 00000000000000000000000123456789 is not in scene scene_1" in str(response["error"]) + + +def test_render_unknown_scene_is_not_found(server: ServerMonitor) -> None: + response = scene_rpc(server, "render", {"scene_id": "scene_1"}) + assert "Scene scene_1 not found" in str(response["error"]) From 1247bfb8b82cbd29a7e199f730ecdaec50275f1e Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Mon, 30 Nov 2026 14:26:15 +0100 Subject: [PATCH 05/22] feat: style data per scene Mesh, model and image style RPCs take a scene_id and style the scene's own render objects. Cell attributes now colour through field data, so the requested component is honoured: cell_color_map_item and polygon_attribute_item references previously showed component 0. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 370 ++++ opengeodeweb_viewer_typed_schemas.d.ts | 1755 +++++++++-------- src/opengeodeweb_viewer/basemap_pipeline.py | 12 + .../object/object_methods.py | 329 ++- .../rpc/image/image_protocols.py | 4 +- .../rpc/image/schemas/opacity.json | 5 + .../rpc/image/schemas/opacity.py | 1 + .../rpc/image/schemas/visibility.json | 5 + .../rpc/image/schemas/visibility.py | 1 + .../cell/cells_attribute_cell_protocols.py | 2 +- .../attribute/cell/schemas/attribute.json | 5 + .../cells/attribute/cell/schemas/attribute.py | 10 +- .../cells_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 10 +- .../rpc/mesh/cells/cells_protocols.py | 6 +- .../rpc/mesh/cells/schemas/color.json | 5 + .../rpc/mesh/cells/schemas/color.py | 1 + .../rpc/mesh/cells/schemas/opacity.json | 5 + .../rpc/mesh/cells/schemas/opacity.py | 1 + .../rpc/mesh/cells/schemas/visibility.json | 5 + .../rpc/mesh/cells/schemas/visibility.py | 1 + .../edge/edges_attribute_edge_protocols.py | 2 +- .../attribute/edge/schemas/attribute.json | 5 + .../edges/attribute/edge/schemas/attribute.py | 10 +- .../edges_attribute_vertex_protocols.py | 4 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 10 +- .../rpc/mesh/edges/edges_protocols.py | 8 +- .../rpc/mesh/edges/schemas/color.json | 5 + .../rpc/mesh/edges/schemas/color.py | 1 + .../rpc/mesh/edges/schemas/opacity.json | 5 + .../rpc/mesh/edges/schemas/opacity.py | 1 + .../rpc/mesh/edges/schemas/visibility.json | 5 + .../rpc/mesh/edges/schemas/visibility.py | 1 + .../rpc/mesh/edges/schemas/width.json | 5 + .../rpc/mesh/edges/schemas/width.py | 1 + .../rpc/mesh/mesh_protocols.py | 154 +- .../points_attribute_vertex_protocols.py | 4 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 10 +- .../rpc/mesh/points/points_protocols.py | 8 +- .../rpc/mesh/points/schemas/color.json | 5 + .../rpc/mesh/points/schemas/color.py | 1 + .../rpc/mesh/points/schemas/opacity.json | 5 + .../rpc/mesh/points/schemas/opacity.py | 1 + .../rpc/mesh/points/schemas/size.json | 5 + .../rpc/mesh/points/schemas/size.py | 1 + .../rpc/mesh/points/schemas/visibility.json | 5 + .../rpc/mesh/points/schemas/visibility.py | 1 + .../polygons_attribute_polygon_protocols.py | 2 +- .../attribute/polygon/schemas/attribute.json | 5 + .../attribute/polygon/schemas/attribute.py | 10 +- .../polygons_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 10 +- .../rpc/mesh/polygons/polygons_protocols.py | 6 +- .../rpc/mesh/polygons/schemas/color.json | 5 + .../rpc/mesh/polygons/schemas/color.py | 1 + .../rpc/mesh/polygons/schemas/opacity.json | 5 + .../rpc/mesh/polygons/schemas/opacity.py | 1 + .../rpc/mesh/polygons/schemas/visibility.json | 5 + .../rpc/mesh/polygons/schemas/visibility.py | 1 + ...olyhedra_attribute_polyhedron_protocols.py | 2 +- .../polyhedron/schemas/attribute.json | 5 + .../attribute/polyhedron/schemas/attribute.py | 10 +- .../polyhedra_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 10 +- .../rpc/mesh/polyhedra/polyhedra_protocols.py | 6 +- .../rpc/mesh/polyhedra/schemas/color.json | 5 + .../rpc/mesh/polyhedra/schemas/color.py | 1 + .../rpc/mesh/polyhedra/schemas/opacity.json | 5 + .../rpc/mesh/polyhedra/schemas/opacity.py | 1 + .../mesh/polyhedra/schemas/visibility.json | 5 + .../rpc/mesh/polyhedra/schemas/visibility.py | 1 + .../rpc/mesh/schemas/apply_textures.json | 5 + .../rpc/mesh/schemas/apply_textures.py | 1 + .../rpc/mesh/schemas/color.json | 5 + .../rpc/mesh/schemas/color.py | 1 + .../rpc/mesh/schemas/highlight.json | 5 + .../rpc/mesh/schemas/highlight.py | 1 + .../rpc/mesh/schemas/visibility.json | 5 + .../rpc/mesh/schemas/visibility.py | 1 + .../blocks_attribute_polyhedron_protocols.py | 2 +- .../polyhedron/schemas/attribute.json | 5 + .../attribute/polyhedron/schemas/attribute.py | 11 +- .../blocks_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- ...blocks_edges_attribute_vertex_protocols.py | 4 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- .../edges/model_blocks_edges_protocols.py | 10 +- .../rpc/model/blocks/edges/schemas/color.json | 5 + .../rpc/model/blocks/edges/schemas/color.py | 1 + .../blocks/edges/schemas/visibility.json | 5 + .../model/blocks/edges/schemas/visibility.py | 1 + .../rpc/model/blocks/edges/schemas/width.json | 5 + .../rpc/model/blocks/edges/schemas/width.py | 1 + .../model/blocks/model_blocks_protocols.py | 13 +- ...locks_points_attribute_vertex_protocols.py | 4 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- .../points/model_blocks_points_protocols.py | 10 +- .../model/blocks/points/schemas/color.json | 5 + .../rpc/model/blocks/points/schemas/color.py | 1 + .../rpc/model/blocks/points/schemas/size.json | 5 + .../rpc/model/blocks/points/schemas/size.py | 1 + .../blocks/points/schemas/visibility.json | 5 + .../model/blocks/points/schemas/visibility.py | 1 + .../rpc/model/blocks/schemas/color.json | 5 + .../rpc/model/blocks/schemas/color.py | 1 + .../rpc/model/blocks/schemas/visibility.json | 5 + .../rpc/model/blocks/schemas/visibility.py | 1 + .../corners_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- .../model/corners/model_corners_protocols.py | 13 +- .../rpc/model/corners/schemas/color.json | 5 + .../rpc/model/corners/schemas/color.py | 1 + .../rpc/model/corners/schemas/visibility.json | 5 + .../rpc/model/corners/schemas/visibility.py | 1 + .../rpc/model/edges/model_edges_protocols.py | 6 +- .../rpc/model/edges/schemas/visibility.json | 5 + .../rpc/model/edges/schemas/visibility.py | 1 + .../rpc/model/edges/schemas/width.json | 5 + .../rpc/model/edges/schemas/width.py | 1 + .../edge/lines_attribute_edge_protocols.py | 2 +- .../attribute/edge/schemas/attribute.json | 5 + .../lines/attribute/edge/schemas/attribute.py | 11 +- .../lines_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- .../rpc/model/lines/model_lines_protocols.py | 13 +- ...lines_points_attribute_vertex_protocols.py | 4 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- .../points/model_lines_points_protocols.py | 10 +- .../rpc/model/lines/points/schemas/color.json | 5 + .../rpc/model/lines/points/schemas/color.py | 1 + .../rpc/model/lines/points/schemas/size.json | 5 + .../rpc/model/lines/points/schemas/size.py | 1 + .../lines/points/schemas/visibility.json | 5 + .../model/lines/points/schemas/visibility.py | 1 + .../rpc/model/lines/schemas/color.json | 5 + .../rpc/model/lines/schemas/color.py | 1 + .../rpc/model/lines/schemas/visibility.json | 5 + .../rpc/model/lines/schemas/visibility.py | 1 + .../rpc/model/model_protocols.py | 446 +++-- .../model/points/model_points_protocols.py | 6 +- .../rpc/model/points/schemas/size.json | 5 + .../rpc/model/points/schemas/size.py | 1 + .../rpc/model/points/schemas/visibility.json | 5 + .../rpc/model/points/schemas/visibility.py | 1 + .../rpc/model/schemas/highlight.json | 5 + .../rpc/model/schemas/highlight.py | 1 + .../rpc/model/schemas/visibility.json | 5 + .../rpc/model/schemas/visibility.py | 1 + .../attribute/polygon/schemas/attribute.json | 5 + .../attribute/polygon/schemas/attribute.py | 11 +- .../surfaces_attribute_polygon_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- .../surfaces_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- ...rfaces_edges_attribute_vertex_protocols.py | 4 +- .../edges/model_surfaces_edges_protocols.py | 10 +- .../model/surfaces/edges/schemas/color.json | 5 + .../rpc/model/surfaces/edges/schemas/color.py | 1 + .../surfaces/edges/schemas/visibility.json | 5 + .../surfaces/edges/schemas/visibility.py | 1 + .../model/surfaces/edges/schemas/width.json | 5 + .../rpc/model/surfaces/edges/schemas/width.py | 1 + .../surfaces/model_surfaces_protocols.py | 13 +- .../attribute/vertex/schemas/attribute.json | 5 + .../attribute/vertex/schemas/attribute.py | 11 +- ...faces_points_attribute_vertex_protocols.py | 4 +- .../points/model_surfaces_points_protocols.py | 10 +- .../model/surfaces/points/schemas/color.json | 5 + .../model/surfaces/points/schemas/color.py | 1 + .../model/surfaces/points/schemas/size.json | 5 + .../rpc/model/surfaces/points/schemas/size.py | 1 + .../surfaces/points/schemas/visibility.json | 5 + .../surfaces/points/schemas/visibility.py | 1 + .../surfaces/schemas/apply_textures.json | 5 + .../model/surfaces/schemas/apply_textures.py | 1 + .../rpc/model/surfaces/schemas/color.json | 5 + .../rpc/model/surfaces/schemas/color.py | 1 + .../model/surfaces/schemas/visibility.json | 5 + .../rpc/model/surfaces/schemas/visibility.py | 1 + .../rpc/viewer/viewer_protocols.py | 27 +- src/opengeodeweb_viewer/vtk_protocol.py | 14 +- tests/conftest.py | 20 + .../mesh/cells/cell_color_map_item.jpeg | Bin 42657 -> 29478 bytes .../mesh/polygons/polygon_attribute_item.jpeg | Bin 12339 -> 13159 bytes tests/image/test_image_protocols.py | 85 +- .../test_cells_attribute_cell_protocols.py | 10 + .../test_cells_attribute_vertex_protocols.py | 10 + tests/mesh/cells/test_mesh_cells_protocols.py | 29 +- .../test_edges_attribute_edge_protocols.py | 8 + .../test_edges_attribute_vertex_protocols.py | 46 +- tests/mesh/edges/test_mesh_edges_protocols.py | 17 +- .../test_points_attribute_vertex_protocols.py | 29 +- .../mesh/points/test_mesh_points_protocols.py | 55 +- ...st_polygons_attribute_polygon_protocols.py | 10 + ...est_polygons_attribute_vertex_protocols.py | 15 +- .../polygons/test_mesh_polygons_protocols.py | 7 +- ...olyhedra_attribute_polyhedron_protocols.py | 10 + ...st_polyhedra_attribute_vertex_protocols.py | 10 + .../test_mesh_polyhedra_protocols.py | 8 +- tests/mesh/test_mesh_protocols.py | 21 +- ...l_blocks_attribute_polyhedron_protocols.py | 101 +- ...model_blocks_attribute_vertex_protocols.py | 117 +- .../blocks/test_model_blocks_protocols.py | 6 + ...odel_corners_attribute_vertex_protocols.py | 98 +- .../corners/test_model_corners_protocols.py | 12 +- .../model/edges/test_model_edges_protocols.py | 20 +- ...st_model_lines_attribute_edge_protocols.py | 98 +- ..._model_lines_attribute_vertex_protocols.py | 98 +- .../model/lines/test_model_lines_protocols.py | 5 + .../points/test_model_points_protocols.py | 23 +- ...el_surfaces_attribute_polygon_protocols.py | 100 +- ...del_surfaces_attribute_vertex_protocols.py | 129 +- .../surfaces/test_model_surfaces_protocols.py | 15 +- tests/model/test_model_protocols.py | 29 +- tests/test_generic_protocols.py | 6 + tests/test_typed_rpcs.py | 18 +- tests/test_utils_protocols.py | 26 +- tests/test_viewer_protocols.py | 15 + 231 files changed, 3690 insertions(+), 1576 deletions(-) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index 0889ec78..783e9d7b 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -58,6 +58,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -70,6 +74,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -113,6 +118,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -127,6 +136,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], @@ -171,6 +181,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -239,6 +253,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -261,6 +276,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -329,6 +348,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -351,6 +371,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -363,6 +387,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -379,6 +404,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -393,6 +422,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], @@ -409,6 +439,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -450,6 +484,7 @@ } }, "required": [ + "scene_id", "id", "color" ], @@ -470,6 +505,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -538,6 +577,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -560,6 +600,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -628,6 +672,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -650,6 +695,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -662,6 +711,7 @@ } }, "required": [ + "scene_id", "id", "width" ], @@ -678,6 +728,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -690,6 +744,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -706,6 +761,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -720,6 +779,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], @@ -736,6 +796,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -777,6 +841,7 @@ } }, "required": [ + "scene_id", "id", "color" ], @@ -797,6 +862,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -865,6 +934,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -887,6 +957,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -899,6 +973,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -929,6 +1004,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -941,6 +1020,7 @@ } }, "required": [ + "scene_id", "id", "size" ], @@ -957,6 +1037,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -971,6 +1055,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], @@ -987,6 +1072,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1028,6 +1117,7 @@ } }, "required": [ + "scene_id", "id", "color" ], @@ -1048,6 +1138,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1116,6 +1210,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -1138,6 +1233,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1206,6 +1305,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -1228,6 +1328,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1240,6 +1344,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -1256,6 +1361,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1270,6 +1379,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], @@ -1286,6 +1396,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1327,6 +1441,7 @@ } }, "required": [ + "scene_id", "id", "color" ], @@ -1347,6 +1462,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1415,6 +1534,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -1437,6 +1557,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1505,6 +1629,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", @@ -1527,6 +1652,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1539,6 +1668,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -1555,6 +1685,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1569,6 +1703,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], @@ -1585,6 +1720,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1626,6 +1765,7 @@ } }, "required": [ + "scene_id", "id", "color" ], @@ -1643,6 +1783,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1655,6 +1799,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -1698,6 +1843,10 @@ "rpc": "highlight", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1710,6 +1859,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -1749,6 +1899,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1790,6 +1944,7 @@ } }, "required": [ + "scene_id", "id", "color" ], @@ -1891,6 +2046,10 @@ "rpc": "apply_textures", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -1923,6 +2082,7 @@ } }, "required": [ + "scene_id", "id", "textures" ], @@ -2041,6 +2201,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2118,6 +2282,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -2141,6 +2306,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2218,6 +2387,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -2244,6 +2414,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2321,6 +2495,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -2344,6 +2519,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2365,6 +2544,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "width" @@ -2382,6 +2562,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2403,6 +2587,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -2420,6 +2605,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2470,6 +2659,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" @@ -2491,6 +2681,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2568,6 +2762,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -2591,6 +2786,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2612,6 +2811,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -2629,6 +2829,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2650,6 +2854,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "size" @@ -2667,6 +2872,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2717,6 +2926,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" @@ -2735,6 +2945,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2756,6 +2970,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -2773,6 +2988,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2836,6 +3055,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" @@ -2918,6 +3138,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -2995,6 +3219,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -3018,6 +3243,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3039,6 +3268,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -3056,6 +3286,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3119,6 +3353,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" @@ -3199,6 +3434,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3211,6 +3450,7 @@ } }, "required": [ + "scene_id", "id", "width" ], @@ -3227,6 +3467,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3239,6 +3483,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -3259,6 +3504,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3336,6 +3585,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -3359,6 +3609,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3436,6 +3690,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -3462,6 +3717,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3539,6 +3798,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -3562,6 +3822,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3583,6 +3847,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -3600,6 +3865,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3621,6 +3890,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "size" @@ -3638,6 +3908,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3688,6 +3962,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" @@ -3706,6 +3981,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3727,6 +4006,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -3744,6 +4024,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3807,6 +4091,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" @@ -3887,6 +4172,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3899,6 +4188,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -3915,6 +4205,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3927,6 +4221,7 @@ } }, "required": [ + "scene_id", "id", "size" ], @@ -3944,6 +4239,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -3956,6 +4255,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], @@ -3999,6 +4299,10 @@ "rpc": "highlight", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4018,6 +4322,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -4103,6 +4408,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4180,6 +4489,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -4203,6 +4513,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4280,6 +4594,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -4306,6 +4621,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4383,6 +4702,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -4406,6 +4726,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4427,6 +4751,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "width" @@ -4444,6 +4769,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4465,6 +4794,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -4482,6 +4812,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4532,6 +4866,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" @@ -4553,6 +4888,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4630,6 +4969,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", @@ -4653,6 +4993,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4674,6 +5018,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -4691,6 +5036,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4712,6 +5061,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "size" @@ -4729,6 +5079,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4779,6 +5133,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" @@ -4797,6 +5152,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4818,6 +5177,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" @@ -4835,6 +5195,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -4898,6 +5262,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" @@ -4976,6 +5341,10 @@ "rpc": "apply_textures", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId", "type": "string", @@ -5006,6 +5375,7 @@ } }, "required": [ + "scene_id", "id", "textures" ], diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index ce87f15b..e804012c 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -2,1239 +2,1223 @@ import type json from "./opengeodeweb_viewer_schemas.json"; import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; -import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, ViewerId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; +import type { + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGB, + ColorRGBA, + EdgeWidth, + Filename, + Opacity, + Point3D, + PointSize, + ViewerId, + Visibility, +} from "@geode/opengeodeweb-viewer/schema_types"; export interface GenericRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface GenericRegisterResponse { -} +export interface GenericRegisterResponse {} export interface GenericDeregisterParams { - id: DataId; + id: DataId; } -export interface GenericDeregisterResponse { -} +export interface GenericDeregisterResponse {} export interface ImageVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ImageVisibilityResponse { -} +export interface ImageVisibilityResponse {} export interface ImageRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface ImageRegisterResponse { -} +export interface ImageRegisterResponse {} export interface ImageOpacityParams { - id: DataId; - opacity: Opacity; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface ImageOpacityResponse { -} +export interface ImageOpacityResponse {} export interface ImageDeregisterParams { - id: DataId; + id: DataId; } -export interface ImageDeregisterResponse { -} +export interface ImageDeregisterResponse {} export interface MeshCellsAttributeCellAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } /** * Flat array of [value, r, g, b, ...] */ -export interface MeshCellsAttributeCellAttributeResponse { -} +export interface MeshCellsAttributeCellAttributeResponse {} export interface MeshCellsAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshCellsAttributeVertexAttributeResponse { -} +export interface MeshCellsAttributeVertexAttributeResponse {} export interface MeshCellsVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshCellsVisibilityResponse { -} +export interface MeshCellsVisibilityResponse {} export interface MeshCellsOpacityParams { - id: DataId; - opacity: Opacity; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshCellsOpacityResponse { -} +export interface MeshCellsOpacityResponse {} export interface MeshCellsColorParams { - color: ColorRGBA; - id: DataId; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshCellsColorResponse { -} +export interface MeshCellsColorResponse {} export interface MeshEdgesAttributeEdgeAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshEdgesAttributeEdgeAttributeResponse { -} +export interface MeshEdgesAttributeEdgeAttributeResponse {} export interface MeshEdgesAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshEdgesAttributeVertexAttributeResponse { -} +export interface MeshEdgesAttributeVertexAttributeResponse {} export interface MeshEdgesWidthParams { - id: DataId; - width: EdgeWidth; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface MeshEdgesWidthResponse { -} +export interface MeshEdgesWidthResponse {} export interface MeshEdgesVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshEdgesVisibilityResponse { -} +export interface MeshEdgesVisibilityResponse {} export interface MeshEdgesOpacityParams { - id: DataId; - opacity: Opacity; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshEdgesOpacityResponse { -} +export interface MeshEdgesOpacityResponse {} export interface MeshEdgesColorParams { - color: ColorRGBA; - id: DataId; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshEdgesColorResponse { -} +export interface MeshEdgesColorResponse {} export interface MeshPointsAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPointsAttributeVertexAttributeResponse { -} +export interface MeshPointsAttributeVertexAttributeResponse {} export interface MeshPointsVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } export interface MeshPointsVisibilityResponse { - id: DataId; - visibility: Visibility; + id: DataId; + visibility: Visibility; } export interface MeshPointsSizeParams { - id: DataId; - size: PointSize; + id: DataId; + scene_id: string; + size: PointSize; } -export interface MeshPointsSizeResponse { -} +export interface MeshPointsSizeResponse {} export interface MeshPointsOpacityParams { - id: DataId; - opacity: Opacity; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshPointsOpacityResponse { -} +export interface MeshPointsOpacityResponse {} export interface MeshPointsColorParams { - color: ColorRGBA; - id: DataId; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshPointsColorResponse { -} +export interface MeshPointsColorResponse {} export interface MeshPolygonsAttributePolygonAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolygonsAttributePolygonAttributeResponse { -} +export interface MeshPolygonsAttributePolygonAttributeResponse {} export interface MeshPolygonsAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolygonsAttributeVertexAttributeResponse { -} +export interface MeshPolygonsAttributeVertexAttributeResponse {} export interface MeshPolygonsVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshPolygonsVisibilityResponse { -} +export interface MeshPolygonsVisibilityResponse {} export interface MeshPolygonsOpacityParams { - id: DataId; - opacity: Opacity; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshPolygonsOpacityResponse { -} +export interface MeshPolygonsOpacityResponse {} export interface MeshPolygonsColorParams { - color: ColorRGBA; - id: DataId; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshPolygonsColorResponse { -} +export interface MeshPolygonsColorResponse {} export interface MeshPolyhedraAttributePolyhedronAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolyhedraAttributePolyhedronAttributeResponse { -} +export interface MeshPolyhedraAttributePolyhedronAttributeResponse {} export interface MeshPolyhedraAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolyhedraAttributeVertexAttributeResponse { -} +export interface MeshPolyhedraAttributeVertexAttributeResponse {} export interface MeshPolyhedraVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshPolyhedraVisibilityResponse { -} +export interface MeshPolyhedraVisibilityResponse {} export interface MeshPolyhedraOpacityParams { - id: DataId; - opacity: Opacity; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshPolyhedraOpacityResponse { -} +export interface MeshPolyhedraOpacityResponse {} export interface MeshPolyhedraColorParams { - color: ColorRGBA; - id: DataId; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshPolyhedraColorResponse { -} +export interface MeshPolyhedraColorResponse {} export interface MeshVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshVisibilityResponse { -} +export interface MeshVisibilityResponse {} export interface MeshRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface MeshRegisterResponse { -} +export interface MeshRegisterResponse {} export interface MeshHighlightParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshHighlightResponse { -} +export interface MeshHighlightResponse {} export interface MeshDeregisterParams { - id: DataId; + id: DataId; } -export interface MeshDeregisterResponse { -} +export interface MeshDeregisterResponse {} export interface MeshColorParams { - color: ColorRGBA; - id: DataId; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshColorResponse { -} +export interface MeshColorResponse {} export interface MeshBasemapLayersParams { - id: DataId; - layers: Layer[]; + id: DataId; + layers: Layer[]; } export interface Layer { - crop: boolean; - map: string; - opacity: Opacity; - visible: boolean; + crop: boolean; + map: string; + opacity: Opacity; + visible: boolean; } -export interface MeshBasemapLayersResponse { -} +export interface MeshBasemapLayersResponse {} export interface MeshBasemapDrapeParams { - data_ids: string[]; - id: DataId; + data_ids: string[]; + id: DataId; } -export interface MeshBasemapDrapeResponse { -} +export interface MeshBasemapDrapeResponse {} export interface MeshApplyTexturesParams { - id: DataId; - textures: MeshApplyTexturesParamsTexture[]; + id: DataId; + scene_id: string; + textures: MeshApplyTexturesParamsTexture[]; } export interface MeshApplyTexturesParamsTexture { - id: DataId; - texture_name: string; + id: DataId; + texture_name: string; } -export interface MeshApplyTexturesResponse { -} +export interface MeshApplyTexturesResponse {} export interface MeshApplyBasemapParams { - columns: number; - detail_of?: string; - id: DataId; - layers: MapState[]; - maps: Map[]; - rows: number; + columns: number; + detail_of?: string; + id: DataId; + layers: MapState[]; + maps: Map[]; + rows: number; } export interface MapState { - crop: boolean; - map: string; - opacity: Opacity; - visible: boolean; + crop: boolean; + map: string; + opacity: Opacity; + visible: boolean; } export interface Map { - map: string; - sources: string[]; + map: string; + sources: string[]; } -export interface MeshApplyBasemapResponse { -} +export interface MeshApplyBasemapResponse {} export interface ModelBlocksAttributePolyhedronAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksAttributePolyhedronAttributeResponse { -} +export interface ModelBlocksAttributePolyhedronAttributeResponse {} export interface ModelBlocksAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksAttributeVertexAttributeResponse { -} +export interface ModelBlocksAttributeVertexAttributeResponse {} export interface ModelBlocksEdgesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksEdgesAttributeVertexAttributeResponse { -} +export interface ModelBlocksEdgesAttributeVertexAttributeResponse {} export interface ModelBlocksEdgesWidthParams { - block_ids: BlockIds; - id: DataId; - width: EdgeWidth; + block_ids: BlockIds; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface ModelBlocksEdgesWidthResponse { -} +export interface ModelBlocksEdgesWidthResponse {} export interface ModelBlocksEdgesVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelBlocksEdgesVisibilityResponse { -} +export interface ModelBlocksEdgesVisibilityResponse {} export interface ModelBlocksEdgesColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelBlocksEdgesColorResponse { -} +export interface ModelBlocksEdgesColorResponse {} export interface ModelBlocksPointsAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksPointsAttributeVertexAttributeResponse { -} +export interface ModelBlocksPointsAttributeVertexAttributeResponse {} export interface ModelBlocksPointsVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelBlocksPointsVisibilityResponse { -} +export interface ModelBlocksPointsVisibilityResponse {} export interface ModelBlocksPointsSizeParams { - block_ids: BlockIds; - id: DataId; - size: PointSize; + block_ids: BlockIds; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelBlocksPointsSizeResponse { -} +export interface ModelBlocksPointsSizeResponse {} export interface ModelBlocksPointsColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelBlocksPointsColorResponse { -} +export interface ModelBlocksPointsColorResponse {} export interface ModelBlocksVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelBlocksVisibilityResponse { -} +export interface ModelBlocksVisibilityResponse {} export interface ModelBlocksColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export type ColorMode = "constant" | "random"; export interface ModelBlocksColorResponse { - colors: ModelBlocksColorResponseColor[]; + colors: ModelBlocksColorResponseColor[]; } export interface ModelBlocksColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelCornersAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelCornersAttributeVertexAttributeResponse { -} +export interface ModelCornersAttributeVertexAttributeResponse {} export interface ModelCornersVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelCornersVisibilityResponse { -} +export interface ModelCornersVisibilityResponse {} export interface ModelCornersColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export interface ModelCornersColorResponse { - colors: ModelCornersColorResponseColor[]; + colors: ModelCornersColorResponseColor[]; } export interface ModelCornersColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelEdgesWidthParams { - id: DataId; - width: EdgeWidth; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface ModelEdgesWidthResponse { -} +export interface ModelEdgesWidthResponse {} export interface ModelEdgesVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelEdgesVisibilityResponse { -} +export interface ModelEdgesVisibilityResponse {} export interface ModelLinesAttributeEdgeAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelLinesAttributeEdgeAttributeResponse { -} +export interface ModelLinesAttributeEdgeAttributeResponse {} export interface ModelLinesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelLinesAttributeVertexAttributeResponse { -} +export interface ModelLinesAttributeVertexAttributeResponse {} export interface ModelLinesPointsAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelLinesPointsAttributeVertexAttributeResponse { -} +export interface ModelLinesPointsAttributeVertexAttributeResponse {} export interface ModelLinesPointsVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelLinesPointsVisibilityResponse { -} +export interface ModelLinesPointsVisibilityResponse {} export interface ModelLinesPointsSizeParams { - block_ids: BlockIds; - id: DataId; - size: PointSize; + block_ids: BlockIds; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelLinesPointsSizeResponse { -} +export interface ModelLinesPointsSizeResponse {} export interface ModelLinesPointsColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelLinesPointsColorResponse { -} +export interface ModelLinesPointsColorResponse {} export interface ModelLinesVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelLinesVisibilityResponse { -} +export interface ModelLinesVisibilityResponse {} export interface ModelLinesColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export interface ModelLinesColorResponse { - colors: ModelLinesColorResponseColor[]; + colors: ModelLinesColorResponseColor[]; } export interface ModelLinesColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelPointsVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelPointsVisibilityResponse { -} +export interface ModelPointsVisibilityResponse {} export interface ModelPointsSizeParams { - id: DataId; - size: PointSize; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelPointsSizeResponse { -} +export interface ModelPointsSizeResponse {} export interface ModelVisibilityParams { - id: DataId; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelVisibilityResponse { -} +export interface ModelVisibilityResponse {} export interface ModelRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface ModelRegisterResponse { -} +export interface ModelRegisterResponse {} export interface ModelHighlightParams { - block_ids: ViewerId[]; - id: DataId; - visibility: Visibility; + block_ids: ViewerId[]; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelHighlightResponse { -} +export interface ModelHighlightResponse {} export interface ModelGetBlocksBoundsParams { - block_ids: ViewerId[]; - id: DataId; + block_ids: ViewerId[]; + id: DataId; } export interface ModelGetBlocksBoundsResponse { - bounds: number[]; + bounds: number[]; } export interface ModelDeregisterParams { - id: DataId; + id: DataId; } -export interface ModelDeregisterResponse { -} +export interface ModelDeregisterResponse {} export interface ModelSurfacesAttributePolygonAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesAttributePolygonAttributeResponse { -} +export interface ModelSurfacesAttributePolygonAttributeResponse {} export interface ModelSurfacesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesAttributeVertexAttributeResponse { -} +export interface ModelSurfacesAttributeVertexAttributeResponse {} export interface ModelSurfacesEdgesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { -} +export interface ModelSurfacesEdgesAttributeVertexAttributeResponse {} export interface ModelSurfacesEdgesWidthParams { - block_ids: BlockIds; - id: DataId; - width: EdgeWidth; + block_ids: BlockIds; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface ModelSurfacesEdgesWidthResponse { -} +export interface ModelSurfacesEdgesWidthResponse {} export interface ModelSurfacesEdgesVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelSurfacesEdgesVisibilityResponse { -} +export interface ModelSurfacesEdgesVisibilityResponse {} export interface ModelSurfacesEdgesColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelSurfacesEdgesColorResponse { -} +export interface ModelSurfacesEdgesColorResponse {} export interface ModelSurfacesPointsAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesPointsAttributeVertexAttributeResponse { -} +export interface ModelSurfacesPointsAttributeVertexAttributeResponse {} export interface ModelSurfacesPointsVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelSurfacesPointsVisibilityResponse { -} +export interface ModelSurfacesPointsVisibilityResponse {} export interface ModelSurfacesPointsSizeParams { - block_ids: BlockIds; - id: DataId; - size: PointSize; + block_ids: BlockIds; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelSurfacesPointsSizeResponse { -} +export interface ModelSurfacesPointsSizeResponse {} export interface ModelSurfacesPointsColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelSurfacesPointsColorResponse { -} +export interface ModelSurfacesPointsColorResponse {} export interface ModelSurfacesVisibilityParams { - block_ids: BlockIds; - id: DataId; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelSurfacesVisibilityResponse { -} +export interface ModelSurfacesVisibilityResponse {} export interface ModelSurfacesColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export interface ModelSurfacesColorResponse { - colors: ModelSurfacesColorResponseColor[]; + colors: ModelSurfacesColorResponseColor[]; } export interface ModelSurfacesColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelSurfacesApplyTexturesParams { - id: DataId; - textures: ModelSurfacesApplyTexturesParamsTexture[]; + id: DataId; + scene_id: string; + textures: ModelSurfacesApplyTexturesParamsTexture[]; } export interface ModelSurfacesApplyTexturesParamsTexture { - texture_file_name: string; - texture_name: string; + texture_file_name: string; + texture_name: string; } -export interface ModelSurfacesApplyTexturesResponse { -} +export interface ModelSurfacesApplyTexturesResponse {} -export interface RenderingWarningsParams { -} +export interface RenderingWarningsParams {} export interface RenderingWarningsResponse { - warnings: string[]; + warnings: string[]; } -export interface ReleaseDatabaseParams { -} +export interface ReleaseDatabaseParams {} -export interface ReleaseDatabaseResponse { -} +export interface ReleaseDatabaseResponse {} -export interface KillParams { -} +export interface KillParams {} -export interface KillResponse { -} +export interface KillResponse {} -export interface ImportProjectParams { -} +export interface ImportProjectParams {} -export interface ImportProjectResponse { -} +export interface ImportProjectResponse {} export interface ViewerUpdateDataParams { - id: DataId; - scene_id: string; + id: DataId; + scene_id: string; } -export interface ViewerUpdateDataResponse { -} +export interface ViewerUpdateDataResponse {} export interface ViewerUpdateCameraParams { - camera_options: CameraOptions; - scene_id: string; - [property: string]: any; + camera_options: CameraOptions; + scene_id: string; + [property: string]: any; } export interface CameraOptions { - clipping_range: number[]; - focal_point: number[]; - position: number[]; - view_angle: number; - view_up: number[]; - [property: string]: any; + clipping_range: number[]; + focal_point: number[]; + position: number[]; + view_angle: number; + view_up: number[]; + [property: string]: any; } -export interface ViewerUpdateCameraResponse { -} +export interface ViewerUpdateCameraResponse {} export interface ViewerThresholdParams { - attributes: AttributeElement[]; - ids: DataId[]; - scene_id: string; + attributes: AttributeElement[]; + ids: DataId[]; + scene_id: string; } export interface AttributeElement { - item: AttributeItem; - location: Location; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: string; + item: AttributeItem; + location: Location; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: string; } export type Location = "point" | "cell"; -export interface ViewerThresholdResponse { -} +export interface ViewerThresholdResponse {} export interface ViewerTakeScreenshotParams { - filename: Filename; - height?: number; - include_background: boolean; - output_extension: OutputExtension; - scene_id: string; - width?: number; + filename: Filename; + height?: number; + include_background: boolean; + output_extension: OutputExtension; + scene_id: string; + width?: number; } export type OutputExtension = "png" | "jpg"; export interface ViewerTakeScreenshotResponse { - blob: any; // Image file content, sent as binary + blob: any; // Image file content, sent as binary } export interface ViewerSliceParams { - ids: DataId[]; - scene_id: string; - slices: Slice[]; + ids: DataId[]; + scene_id: string; + slices: Slice[]; } export interface Slice { - axis: number; - index: number; + axis: number; + index: number; } export interface ViewerSliceResponse { - max_indices: number[]; + max_indices: number[]; } export interface ViewerShrinkParams { - ids: DataId[]; - scene_id: string; - shrink_factor: number; + ids: DataId[]; + scene_id: string; + shrink_factor: number; } -export interface ViewerShrinkResponse { -} +export interface ViewerShrinkResponse {} export interface ViewerSetZScalingParams { - scene_id: string; - z_scale: number; + scene_id: string; + z_scale: number; } -export interface ViewerSetZScalingResponse { -} +export interface ViewerSetZScalingResponse {} export interface ViewerSetTextStyleParams { - color: ColorRGB; - font_family: FontFamily; - opacity: Opacity; - scene_id: string; + color: ColorRGB; + font_family: FontFamily; + opacity: Opacity; + scene_id: string; } export type FontFamily = "arial" | "courier" | "times"; -export interface ViewerSetTextStyleResponse { -} +export interface ViewerSetTextStyleResponse {} export interface ViewerSetOrientationWidgetParams { - marker: Marker; - scene_id: string; + marker: Marker; + scene_id: string; } export type Marker = "axes" | "compass" | "none"; -export interface ViewerSetOrientationWidgetResponse { -} +export interface ViewerSetOrientationWidgetResponse {} export interface ViewerSetBackgroundColorParams { - color: ColorRGB; - scene_id: string; + color: ColorRGB; + scene_id: string; } -export interface ViewerSetBackgroundColorResponse { -} +export interface ViewerSetBackgroundColorResponse {} export interface ViewerRulerParams { - points: Array; - scene_id: string; + points: Array; + scene_id: string; } export interface ViewerRulerResponse { - distance: number; - point1: number[]; - point2?: number[]; + distance: number; + point1: number[]; + point2?: number[]; } export interface ViewerResetVisualizationParams { - scene_id: string; + scene_id: string; } -export interface ViewerResetVisualizationResponse { -} +export interface ViewerResetVisualizationResponse {} export interface ViewerResetRulerParams { - scene_id: string; + scene_id: string; } -export interface ViewerResetRulerResponse { -} +export interface ViewerResetRulerResponse {} export interface ViewerResetCameraParams { - scene_id: string; + scene_id: string; } -export interface ViewerResetCameraResponse { -} +export interface ViewerResetCameraResponse {} export interface ViewerRenderParams { - scene_id: string; + scene_id: string; } -export interface ViewerRenderResponse { -} +export interface ViewerRenderResponse {} export interface ViewerRemoveFromSceneParams { - id: DataId; - scene_id: string; + id: DataId; + scene_id: string; } -export interface ViewerRemoveFromSceneResponse { -} +export interface ViewerRemoveFromSceneResponse {} export interface ViewerPreviewPointsParams { - closed?: boolean; - points: Point3D[]; - scene_id: string; - style: Style; + closed?: boolean; + points: Point3D[]; + scene_id: string; + style: Style; } export type Style = "points" | "curve" | "surface"; -export interface ViewerPreviewPointsResponse { -} +export interface ViewerPreviewPointsResponse {} export interface ViewerPickedIDSParams { - ids: DataId[]; - scene_id: string; - x: number; - y: number; + ids: DataId[]; + scene_id: string; + x: number; + y: number; } export interface ViewerPickedIDSResponse { - array_ids: DataId[]; - viewer_id?: ViewerId; + array_ids: DataId[]; + viewer_id?: ViewerId; } export interface ViewerPickColormapParams { - scene_id: string; - x: number; - y: number; - [property: string]: any; + scene_id: string; + x: number; + y: number; + [property: string]: any; } export interface ViewerPickColormapResponse { - block_ids?: ViewerId[]; - data_id?: string; + block_ids?: ViewerId[]; + data_id?: string; } export interface ViewerHighlightParams { - field_type: PickedFieldType; - ids: DataId[]; - scene_id: string; - x: number; - y: number; + field_type: PickedFieldType; + ids: DataId[]; + scene_id: string; + x: number; + y: number; } export type PickedFieldType = "CELL" | "POINT"; export interface ViewerHighlightResponse { - attributes?: { [key: string]: number[] | number }; - field_type?: PickedFieldType; - geode_id?: GeodeId; - id?: DataId; - picked_id?: number; + attributes?: { [key: string]: number[] | number }; + field_type?: PickedFieldType; + geode_id?: GeodeId; + id?: DataId; + picked_id?: number; } export interface ViewerGridScaleParams { - scene_id: string; - visibility: Visibility; + scene_id: string; + visibility: Visibility; } -export interface ViewerGridScaleResponse { -} +export interface ViewerGridScaleResponse {} export interface ViewerGetPointPositionParams { - scene_id: string; - x: number; - y: number; + scene_id: string; + x: number; + y: number; } export type ViewerGetPointPositionResponse = Point3D; export interface ViewerExplodeParams { - explode_factor: number; - ids: DataId[]; - scene_id: string; + explode_factor: number; + ids: DataId[]; + scene_id: string; } export interface ViewerExplodeResponse { - exploded_bounds: ExplodedBound[]; + exploded_bounds: ExplodedBound[]; } export interface ExplodedBound { - bounds: number[]; - id: DataId; + bounds: number[]; + id: DataId; } export interface ViewerDeleteSceneParams { - scene_id: string; + scene_id: string; } -export interface ViewerDeleteSceneResponse { -} +export interface ViewerDeleteSceneResponse {} export interface ViewerCreateSceneParams { - scene_id: string; + scene_id: string; } export interface ViewerCreateSceneResponse { - view_id: string; + view_id: string; } export interface ViewerClippingPlanesParams { - ids: DataId[]; - planes: Plane[]; - scene_id: string; + ids: DataId[]; + planes: Plane[]; + scene_id: string; } export interface Plane { - color?: ColorRGBA; - normal: number[]; - origin: number[]; + color?: ColorRGBA; + normal: number[]; + origin: number[]; } -export interface ViewerClippingPlanesResponse { -} +export interface ViewerClippingPlanesResponse {} export interface ViewerAxesParams { - scene_id: string; - visibility: Visibility; + scene_id: string; + visibility: Visibility; } -export interface ViewerAxesResponse { -} +export interface ViewerAxesResponse {} export interface ViewerAddToSceneParams { - id: DataId; - scene_id: string; + id: DataId; + scene_id: string; } -export interface ViewerAddToSceneResponse { -} +export interface ViewerAddToSceneResponse {} export interface ErrorResponse { - code: number; - description: string; - name: string; + code: number; + description: string; + name: string; } // `__params` and `__response` only exist at type level, to infer request/response types from a schema. @@ -1247,234 +1231,415 @@ export type TypedSchema = { export interface Schemas { readonly opengeodeweb_viewer: { readonly generic: { - readonly register: (typeof json)["opengeodeweb_viewer"]["generic"]["register"] & TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["generic"]["deregister"] & TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["generic"]["register"] & + TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["generic"]["deregister"] & + TypedSchema; }; readonly image: { - readonly visibility: (typeof json)["opengeodeweb_viewer"]["image"]["visibility"] & TypedSchema; - readonly register: (typeof json)["opengeodeweb_viewer"]["image"]["register"] & TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["image"]["opacity"] & TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["image"]["deregister"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["image"]["visibility"] & + TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["image"]["register"] & + TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["image"]["opacity"] & + TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["image"]["deregister"] & + TypedSchema; }; readonly mesh: { readonly cells: { readonly attribute: { readonly cell: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["cell"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["cell"]["attribute"] & + TypedSchema< + MeshCellsAttributeCellAttributeParams, + MeshCellsAttributeCellAttributeResponse + >; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + MeshCellsAttributeVertexAttributeParams, + MeshCellsAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["visibility"] & TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["opacity"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["visibility"] & + TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["opacity"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["color"] & + TypedSchema; }; readonly edges: { readonly attribute: { readonly edge: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["edge"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["edge"]["attribute"] & + TypedSchema< + MeshEdgesAttributeEdgeAttributeParams, + MeshEdgesAttributeEdgeAttributeResponse + >; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + MeshEdgesAttributeVertexAttributeParams, + MeshEdgesAttributeVertexAttributeResponse + >; }; }; - readonly width: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["width"] & TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["visibility"] & TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["opacity"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["color"] & TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["width"] & + TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["visibility"] & + TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["opacity"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["color"] & + TypedSchema; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + MeshPointsAttributeVertexAttributeParams, + MeshPointsAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["visibility"] & TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["size"] & TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["opacity"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["visibility"] & + TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["size"] & + TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["opacity"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["color"] & + TypedSchema; }; readonly polygons: { readonly attribute: { readonly polygon: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["polygon"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["polygon"]["attribute"] & + TypedSchema< + MeshPolygonsAttributePolygonAttributeParams, + MeshPolygonsAttributePolygonAttributeResponse + >; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + MeshPolygonsAttributeVertexAttributeParams, + MeshPolygonsAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["visibility"] & TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["opacity"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["visibility"] & + TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["opacity"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["color"] & + TypedSchema; }; readonly polyhedra: { readonly attribute: { readonly polyhedron: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["polyhedron"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["polyhedron"]["attribute"] & + TypedSchema< + MeshPolyhedraAttributePolyhedronAttributeParams, + MeshPolyhedraAttributePolyhedronAttributeResponse + >; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + MeshPolyhedraAttributeVertexAttributeParams, + MeshPolyhedraAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["visibility"] & TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["opacity"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["visibility"] & + TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["opacity"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["color"] & + TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["visibility"] & TypedSchema; - readonly register: (typeof json)["opengeodeweb_viewer"]["mesh"]["register"] & TypedSchema; - readonly highlight: (typeof json)["opengeodeweb_viewer"]["mesh"]["highlight"] & TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["mesh"]["deregister"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["color"] & TypedSchema; - readonly basemap_layers: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_layers"] & TypedSchema; - readonly basemap_drape: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_drape"] & TypedSchema; - readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_textures"] & TypedSchema; - readonly apply_basemap: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_basemap"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["visibility"] & + TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["mesh"]["register"] & + TypedSchema; + readonly highlight: (typeof json)["opengeodeweb_viewer"]["mesh"]["highlight"] & + TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["mesh"]["deregister"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["color"] & + TypedSchema; + readonly basemap_layers: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_layers"] & + TypedSchema; + readonly basemap_drape: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_drape"] & + TypedSchema; + readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_textures"] & + TypedSchema; + readonly apply_basemap: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_basemap"] & + TypedSchema; }; readonly model: { readonly blocks: { readonly attribute: { readonly polyhedron: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["polyhedron"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["polyhedron"]["attribute"] & + TypedSchema< + ModelBlocksAttributePolyhedronAttributeParams, + ModelBlocksAttributePolyhedronAttributeResponse + >; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelBlocksAttributeVertexAttributeParams, + ModelBlocksAttributeVertexAttributeResponse + >; }; }; readonly edges: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelBlocksEdgesAttributeVertexAttributeParams, + ModelBlocksEdgesAttributeVertexAttributeResponse + >; }; }; - readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["width"] & TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["visibility"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["color"] & TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["width"] & + TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["visibility"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["color"] & + TypedSchema; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelBlocksPointsAttributeVertexAttributeParams, + ModelBlocksPointsAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["visibility"] & TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["size"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["visibility"] & + TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["size"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["color"] & + TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["visibility"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["visibility"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["color"] & + TypedSchema; }; readonly corners: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelCornersAttributeVertexAttributeParams, + ModelCornersAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["visibility"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["visibility"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["color"] & + TypedSchema; }; readonly edges: { - readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["width"] & TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["visibility"] & TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["width"] & + TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["visibility"] & + TypedSchema; }; readonly lines: { readonly attribute: { readonly edge: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["edge"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["edge"]["attribute"] & + TypedSchema< + ModelLinesAttributeEdgeAttributeParams, + ModelLinesAttributeEdgeAttributeResponse + >; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelLinesAttributeVertexAttributeParams, + ModelLinesAttributeVertexAttributeResponse + >; }; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelLinesPointsAttributeVertexAttributeParams, + ModelLinesPointsAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["visibility"] & TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["size"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["visibility"] & + TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["size"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["color"] & + TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["visibility"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["visibility"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["color"] & + TypedSchema; }; readonly points: { - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["visibility"] & TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["size"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["visibility"] & + TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["size"] & + TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["visibility"] & TypedSchema; - readonly register: (typeof json)["opengeodeweb_viewer"]["model"]["register"] & TypedSchema; - readonly highlight: (typeof json)["opengeodeweb_viewer"]["model"]["highlight"] & TypedSchema; - readonly get_blocks_bounds: (typeof json)["opengeodeweb_viewer"]["model"]["get_blocks_bounds"] & TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["model"]["deregister"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["visibility"] & + TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["model"]["register"] & + TypedSchema; + readonly highlight: (typeof json)["opengeodeweb_viewer"]["model"]["highlight"] & + TypedSchema; + readonly get_blocks_bounds: (typeof json)["opengeodeweb_viewer"]["model"]["get_blocks_bounds"] & + TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["model"]["deregister"] & + TypedSchema; readonly surfaces: { readonly attribute: { readonly polygon: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["polygon"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["polygon"]["attribute"] & + TypedSchema< + ModelSurfacesAttributePolygonAttributeParams, + ModelSurfacesAttributePolygonAttributeResponse + >; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelSurfacesAttributeVertexAttributeParams, + ModelSurfacesAttributeVertexAttributeResponse + >; }; }; readonly edges: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelSurfacesEdgesAttributeVertexAttributeParams, + ModelSurfacesEdgesAttributeVertexAttributeResponse + >; }; }; - readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["width"] & TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["visibility"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["color"] & TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["width"] & + TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["visibility"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["color"] & + TypedSchema; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["attribute"]["vertex"]["attribute"] & + TypedSchema< + ModelSurfacesPointsAttributeVertexAttributeParams, + ModelSurfacesPointsAttributeVertexAttributeResponse + >; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["visibility"] & TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["size"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["color"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["visibility"] & + TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["size"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["color"] & + TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["visibility"] & TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["color"] & TypedSchema; - readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["apply_textures"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["visibility"] & + TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["color"] & + TypedSchema; + readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["apply_textures"] & + TypedSchema; }; }; - readonly rendering_warnings: (typeof json)["opengeodeweb_viewer"]["rendering_warnings"] & TypedSchema; - readonly release_database: (typeof json)["opengeodeweb_viewer"]["release_database"] & TypedSchema; - readonly kill: (typeof json)["opengeodeweb_viewer"]["kill"] & TypedSchema; - readonly import_project: (typeof json)["opengeodeweb_viewer"]["import_project"] & TypedSchema; + readonly rendering_warnings: (typeof json)["opengeodeweb_viewer"]["rendering_warnings"] & + TypedSchema; + readonly release_database: (typeof json)["opengeodeweb_viewer"]["release_database"] & + TypedSchema; + readonly kill: (typeof json)["opengeodeweb_viewer"]["kill"] & + TypedSchema; + readonly import_project: (typeof json)["opengeodeweb_viewer"]["import_project"] & + TypedSchema; readonly viewer: { - readonly update_data: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_data"] & TypedSchema; - readonly update_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_camera"] & TypedSchema; - readonly threshold: (typeof json)["opengeodeweb_viewer"]["viewer"]["threshold"] & TypedSchema; - readonly take_screenshot: (typeof json)["opengeodeweb_viewer"]["viewer"]["take_screenshot"] & TypedSchema; - readonly slice: (typeof json)["opengeodeweb_viewer"]["viewer"]["slice"] & TypedSchema; - readonly shrink: (typeof json)["opengeodeweb_viewer"]["viewer"]["shrink"] & TypedSchema; - readonly set_z_scaling: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_z_scaling"] & TypedSchema; - readonly set_text_style: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_text_style"] & TypedSchema; - readonly set_orientation_widget: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_orientation_widget"] & TypedSchema; - readonly set_background_color: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_background_color"] & TypedSchema; - readonly ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["ruler"] & TypedSchema; - readonly reset_visualization: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_visualization"] & TypedSchema; - readonly reset_ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_ruler"] & TypedSchema; - readonly reset_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_camera"] & TypedSchema; - readonly render: (typeof json)["opengeodeweb_viewer"]["viewer"]["render"] & TypedSchema; - readonly remove_from_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["remove_from_scene"] & TypedSchema; - readonly preview_points: (typeof json)["opengeodeweb_viewer"]["viewer"]["preview_points"] & TypedSchema; - readonly picked_ids: (typeof json)["opengeodeweb_viewer"]["viewer"]["picked_ids"] & TypedSchema; - readonly pick_colormap: (typeof json)["opengeodeweb_viewer"]["viewer"]["pick_colormap"] & TypedSchema; - readonly highlight: (typeof json)["opengeodeweb_viewer"]["viewer"]["highlight"] & TypedSchema; - readonly grid_scale: (typeof json)["opengeodeweb_viewer"]["viewer"]["grid_scale"] & TypedSchema; - readonly get_point_position: (typeof json)["opengeodeweb_viewer"]["viewer"]["get_point_position"] & TypedSchema; - readonly explode: (typeof json)["opengeodeweb_viewer"]["viewer"]["explode"] & TypedSchema; - readonly delete_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["delete_scene"] & TypedSchema; - readonly create_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["create_scene"] & TypedSchema; - readonly clipping_planes: (typeof json)["opengeodeweb_viewer"]["viewer"]["clipping_planes"] & TypedSchema; - readonly axes: (typeof json)["opengeodeweb_viewer"]["viewer"]["axes"] & TypedSchema; - readonly add_to_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["add_to_scene"] & TypedSchema; + readonly update_data: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_data"] & + TypedSchema; + readonly update_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_camera"] & + TypedSchema; + readonly threshold: (typeof json)["opengeodeweb_viewer"]["viewer"]["threshold"] & + TypedSchema; + readonly take_screenshot: (typeof json)["opengeodeweb_viewer"]["viewer"]["take_screenshot"] & + TypedSchema; + readonly slice: (typeof json)["opengeodeweb_viewer"]["viewer"]["slice"] & + TypedSchema; + readonly shrink: (typeof json)["opengeodeweb_viewer"]["viewer"]["shrink"] & + TypedSchema; + readonly set_z_scaling: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_z_scaling"] & + TypedSchema; + readonly set_text_style: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_text_style"] & + TypedSchema; + readonly set_orientation_widget: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_orientation_widget"] & + TypedSchema; + readonly set_background_color: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_background_color"] & + TypedSchema; + readonly ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["ruler"] & + TypedSchema; + readonly reset_visualization: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_visualization"] & + TypedSchema; + readonly reset_ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_ruler"] & + TypedSchema; + readonly reset_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_camera"] & + TypedSchema; + readonly render: (typeof json)["opengeodeweb_viewer"]["viewer"]["render"] & + TypedSchema; + readonly remove_from_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["remove_from_scene"] & + TypedSchema; + readonly preview_points: (typeof json)["opengeodeweb_viewer"]["viewer"]["preview_points"] & + TypedSchema; + readonly picked_ids: (typeof json)["opengeodeweb_viewer"]["viewer"]["picked_ids"] & + TypedSchema; + readonly pick_colormap: (typeof json)["opengeodeweb_viewer"]["viewer"]["pick_colormap"] & + TypedSchema; + readonly highlight: (typeof json)["opengeodeweb_viewer"]["viewer"]["highlight"] & + TypedSchema; + readonly grid_scale: (typeof json)["opengeodeweb_viewer"]["viewer"]["grid_scale"] & + TypedSchema; + readonly get_point_position: (typeof json)["opengeodeweb_viewer"]["viewer"]["get_point_position"] & + TypedSchema; + readonly explode: (typeof json)["opengeodeweb_viewer"]["viewer"]["explode"] & + TypedSchema; + readonly delete_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["delete_scene"] & + TypedSchema; + readonly create_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["create_scene"] & + TypedSchema; + readonly clipping_planes: (typeof json)["opengeodeweb_viewer"]["viewer"]["clipping_planes"] & + TypedSchema; + readonly axes: (typeof json)["opengeodeweb_viewer"]["viewer"]["axes"] & + TypedSchema; + readonly add_to_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["add_to_scene"] & + TypedSchema; }; }; } diff --git a/src/opengeodeweb_viewer/basemap_pipeline.py b/src/opengeodeweb_viewer/basemap_pipeline.py index ecd0ba76..bdaf4c20 100644 --- a/src/opengeodeweb_viewer/basemap_pipeline.py +++ b/src/opengeodeweb_viewer/basemap_pipeline.py @@ -10,11 +10,14 @@ # Local application imports from opengeodeweb_viewer.basemap_compose import basemap_texture, textures from opengeodeweb_viewer.basemap_drape import ( + BASEMAP_POLYGON_OFFSET_UNITS, DETAIL_DRAPE_POLYGON_OFFSET_UNITS, + DETAIL_POLYGON_OFFSET_UNITS, clipped_to_bounds, drape_actor, drape_polydata, shown_top_surfaces, + style_basemap, ) if TYPE_CHECKING: @@ -38,6 +41,15 @@ def compose(basemap: BasemapState, shape: tuple[int, ...]) -> None: ) +def style_basemap_object(basemap: BasemapState, scene_object: SceneObject) -> None: + """A basemap is drawn the same in every scene: its actor gets the basemap style.""" + style_basemap( + scene_object.actor, + scene_object.mapper, + BASEMAP_POLYGON_OFFSET_UNITS if basemap.detail_of is None else DETAIL_POLYGON_OFFSET_UNITS, + ) + + def basemaps( database: Mapping[str, VtkPipeline], ) -> list[tuple[VtkPipeline, BasemapState]]: diff --git a/src/opengeodeweb_viewer/object/object_methods.py b/src/opengeodeweb_viewer/object/object_methods.py index f80e38b8..2c08d3fb 100644 --- a/src/opengeodeweb_viewer/object/object_methods.py +++ b/src/opengeodeweb_viewer/object/object_methods.py @@ -5,7 +5,6 @@ # Third party imports from vtkmodules.vtkCommonCore import VTK_COLOR_MODE_DIRECT_SCALARS, reference from vtkmodules.vtkCommonDataModel import ( - vtkDataSet, vtkMultiBlockDataSet, ) from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor @@ -18,6 +17,7 @@ ) # Local application imports +from opengeodeweb_viewer.basemap_pipeline import style_basemap_object from opengeodeweb_viewer.scene import SceneObject from opengeodeweb_viewer.vtk_pipeline import VtkPipeline from opengeodeweb_viewer.vtk_protocol import VtkView, scene_object_of @@ -82,6 +82,8 @@ def add_object(self, scene: Scene, data_id: str) -> None: scene.objects[data_id] = scene_object scene_object.actor.SetMapper(mapper) self.configure_actor(scene_object, data_id) + if pipeline.basemap is not None: + style_basemap_object(pipeline.basemap, scene_object) mapper.SetResolveCoincidentTopologyLineOffsetParameters(1, -0.1) mapper.SetResolveCoincidentTopologyPolygonOffsetParameters(2, 0) mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) @@ -136,146 +138,152 @@ def deregister_dataset(self, data_id: str) -> None: self.mark_basemaps_dirty([data_id]) self.deregister_object(data_id) - def set_visibility(self, data_id: str, *, visibility: bool) -> None: - pipeline = self.get_vtk_pipeline(data_id) - pipeline.visibility = visibility - pipeline.actor.SetVisibility(visibility) - self.set_style_actors_visibility(pipeline, visibility=visibility) + def scene_and_object(self, scene_id: str, data_id: str) -> tuple[Scene, SceneObject]: + scene = self.get_scene(scene_id) + return scene, scene_object_of(scene, data_id) + + def set_visibility(self, scene_id: str, data_id: str, *, visibility: bool) -> None: + scene, scene_object = self.scene_and_object(scene_id, data_id) + scene_object.visibility = visibility + scene_object.actor.SetVisibility(visibility) + self.set_style_actors_visibility(scene_object, visibility=visibility) self.mark_basemaps_dirty([data_id]) if not visibility: - pipeline.scalar_bar.VisibilityOff() - for scalar_bar in pipeline.scalar_bars.values(): + scene_object.scalar_bar.VisibilityOff() + for scalar_bar in scene_object.scalar_bars.values(): scalar_bar.actor.VisibilityOff() - if pipeline.points_scalar_bar is not None: - pipeline.points_scalar_bar.VisibilityOff() - if pipeline.edges_scalar_bar is not None: - pipeline.edges_scalar_bar.VisibilityOff() + if scene_object.points_scalar_bar is not None: + scene_object.points_scalar_bar.VisibilityOff() + if scene_object.edges_scalar_bar is not None: + scene_object.edges_scalar_bar.VisibilityOff() else: - if self.maps_scalars(pipeline.mapper): - pipeline.scalar_bar.VisibilityOn() - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() - - def set_style_actors_visibility(self, pipeline: VtkPipeline, *, visibility: bool) -> None: - if pipeline.points_actor is not None: - pipeline.points_actor.SetVisibility(visibility and pipeline.points_visibility) - for size_actor in pipeline.points_size_actors.values(): + if self.maps_scalars(scene_object.mapper): + scene_object.scalar_bar.VisibilityOn() + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) + + @staticmethod + def set_style_actors_visibility(scene_object: SceneObject, *, visibility: bool) -> None: + if scene_object.points_actor is not None: + scene_object.points_actor.SetVisibility(visibility and scene_object.points_visibility) + for size_actor in scene_object.points_size_actors.values(): size_actor.actor.SetVisibility(visibility) - if pipeline.edges_actor is not None: - pipeline.edges_actor.SetVisibility(visibility and pipeline.edges_visibility) - for width_actor in pipeline.edges_width_actors.values(): + if scene_object.edges_actor is not None: + scene_object.edges_actor.SetVisibility(visibility and scene_object.edges_visibility) + for width_actor in scene_object.edges_width_actors.values(): width_actor.actor.SetVisibility(visibility) - def set_opacity(self, data_id: str, opacity: float) -> None: - actor = self.get_vtk_pipeline(data_id).actor + def set_opacity(self, scene_id: str, data_id: str, opacity: float) -> None: + actor = self.get_scene_object(scene_id, data_id).actor actor.GetProperty().SetOpacity(opacity) - def set_color(self, data_id: str, color: ColorClassProtocol) -> None: - pipeline = self.get_vtk_pipeline(data_id) - pipeline.mapper.ScalarVisibilityOff() - actor = pipeline.actor + def set_color(self, scene_id: str, data_id: str, color: ColorClassProtocol) -> None: + scene, scene_object = self.scene_and_object(scene_id, data_id) + scene_object.mapper.ScalarVisibilityOff() + actor = scene_object.actor actor.GetProperty().SetColor([color.red / 255, color.green / 255, color.blue / 255]) actor.GetProperty().SetOpacity(color.alpha) # Points and edges bars that reused the polygons one now show their own - pipeline.scalar_bar.VisibilityOff() - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() + scene_object.scalar_bar.VisibilityOff() + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) - def set_edges_visibility(self, data_id: str, *, visibility: bool) -> None: + def set_edges_visibility(self, scene_id: str, data_id: str, *, visibility: bool) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": - self.set_visibility(data_id, visibility=visibility) + self.set_visibility(scene_id, data_id, visibility=visibility) return - pipeline = self.get_vtk_pipeline(data_id) - if pipeline.edges_actor is None: - pipeline.actor.GetProperty().SetEdgeVisibility(visibility) + scene, scene_object = self.scene_and_object(scene_id, data_id) + if scene_object.edges_actor is None: + scene_object.actor.GetProperty().SetEdgeVisibility(visibility) return - pipeline.edges_visibility = visibility - pipeline.edges_actor.SetVisibility(pipeline.actor.GetVisibility() and visibility) - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() + scene_object.edges_visibility = visibility + scene_object.edges_actor.SetVisibility(scene_object.actor.GetVisibility() and visibility) + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) - def set_edges_width(self, data_id: str, width: float) -> None: - pipeline = self.get_vtk_pipeline(data_id) + def set_edges_width(self, scene_id: str, data_id: str, width: float) -> None: + scene_object = self.get_scene_object(scene_id, data_id) if self.get_viewer_data(data_id).viewer_elements_type == "edges": - pipeline.actor.GetProperty().SetLineWidth(width) + scene_object.actor.GetProperty().SetLineWidth(width) return # VTK draws polygon edges with the line width, the edge width property is not rendered - pipeline.actor.GetProperty().SetLineWidth(width) - if pipeline.edges_actor is not None: - pipeline.edges_actor.GetProperty().SetLineWidth(width) + scene_object.actor.GetProperty().SetLineWidth(width) + if scene_object.edges_actor is not None: + scene_object.edges_actor.GetProperty().SetLineWidth(width) - def set_edges_color(self, data_id: str, color: ColorClassProtocol) -> None: + def set_edges_color(self, scene_id: str, data_id: str, color: ColorClassProtocol) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": - self.set_color(data_id, color) + self.set_color(scene_id, data_id, color) return - pipeline = self.get_vtk_pipeline(data_id) + scene, scene_object = self.scene_and_object(scene_id, data_id) rgb = [color.red / 255, color.green / 255, color.blue / 255] - pipeline.actor.GetProperty().SetEdgeColor(rgb) - if pipeline.edges_actor is None or pipeline.edges_mapper is None: + scene_object.actor.GetProperty().SetEdgeColor(rgb) + if scene_object.edges_actor is None or scene_object.edges_mapper is None: return # A constant color replaces the edges attribute and its scalar bar - pipeline.edges_mapper.ScalarVisibilityOff() - pipeline.edges_actor.GetProperty().SetColor(rgb) - pipeline.edges_actor.GetProperty().SetOpacity(color.alpha) - if pipeline.edges_scalar_bar is not None: - pipeline.edges_scalar_bar.SetLookupTable(None) - pipeline.edges_color_map_key = None - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() - - def set_edges_opacity(self, data_id: str, opacity: float) -> None: + scene_object.edges_mapper.ScalarVisibilityOff() + scene_object.edges_actor.GetProperty().SetColor(rgb) + scene_object.edges_actor.GetProperty().SetOpacity(color.alpha) + if scene_object.edges_scalar_bar is not None: + scene_object.edges_scalar_bar.SetLookupTable(None) + scene_object.edges_color_map_key = None + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) + + def set_edges_opacity(self, scene_id: str, data_id: str, opacity: float) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": - self.set_opacity(data_id, opacity) + self.set_opacity(scene_id, data_id, opacity) return - pipeline = self.get_vtk_pipeline(data_id) - if pipeline.edges_actor is not None: - pipeline.edges_actor.GetProperty().SetOpacity(opacity) + scene_object = self.get_scene_object(scene_id, data_id) + if scene_object.edges_actor is not None: + scene_object.edges_actor.GetProperty().SetOpacity(opacity) - def set_points_visibility(self, data_id: str, *, visibility: bool) -> None: + def set_points_visibility(self, scene_id: str, data_id: str, *, visibility: bool) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": - self.set_visibility(data_id, visibility=visibility) + self.set_visibility(scene_id, data_id, visibility=visibility) + return + scene, scene_object = self.scene_and_object(scene_id, data_id) + if scene_object.points_actor is not None: + scene_object.points_visibility = visibility + scene_object.points_actor.SetVisibility(visibility) + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) else: - pipeline = self.get_vtk_pipeline(data_id) - if pipeline.points_actor is not None: - pipeline.points_visibility = visibility - pipeline.points_actor.SetVisibility(visibility) - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() - else: - pipeline.actor.GetProperty().SetVertexVisibility(visibility) - - def set_points_size(self, data_id: str, size: float) -> None: - pipeline = self.get_vtk_pipeline(data_id) - pipeline.actor.GetProperty().SetPointSize(size) - if pipeline.points_actor is not None: - pipeline.points_actor.GetProperty().SetPointSize(size) + scene_object.actor.GetProperty().SetVertexVisibility(visibility) + + def set_points_size(self, scene_id: str, data_id: str, size: float) -> None: + scene_object = self.get_scene_object(scene_id, data_id) + scene_object.actor.GetProperty().SetPointSize(size) + if scene_object.points_actor is not None: + scene_object.points_actor.GetProperty().SetPointSize(size) - def ensure_points_actor(self, pipeline: VtkPipeline) -> vtkActor: + @staticmethod + def ensure_points_actor( + pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject + ) -> vtkActor: # Points get their own actor so their scalars stay independent from the polygons - if pipeline.points_actor is not None: - return pipeline.points_actor + if scene_object.points_actor is not None: + return scene_object.points_actor mapper = vtkDataSetMapper() mapper.SetInputConnection(pipeline.filter.GetOutputPort()) mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - main_property = pipeline.actor.GetProperty() + main_property = scene_object.actor.GetProperty() points_property = actor.GetProperty() points_property.SetRepresentationToPoints() points_property.SetPointSize(main_property.GetPointSize()) - pipeline.points_visibility = bool(main_property.GetVertexVisibility()) - actor.SetVisibility(pipeline.points_visibility) + scene_object.points_visibility = bool(main_property.GetVertexVisibility()) + actor.SetVisibility(scene_object.points_visibility) main_property.VertexVisibilityOff() scalar_bar = vtkScalarBarActor() scalar_bar.VisibilityOff() - render_window = self.getView("-1") - renderer = render_window.GetRenderers().GetFirstRenderer() - renderer.AddActor(actor) - renderer.AddViewProp(scalar_bar) - pipeline.points_mapper = mapper - pipeline.points_actor = actor - pipeline.points_scalar_bar = scalar_bar + scene.renderer.AddActor(actor) + scene.renderer.AddViewProp(scalar_bar) + scene_object.points_mapper = mapper + scene_object.points_actor = actor + scene_object.points_scalar_bar = scalar_bar return actor @staticmethod @@ -288,8 +296,8 @@ def maps_scalars(mapper: vtkMapper) -> bool: ) @staticmethod - def polygons_color_map_key(pipeline: VtkPipeline) -> ColorMapKey | None: - mapper = pipeline.mapper + def polygons_color_map_key(scene_object: SceneObject) -> ColorMapKey | None: + mapper = scene_object.mapper if not VtkObjectView.maps_scalars(mapper): return None minimum, maximum = mapper.GetScalarRange() @@ -298,30 +306,30 @@ def polygons_color_map_key(pipeline: VtkPipeline) -> ColorMapKey | None: mapper.GetArrayComponent(), minimum, maximum, - tuple(pipeline.color_map_points), + tuple(scene_object.color_map_points), ) - def update_style_scalar_bars_visibility(self, pipeline: VtkPipeline) -> None: + def update_style_scalar_bars_visibility(self, scene_object: SceneObject) -> None: # Points and edges bars show only when no visible bar already holds the same attribute - visible = bool(pipeline.actor.GetVisibility()) - polygons_key = self.polygons_color_map_key(pipeline) + visible = bool(scene_object.actor.GetVisibility()) + polygons_key = self.polygons_color_map_key(scene_object) points_bar_visible = ( visible - and pipeline.points_visibility - and pipeline.points_color_map_key is not None - and pipeline.points_color_map_key != polygons_key + and scene_object.points_visibility + and scene_object.points_color_map_key is not None + and scene_object.points_color_map_key != polygons_key ) - if pipeline.points_scalar_bar is not None: - pipeline.points_scalar_bar.SetVisibility(points_bar_visible) - if pipeline.edges_scalar_bar is not None: - pipeline.edges_scalar_bar.SetVisibility( + if scene_object.points_scalar_bar is not None: + scene_object.points_scalar_bar.SetVisibility(points_bar_visible) + if scene_object.edges_scalar_bar is not None: + scene_object.edges_scalar_bar.SetVisibility( visible - and pipeline.edges_visibility - and pipeline.edges_color_map_key is not None - and pipeline.edges_color_map_key != polygons_key + and scene_object.edges_visibility + and scene_object.edges_color_map_key is not None + and scene_object.edges_color_map_key != polygons_key and not ( points_bar_visible - and pipeline.edges_color_map_key == pipeline.points_color_map_key + and scene_object.edges_color_map_key == scene_object.points_color_map_key ) ) @@ -341,10 +349,12 @@ def match_edges_depth_to_polygons(mapper: vtkMapper) -> None: EDGES_DEPTH_FACTOR_SHARE * (float(polygon_factor) - float(line_factor)), 0.0 ) - def ensure_edges_actor(self, pipeline: VtkPipeline) -> vtkActor: + def ensure_edges_actor( + self, pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject + ) -> vtkActor: # Edges get their own actor so their scalars stay independent from the polygons - if pipeline.edges_actor is not None: - return pipeline.edges_actor + if scene_object.edges_actor is not None: + return scene_object.edges_actor mapper = vtkDataSetMapper() mapper.SetInputConnection(pipeline.filter.GetOutputPort()) mapper.ScalarVisibilityOff() @@ -352,57 +362,56 @@ def ensure_edges_actor(self, pipeline: VtkPipeline) -> vtkActor: actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - main_property = pipeline.actor.GetProperty() + main_property = scene_object.actor.GetProperty() edges_property = actor.GetProperty() edges_property.SetRepresentationToWireframe() edges_property.SetLineWidth(main_property.GetLineWidth()) edges_property.SetColor(*main_property.GetEdgeColor()) - pipeline.edges_visibility = bool(main_property.GetEdgeVisibility()) - actor.SetVisibility(pipeline.actor.GetVisibility() and pipeline.edges_visibility) + scene_object.edges_visibility = bool(main_property.GetEdgeVisibility()) + actor.SetVisibility(scene_object.actor.GetVisibility() and scene_object.edges_visibility) main_property.EdgeVisibilityOff() scalar_bar = vtkScalarBarActor() scalar_bar.VisibilityOff() - render_window = self.getView("-1") - renderer = render_window.GetRenderers().GetFirstRenderer() - renderer.AddActor(actor) - renderer.AddViewProp(scalar_bar) - pipeline.edges_mapper = mapper - pipeline.edges_actor = actor - pipeline.edges_scalar_bar = scalar_bar + scene.renderer.AddActor(actor) + scene.renderer.AddViewProp(scalar_bar) + scene_object.edges_mapper = mapper + scene_object.edges_actor = actor + scene_object.edges_scalar_bar = scalar_bar return actor - def set_points_color(self, data_id: str, color: ColorClassProtocol) -> None: + def set_points_color(self, scene_id: str, data_id: str, color: ColorClassProtocol) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": - self.set_color(data_id, color) + self.set_color(scene_id, data_id, color) return - pipeline = self.get_vtk_pipeline(data_id) + scene, scene_object = self.scene_and_object(scene_id, data_id) rgb = [color.red / 255, color.green / 255, color.blue / 255] - pipeline.actor.GetProperty().SetVertexColor(rgb) - if pipeline.points_actor is None or pipeline.points_mapper is None: + scene_object.actor.GetProperty().SetVertexColor(rgb) + if scene_object.points_actor is None or scene_object.points_mapper is None: return # A constant color replaces the points attribute and its scalar bar - pipeline.points_mapper.ScalarVisibilityOff() - pipeline.points_actor.GetProperty().SetColor(rgb) - pipeline.points_actor.GetProperty().SetOpacity(color.alpha) - if pipeline.points_scalar_bar is not None: - pipeline.points_scalar_bar.SetLookupTable(None) - pipeline.points_color_map_key = None - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() - - def set_points_opacity(self, data_id: str, opacity: float) -> None: + scene_object.points_mapper.ScalarVisibilityOff() + scene_object.points_actor.GetProperty().SetColor(rgb) + scene_object.points_actor.GetProperty().SetOpacity(color.alpha) + if scene_object.points_scalar_bar is not None: + scene_object.points_scalar_bar.SetLookupTable(None) + scene_object.points_color_map_key = None + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) + + def set_points_opacity(self, scene_id: str, data_id: str, opacity: float) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": - self.set_opacity(data_id, opacity) + self.set_opacity(scene_id, data_id, opacity) return - pipeline = self.get_vtk_pipeline(data_id) - if pipeline.points_actor is not None: - pipeline.points_actor.GetProperty().SetOpacity(opacity) + scene_object = self.get_scene_object(scene_id, data_id) + if scene_object.points_actor is not None: + scene_object.points_actor.GetProperty().SetOpacity(opacity) def set_blocks_visibility( - self, data_id: str, block_ids: list[int], *, visibility: bool + self, scene_id: str, data_id: str, block_ids: list[int], *, visibility: bool ) -> None: pipeline = self.get_vtk_pipeline(data_id) - mapper = pipeline.mapper + scene_object = self.get_scene_object(scene_id, data_id) + mapper = scene_object.mapper if not isinstance(mapper, vtkCompositePolyDataMapper): msg = "Mapper is not a vtkCompositePolyDataMapper" raise TypeError(msg) @@ -411,35 +420,19 @@ def set_blocks_visibility( logger.debug("visibility_attributes=%s", visibility_attributes) for block_id in block_ids: visibility_attributes.SetBlockVisibility(blocks[block_id], visibility) - pipeline.update_points_size_actors() - pipeline.update_edges_width_actors() + scene_object.update_points_size_actors(pipeline) + scene_object.update_edges_width_actors(pipeline) self.mark_basemaps_dirty([data_id]) dataset = mapper.GetInputDataObject(0, 0) if not isinstance(dataset, vtkMultiBlockDataSet): return # Re-build a pruned dataset for the dedicated pick mapper - if pipeline.pick_mapper is None: - pipeline.pick_mapper = vtkCompositePolyDataMapper() - pipeline.pick_mapper.SetInputDataObject( + if scene_object.pick_mapper is None: + scene_object.pick_mapper = vtkCompositePolyDataMapper() + scene_object.pick_mapper.SetInputDataObject( pipeline.prune_hidden_blocks(dataset, visibility_attributes) ) - def clear_colors(self, data_id: str) -> None: - pipeline = self.get_vtk_pipeline(data_id) - mapper = pipeline.mapper - reader = pipeline.reader - output = reader.GetOutputDataObject(0) - if isinstance(output, vtkDataSet): - output.GetPointData().SetActiveScalars("") - output.GetCellData().SetActiveScalars("") - elif isinstance(mapper, vtkCompositePolyDataMapper): - pipeline.clear_blocks_scalars() - mapper.ScalarVisibilityOff() - pipeline.scalar_bar.VisibilityOff() - for scalar_bar in pipeline.scalar_bars.values(): - scalar_bar.actor.VisibilityOff() - self.update_scalar_bars_layout() - def _apply_highlight_style(self, actor: vtkActor, mapper: vtkDataSetMapper) -> None: mapper.ScalarVisibilityOff() mapper.SetResolveCoincidentTopologyToPolygonOffset() diff --git a/src/opengeodeweb_viewer/rpc/image/image_protocols.py b/src/opengeodeweb_viewer/rpc/image/image_protocols.py index 23e4d21c..023ed908 100644 --- a/src/opengeodeweb_viewer/rpc/image/image_protocols.py +++ b/src/opengeodeweb_viewer/rpc/image/image_protocols.py @@ -31,10 +31,10 @@ def deregister_image(self, params: schemas.Deregister) -> schemas.DeregisterResp @typed_rpc(image_prefix, schemas.visibility_route) def set_image_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.id, visibility=params.visibility) + self.set_visibility(params.scene_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(image_prefix, schemas.opacity_route) def set_image_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.id, params.opacity) + self.set_opacity(params.scene_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json index efc0eb49..144acafb 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json @@ -2,6 +2,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py index 3130d198..fc989d04 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py index 950c0671..2cf3f23f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py @@ -20,5 +20,5 @@ def __init__(self) -> None: @typed_rpc(mesh_cells_attribute_cell_prefix, schemas.attribute_route) def set_mesh_cells_cell_attribute(self, params: schemas.Attribute) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.id, params) + self.display_attribute_on_cells(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py index c97f5b6a..1ea56f8d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_mesh_cells_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.id, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py index 26a092d2..2a5f87b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py @@ -20,16 +20,16 @@ def __init__(self) -> None: @typed_rpc(mesh_cells_prefix, schemas.visibility_route) def set_mesh_cells_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.id, visibility=params.visibility) + self.set_visibility(params.scene_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_cells_prefix, schemas.color_route) def set_mesh_cells_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.id, color) + self.set_color(params.scene_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_cells_prefix, schemas.opacity_route) def set_mesh_cells_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.id, params.opacity) + self.set_opacity(params.scene_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json index 39c9c6b2..980dcd29 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py index eb65cb56..d393b62e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json index efc0eb49..144acafb 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json @@ -2,6 +2,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py index 3130d198..fc989d04 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py index 3eefa999..eedc8ae6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py @@ -20,5 +20,5 @@ def __init__(self) -> None: @typed_rpc(mesh_edges_attribute_edge_prefix, schemas.attribute_route) def set_mesh_edges_edge_attribute(self, params: schemas.Attribute) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.id, params) + self.display_attribute_on_cells(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py index 74c11aef..ffc65809 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py @@ -23,7 +23,7 @@ def set_mesh_edges_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: if self.get_viewer_data(params.id).viewer_elements_type == "edges": - self.display_attribute_on_vertices(params.id, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params) else: - self.display_attribute_on_edges(params.id, params) + self.display_attribute_on_edges(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py index 98f57894..5bc7a136 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py @@ -20,21 +20,21 @@ def __init__(self) -> None: @typed_rpc(mesh_edges_prefix, schemas.visibility_route) def set_mesh_edges_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_edges_visibility(params.id, visibility=params.visibility) + self.set_edges_visibility(params.scene_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_edges_prefix, schemas.color_route) def set_mesh_edges_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_edges_color(params.id, color) + self.set_edges_color(params.scene_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_edges_prefix, schemas.width_route) def set_mesh_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: - self.set_edges_width(params.id, params.width) + self.set_edges_width(params.scene_id, params.id, params.width) return schemas.WidthResponse() @typed_rpc(mesh_edges_prefix, schemas.opacity_route) def set_mesh_edges_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_edges_opacity(params.id, params.opacity) + self.set_edges_opacity(params.scene_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json index 39c9c6b2..980dcd29 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py index eb65cb56..d393b62e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json index efc0eb49..144acafb 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json @@ -2,6 +2,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py index 3130d198..fc989d04 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json index 3040c522..36e72ec6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json @@ -2,6 +2,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "width" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py index 9c2e0b02..9042029b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py index 4ced59e8..fcb7c148 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py @@ -16,12 +16,7 @@ # Local application imports from opengeodeweb_viewer.basemap_compose import mosaic, read_tiles -from opengeodeweb_viewer.basemap_drape import ( - BASEMAP_POLYGON_OFFSET_UNITS, - DETAIL_POLYGON_OFFSET_UNITS, - style_basemap, -) -from opengeodeweb_viewer.basemap_pipeline import compose, retexture +from opengeodeweb_viewer.basemap_pipeline import compose, retexture, style_basemap_object from opengeodeweb_viewer.object.object_methods import VtkObjectView from opengeodeweb_viewer.typed_rpc import typed_rpc from opengeodeweb_viewer.utils_functions import ( @@ -38,6 +33,7 @@ from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor from opengeodeweb_viewer.basemap_compose import LayerState + from opengeodeweb_viewer.scene import Scene, SceneObject logger = logging.getLogger(__name__) @@ -79,18 +75,19 @@ def deregister_mesh(self, params: schemas.Deregister) -> schemas.DeregisterRespo @typed_rpc(mesh_prefix, schemas.visibility_route) def set_mesh_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.id, visibility=params.visibility) + self.set_visibility(params.scene_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_prefix, schemas.color_route) def set_mesh_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.id, color) + self.set_color(params.scene_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_prefix, schemas.apply_textures_route) def mesh_apply_textures(self, params: schemas.ApplyTextures) -> schemas.ApplyTexturesResponse: mesh_id = params.id + scene_object = self.get_scene_object(params.scene_id, mesh_id) for tex_info in params.textures: texture_id = tex_info.id texture_data = Data.get(texture_id) @@ -113,7 +110,7 @@ def mesh_apply_textures(self, params: schemas.ApplyTextures) -> schemas.ApplyTex output.GetPointData().SetTCoords(array) pipeline.filter.Modified() pipeline.filter.Update() - pipeline.actor.SetTexture(texture) + scene_object.actor.SetTexture(texture) return schemas.ApplyTexturesResponse() @typed_rpc(mesh_prefix, schemas.apply_basemap_route) @@ -148,18 +145,11 @@ def mesh_apply_basemap(self, params: schemas.ApplyBasemap) -> schemas.ApplyBasem output.GetPointData().SetTCoords(output.GetPointData().GetArray("basemap_uv")) pipeline.filter.Modified() pipeline.filter.Update() - style_basemap( - pipeline.actor, - pipeline.mapper, - ( - BASEMAP_POLYGON_OFFSET_UNITS - if params.detail_of is None - else DETAIL_POLYGON_OFFSET_UNITS - ), - ) + # A basemap is a global setting: every scene showing the data draws it + for scene_object in self.scene_objects_of(pipeline): + style_basemap_object(basemap, scene_object) if pipeline.basemap is not None: basemap.drape_ids = pipeline.basemap.drape_ids - basemap.drape_actor = pipeline.basemap.drape_actor pipeline.basemap = basemap # A basemap rebuilt while the data is clipped or exploded follows it at once self.clip_basemap(pipeline) @@ -180,8 +170,10 @@ def mesh_basemap_layers(self, params: schemas.BasemapLayers) -> schemas.BasemapL basemap.layers = layers if basemap.images: compose(basemap, next(iter(basemap.images.values())).shape[:2]) - # Same geometry: the existing actors only get the new textures - retexture(self.get_data_base(), pipeline) + # Same geometry: the existing actors of every scene only get the new textures + for scene in self.get_scenes().values(): + if (scene_object := scene.objects.get(params.id)) is not None: + retexture(pipeline, scene_object, scene) return schemas.BasemapLayersResponse() @typed_rpc(mesh_prefix, schemas.basemap_drape_route) @@ -196,39 +188,38 @@ def mesh_basemap_drape(self, params: schemas.BasemapDrape) -> schemas.BasemapDra self.mark_basemaps_dirty() return schemas.BasemapDrapeResponse() - def display_attribute_on_vertices(self, data_id: str, attribute: AttributeProtocol) -> None: - pipeline = self.get_vtk_pipeline(data_id) - name = attribute.name - pipeline.reader.GetOutputAsDataSet().GetPointData().SetActiveScalars(name) - pipeline.filter.Update() - if active_ds := pipeline.mapper.GetInputDataObject(0, 0): - active_ds.GetPointData().SetActiveScalars(name) - pipeline.mapper.ScalarVisibilityOn() - pipeline.mapper.SetScalarModeToUsePointData() - pipeline.mapper.ColorByArrayComponent(name, attribute.item) - self.setup_color_map(data_id, attribute) - - def display_attribute_on_points(self, data_id: str, attribute: AttributeProtocol) -> None: - pipeline = self.get_vtk_pipeline(data_id) - self.ensure_points_actor(pipeline) - if pipeline.points_mapper is None: + def display_attribute_on_vertices( + self, scene_id: str, data_id: str, attribute: AttributeProtocol + ) -> None: + scene, scene_object = self.scene_and_object(scene_id, data_id) + scene_object.color_by_array(attribute.name, attribute.item, is_point=True) + self.setup_color_map(scene, scene_object, attribute) + + def display_attribute_on_points( + self, scene_id: str, data_id: str, attribute: AttributeProtocol + ) -> None: + scene, scene_object = self.scene_and_object(scene_id, data_id) + self.ensure_points_actor(self.get_vtk_pipeline(data_id), scene, scene_object) + if scene_object.points_mapper is None: return - pipeline.points_color_map_key = self.display_attribute_on_style_mapper( - pipeline.points_mapper, pipeline.points_scalar_bar, attribute + scene_object.points_color_map_key = self.display_attribute_on_style_mapper( + scene_object.points_mapper, scene_object.points_scalar_bar, attribute ) - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() - - def display_attribute_on_edges(self, data_id: str, attribute: AttributeProtocol) -> None: - pipeline = self.get_vtk_pipeline(data_id) - self.ensure_edges_actor(pipeline) - if pipeline.edges_mapper is None: + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) + + def display_attribute_on_edges( + self, scene_id: str, data_id: str, attribute: AttributeProtocol + ) -> None: + scene, scene_object = self.scene_and_object(scene_id, data_id) + self.ensure_edges_actor(self.get_vtk_pipeline(data_id), scene, scene_object) + if scene_object.edges_mapper is None: return - pipeline.edges_color_map_key = self.display_attribute_on_style_mapper( - pipeline.edges_mapper, pipeline.edges_scalar_bar, attribute + scene_object.edges_color_map_key = self.display_attribute_on_style_mapper( + scene_object.edges_mapper, scene_object.edges_scalar_bar, attribute ) - self.update_style_scalar_bars_visibility(pipeline) - self.update_scalar_bars_layout() + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) def display_attribute_on_style_mapper( self, @@ -263,57 +254,44 @@ def display_attribute_on_style_mapper( tuple(attribute.points), ) - def display_attribute_on_cells(self, data_id: str, attribute: AttributeProtocol) -> None: - pipeline = self.get_vtk_pipeline(data_id) - name = attribute.name - pipeline.reader.GetOutputAsDataSet().GetCellData().SetActiveScalars(name) - pipeline.filter.Update() - if active_ds := pipeline.mapper.GetInputDataObject(0, 0): - active_ds.GetCellData().SetActiveScalars(name) - pipeline.mapper.ScalarVisibilityOn() - pipeline.mapper.SetScalarModeToUseCellData() - pipeline.mapper.ColorByArrayComponent(name, attribute.item) - self.setup_color_map(data_id, attribute) - - def display_scalar_range(self, data_id: str, minimum: float, maximum: float) -> None: - logger.debug("Setting scalar range for %s to (%s, %s)", data_id, minimum, maximum) - data = self.get_vtk_pipeline(data_id) - data.mapper.SetScalarRange(minimum, maximum) - data.mapper.GetLookupTable().SetRange(minimum, maximum) - data.mapper.UseLookupTableScalarRangeOff() - self.update_style_scalar_bars_visibility(data) - self.update_scalar_bars_layout() - - def setup_color_map(self, data_id: str, attribute: AttributeProtocol) -> None: - data = self.get_vtk_pipeline(data_id) + def display_attribute_on_cells( + self, scene_id: str, data_id: str, attribute: AttributeProtocol + ) -> None: + scene, scene_object = self.scene_and_object(scene_id, data_id) + scene_object.color_by_array(attribute.name, attribute.item, is_point=False) + self.setup_color_map(scene, scene_object, attribute) + + def setup_color_map( + self, scene: Scene, scene_object: SceneObject, attribute: AttributeProtocol + ) -> None: + mapper = scene_object.mapper minimum = attribute.minimum maximum = attribute.maximum lut = create_color_transfer_function( attribute.points, minimum, maximum, attribute.item, attribute.no_data_color ) - data.mapper.SetLookupTable(lut) - data.color_map_points = list(attribute.points) + mapper.SetLookupTable(lut) + scene_object.color_map_points = list(attribute.points) - data.mapper.SetScalarRange(minimum, maximum) + mapper.SetScalarRange(minimum, maximum) lut.SetRange(minimum, maximum) - data.mapper.UseLookupTableScalarRangeOff() - data.mapper.InterpolateScalarsBeforeMappingOn() + mapper.UseLookupTableScalarRangeOff() + mapper.InterpolateScalarsBeforeMappingOn() - data.scalar_bar.SetLookupTable(lut) - data.scalar_bar.VisibilityOn() - self.update_style_scalar_bars_visibility(data) - self.update_scalar_bars_layout() + scene_object.scalar_bar.SetLookupTable(lut) + scene_object.scalar_bar.VisibilityOn() + self.update_style_scalar_bars_visibility(scene_object) + self.update_scalar_bars_layout(scene) @typed_rpc(mesh_prefix, schemas.highlight_route) def set_mesh_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: pipeline = self.get_vtk_pipeline(params.id) + highlight = self.get_scene_object(params.scene_id, params.id).highlight if params.visibility: dataset = pipeline.reader.GetOutputDataObject(0) - pipeline.highlight.mapper.SetInputDataObject(dataset) + highlight.mapper.SetInputDataObject(dataset) else: - pipeline.highlight.mapper.SetInputConnection( - pipeline.highlight.extract_selection.GetOutputPort() - ) - pipeline.highlight.actor.SetVisibility(params.visibility) - self.render(-1) + highlight.mapper.SetInputConnection(highlight.extract_selection.GetOutputPort()) + highlight.actor.SetVisibility(params.visibility) + self.render(params.scene_id) return schemas.HighlightResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py index 47908798..d0815575 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py @@ -23,7 +23,7 @@ def set_mesh_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: if self.get_viewer_data(params.id).viewer_elements_type == "points": - self.display_attribute_on_vertices(params.id, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params) else: - self.display_attribute_on_points(params.id, params) + self.display_attribute_on_points(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py index 8a0f5625..d3644679 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py @@ -20,21 +20,21 @@ def __init__(self) -> None: @typed_rpc(mesh_points_prefix, schemas.visibility_route) def set_mesh_points_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_points_visibility(params.id, visibility=params.visibility) + self.set_points_visibility(params.scene_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse(id=params.id, visibility=params.visibility) @typed_rpc(mesh_points_prefix, schemas.color_route) def set_mesh_points_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_points_color(params.id, color) + self.set_points_color(params.scene_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_points_prefix, schemas.size_route) def set_mesh_points_size(self, params: schemas.Size) -> schemas.SizeResponse: - self.set_points_size(params.id, params.size) + self.set_points_size(params.scene_id, params.id, params.size) return schemas.SizeResponse() @typed_rpc(mesh_points_prefix, schemas.opacity_route) def set_mesh_points_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_points_opacity(params.id, params.opacity) + self.set_points_opacity(params.scene_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json index 39c9c6b2..980dcd29 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py index eb65cb56..d393b62e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json index efc0eb49..144acafb 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json @@ -2,6 +2,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py index 3130d198..fc989d04 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json index d3c64bd9..00e3f1c9 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json @@ -2,6 +2,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "size" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py index 03dc2f79..005af0df 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json index 8baebe36..185e2a7a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py index afed3873..8c16d658 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py index e5b7c290..c9664d5e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_mesh_polygons_polygon_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.id, params) + self.display_attribute_on_cells(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py index 1f2eda7a..e861b95b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_mesh_polygons_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.id, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py index c64bbc01..09a1aebd 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py @@ -22,16 +22,16 @@ def __init__(self) -> None: def set_mesh_polygons_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_visibility(params.id, visibility=params.visibility) + self.set_visibility(params.scene_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_polygons_prefix, schemas.color_route) def set_mesh_polygons_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.id, color) + self.set_color(params.scene_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_polygons_prefix, schemas.opacity_route) def set_mesh_polygons_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.id, params.opacity) + self.set_opacity(params.scene_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json index 39c9c6b2..980dcd29 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py index eb65cb56..d393b62e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json index efc0eb49..144acafb 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json @@ -2,6 +2,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py index 3130d198..fc989d04 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py index a8433570..ab6900d9 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py @@ -26,5 +26,5 @@ def __init__(self) -> None: def set_mesh_polyhedra_polyhedron_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.id, params) + self.display_attribute_on_cells(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py index 992904a3..f0ca7685 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_mesh_polyhedra_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.id, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json index 58a71266..c53628af 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -25,6 +29,7 @@ } }, "required": [ + "scene_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py index 0316dde5..7de5145f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py @@ -1,5 +1,12 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + ColorMapPoints, + ColorRGBA, +) from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,6 +28,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py index f3a1017a..1d3873f5 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py @@ -22,16 +22,16 @@ def __init__(self) -> None: def set_mesh_polyhedra_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_visibility(params.id, visibility=params.visibility) + self.set_visibility(params.scene_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_polyhedra_prefix, schemas.color_route) def set_mesh_polyhedra_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.id, color) + self.set_color(params.scene_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_polyhedra_prefix, schemas.opacity_route) def set_mesh_polyhedra_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.id, params.opacity) + self.set_opacity(params.scene_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json index 39c9c6b2..980dcd29 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py index eb65cb56..d393b62e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json index efc0eb49..144acafb 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json @@ -2,6 +2,10 @@ "rpc": "opacity", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py index 3130d198..fc989d04 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json index f5f7c4b6..74acdcdd 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json @@ -2,6 +2,10 @@ "rpc": "apply_textures", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "textures" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py index f3bbf803..c918d1b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py @@ -22,6 +22,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str textures: List[Texture] diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json index 39c9c6b2..980dcd29 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py index eb65cb56..d393b62e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json index fddb90d0..f33f73e6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json @@ -2,6 +2,10 @@ "rpc": "highlight", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py index 8d4538e0..2d8bdc65 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py index c8ea095d..a304d653 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py @@ -26,5 +26,5 @@ def __init__(self) -> None: def set_model_blocks_polyhedron_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.id, params.block_ids, params) + self.display_attribute_on_cells(params.scene_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py index 29c40708..96803758 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_model_blocks_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py index bbee371e..3cc73e47 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py @@ -26,5 +26,7 @@ def __init__(self) -> None: def set_model_blocks_edges_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.set_component_edges_attribute(params.id, "blocks", params.block_ids, params) + self.set_component_edges_attribute( + params.scene_id, params.id, "blocks", params.block_ids, params + ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py index 26595563..b698fa7f 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py @@ -23,16 +23,20 @@ def set_model_blocks_edges_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_edges_visibility( - params.id, "blocks", params.block_ids, visibility=params.visibility + params.scene_id, params.id, "blocks", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_blocks_edges_prefix, schemas.color_route) def set_model_blocks_edges_color(self, params: schemas.Color) -> schemas.ColorResponse: - self.set_component_edges_color(params.id, "blocks", params.block_ids, params.color) + self.set_component_edges_color( + params.scene_id, params.id, "blocks", params.block_ids, params.color + ) return schemas.ColorResponse() @typed_rpc(model_blocks_edges_prefix, schemas.width_route) def set_model_blocks_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: - self.set_component_edges_width(params.id, "blocks", params.block_ids, params.width) + self.set_component_edges_width( + params.scene_id, params.id, "blocks", params.block_ids, params.width + ) return schemas.WidthResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json index 4decd739..470a5412 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py index f2495bd4..d0bcb155 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py @@ -15,6 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json index 3f46e4b5..2bbc41c2 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json @@ -2,6 +2,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "width" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py index f54fda05..1c66bc84 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py index 1899b574..84093aa0 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py @@ -22,17 +22,12 @@ def __init__(self) -> None: def set_model_blocks_polyhedra_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_blocks_visibility(params.id, params.block_ids, visibility=params.visibility) + self.set_blocks_visibility( + params.scene_id, params.id, params.block_ids, visibility=params.visibility + ) return schemas.VisibilityResponse() @typed_rpc(model_blocks_prefix, schemas.color_route) def set_model_blocks_color(self, params: schemas.Color) -> schemas.ColorResponse: - pipeline = self.get_vtk_pipeline(params.id) - colors = self.apply_color( - pipeline, - params.block_ids, - params.color_mode.value, - params.color, - params.collection_id, - ) + colors = self.apply_color(params) return schemas.ColorResponse.from_dict({"colors": colors}) diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py index 8396055d..b129a651 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py @@ -26,5 +26,7 @@ def __init__(self) -> None: def set_model_blocks_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.set_component_points_attribute(params.id, "blocks", params.block_ids, params) + self.set_component_points_attribute( + params.scene_id, params.id, "blocks", params.block_ids, params + ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py index 6d3f1fca..33b90f10 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py @@ -23,16 +23,20 @@ def set_model_blocks_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_points_visibility( - params.id, "blocks", params.block_ids, visibility=params.visibility + params.scene_id, params.id, "blocks", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_blocks_points_prefix, schemas.color_route) def set_model_blocks_points_color(self, params: schemas.Color) -> schemas.ColorResponse: - self.set_component_points_color(params.id, "blocks", params.block_ids, params.color) + self.set_component_points_color( + params.scene_id, params.id, "blocks", params.block_ids, params.color + ) return schemas.ColorResponse() @typed_rpc(model_blocks_points_prefix, schemas.size_route) def set_model_blocks_points_size(self, params: schemas.Size) -> schemas.SizeResponse: - self.set_component_points_size(params.id, "blocks", params.block_ids, params.size) + self.set_component_points_size( + params.scene_id, params.id, "blocks", params.block_ids, params.size + ) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json index 4decd739..470a5412 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py index f2495bd4..d0bcb155 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py @@ -15,6 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json index b4a3fc4b..c8781d29 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json @@ -2,6 +2,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "size" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py index db84284e..037d1dcb 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json index 615f31f7..3ceebae6 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -23,6 +27,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py index b828df8e..91579462 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -23,6 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId + scene_id: str collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py index b7e5207b..96c4980f 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_model_corners_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py b/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py index f8841fb4..643164c1 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py @@ -22,17 +22,12 @@ def __init__(self) -> None: def set_model_corners_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_blocks_visibility(params.id, params.block_ids, visibility=params.visibility) + self.set_blocks_visibility( + params.scene_id, params.id, params.block_ids, visibility=params.visibility + ) return schemas.VisibilityResponse() @typed_rpc(model_corners_prefix, schemas.color_route) def set_model_corners_color(self, params: schemas.Color) -> schemas.ColorResponse: - pipeline = self.get_vtk_pipeline(params.id) - colors = self.apply_color( - pipeline, - params.block_ids, - params.color_mode.value, - params.color, - params.collection_id, - ) + colors = self.apply_color(params) return schemas.ColorResponse.from_dict({"colors": colors}) diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json index 615f31f7..3ceebae6 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -23,6 +27,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py index b828df8e..91579462 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -23,6 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId + scene_id: str collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py b/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py index 314ced91..3178386a 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py @@ -20,10 +20,12 @@ def __init__(self) -> None: @typed_rpc(model_edges_prefix, schemas.visibility_route) def set_model_edges_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_model_edges_visibility_on_all(params.id, visibility=params.visibility) + self.set_model_edges_visibility_on_all( + params.scene_id, params.id, visibility=params.visibility + ) return schemas.VisibilityResponse() @typed_rpc(model_edges_prefix, schemas.width_route) def set_model_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: - self.set_model_edges_width_on_all(params.id, params.width) + self.set_model_edges_width_on_all(params.scene_id, params.id, params.width) return schemas.WidthResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json index 3040c522..36e72ec6 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json @@ -2,6 +2,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "width" ], diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py index 9c2e0b02..9042029b 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py index 9b4c7494..f0fb91fc 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_model_lines_edge_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.id, params.block_ids, params) + self.display_attribute_on_cells(params.scene_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py index ad6235aa..2a3b4fed 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_model_lines_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py index 13a8ce6c..54d9954d 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py @@ -22,17 +22,12 @@ def __init__(self) -> None: def set_model_lines_edges_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_blocks_visibility(params.id, params.block_ids, visibility=params.visibility) + self.set_blocks_visibility( + params.scene_id, params.id, params.block_ids, visibility=params.visibility + ) return schemas.VisibilityResponse() @typed_rpc(model_lines_prefix, schemas.color_route) def set_model_lines_color(self, params: schemas.Color) -> schemas.ColorResponse: - pipeline = self.get_vtk_pipeline(params.id) - colors = self.apply_color( - pipeline, - params.block_ids, - params.color_mode.value, - params.color, - params.collection_id, - ) + colors = self.apply_color(params) return schemas.ColorResponse.from_dict({"colors": colors}) diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py index 3941e747..741ac9ca 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py @@ -26,5 +26,7 @@ def __init__(self) -> None: def set_model_lines_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.set_component_points_attribute(params.id, "lines", params.block_ids, params) + self.set_component_points_attribute( + params.scene_id, params.id, "lines", params.block_ids, params + ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py index bbb8ba96..94dde7d1 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py @@ -23,16 +23,20 @@ def set_model_lines_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_points_visibility( - params.id, "lines", params.block_ids, visibility=params.visibility + params.scene_id, params.id, "lines", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_lines_points_prefix, schemas.color_route) def set_model_lines_points_color(self, params: schemas.Color) -> schemas.ColorResponse: - self.set_component_points_color(params.id, "lines", params.block_ids, params.color) + self.set_component_points_color( + params.scene_id, params.id, "lines", params.block_ids, params.color + ) return schemas.ColorResponse() @typed_rpc(model_lines_points_prefix, schemas.size_route) def set_model_lines_points_size(self, params: schemas.Size) -> schemas.SizeResponse: - self.set_component_points_size(params.id, "lines", params.block_ids, params.size) + self.set_component_points_size( + params.scene_id, params.id, "lines", params.block_ids, params.size + ) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json index 4decd739..470a5412 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py index f2495bd4..d0bcb155 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py @@ -15,6 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json index b4a3fc4b..c8781d29 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json @@ -2,6 +2,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "size" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py index db84284e..037d1dcb 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json index 615f31f7..3ceebae6 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -23,6 +27,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py index b828df8e..91579462 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -23,6 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId + scene_id: str collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/model_protocols.py b/src/opengeodeweb_viewer/rpc/model/model_protocols.py index f86c4b01..062640b0 100644 --- a/src/opengeodeweb_viewer/rpc/model/model_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/model_protocols.py @@ -2,7 +2,7 @@ # Standard library imports from pathlib import Path -from typing import Protocol, TypedDict, cast +from typing import TYPE_CHECKING, Literal, Protocol, TypedDict, cast # Third party imports from opengeodeweb_microservice.schemas import get_schemas_dict @@ -40,6 +40,12 @@ from . import schemas +if TYPE_CHECKING: + from collections.abc import Callable + from enum import Enum + + from opengeodeweb_viewer.scene import Scene, SceneObject + logger = logging.getLogger(__name__) @@ -50,6 +56,23 @@ class ColorProtocol(Protocol): alpha: float +class ModelColorParams(Protocol): + """The params of the color RPC of every model component.""" + + @property + def scene_id(self) -> str: ... + @property + def id(self) -> str: ... + @property + def block_ids(self) -> list[int]: ... + @property + def color_mode(self) -> Enum: ... + @property + def color(self) -> ColorProtocol | None: ... + @property + def collection_id(self) -> str | None: ... + + class ColorRGBA(TypedDict): red: int green: int @@ -68,6 +91,18 @@ class ColorResult(TypedDict): EDGES_COMPONENT_TYPES = ("surfaces", "blocks") +def block_style(attribute: AttributeProtocol) -> BlockStyle: + return BlockStyle( + name=attribute.name, + attribute_location="point", + points=attribute.points, + minimum=attribute.minimum, + maximum=attribute.maximum, + item=attribute.item, + no_data_color=attribute.no_data_color, + ) + + class VtkModelView(VtkObjectView): model_prefix = "opengeodeweb_viewer.model." model_schemas_dict = get_schemas_dict(Path(__file__).parent / "schemas") @@ -75,23 +110,21 @@ class VtkModelView(VtkObjectView): def __init__(self) -> None: super().__init__() - def apply_color( - self, - pipeline: VtkPipeline, - block_ids: list[int], - color_mode: str, - color: ColorProtocol | None = None, - collection_id: str | None = None, - ) -> list[ColorResult]: - mapper = pipeline.mapper + def apply_color(self, params: ModelColorParams) -> list[ColorResult]: + pipeline = self.get_vtk_pipeline(params.id) + scene, scene_object = self.scene_and_object(params.scene_id, params.id) + color_mode = params.color_mode.value + color = params.color + collection_id = params.collection_id + mapper = scene_object.mapper if not isinstance(mapper, vtkCompositePolyDataMapper): return [] attr = mapper.GetCompositeDataDisplayAttributes() logger.debug("attr=%s", attr) colors: list[ColorResult] = [] - for block_id in block_ids: - pipeline.get_block_style(block_id) - pipeline.clear_block_scalars(block_id) + for block_id in params.block_ids: + scene_object.get_block_style(block_id) + scene_object.clear_block_scalars(pipeline, block_id) block_dataset = pipeline.block_data_sets[block_id] if isinstance(block_dataset, vtkDataSet): if color_mode == "random": @@ -123,7 +156,7 @@ def apply_color( attr.SetBlockColor(block_dataset, [red, green, blue]) attr.SetBlockOpacity(block_dataset, alpha) mapper.Modified() - self.setup_model_color_map(pipeline) + self.setup_model_color_map(scene, scene_object) return colors @staticmethod @@ -153,18 +186,21 @@ def scalar_bar_key(active_attrs: dict[str, BlockStyle], style: BlockStyle, label attr_key = f"{attr_key} (Block {label})" return attr_key - def setup_model_color_map(self, pipeline: VtkPipeline) -> None: + def setup_model_color_map(self, scene: Scene, scene_object: SceneObject) -> None: # Points attributes join the polygons ones, so identical color maps share one scalar bar displayed_styles = ( - [(block_id, str(block_id), style) for block_id, style in pipeline.block_styles.items()] + [ + (block_id, str(block_id), style) + for block_id, style in scene_object.block_styles.items() + ] + [ (block_id, f"{block_id} points", points_style.attribute) - for block_id, points_style in pipeline.points_block_styles.items() + for block_id, points_style in scene_object.points_block_styles.items() if points_style.attribute is not None and points_style.visibility ] + [ (block_id, f"{block_id} edges", edges_style.attribute) - for block_id, edges_style in pipeline.edges_block_styles.items() + for block_id, edges_style in scene_object.edges_block_styles.items() if edges_style.attribute is not None and edges_style.visibility ] ) @@ -178,11 +214,11 @@ def setup_model_color_map(self, pipeline: VtkPipeline) -> None: if block_id not in bar_block_ids: bar_block_ids.append(block_id) for name, style in active_attrs.items(): - if name not in pipeline.scalar_bars: - pipeline.scalar_bars[name] = ModelScalarBar() - self.get_renderer().AddViewProp(pipeline.scalar_bars[name].actor) - pipeline.scalar_bars[name].block_ids = active_block_ids[name] - bar = pipeline.scalar_bars[name].actor + if name not in scene_object.scalar_bars: + scene_object.scalar_bars[name] = ModelScalarBar() + scene.renderer.AddViewProp(scene_object.scalar_bars[name].actor) + scene_object.scalar_bars[name].block_ids = active_block_ids[name] + bar = scene_object.scalar_bars[name].actor item = style["item"] minimum = style["minimum"] maximum = style["maximum"] @@ -190,296 +226,317 @@ def setup_model_color_map(self, pipeline: VtkPipeline) -> None: no_data_color = style["no_data_color"] lut = create_color_transfer_function(points, minimum, maximum, item, no_data_color) bar.SetLookupTable(lut) - bar.SetVisibility(pipeline.actor.GetVisibility()) - for name, scalar_bar in pipeline.scalar_bars.items(): + bar.SetVisibility(scene_object.actor.GetVisibility()) + for name, scalar_bar in scene_object.scalar_bars.items(): if name not in active_attrs: scalar_bar.actor.VisibilityOff() - self.update_scalar_bars_layout() + self.update_scalar_bars_layout(scene) def display_attribute_on_vertices( - self, data_id: str, block_ids: list[int], attribute: AttributeProtocol + self, scene_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol ) -> None: - pipeline = self.get_vtk_pipeline(data_id) - for block_id in block_ids: - style = pipeline.get_block_style(block_id) - style["name"] = attribute.name - style["item"] = attribute.item - style["attribute_location"] = "point" - style["points"] = attribute.points - style["minimum"] = attribute.minimum - style["maximum"] = attribute.maximum - style["no_data_color"] = attribute.no_data_color - pipeline.update_block_colors(block_id) - self.setup_model_color_map(pipeline) + self.display_attribute_on_blocks(scene_id, data_id, block_ids, attribute, "point") def display_attribute_on_cells( - self, data_id: str, block_ids: list[int], attribute: AttributeProtocol + self, scene_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol + ) -> None: + self.display_attribute_on_blocks(scene_id, data_id, block_ids, attribute, "cell") + + def display_attribute_on_blocks( + self, + scene_id: str, + data_id: str, + block_ids: list[int], + attribute: AttributeProtocol, + location: Literal["point", "cell"], ) -> None: pipeline = self.get_vtk_pipeline(data_id) + scene, scene_object = self.scene_and_object(scene_id, data_id) for block_id in block_ids: - style = pipeline.get_block_style(block_id) + style = scene_object.get_block_style(block_id) style["name"] = attribute.name style["item"] = attribute.item - style["attribute_location"] = "cell" + style["attribute_location"] = location style["points"] = attribute.points style["minimum"] = attribute.minimum style["maximum"] = attribute.maximum style["no_data_color"] = attribute.no_data_color - pipeline.update_block_colors(block_id) - self.setup_model_color_map(pipeline) + scene_object.update_block_colors(pipeline, block_id) + self.setup_model_color_map(scene, scene_object) - def setup_color_map( - self, - pipeline: VtkPipeline, - block_ids: list[int], - points: list[float], - minimum: float, - maximum: float, - ) -> None: - for block_id in block_ids: - style = pipeline.get_block_style(block_id) - style["points"] = points - style["minimum"] = minimum - style["maximum"] = maximum - pipeline.update_block_colors(block_id) - self.setup_model_color_map(pipeline) - - def ensure_model_points_styles(self, pipeline: VtkPipeline) -> dict[int, ModelPointsStyle]: + @staticmethod + def ensure_model_points_styles( + pipeline: VtkPipeline, scene_object: SceneObject + ) -> dict[int, ModelPointsStyle]: # Components points leave the main actor once styled individually - if pipeline.points_block_styles: - return pipeline.points_block_styles - main_property = pipeline.actor.GetProperty() + if scene_object.points_block_styles: + return scene_object.points_block_styles + main_property = scene_object.actor.GetProperty() for block_id, component_type in pipeline.block_component_types().items(): if component_type in POINTS_COMPONENT_TYPES: - pipeline.points_block_styles[block_id] = ModelPointsStyle( + scene_object.points_block_styles[block_id] = ModelPointsStyle( size=main_property.GetPointSize(), visibility=bool(main_property.GetVertexVisibility()), ) main_property.VertexVisibilityOff() - return pipeline.points_block_styles + return scene_object.points_block_styles - def sync_points_size_actors(self, pipeline: VtkPipeline) -> None: - renderer = self.get_renderer() - sizes = {style.size for style in pipeline.points_block_styles.values()} - for size in list(pipeline.points_size_actors): + @staticmethod + def sync_points_size_actors( + pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject + ) -> None: + renderer = scene.renderer + sizes = {style.size for style in scene_object.points_block_styles.values()} + for size in list(scene_object.points_size_actors): if size not in sizes: - renderer.RemoveActor(pipeline.points_size_actors.pop(size).actor) - main_property = pipeline.actor.GetProperty() - for size in sizes - pipeline.points_size_actors.keys(): + renderer.RemoveActor(scene_object.points_size_actors.pop(size).actor) + main_property = scene_object.actor.GetProperty() + for size in sizes - scene_object.points_size_actors.keys(): mapper = vtkCompositePolyDataMapper() - mapper.SetInputDataObject(pipeline.mapper.GetInputDataObject(0, 0)) + mapper.SetInputDataObject(scene_object.mapper.GetInputDataObject(0, 0)) mapper.ScalarVisibilityOn() mapper.SetColorModeToMapScalars() mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - actor.SetVisibility(pipeline.actor.GetVisibility()) + actor.SetVisibility(scene_object.actor.GetVisibility()) points_property = actor.GetProperty() points_property.SetRepresentationToPoints() points_property.SetPointSize(size) points_property.SetColor(*main_property.GetVertexColor()) - pipeline.points_size_actors[size] = PointsSizeActor(mapper=mapper, actor=actor) + scene_object.points_size_actors[size] = PointsSizeActor(mapper=mapper, actor=actor) # Bigger points are drawn first so smaller coincident ones stay visible on top - for size in sorted(pipeline.points_size_actors, reverse=True): - renderer.RemoveActor(pipeline.points_size_actors[size].actor) - renderer.AddActor(pipeline.points_size_actors[size].actor) - pipeline.update_points_size_actors() - - def component_points_styles( - self, data_id: str, component_type: str, block_ids: list[int] - ) -> list[ModelPointsStyle]: + for size in sorted(scene_object.points_size_actors, reverse=True): + renderer.RemoveActor(scene_object.points_size_actors[size].actor) + renderer.AddActor(scene_object.points_size_actors[size].actor) + scene_object.update_points_size_actors(pipeline) + + def update_component_points( + self, + scene_id: str, + data_id: str, + component_type: str, + block_ids: list[int], + update: Callable[[ModelPointsStyle], None], + ) -> None: + """Apply update to the points style of each component, then redraw the points actors.""" pipeline = self.get_vtk_pipeline(data_id) - styles = self.ensure_model_points_styles(pipeline) + scene, scene_object = self.scene_and_object(scene_id, data_id) + styles = self.ensure_model_points_styles(pipeline, scene_object) component_types = pipeline.block_component_types() - return [ - styles[block_id] - for block_id in block_ids - if block_id in styles and component_types.get(block_id) == component_type - ] + for block_id in block_ids: + if block_id in styles and component_types.get(block_id) == component_type: + update(styles[block_id]) + self.sync_points_size_actors(pipeline, scene, scene_object) + self.setup_model_color_map(scene, scene_object) def set_component_points_visibility( - self, data_id: str, component_type: str, block_ids: list[int], *, visibility: bool + self, + scene_id: str, + data_id: str, + component_type: str, + block_ids: list[int], + *, + visibility: bool, ) -> None: - for style in self.component_points_styles(data_id, component_type, block_ids): + def update(style: ModelPointsStyle) -> None: style.visibility = visibility - pipeline = self.get_vtk_pipeline(data_id) - self.sync_points_size_actors(pipeline) - self.setup_model_color_map(pipeline) + + self.update_component_points(scene_id, data_id, component_type, block_ids, update) def set_component_points_color( - self, data_id: str, component_type: str, block_ids: list[int], color: ColorProtocol + self, + scene_id: str, + data_id: str, + component_type: str, + block_ids: list[int], + color: ColorProtocol, ) -> None: - for style in self.component_points_styles(data_id, component_type, block_ids): + def update(style: ModelPointsStyle) -> None: style.color = (color.red / 255, color.green / 255, color.blue / 255) style.opacity = color.alpha style.attribute = None - pipeline = self.get_vtk_pipeline(data_id) - self.sync_points_size_actors(pipeline) - self.setup_model_color_map(pipeline) + + self.update_component_points(scene_id, data_id, component_type, block_ids, update) def set_component_points_attribute( self, + scene_id: str, data_id: str, component_type: str, block_ids: list[int], attribute: AttributeProtocol, ) -> None: - for style in self.component_points_styles(data_id, component_type, block_ids): - style.attribute = BlockStyle( - name=attribute.name, - attribute_location="point", - points=attribute.points, - minimum=attribute.minimum, - maximum=attribute.maximum, - item=attribute.item, - no_data_color=attribute.no_data_color, - ) - pipeline = self.get_vtk_pipeline(data_id) - self.sync_points_size_actors(pipeline) - self.setup_model_color_map(pipeline) + def update(style: ModelPointsStyle) -> None: + style.attribute = block_style(attribute) + + self.update_component_points(scene_id, data_id, component_type, block_ids, update) def set_component_points_size( - self, data_id: str, component_type: str, block_ids: list[int], size: float + self, scene_id: str, data_id: str, component_type: str, block_ids: list[int], size: float ) -> None: - for style in self.component_points_styles(data_id, component_type, block_ids): + def update(style: ModelPointsStyle) -> None: style.size = size - self.sync_points_size_actors(self.get_vtk_pipeline(data_id)) - def set_model_points_visibility_on_all(self, data_id: str, *, visibility: bool) -> None: + self.update_component_points(scene_id, data_id, component_type, block_ids, update) + + def set_model_points_visibility_on_all( + self, scene_id: str, data_id: str, *, visibility: bool + ) -> None: pipeline = self.get_vtk_pipeline(data_id) - if not pipeline.points_block_styles: - self.set_points_visibility(data_id, visibility=visibility) + scene, scene_object = self.scene_and_object(scene_id, data_id) + if not scene_object.points_block_styles: + self.set_points_visibility(scene_id, data_id, visibility=visibility) return - for style in pipeline.points_block_styles.values(): + for style in scene_object.points_block_styles.values(): style.visibility = visibility - self.sync_points_size_actors(pipeline) - self.setup_model_color_map(pipeline) + self.sync_points_size_actors(pipeline, scene, scene_object) + self.setup_model_color_map(scene, scene_object) - def set_model_points_size_on_all(self, data_id: str, size: float) -> None: + def set_model_points_size_on_all(self, scene_id: str, data_id: str, size: float) -> None: pipeline = self.get_vtk_pipeline(data_id) - self.set_points_size(data_id, size) - for style in pipeline.points_block_styles.values(): + scene, scene_object = self.scene_and_object(scene_id, data_id) + self.set_points_size(scene_id, data_id, size) + for style in scene_object.points_block_styles.values(): style.size = size - self.sync_points_size_actors(pipeline) + self.sync_points_size_actors(pipeline, scene, scene_object) - def ensure_model_edges_styles(self, pipeline: VtkPipeline) -> dict[int, ModelEdgesStyle]: + @staticmethod + def ensure_model_edges_styles( + pipeline: VtkPipeline, scene_object: SceneObject + ) -> dict[int, ModelEdgesStyle]: # Components edges leave the main actor once styled individually - if pipeline.edges_block_styles: - return pipeline.edges_block_styles - main_property = pipeline.actor.GetProperty() + if scene_object.edges_block_styles: + return scene_object.edges_block_styles + main_property = scene_object.actor.GetProperty() red, green, blue = main_property.GetEdgeColor() for block_id, component_type in pipeline.block_component_types().items(): if component_type in EDGES_COMPONENT_TYPES: - pipeline.edges_block_styles[block_id] = ModelEdgesStyle( + scene_object.edges_block_styles[block_id] = ModelEdgesStyle( width=main_property.GetEdgeWidth(), visibility=bool(main_property.GetEdgeVisibility()), color=(red, green, blue), ) main_property.EdgeVisibilityOff() - return pipeline.edges_block_styles + return scene_object.edges_block_styles - def sync_edges_width_actors(self, pipeline: VtkPipeline) -> None: - renderer = self.get_renderer() - widths = {style.width for style in pipeline.edges_block_styles.values()} - for width in list(pipeline.edges_width_actors): + def sync_edges_width_actors( + self, pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject + ) -> None: + renderer = scene.renderer + widths = {style.width for style in scene_object.edges_block_styles.values()} + for width in list(scene_object.edges_width_actors): if width not in widths: - renderer.RemoveActor(pipeline.edges_width_actors.pop(width).actor) - for width in widths - pipeline.edges_width_actors.keys(): + renderer.RemoveActor(scene_object.edges_width_actors.pop(width).actor) + for width in widths - scene_object.edges_width_actors.keys(): mapper = vtkCompositePolyDataMapper() - mapper.SetInputDataObject(pipeline.mapper.GetInputDataObject(0, 0)) + mapper.SetInputDataObject(scene_object.mapper.GetInputDataObject(0, 0)) mapper.ScalarVisibilityOn() mapper.SetColorModeToMapScalars() self.match_edges_depth_to_polygons(mapper) actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - actor.SetVisibility(pipeline.actor.GetVisibility()) + actor.SetVisibility(scene_object.actor.GetVisibility()) edges_property = actor.GetProperty() edges_property.SetRepresentationToWireframe() edges_property.SetLineWidth(width) - pipeline.edges_width_actors[width] = EdgesWidthActor(mapper=mapper, actor=actor) + scene_object.edges_width_actors[width] = EdgesWidthActor(mapper=mapper, actor=actor) renderer.AddActor(actor) - pipeline.update_edges_width_actors() + scene_object.update_edges_width_actors(pipeline) - def component_edges_styles( - self, data_id: str, component_type: str, block_ids: list[int] - ) -> list[ModelEdgesStyle]: + def update_component_edges( + self, + scene_id: str, + data_id: str, + component_type: str, + block_ids: list[int], + update: Callable[[ModelEdgesStyle], None], + ) -> None: + """Apply update to the edges style of each component, then redraw the edges actors.""" pipeline = self.get_vtk_pipeline(data_id) - styles = self.ensure_model_edges_styles(pipeline) + scene, scene_object = self.scene_and_object(scene_id, data_id) + styles = self.ensure_model_edges_styles(pipeline, scene_object) component_types = pipeline.block_component_types() - return [ - styles[block_id] - for block_id in block_ids - if block_id in styles and component_types.get(block_id) == component_type - ] + for block_id in block_ids: + if block_id in styles and component_types.get(block_id) == component_type: + update(styles[block_id]) + self.sync_edges_width_actors(pipeline, scene, scene_object) + self.setup_model_color_map(scene, scene_object) def set_component_edges_visibility( - self, data_id: str, component_type: str, block_ids: list[int], *, visibility: bool + self, + scene_id: str, + data_id: str, + component_type: str, + block_ids: list[int], + *, + visibility: bool, ) -> None: - for style in self.component_edges_styles(data_id, component_type, block_ids): + def update(style: ModelEdgesStyle) -> None: style.visibility = visibility - pipeline = self.get_vtk_pipeline(data_id) - self.sync_edges_width_actors(pipeline) - self.setup_model_color_map(pipeline) + + self.update_component_edges(scene_id, data_id, component_type, block_ids, update) def set_component_edges_color( - self, data_id: str, component_type: str, block_ids: list[int], color: ColorProtocol + self, + scene_id: str, + data_id: str, + component_type: str, + block_ids: list[int], + color: ColorProtocol, ) -> None: - for style in self.component_edges_styles(data_id, component_type, block_ids): + def update(style: ModelEdgesStyle) -> None: style.color = (color.red / 255, color.green / 255, color.blue / 255) style.opacity = color.alpha style.attribute = None - pipeline = self.get_vtk_pipeline(data_id) - self.sync_edges_width_actors(pipeline) - self.setup_model_color_map(pipeline) + + self.update_component_edges(scene_id, data_id, component_type, block_ids, update) def set_component_edges_attribute( self, + scene_id: str, data_id: str, component_type: str, block_ids: list[int], attribute: AttributeProtocol, ) -> None: - for style in self.component_edges_styles(data_id, component_type, block_ids): - style.attribute = BlockStyle( - name=attribute.name, - attribute_location="point", - points=attribute.points, - minimum=attribute.minimum, - maximum=attribute.maximum, - item=attribute.item, - no_data_color=attribute.no_data_color, - ) - pipeline = self.get_vtk_pipeline(data_id) - self.sync_edges_width_actors(pipeline) - self.setup_model_color_map(pipeline) + def update(style: ModelEdgesStyle) -> None: + style.attribute = block_style(attribute) + + self.update_component_edges(scene_id, data_id, component_type, block_ids, update) def set_component_edges_width( - self, data_id: str, component_type: str, block_ids: list[int], width: float + self, scene_id: str, data_id: str, component_type: str, block_ids: list[int], width: float ) -> None: - for style in self.component_edges_styles(data_id, component_type, block_ids): + def update(style: ModelEdgesStyle) -> None: style.width = width - self.sync_edges_width_actors(self.get_vtk_pipeline(data_id)) - def set_model_edges_visibility_on_all(self, data_id: str, *, visibility: bool) -> None: + self.update_component_edges(scene_id, data_id, component_type, block_ids, update) + + def set_model_edges_visibility_on_all( + self, scene_id: str, data_id: str, *, visibility: bool + ) -> None: pipeline = self.get_vtk_pipeline(data_id) - if not pipeline.edges_block_styles: - self.set_edges_visibility(data_id, visibility=visibility) + scene, scene_object = self.scene_and_object(scene_id, data_id) + if not scene_object.edges_block_styles: + self.set_edges_visibility(scene_id, data_id, visibility=visibility) return - for style in pipeline.edges_block_styles.values(): + for style in scene_object.edges_block_styles.values(): style.visibility = visibility - self.sync_edges_width_actors(pipeline) - self.setup_model_color_map(pipeline) + self.sync_edges_width_actors(pipeline, scene, scene_object) + self.setup_model_color_map(scene, scene_object) - def set_model_edges_width_on_all(self, data_id: str, width: float) -> None: + def set_model_edges_width_on_all(self, scene_id: str, data_id: str, width: float) -> None: # The main actor line width would also resize the lines, so edges always use their styles pipeline = self.get_vtk_pipeline(data_id) - pipeline.actor.GetProperty().SetEdgeWidth(width) - for style in self.ensure_model_edges_styles(pipeline).values(): + scene, scene_object = self.scene_and_object(scene_id, data_id) + scene_object.actor.GetProperty().SetEdgeWidth(width) + for style in self.ensure_model_edges_styles(pipeline, scene_object).values(): style.width = width - self.sync_edges_width_actors(pipeline) + self.sync_edges_width_actors(pipeline, scene, scene_object) @typed_rpc(model_prefix, schemas.register_route) def register_model(self, params: schemas.Register) -> schemas.RegisterResponse: @@ -522,15 +579,16 @@ def deregister_model(self, params: schemas.Deregister) -> schemas.DeregisterResp @typed_rpc(model_prefix, schemas.visibility_route) def set_model_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.id, visibility=params.visibility) + self.set_visibility(params.scene_id, params.id, visibility=params.visibility) if params.visibility: # Bars come back from the displayed attributes, hidden components' ones stay hidden - self.setup_model_color_map(self.get_vtk_pipeline(params.id)) + self.setup_model_color_map(*self.scene_and_object(params.scene_id, params.id)) return schemas.VisibilityResponse() @typed_rpc(model_prefix, schemas.highlight_route) def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: pipeline = self.get_vtk_pipeline(params.id) + highlight = self.get_scene_object(params.scene_id, params.id).highlight if params.visibility and params.block_ids: append = vtkAppendDataSets() for i in params.block_ids: @@ -538,13 +596,11 @@ def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightRes if isinstance(block, vtkDataSet): append.AddInputData(block) append.Update() - pipeline.highlight.mapper.SetInputDataObject(append.GetOutput()) + highlight.mapper.SetInputDataObject(append.GetOutput()) else: - pipeline.highlight.mapper.SetInputConnection( - pipeline.highlight.extract_selection.GetOutputPort() - ) - pipeline.highlight.actor.SetVisibility(params.visibility) - self.render(-1) + highlight.mapper.SetInputConnection(highlight.extract_selection.GetOutputPort()) + highlight.actor.SetVisibility(params.visibility) + self.render(params.scene_id) return schemas.HighlightResponse() @typed_rpc(model_prefix, schemas.get_blocks_bounds_route) diff --git a/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py index 77fc427c..bd78a435 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py @@ -20,10 +20,12 @@ def __init__(self) -> None: @typed_rpc(model_points_prefix, schemas.visibility_route) def set_model_points_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_model_points_visibility_on_all(params.id, visibility=params.visibility) + self.set_model_points_visibility_on_all( + params.scene_id, params.id, visibility=params.visibility + ) return schemas.VisibilityResponse() @typed_rpc(model_points_prefix, schemas.size_route) def set_model_points_size(self, params: schemas.Size) -> schemas.SizeResponse: - self.set_model_points_size_on_all(params.id, params.size) + self.set_model_points_size_on_all(params.scene_id, params.id, params.size) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json index d3c64bd9..00e3f1c9 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json @@ -2,6 +2,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "size" ], diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py index 03dc2f79..005af0df 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json index 9cf83bd8..6905f954 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json @@ -2,6 +2,10 @@ "rpc": "highlight", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -16,6 +20,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py index daa9528c..7c2ff87b 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py @@ -15,6 +15,7 @@ def __post_init__(self) -> None: block_ids: List[ViewerId] id: DataId + scene_id: str visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json index 5e918a3e..a2153d2d 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -10,6 +14,7 @@ } }, "required": [ + "scene_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py index 4aaf35ee..a94e6110 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py @@ -13,6 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py index bb606233..e9ce2549 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py @@ -26,5 +26,5 @@ def __init__(self) -> None: def set_model_surfaces_polygon_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.id, params.block_ids, params) + self.display_attribute_on_cells(params.scene_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py index 11dda82a..611aeddb 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_model_surfaces_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py index 0854aa3b..aa53c0d3 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py @@ -26,5 +26,7 @@ def __init__(self) -> None: def set_model_surfaces_edges_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.set_component_edges_attribute(params.id, "surfaces", params.block_ids, params) + self.set_component_edges_attribute( + params.scene_id, params.id, "surfaces", params.block_ids, params + ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py index 6aa01870..08f8caa0 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py @@ -23,16 +23,20 @@ def set_model_surfaces_edges_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_edges_visibility( - params.id, "surfaces", params.block_ids, visibility=params.visibility + params.scene_id, params.id, "surfaces", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_surfaces_edges_prefix, schemas.color_route) def set_model_surfaces_edges_color(self, params: schemas.Color) -> schemas.ColorResponse: - self.set_component_edges_color(params.id, "surfaces", params.block_ids, params.color) + self.set_component_edges_color( + params.scene_id, params.id, "surfaces", params.block_ids, params.color + ) return schemas.ColorResponse() @typed_rpc(model_surfaces_edges_prefix, schemas.width_route) def set_model_surfaces_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: - self.set_component_edges_width(params.id, "surfaces", params.block_ids, params.width) + self.set_component_edges_width( + params.scene_id, params.id, "surfaces", params.block_ids, params.width + ) return schemas.WidthResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json index 4decd739..470a5412 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py index f2495bd4..d0bcb155 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py @@ -15,6 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json index 3f46e4b5..2bbc41c2 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json @@ -2,6 +2,10 @@ "rpc": "width", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "width" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py index f54fda05..1c66bc84 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py index b0851675..a1730cb9 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py @@ -22,17 +22,12 @@ def __init__(self) -> None: def set_model_surfaces_polygons_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_blocks_visibility(params.id, params.block_ids, visibility=params.visibility) + self.set_blocks_visibility( + params.scene_id, params.id, params.block_ids, visibility=params.visibility + ) return schemas.VisibilityResponse() @typed_rpc(model_surfaces_prefix, schemas.color_route) def set_model_surfaces_color(self, params: schemas.Color) -> schemas.ColorResponse: - pipeline = self.get_vtk_pipeline(params.id) - colors = self.apply_color( - pipeline, - params.block_ids, - params.color_mode.value, - params.color, - params.collection_id, - ) + colors = self.apply_color(params) return schemas.ColorResponse.from_dict({"colors": colors}) diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json index 31af0dd4..4d5584e0 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json @@ -2,6 +2,10 @@ "rpc": "attribute", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -28,6 +32,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py index 8741a05b..f7e0988d 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,12 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import ( + AttributeItem, + AttributeName, + AttributeRangeMaximum, + AttributeRangeMinimum, + BlockIds, + ColorMapPoints, + ColorRGBA, +) from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,6 +30,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" + scene_id: str no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py index 464a0f89..a0861c39 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py @@ -26,5 +26,7 @@ def __init__(self) -> None: def set_model_surfaces_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.set_component_points_attribute(params.id, "surfaces", params.block_ids, params) + self.set_component_points_attribute( + params.scene_id, params.id, "surfaces", params.block_ids, params + ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py index d7817d89..3fd0f8cb 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py @@ -23,16 +23,20 @@ def set_model_surfaces_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_points_visibility( - params.id, "surfaces", params.block_ids, visibility=params.visibility + params.scene_id, params.id, "surfaces", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_surfaces_points_prefix, schemas.color_route) def set_model_surfaces_points_color(self, params: schemas.Color) -> schemas.ColorResponse: - self.set_component_points_color(params.id, "surfaces", params.block_ids, params.color) + self.set_component_points_color( + params.scene_id, params.id, "surfaces", params.block_ids, params.color + ) return schemas.ColorResponse() @typed_rpc(model_surfaces_points_prefix, schemas.size_route) def set_model_surfaces_points_size(self, params: schemas.Size) -> schemas.SizeResponse: - self.set_component_points_size(params.id, "surfaces", params.block_ids, params.size) + self.set_component_points_size( + params.scene_id, params.id, "surfaces", params.block_ids, params.size + ) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json index 4decd739..470a5412 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py index f2495bd4..d0bcb155 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py @@ -15,6 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId + scene_id: str @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json index b4a3fc4b..c8781d29 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json @@ -2,6 +2,10 @@ "rpc": "size", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "size" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py index db84284e..037d1dcb 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json index d621593a..9510f084 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json @@ -2,6 +2,10 @@ "rpc": "apply_textures", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -29,6 +33,7 @@ } }, "required": [ + "scene_id", "id", "textures" ], diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py index 4c98f949..ee291db4 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py @@ -22,6 +22,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId + scene_id: str textures: List[Texture] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json index 615f31f7..3ceebae6 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json @@ -2,6 +2,10 @@ "rpc": "color", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -23,6 +27,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py index b828df8e..91579462 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -23,6 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId + scene_id: str collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json index 488d6b3b..50a8769e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json @@ -2,6 +2,10 @@ "rpc": "visibility", "type": "object", "properties": { + "scene_id": { + "type": "string", + "minLength": 1 + }, "id": { "title": "DataId" }, @@ -13,6 +17,7 @@ } }, "required": [ + "scene_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py index 708caaf2..0c648ad9 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py @@ -14,6 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId + scene_id: str visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index 737a0735..1ac8b3fa 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -196,24 +196,27 @@ def take_screenshot(self, params: schemas.TakeScreenshot) -> schemas.TakeScreens @typed_rpc(viewer_prefix, schemas.update_data_route) def update_data(self, params: schemas.UpdateData) -> schemas.UpdateDataResponse: data = self.get_vtk_pipeline(params.id) + # Validates the scene: the new data reaches every scene showing it + self.get_scene_object(params.scene_id, params.id) reader = data.reader reader.Update() - mapper = self.get_scene_object(params.scene_id, params.id).mapper - tag: Any = reference(0) output = reader.GetOutputDataObject(0) if not isinstance(output, vtkDataSet): msg = "Output is not a vtkDataSet" raise TypeError(msg) - - scalars = vtkAbstractMapper.GetAbstractScalars( - output, - mapper.GetScalarMode(), - mapper.GetArrayAccessMode(), - mapper.GetArrayId(), - mapper.GetArrayName(), - tag, - ) - mapper.SetScalarRange(scalars.GetRange()) + for scene_object in self.scene_objects_of(data): + mapper = scene_object.mapper + tag: Any = reference(0) + scalars = vtkAbstractMapper.GetAbstractScalars( + output, + mapper.GetScalarMode(), + mapper.GetArrayAccessMode(), + mapper.GetArrayId(), + mapper.GetArrayName(), + tag, + ) + if scalars is not None: + mapper.SetScalarRange(scalars.GetRange()) return schemas.UpdateDataResponse() @typed_rpc(viewer_prefix, schemas.get_point_position_route) diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index b3dbc213..c7d4bb05 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -4,7 +4,7 @@ import math import os from pathlib import Path -from typing import TYPE_CHECKING, cast +from typing import TYPE_CHECKING, cast, override import vtkmodules.vtkRenderingOpenGL2 # noqa: F401 registers the OpenGL render window backend @@ -122,7 +122,8 @@ def __init__(self) -> None: super().__init__() self.DATA_FOLDER_PATH = os.getenv("DATA_FOLDER_PATH", ".") - def getView(self, view_id: str) -> vtkRenderWindow: # noqa: N802 VTK override + @override + def getView(self, view_id: str) -> vtkRenderWindow: for scene in self.get_scenes().values(): if scene.view_id == str(view_id): return scene.render_window @@ -604,13 +605,8 @@ def visible_scalar_bars( visible_bars: list[tuple[vtkScalarBarActor, str, str, VtkPipeline]] = [] scalar_bar = scene_object.scalar_bar if scalar_bar.GetVisibility() and scalar_bar.GetLookupTable() is not None: - dataset = pipeline.filter.GetOutputDataObject(0) - scalars = ( - dataset.GetPointData().GetScalars() or dataset.GetCellData().GetScalars() - if isinstance(dataset, vtkDataSet) - else None - ) - attr_name = scalars.GetName() if scalars else "Attribute" + # The mapper of the scene colours by name: the shared data has no active scalars + attr_name = scene_object.mapper.GetArrayName() or "Attribute" visible_bars.append((scalar_bar, attr_name, data_id, pipeline)) points_bar = scene_object.points_scalar_bar diff --git a/tests/conftest.py b/tests/conftest.py index ca128c7f..b281374a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -122,6 +122,26 @@ def create_scene(self, scene_id: str = "scene_1") -> str: self._drain_initial_messages(view_id) return view_id + def create_data_scene(self, scene_id: str = "scene_1") -> str: + """A scene drawn like the data references: black background, no orientation widget. + Kept as it is when the test already created it.""" + if scene_id in self.view_ids: + return self.view_ids[scene_id] + view_id = self.create_scene(scene_id) + for name, params in ( + ("set_background_color", {"color": {"red": 0, "green": 0, "blue": 0}}), + ("set_orientation_widget", {"marker": "none"}), + ): + rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict[name]["rpc"] + self.call(rpc, [{"scene_id": scene_id, **params}]) + self.get_result(rpc) + return view_id + + def add_to_scene(self, data_id: str, scene_id: str = "scene_1") -> None: + rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["add_to_scene"]["rpc"] + self.call(rpc, [{"scene_id": scene_id, "id": data_id}]) + self.get_result(rpc) + def compare_image(self, filename: str, scene_id: str = "scene_1") -> bool: view_id = self.view_ids[scene_id] render_rpc = ( diff --git a/tests/data/images/mesh/cells/cell_color_map_item.jpeg b/tests/data/images/mesh/cells/cell_color_map_item.jpeg index edec8f28bfdf50b5702393c270a0c9ba4287d91b..6f7ceabe403f7614f89eaa5f91f04a8700c1964a 100644 GIT binary patch literal 29478 zcmb@t1yEeg)-F7_6Wrb1-QAtR-5r8^NC@s47#xBQ?he6Sg1bY4I|K`tyyrdVdr#f^ z>#w@^?y1_fyVvU8&+66t>F(7%uS>6605k;|c^Lo%1ONc>_5-}G0wmv3|997)O8)O^ zcq{$d3qXg5V1i(Rf}j9EqC-HTL%j9_i2uNZc@qQvbHPGF!N9>oKqLMUzX>3qq5dHS z!2c0L!y-Vut^knVB#>xOXm7?ozXCq~r;5KHkaN5lC&G(SrGNUFk{^ByFNP#ZhyUlJ z4%X16Wa!{u>O5Y9i=3cWKu%Gd^15cCMVNG)h^6k21?f0^QubZ4p|0m)_Fd{4Hux!W z*R|Q{j$7O|KIsb6KV>26OW5qD@l5H9tPE z#jZR4kph-y)46_3j~BD4qOkl)w>o#Mm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X7rYWODv$2m7M}3_ zW&GD7ZO?Z4vfl<-nR1NJ%^2e?JTO0HN0IM+dN(15;9%W$qp?T)x5g~}@Ssx;vZ3}^ z(xbw~k=8psaDn1(5If&Wm`$muD262+lZ!(D5N(oWDfY@YucZ(E1>$&rJZER&^JAVu zUP2poIJId_!|FhxGeli_iHC5|k|0s%1UEAxWRzSCbr`QHtC}WPo;sB5iG4Rz1D{C5 zsJoDk%rzlF)Pm1$pZ*09u3%HX9{!CoYx=3kgXzV{vQ62c)Whqh=jej3J316v`!c1M z^%85}EJUMb9t++kVS`li^38m|$Qhov0?yBV^!ob&D~BGlve(}CU{r7jAR3a`Dw+`GdQnj3+G)3a;Vf0a=3b%g?%^#ofiLrk$I{#%wZE?Rk7ZHL6YB zwF-kI5;ODm>Amp+rvza4l5&LPi|7dP1W(}OhTUT!9^7AYyb${G z@wdt%+g}8&ITxePs}TkJyZk180Yj1cyLBs;iZw!pV;VU6av+jOJ|sy5L__=*lszi? z^0UB$4Gl(=E&_N(D)-Sm^b#b-W)9*YKR`biHwj+4kg4&~bVD_q%{qIf>V)6yGp!tf zY9hGTRtl`uoO=Jhn}wjsBak5Tfjnn7c#K1OB(zY{9?y<4S~ z=&TrgTbk9ob^<$JgG2eFBLKSttKvP{_dmd_x^$XbU{7;B6@|(Ka(Q5 zt6_2coGa@9wF?&uC6mF$pjq%I5gt~6V#sL|A_Q?9=76Y$zH2c;`eaW zenZd6tsqo^2j7dktI8SxN(6qMheivr#dZo<sO0_7y0g(3 lzh(KWoR`fyd~EwGeOz4bvT;-2sNAf`eqbAWW&ZEN{{z2Or+5GW diff --git a/tests/data/images/mesh/polygons/polygon_attribute_item.jpeg b/tests/data/images/mesh/polygons/polygon_attribute_item.jpeg index 8ed15a6998480492cd2c5e697d1b054d275ac714..b37944a2bcf0834ad3fb51c0e428478c443085b7 100644 GIT binary patch literal 13159 zcmb`uWmH@3)-D{}T}q2P!JXpn7QDE-Ym2)(!QI`pxLcvc-8IFf6qk=@@3Y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=s6X||GvZwi^DKh-@kUbV#UU&onn}Og3!xx;d*!yR{X7`e*Q!7zY z-eDGKc`Wyj|5-cg!WXW-oUv4JP%2*b$px)mPLeMcVsixX6Uv_y_jE;16#^`9PNe#> za8Q|KVF)m}#&^Vgdr1Q#7-r!NS5v+>pq+`90T&{()z)h_xi974+|N0uy6lLr_?St5 zymm23lyVf>;Jc?OTMB$q&c(;qD61^{tzWGLn<5X9#HOS|PLo2J3Xa2uCZqlyuWeCA(Z?A@ADmKL~AOd=fVL&^7Y9$T~dIk9&O?s{yLFUPBogo-HaD>TmN%x!lS0%)Tz>Hw8gNMdWR!O=WZ)NBH=0Ysl+r3Dyy~b!%i9 Xh{`o*+X@btBKOKW>(5!!FN^;V@CE2> diff --git a/tests/image/test_image_protocols.py b/tests/image/test_image_protocols.py index 25cd793e..7270f128 100644 --- a/tests/image/test_image_protocols.py +++ b/tests/image/test_image_protocols.py @@ -7,12 +7,13 @@ from vtkmodules.vtkCommonCore import VTK_COLOR_MODE_DIRECT_SCALARS from vtkmodules.vtkIOImage import vtkPNGReader from vtkmodules.vtkIOXML import vtkXMLImageDataReader -from vtkmodules.vtkRenderingCore import vtkDataSetMapper +from vtkmodules.vtkWebCore import vtkWebApplication from opengeodeweb_viewer.rpc.image.image_protocols import VtkImageView from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView from opengeodeweb_viewer.rpc.viewer.viewer_protocols import VtkViewerView -from opengeodeweb_viewer.vtk_pipeline import VtkPipeline +from opengeodeweb_viewer.scene import Scene +from opengeodeweb_viewer.vtk_pipeline import ViewerData, VtkPipeline from tests.mesh.test_mesh_protocols import _SharedObjects if TYPE_CHECKING: @@ -20,6 +21,7 @@ from vtkmodules.vtkCommonDataModel import vtkImageData + from opengeodeweb_viewer.scene import SceneObject from tests.conftest import ServerMonitor image_id = "123456789012345678901234567image" @@ -48,7 +50,9 @@ def _register_image( geode_object_type=geode_object_type, viewer_elements_type="polygons" if geode_object_type == "RasterImage2D" else "polyhedra", ) + server.create_data_scene() server.call(_image_rpc("register"), [{"id": image_id, "name": viewable_file}]) + server.add_to_scene(image_id) def register_image_2d(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -63,7 +67,14 @@ def _screenshot(server: ServerMonitor) -> vtkImageData: rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"] server.call( rpc, - [{"filename": "image_colors", "output_extension": "png", "include_background": True}], + [ + { + "scene_id": "scene_1", + "filename": "image_colors", + "output_extension": "png", + "include_background": True, + } + ], ) path = server.test_output_dir / "image_colors.png" path.write_bytes(server.get_result(rpc)["blob"]) @@ -153,15 +164,19 @@ def test_register_image_3d_true_colors( def test_image_visibility(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: register_image_2d(server, dataset_factory) - server.call(_image_rpc("visibility"), [{"id": image_id, "visibility": False}]) + server.call( + _image_rpc("visibility"), [{"scene_id": "scene_1", "id": image_id, "visibility": False}] + ) assert server.compare_image("image/visibility.jpeg") - server.call(_image_rpc("visibility"), [{"id": image_id, "visibility": True}]) + server.call( + _image_rpc("visibility"), [{"scene_id": "scene_1", "id": image_id, "visibility": True}] + ) assert server.compare_image("image/register.jpeg") def test_image_opacity(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: register_image_2d(server, dataset_factory) - server.call(_image_rpc("opacity"), [{"id": image_id, "opacity": 0.3}]) + server.call(_image_rpc("opacity"), [{"scene_id": "scene_1", "id": image_id, "opacity": 0.3}]) assert server.compare_image("image/opacity.jpeg") @@ -178,45 +193,57 @@ def test_image_is_not_pickable(server: ServerMonitor, dataset_factory: Callable[ # The image is drawn under the picked pixel _assert_between(_pixel(screenshot, x, y), _hat_bar_colors()) rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["picked_ids"]["rpc"] - server.call(rpc, [{"x": x, "y": y, "ids": [image_id]}]) + server.call(rpc, [{"scene_id": "scene_1", "x": x, "y": y, "ids": [image_id]}]) assert server.get_result(rpc)["array_ids"] == [] -def _image_pipeline(view: VtkImageView | VtkMeshView, data_id: str) -> VtkPipeline: +def _image_scene( + view: VtkImageView | VtkMeshView, + monkeypatch: pytest.MonkeyPatch, + viewer_object_type: str, +) -> SceneObject: + """The image, read as a data of viewer_object_type, shown in a scene of the view.""" view.coreServer = _SharedObjects() + monkeypatch.setattr( + view, + "get_viewer_data", + lambda data_id: ViewerData(data_id, "hat_lambert2SG.vti", viewer_object_type, "polygons"), + ) reader = vtkXMLImageDataReader() reader.SetFileName(str(DATA_PATH / "hat_lambert2SG.vti")) reader.Update() - pipeline = VtkPipeline(reader, vtkDataSetMapper()) - view.setup_pipeline(pipeline, data_id) - view.configure_actor(pipeline) - view.get_data_base()[data_id] = pipeline - return pipeline + pipeline = VtkPipeline(reader) + view.setup_pipeline(pipeline, image_id) + view.get_data_base()[image_id] = pipeline + scene = Scene.create("scene_1", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["scene_1"] = scene + view.add_object(scene, image_id) + return scene.objects[image_id] -def test_image_visibility_keeps_scalar_bar_hidden() -> None: +def test_image_visibility_keeps_scalar_bar_hidden(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkImageView() - pipeline = _image_pipeline(view, image_id) - view.set_visibility(image_id, visibility=False) - view.set_visibility(image_id, visibility=True) - assert not pipeline.scalar_bar.GetVisibility() + scene_object = _image_scene(view, monkeypatch, "image") + view.set_visibility("scene_1", image_id, visibility=False) + view.set_visibility("scene_1", image_id, visibility=True) + assert not scene_object.scalar_bar.GetVisibility() -def test_mesh_visibility_shows_its_scalar_bar() -> None: +def test_mesh_visibility_shows_its_scalar_bar(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkMeshView() - pipeline = _image_pipeline(view, image_id) - view.set_visibility(image_id, visibility=False) - view.set_visibility(image_id, visibility=True) - assert pipeline.scalar_bar.GetVisibility() + scene_object = _image_scene(view, monkeypatch, "mesh") + view.set_visibility("scene_1", image_id, visibility=False) + view.set_visibility("scene_1", image_id, visibility=True) + assert scene_object.scalar_bar.GetVisibility() -def test_image_actor_shows_unlit_unpickable_colors() -> None: +def test_image_actor_shows_unlit_unpickable_colors(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkImageView() - pipeline = _image_pipeline(view, image_id) - assert pipeline.mapper.GetScalarVisibility() - assert pipeline.mapper.GetColorMode() == VTK_COLOR_MODE_DIRECT_SCALARS - assert not pipeline.actor.GetProperty().GetLighting() - assert not pipeline.actor.GetPickable() + scene_object = _image_scene(view, monkeypatch, "image") + assert scene_object.mapper.GetScalarVisibility() + assert scene_object.mapper.GetColorMode() == VTK_COLOR_MODE_DIRECT_SCALARS + assert not scene_object.actor.GetProperty().GetLighting() + assert not scene_object.actor.GetPickable() @pytest.mark.parametrize("view_class", [VtkImageView, VtkMeshView]) diff --git a/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py b/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py index 3e08e59a..1fc6fd66 100644 --- a/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py +++ b/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py @@ -28,10 +28,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="cells", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], ) + server.add_to_scene(mesh_id) def test_cells_cell_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -44,6 +46,7 @@ def test_cells_cell_color_map(server: ServerMonitor, dataset_factory: Callable[. + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -79,6 +82,7 @@ def test_cells_cell_color_map_range_update( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -107,6 +111,7 @@ def test_cells_cell_color_map_range_update( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -142,6 +147,7 @@ def test_cells_cell_color_map_red_shift( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -170,6 +176,7 @@ def test_cells_cell_color_map_red_shift( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -205,6 +212,7 @@ def test_cells_cell_color_map_rainbow( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -257,6 +265,7 @@ def test_cells_cell_color_map_rainbow( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -315,6 +324,7 @@ def test_cells_cell_attribute_item( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "RGB_data", "item": 1, diff --git a/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py b/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py index bbf16599..b7cf36c7 100644 --- a/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py +++ b/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py @@ -28,10 +28,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="cells", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], ) + server.add_to_scene(mesh_id) def test_cells_vertex_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -46,6 +48,7 @@ def test_cells_vertex_color_map(server: ServerMonitor, dataset_factory: Callable ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 0, @@ -83,6 +86,7 @@ def test_cells_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 0, @@ -113,6 +117,7 @@ def test_cells_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 0, @@ -150,6 +155,7 @@ def test_cells_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 0, @@ -180,6 +186,7 @@ def test_cells_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 0, @@ -217,6 +224,7 @@ def test_cells_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 0, @@ -271,6 +279,7 @@ def test_cells_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 0, @@ -331,6 +340,7 @@ def test_cells_vertex_attribute_item( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 1, diff --git a/tests/mesh/cells/test_mesh_cells_protocols.py b/tests/mesh/cells/test_mesh_cells_protocols.py index b12da4ec..195582e8 100644 --- a/tests/mesh/cells/test_mesh_cells_protocols.py +++ b/tests/mesh/cells/test_mesh_cells_protocols.py @@ -27,10 +27,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="cells", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], ) + server.add_to_scene(mesh_id) assert server.compare_image("mesh/cells/register.jpeg") @@ -41,7 +43,13 @@ def test_cells_color(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkMeshCellsView.mesh_cells_prefix + VtkMeshCellsView.mesh_cells_schemas_dict["color"]["rpc"], - [{"id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 0.5}}], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 0, "blue": 0, "alpha": 0.5}, + } + ], ) assert server.compare_image("mesh/cells/color.jpeg") @@ -53,7 +61,7 @@ def test_cells_opacity(server: ServerMonitor, dataset_factory: Callable[..., str server.call( VtkMeshCellsView.mesh_cells_prefix + VtkMeshCellsView.mesh_cells_schemas_dict["opacity"]["rpc"], - [{"id": mesh_id, "opacity": 0.5}], + [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/cells/opacity.jpeg") @@ -65,7 +73,7 @@ def test_cells_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshCellsView.mesh_cells_prefix + VtkMeshCellsView.mesh_cells_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": False}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/cells/visibility.jpeg") @@ -78,6 +86,7 @@ def test_cells_clipping_plane(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "planes": [ { @@ -99,6 +108,7 @@ def test_cells_shrink(server: ServerMonitor, dataset_factory: Callable[..., str] VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -118,15 +128,17 @@ def register_grid_3d(server: ServerMonitor, dataset_factory: Callable[..., str]) viewable_file="regular_grid_3d.vti", viewer_elements_type="cells", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": grid_3d_id, "name": "regular_grid_3d.vti"}], ) + server.add_to_scene(grid_3d_id) assert server.compare_image("mesh/cells/slice_grid_3d_register.jpeg") def call_slice(server: ServerMonitor, ids: list[str], slices: list[dict[str, int]]) -> object: - server.call(slice_rpc, [{"ids": ids, "slices": slices}]) + server.call(slice_rpc, [{"scene_id": "scene_1", "ids": ids, "slices": slices}]) return server.get_result(slice_rpc) @@ -166,6 +178,7 @@ def test_slice_then_clipping(server: ServerMonitor, dataset_factory: Callable[.. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [grid_3d_id], "planes": [{"origin": [50.0, 40.0, 30.0], "normal": [1.0, 0.0, 0.0]}], } @@ -186,11 +199,13 @@ def test_slice_on_non_grid_removed( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: dataset_factory(data_id=other_mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": other_mesh_id, "name": "hat.vtp"}], ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) + server.add_to_scene(other_mesh_id) result = call_slice(server, [other_mesh_id], []) assert result == {"max_indices": [0, 0, 0]} @@ -201,11 +216,13 @@ def test_slice_on_non_grid_ignored( ) -> None: register_grid_3d(server, dataset_factory) dataset_factory(data_id=other_mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": other_mesh_id, "name": "hat.vtp"}], ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) + server.add_to_scene(other_mesh_id) result = call_slice(server, [other_mesh_id, grid_3d_id], [{"axis": 2, "index": 3}]) assert result == {"max_indices": [10, 8, 6]} @@ -235,6 +252,7 @@ def test_cells_threshold(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "attributes": [ { @@ -252,7 +270,7 @@ def test_cells_threshold(server: ServerMonitor, dataset_factory: Callable[..., s server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], - [{"ids": [mesh_id], "attributes": []}], + [{"scene_id": "scene_1", "ids": [mesh_id], "attributes": []}], ) assert server.compare_image("mesh/cells/register.jpeg") @@ -267,6 +285,7 @@ def test_cells_multiple_thresholds( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "attributes": [ { diff --git a/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py b/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py index 45a68a82..2e8f7e3e 100644 --- a/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py +++ b/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py @@ -28,10 +28,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="edges", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "edged_curve3D.vtp"}], ) + server.add_to_scene(mesh_id) def test_edges_edge_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -44,6 +46,7 @@ def test_edges_edge_color_map(server: ServerMonitor, dataset_factory: Callable[. + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -79,6 +82,7 @@ def test_edges_edge_color_map_range_update( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -107,6 +111,7 @@ def test_edges_edge_color_map_range_update( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -142,6 +147,7 @@ def test_edges_edge_color_map_rainbow( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -194,6 +200,7 @@ def test_edges_edge_color_map_rainbow( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -252,6 +259,7 @@ def test_edges_edge_attribute_item( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "cycle_id", "item": 1, diff --git a/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py b/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py index 5dc304f2..c8e7c5d2 100644 --- a/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py +++ b/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py @@ -41,10 +41,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="edges", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "attributed_edged_curve.vtp"}], ) + server.add_to_scene(mesh_id) def test_edges_vertex_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -59,6 +61,7 @@ def test_edges_vertex_color_map(server: ServerMonitor, dataset_factory: Callable ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -96,6 +99,7 @@ def test_edges_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -126,6 +130,7 @@ def test_edges_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -163,6 +168,7 @@ def test_edges_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -193,6 +199,7 @@ def test_edges_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -230,6 +237,7 @@ def test_edges_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -284,6 +292,7 @@ def test_edges_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -344,6 +353,7 @@ def test_edges_vertex_attribute_item( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 1, @@ -378,19 +388,21 @@ def test_edges_vertex_attribute_item( def register_hat_with_edges(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) + server.add_to_scene(mesh_id) server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": True}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], ) server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["width"]["rpc"], - [{"id": mesh_id, "width": 4}], + [{"scene_id": "scene_1", "id": mesh_id, "width": 4}], ) @@ -400,7 +412,7 @@ def set_edges_vertex_attribute(server: ServerMonitor, attribute: dict[str, objec + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict["attribute"][ "rpc" ], - [{"id": mesh_id, **attribute}], + [{"scene_id": "scene_1", "id": mesh_id, **attribute}], ) @@ -424,7 +436,7 @@ def test_polygons_edges_shared_scalar_bar( + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[ "attribute" ]["rpc"], - [{"id": mesh_id, **HAT_ATTRIBUTE}], + [{"scene_id": "scene_1", "id": mesh_id, **HAT_ATTRIBUTE}], ) set_edges_vertex_attribute(server, HAT_ATTRIBUTE) # Same attribute and color map: one scalar bar only @@ -440,7 +452,13 @@ def test_polygons_edges_attribute_then_color( server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["color"]["rpc"], - [{"id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}}], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, + } + ], ) # Red edges, no edges scalar bar assert server.compare_image("mesh/edges/polygons_edges_attribute_then_color.jpeg") @@ -455,7 +473,7 @@ def test_polygons_edges_attribute_then_opacity( server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["opacity"]["rpc"], - [{"id": mesh_id, "opacity": 0.5}], + [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], ) # Edges keep their color map, only more transparent assert server.compare_image("mesh/edges/polygons_edges_attribute_then_opacity.jpeg") @@ -469,7 +487,7 @@ def test_polygons_edges_hidden_with_object( set_edges_vertex_attribute(server, HAT_ATTRIBUTE) server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": False}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], ) # Empty scene: no edges, no scalar bar assert server.compare_image("mesh/edges/polygons_edges_hidden_with_object.jpeg") @@ -483,14 +501,14 @@ def test_polygons_points_and_edges_shared_scalar_bar( server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": True}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], ) server.call( VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict["attribute"][ "rpc" ], - [{"id": mesh_id, **HAT_ATTRIBUTE}], + [{"scene_id": "scene_1", "id": mesh_id, **HAT_ATTRIBUTE}], ) set_edges_vertex_attribute(server, HAT_ATTRIBUTE) # Same attribute and color map on points and edges: one scalar bar only @@ -503,7 +521,7 @@ def set_polygons_vertex_attribute(server: ServerMonitor) -> None: + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[ "attribute" ]["rpc"], - [{"id": mesh_id, **HAT_ATTRIBUTE}], + [{"scene_id": "scene_1", "id": mesh_id, **HAT_ATTRIBUTE}], ) @@ -526,7 +544,13 @@ def test_polygons_color_after_shared_scalar_bar( server.call( VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["color"]["rpc"], - [{"id": mesh_id, "color": {"red": 255, "green": 255, "blue": 255, "alpha": 1.0}}], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 255, "blue": 255, "alpha": 1.0}, + } + ], ) # Polygons back to a constant color: the edges keep their attribute and get their own bar assert server.compare_image("mesh/edges/polygons_color_after_shared_scalar_bar.jpeg") diff --git a/tests/mesh/edges/test_mesh_edges_protocols.py b/tests/mesh/edges/test_mesh_edges_protocols.py index 1713b26e..bd441234 100644 --- a/tests/mesh/edges/test_mesh_edges_protocols.py +++ b/tests/mesh/edges/test_mesh_edges_protocols.py @@ -26,7 +26,7 @@ def test_edges_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": True}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], ) assert server.compare_image("mesh/edges/visibility.jpeg") @@ -39,6 +39,7 @@ def test_edges_color(server: ServerMonitor, dataset_factory: Callable[..., str]) + VtkMeshEdgesView.mesh_edges_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 0.5}, } @@ -50,23 +51,31 @@ def test_edges_color(server: ServerMonitor, dataset_factory: Callable[..., str]) def test_edges_with_edged_curve(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=mesh_id, viewable_file="edged_curve.vtp", viewer_elements_type="edges") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "edged_curve.vtp"}], ) + server.add_to_scene(mesh_id) assert server.compare_image("mesh/edges/register_edged_curve.jpeg") server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["color"]["rpc"], - [{"id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}}], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}, + } + ], ) assert server.compare_image("mesh/edges/edged_curve_color.jpeg") server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": False}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/edges/edged_curve_visibility.jpeg") @@ -78,6 +87,7 @@ def test_edges_clipping_plane(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "planes": [ { @@ -98,6 +108,7 @@ def test_edges_shrink(server: ServerMonitor, dataset_factory: Callable[..., str] VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8, } diff --git a/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py b/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py index 8c4ef973..cbe817a4 100644 --- a/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py +++ b/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py @@ -35,10 +35,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="points", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) + server.add_to_scene(mesh_id) def test_points_vertex_attribute( @@ -54,6 +56,7 @@ def test_points_vertex_attribute( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -81,6 +84,7 @@ def test_points_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -111,6 +115,7 @@ def test_points_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -148,6 +153,7 @@ def test_points_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -178,6 +184,7 @@ def test_points_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -215,6 +222,7 @@ def test_points_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -269,6 +277,7 @@ def test_points_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -329,6 +338,7 @@ def test_points_vertex_attribute_item( ], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 1, @@ -363,26 +373,28 @@ def display_points_attribute( viewable_file=viewable_file, viewer_elements_type=viewer_elements_type, ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": viewable_file}], ) + server.add_to_scene(mesh_id) server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": True}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], ) server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["size"]["rpc"], - [{"id": mesh_id, "size": 15}], + [{"scene_id": "scene_1", "id": mesh_id, "size": 15}], ) server.call( VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict["attribute"][ "rpc" ], - [{"id": mesh_id, **attribute}], + [{"scene_id": "scene_1", "id": mesh_id, **attribute}], ) @@ -471,6 +483,7 @@ def test_polygons_points_shared_scalar_bar( ) -> None: attribute = { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -505,7 +518,13 @@ def test_polygons_points_attribute_then_color( server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], - [{"id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}}], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, + } + ], ) # Red points, no points scalar bar assert server.compare_image("mesh/points/polygons_points_attribute_then_color.jpeg") @@ -519,7 +538,7 @@ def test_polygons_points_attribute_then_opacity( server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["opacity"]["rpc"], - [{"id": mesh_id, "opacity": 0.5}], + [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], ) # Points keep their color map, only more transparent assert server.compare_image("mesh/points/polygons_points_attribute_then_opacity.jpeg") diff --git a/tests/mesh/points/test_mesh_points_protocols.py b/tests/mesh/points/test_mesh_points_protocols.py index ae2cfbeb..7cec0935 100644 --- a/tests/mesh/points/test_mesh_points_protocols.py +++ b/tests/mesh/points/test_mesh_points_protocols.py @@ -24,7 +24,7 @@ def test_points_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": True}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], ) assert server.compare_image("mesh/points/visibility.jpeg") @@ -36,7 +36,7 @@ def test_points_size(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["size"]["rpc"], - [{"id": mesh_id, "size": 15}], + [{"scene_id": "scene_1", "id": mesh_id, "size": 15}], ) assert server.compare_image("mesh/points/size.jpeg") @@ -48,7 +48,13 @@ def test_points_color(server: ServerMonitor, dataset_factory: Callable[..., str] server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], - [{"id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}}], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}, + } + ], ) assert server.compare_image("mesh/points/color.jpeg") @@ -57,29 +63,66 @@ def test_points_with_point_set(server: ServerMonitor, dataset_factory: Callable[ mesh_id = "00000000000000000000000044556677" dataset_factory(data_id=mesh_id, viewable_file="points.vtp", viewer_elements_type="points") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "points.vtp"}], ) + server.add_to_scene(mesh_id) assert server.compare_image("mesh/points/register_point_set.jpeg") server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["size"]["rpc"], - [{"id": mesh_id, "size": 10}], + [{"scene_id": "scene_1", "id": mesh_id, "size": 10}], ) assert server.compare_image("mesh/points/point_set_size.jpeg") server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], - [{"id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}}], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, + } + ], ) assert server.compare_image("mesh/points/point_set_color.jpeg") server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": False}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/points/point_set_visibility.jpeg") + + +def test_points_color_is_per_scene( + server: ServerMonitor, dataset_factory: Callable[..., str] +) -> None: + mesh_id = "12345678901234567890123456789012" + test_points_size(server, dataset_factory) + server.create_data_scene("scene_2") + server.add_to_scene(mesh_id, "scene_2") + for name, value in (("visibility", True), ("size", 15)): + server.call( + VtkMeshPointsView.mesh_points_prefix + + VtkMeshPointsView.mesh_points_schemas_dict[name]["rpc"], + [{"scene_id": "scene_2", "id": mesh_id, name: value}], + ) + + server.call( + VtkMeshPointsView.mesh_points_prefix + + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], + [ + { + "scene_id": "scene_1", + "id": mesh_id, + "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}, + } + ], + ) + assert server.compare_image("mesh/points/color.jpeg", "scene_1") + assert server.compare_image("mesh/points/size.jpeg", "scene_2") diff --git a/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py b/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py index ea99229d..e5a27e8e 100644 --- a/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py +++ b/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py @@ -31,10 +31,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="polygons", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "triangulated_surface2d.vtp"}], ) + server.add_to_scene(mesh_id) def test_polygons_polygon_color_map( @@ -51,6 +53,7 @@ def test_polygons_polygon_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -88,6 +91,7 @@ def test_polygons_polygon_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -118,6 +122,7 @@ def test_polygons_polygon_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -155,6 +160,7 @@ def test_polygons_polygon_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -185,6 +191,7 @@ def test_polygons_polygon_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -222,6 +229,7 @@ def test_polygons_polygon_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -276,6 +284,7 @@ def test_polygons_polygon_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -336,6 +345,7 @@ def test_polygons_polygon_attribute_item( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "triangle_vertices", "item": 1, diff --git a/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py b/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py index 099c258f..aab22c28 100644 --- a/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py +++ b/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py @@ -28,10 +28,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> dataset_factory(data_id=mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) + server.add_to_scene(mesh_id) def test_polygons_vertex_color_map( @@ -48,6 +50,7 @@ def test_polygons_vertex_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -85,6 +88,7 @@ def test_polygons_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -115,6 +119,7 @@ def test_polygons_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -152,6 +157,7 @@ def test_polygons_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -182,6 +188,7 @@ def test_polygons_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -219,6 +226,7 @@ def test_polygons_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -273,6 +281,7 @@ def test_polygons_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -332,6 +341,7 @@ def test_polygons_vertex_attribute_item( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 1, @@ -364,10 +374,12 @@ def test_polygons_vertex_no_data( viewer_elements_type="polygons", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polygon_attribute.vtp"}], ) + server.add_to_scene(mesh_id) server.call( VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix @@ -376,6 +388,7 @@ def test_polygons_vertex_no_data( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "gradient_3d_attribute", "item": 0, @@ -409,6 +422,6 @@ def test_polygons_vertex_color_map_opacity( server.call( VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["opacity"]["rpc"], - [{"id": mesh_id, "opacity": 0.5}], + [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/polygons/vertex_color_map_opacity.jpeg") diff --git a/tests/mesh/polygons/test_mesh_polygons_protocols.py b/tests/mesh/polygons/test_mesh_polygons_protocols.py index ed9a757c..186cf3b6 100644 --- a/tests/mesh/polygons/test_mesh_polygons_protocols.py +++ b/tests/mesh/polygons/test_mesh_polygons_protocols.py @@ -27,6 +27,7 @@ def test_polygons_color(server: ServerMonitor, dataset_factory: Callable[..., st + VtkMeshPolygonsView.mesh_polygons_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, } @@ -42,7 +43,7 @@ def test_polygons_visibility(server: ServerMonitor, dataset_factory: Callable[.. server.call( VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": False}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/polygons/visibility.jpeg") @@ -57,6 +58,7 @@ def test_polygons_clipping_plane( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "planes": [ { @@ -78,6 +80,7 @@ def test_polygons_shrink(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -93,6 +96,6 @@ def test_polygons_opacity(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["opacity"]["rpc"], - [{"id": mesh_id, "opacity": 0.5}], + [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/polygons/opacity.jpeg") diff --git a/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py b/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py index e66b2775..0078bb13 100644 --- a/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py +++ b/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py @@ -31,10 +31,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="polyhedra", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], ) + server.add_to_scene(mesh_id) def test_polyhedra_polyhedron_color_map( @@ -51,6 +53,7 @@ def test_polyhedra_polyhedron_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -88,6 +91,7 @@ def test_polyhedra_polyhedron_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -118,6 +122,7 @@ def test_polyhedra_polyhedron_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -155,6 +160,7 @@ def test_polyhedra_polyhedron_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -185,6 +191,7 @@ def test_polyhedra_polyhedron_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -222,6 +229,7 @@ def test_polyhedra_polyhedron_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -276,6 +284,7 @@ def test_polyhedra_polyhedron_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -336,6 +345,7 @@ def test_polyhedra_polyhedron_attribute_item( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 1, diff --git a/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py b/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py index 151ee4d6..74bec67c 100644 --- a/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py +++ b/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py @@ -31,10 +31,12 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="polyhedra", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], ) + server.add_to_scene(mesh_id) def test_polyhedra_vertex_color_map( @@ -51,6 +53,7 @@ def test_polyhedra_vertex_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -88,6 +91,7 @@ def test_polyhedra_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -118,6 +122,7 @@ def test_polyhedra_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -155,6 +160,7 @@ def test_polyhedra_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -185,6 +191,7 @@ def test_polyhedra_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -222,6 +229,7 @@ def test_polyhedra_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -276,6 +284,7 @@ def test_polyhedra_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -336,6 +345,7 @@ def test_polyhedra_vertex_attribute_item( ]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "name": "points", "item": 1, diff --git a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py index b31916bf..ac2161f0 100644 --- a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py +++ b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py @@ -27,10 +27,12 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str viewer_elements_type="polyhedra", ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], ) + server.add_to_scene(mesh_id) assert server.compare_image("mesh/polyhedra/register.jpeg") @@ -42,6 +44,7 @@ def test_polyhedra_color(server: ServerMonitor, dataset_factory: Callable[..., s + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, } @@ -56,7 +59,7 @@ def test_polyhedra_opacity(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshPolyhedraView.mesh_polyhedra_prefix + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["opacity"]["rpc"], - [{"id": mesh_id, "opacity": 0.5}], + [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/polyhedra/opacity.jpeg") @@ -67,7 +70,7 @@ def test_polyhedra_visibility(server: ServerMonitor, dataset_factory: Callable[. server.call( VtkMeshPolyhedraView.mesh_polyhedra_prefix + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": False}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/polyhedra/visibility.jpeg") @@ -82,6 +85,7 @@ def test_polyhedra_clipping_plane( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [mesh_id], "planes": [ { diff --git a/tests/mesh/test_mesh_protocols.py b/tests/mesh/test_mesh_protocols.py index cbae3d4c..9f5a229c 100644 --- a/tests/mesh/test_mesh_protocols.py +++ b/tests/mesh/test_mesh_protocols.py @@ -10,10 +10,10 @@ from vtkmodules.vtkRenderingAnnotation import vtkCubeAxesActor from vtkmodules.vtkRenderingCore import ( vtkActor, - vtkDataSetMapper, vtkPolyDataMapper, vtkRenderer, ) +from vtkmodules.vtkWebCore import vtkWebApplication from opengeodeweb_viewer.rpc.mesh.mesh_protocols import ( TILES_FOLDER, @@ -21,6 +21,7 @@ check_source_folder, ) from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane +from opengeodeweb_viewer.scene import Scene from opengeodeweb_viewer.vtk_pipeline import BasemapState, VtkPipeline from opengeodeweb_viewer.vtk_protocol import VtkView, basemap_clipping_filter @@ -36,10 +37,12 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) + server.add_to_scene(mesh_id) assert server.compare_image("mesh/register.jpeg") @@ -59,7 +62,7 @@ def test_visibility(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["visibility"]["rpc"], - [{"id": mesh_id, "visibility": False}], + [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/visibility.jpeg") @@ -71,6 +74,7 @@ def test_color(server: ServerMonitor, dataset_factory: Callable[..., str]) -> No VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "color": {"red": 50, "green": 2, "blue": 250, "alpha": 1.0}, } @@ -91,6 +95,7 @@ def test_apply_textures(server: ServerMonitor, dataset_factory: Callable[..., st VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["apply_textures"]["rpc"], [ { + "scene_id": "scene_1", "id": mesh_id, "textures": [ { @@ -114,10 +119,12 @@ def _apply_basemap(server: ServerMonitor, dataset_factory: Callable[..., str]) - Path(os.environ["DATA_FOLDER_PATH"]) / basemap_id / TILES_FOLDER, dirs_exist_ok=True, ) + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": basemap_id, "name": "basemap"}], ) + server.add_to_scene(basemap_id) server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["apply_basemap"]["rpc"], [ @@ -209,7 +216,7 @@ def test_basemap_clipping_keeps_texture_coordinates() -> None: class _SharedObjects: def __init__(self) -> None: - self.objects: dict[str, object] = {"db": {}} + self.objects: dict[str, object] = {"db": {}, "scenes": {}} def getSharedObject(self, key: str) -> object: # noqa: N802 wslink API return self.objects.get(key) @@ -227,7 +234,7 @@ def _view_with_basemap() -> tuple[VtkView, VtkPipeline]: reader = vtkXMLPolyDataReader() reader.SetFileName(str(Path(__file__).parent.parent / "data" / "basemap.vtp")) reader.Update() - database[data_id] = VtkPipeline(reader, vtkDataSetMapper()) + database[data_id] = VtkPipeline(reader) basemap = database["basemap"] basemap.basemap = BasemapState(maps=[], images={}, layers={}, drape_ids=["data"]) return view, basemap @@ -246,7 +253,9 @@ def test_basemap_follows_the_clipping_of_its_draped_data() -> None: def test_basemap_drape_dirty_only_for_its_draped_data() -> None: view, _ = _view_with_basemap() + scene = Scene.create("scene_1", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["scene_1"] = scene view.set_shrink(["other"], 0.5) - assert not view.getSharedObject("basemaps_dirty") + assert not scene.basemaps_dirty view.set_shrink(["data"], 0.5) - assert view.getSharedObject("basemaps_dirty") + assert scene.basemaps_dirty diff --git a/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py b/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py index 80038e19..5501c40f 100644 --- a/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py +++ b/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py @@ -39,13 +39,27 @@ def test_blocks_polyhedron_attribute( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) server.call( @@ -55,6 +69,7 @@ def test_blocks_polyhedron_attribute( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -88,13 +103,27 @@ def test_blocks_polyhedron_color_map( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Set active polyhedron attribute, item, color map & range @@ -105,6 +134,7 @@ def test_blocks_polyhedron_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -139,13 +169,27 @@ def test_blocks_polyhedron_color_map_range_update( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Set active polyhedron attribute @@ -156,6 +200,7 @@ def test_blocks_polyhedron_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -187,6 +232,7 @@ def test_blocks_polyhedron_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -221,13 +267,27 @@ def test_blocks_polyhedron_color_map_red_shift( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Set active polyhedron attribute @@ -238,6 +298,7 @@ def test_blocks_polyhedron_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -269,6 +330,7 @@ def test_blocks_polyhedron_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -303,13 +365,27 @@ def test_blocks_polyhedron_color_map_rainbow( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Rainbow Desaturated Map @@ -320,6 +396,7 @@ def test_blocks_polyhedron_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -375,6 +452,7 @@ def test_blocks_polyhedron_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -436,6 +514,7 @@ def test_pick_blocks_polyhedron_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -451,5 +530,5 @@ def test_pick_blocks_polyhedron_color_map( pick_rpc = ( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["pick_colormap"]["rpc"] ) - server.call(pick_rpc, [{"x": 81, "y": 276}]) + server.call(pick_rpc, [{"scene_id": "scene_1", "x": 81, "y": 276}]) assert server.get_result(pick_rpc) == {"data_id": model_id, "block_ids": [48, 49]} diff --git a/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py b/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py index 85a6e48b..6dd75752 100644 --- a/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py +++ b/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py @@ -37,13 +37,27 @@ def test_blocks_vertex_attribute( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) server.call( @@ -53,6 +67,7 @@ def test_blocks_vertex_attribute( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -86,13 +101,27 @@ def test_blocks_vertex_color_map( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Set active vertex attribute, item, color map & range @@ -103,6 +132,7 @@ def test_blocks_vertex_color_map( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -137,13 +167,27 @@ def test_blocks_vertex_color_map_range_update( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -154,6 +198,7 @@ def test_blocks_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -185,6 +230,7 @@ def test_blocks_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -219,13 +265,27 @@ def test_blocks_vertex_color_map_green_shift( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -236,6 +296,7 @@ def test_blocks_vertex_color_map_green_shift( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -267,6 +328,7 @@ def test_blocks_vertex_color_map_green_shift( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -301,13 +363,27 @@ def test_blocks_vertex_color_map_rainbow( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) # Rainbow Desaturated Map @@ -318,6 +394,7 @@ def test_blocks_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -373,6 +450,7 @@ def test_blocks_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -431,13 +509,27 @@ def test_blocks_vertex_attribute_item( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only blocks server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(48, 50)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(48, 50)), + "visibility": True, + } + ], ) server.call( @@ -447,6 +539,7 @@ def test_blocks_vertex_attribute_item( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", diff --git a/tests/model/blocks/test_model_blocks_protocols.py b/tests/model/blocks/test_model_blocks_protocols.py index c4ba9237..1fa4ef97 100644 --- a/tests/model/blocks/test_model_blocks_protocols.py +++ b/tests/model/blocks/test_model_blocks_protocols.py @@ -31,6 +31,7 @@ def test_blocks_polyhedra_visibility( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -45,6 +46,7 @@ def test_blocks_polyhedra_visibility( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -64,6 +66,7 @@ def test_blocks_polyhedra_color(server: ServerMonitor, dataset_factory: Callable + VtkModelBlocksView.model_blocks_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(48, 50)), "color_mode": "constant", @@ -82,6 +85,7 @@ def test_blocks_clipping_plane(server: ServerMonitor, dataset_factory: Callable[ VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [model_id], "planes": [ { @@ -103,6 +107,7 @@ def test_blocks_shrink(server: ServerMonitor, dataset_factory: Callable[..., str VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [model_id], "shrink_factor": 0.8, } @@ -119,6 +124,7 @@ def test_blocks_threshold(server: ServerMonitor, dataset_factory: Callable[..., VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], [ { + "scene_id": "scene_1", "ids": [model_id], "attributes": [ { diff --git a/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py b/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py index e8d2bf80..19db3fb2 100644 --- a/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py +++ b/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py @@ -37,13 +37,27 @@ def test_corners_vertex_attribute( server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only corners server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 13)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 13)), + "visibility": True, + } + ], ) server.call( @@ -53,6 +67,7 @@ def test_corners_vertex_attribute( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -86,13 +101,27 @@ def test_corners_vertex_color_map( server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only corners server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 13)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 13)), + "visibility": True, + } + ], ) # Set active vertex attribute, item, color map & range @@ -103,6 +132,7 @@ def test_corners_vertex_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -137,13 +167,27 @@ def test_corners_vertex_color_map_range_update( server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only corners server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 13)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 13)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -154,6 +198,7 @@ def test_corners_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -185,6 +230,7 @@ def test_corners_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -219,13 +265,27 @@ def test_corners_vertex_color_map_red_shift( server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only corners server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 13)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 13)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -236,6 +296,7 @@ def test_corners_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -267,6 +328,7 @@ def test_corners_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -301,13 +363,27 @@ def test_corners_vertex_color_map_rainbow( server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only corners server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 13)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 13)), + "visibility": True, + } + ], ) # Rainbow Desaturated Map @@ -318,6 +394,7 @@ def test_corners_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -373,6 +450,7 @@ def test_corners_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", diff --git a/tests/model/corners/test_model_corners_protocols.py b/tests/model/corners/test_model_corners_protocols.py index ec7f9deb..aaa213f1 100644 --- a/tests/model/corners/test_model_corners_protocols.py +++ b/tests/model/corners/test_model_corners_protocols.py @@ -30,6 +30,7 @@ def test_corners_points_visibility( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -43,6 +44,7 @@ def test_corners_points_visibility( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "visibility": True, @@ -61,6 +63,7 @@ def test_corners_points_color(server: ServerMonitor, dataset_factory: Callable[. + VtkModelCornersView.model_corners_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 13)), "color_mode": "constant", @@ -80,6 +83,13 @@ def test_corners_points_random_color( server.call( VtkModelCornersView.model_corners_prefix + VtkModelCornersView.model_corners_schemas_dict["color"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 13)), "color_mode": "random"}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 13)), + "color_mode": "random", + } + ], ) assert server.compare_image("model/corners/random_color.jpeg") diff --git a/tests/model/edges/test_model_edges_protocols.py b/tests/model/edges/test_model_edges_protocols.py index 861d1a54..0ccd2634 100644 --- a/tests/model/edges/test_model_edges_protocols.py +++ b/tests/model/edges/test_model_edges_protocols.py @@ -50,7 +50,7 @@ def test_edges_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelEdgesView.model_edges_prefix + VtkModelEdgesView.model_edges_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "visibility": True}], + [{"scene_id": "scene_1", "id": model_id, "visibility": True}], ) assert server.compare_image("model/edges/visibility.jpeg") @@ -62,7 +62,7 @@ def test_edges_width(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkModelEdgesView.model_edges_prefix + VtkModelEdgesView.model_edges_schemas_dict["width"]["rpc"], - [{"id": model_id, "width": 6}], + [{"scene_id": "scene_1", "id": model_id, "width": 6}], ) assert server.compare_image("model/edges/width.jpeg") @@ -71,7 +71,7 @@ def call_surfaces_edges(server: ServerMonitor, route: str, params: dict[str, obj view = VtkModelSurfacesEdgesView server.call( view.model_surfaces_edges_prefix + view.model_surfaces_edges_schemas_dict[route]["rpc"], - [{"id": model_id, **params}], + [{"scene_id": "scene_1", "id": model_id, **params}], ) @@ -106,6 +106,7 @@ def test_surfaces_edges_attribute( + view.model_surfaces_edges_attribute_vertex_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "name": "unique vertices", @@ -127,7 +128,7 @@ def test_surfaces_edges_attribute_model_hidden_then_shown( for visibility in (False, True): server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "visibility": visibility}], + [{"scene_id": "scene_1", "id": model_id, "visibility": visibility}], ) # The edges scalar bar comes back with the model assert server.compare_image("model/edges/surfaces_edges_attribute.jpeg") @@ -152,7 +153,7 @@ def test_surfaces_edges_hidden_blocks( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": surfaces_ids, "visibility": False}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "visibility": False}], ) # Hidden surfaces take their edges with them assert server.compare_image("model/edges/surfaces_edges_hidden_blocks.jpeg") @@ -163,7 +164,7 @@ def test_surfaces_edges_explode(server: ServerMonitor, dataset_factory: Callable test_surfaces_edges_color(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"ids": [model_id], "explode_factor": 1.0}], + [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 1.0}], ) assert server.compare_image("model/edges/surfaces_edges_explode.jpeg") @@ -179,13 +180,14 @@ def test_surfaces_edges_behind_surface( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { + "scene_id": "scene_1", "camera_options": { "focal_point": [5.0, 0.0, 5.0], "view_up": [0.0, 0.0, 1.0], "position": [5.0, -6.0, 13.0], "view_angle": 30.0, "clipping_range": [0.5, 30.0], - } + }, } ], ) @@ -201,7 +203,7 @@ def test_model_edges_width_after_component_width( server.call( VtkModelEdgesView.model_edges_prefix + VtkModelEdgesView.model_edges_schemas_dict["width"]["rpc"], - [{"id": model_id, "width": 1}], + [{"scene_id": "scene_1", "id": model_id, "width": 1}], ) # Model width overrides every component width, block 45 included assert server.compare_image("model/edges/width_after_component_width.jpeg") @@ -217,6 +219,6 @@ def test_blocks_edges_color(server: ServerMonitor, dataset_factory: Callable[... ): server.call( view.model_blocks_edges_prefix + view.model_blocks_edges_schemas_dict[route]["rpc"], - [{"id": model_id, "block_ids": blocks_ids, **params}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": blocks_ids, **params}], ) assert server.compare_image("model/edges/blocks_edges_color.jpeg") diff --git a/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py b/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py index 56d9d3ae..585749af 100644 --- a/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py +++ b/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py @@ -31,13 +31,27 @@ def test_lines_edge_attribute(server: ServerMonitor, dataset_factory: Callable[. server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) server.call( @@ -47,6 +61,7 @@ def test_lines_edge_attribute(server: ServerMonitor, dataset_factory: Callable[. ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -78,13 +93,27 @@ def test_lines_edge_color_map(server: ServerMonitor, dataset_factory: Callable[. server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Set active edge attribute, item, color map & range @@ -95,6 +124,7 @@ def test_lines_edge_color_map(server: ServerMonitor, dataset_factory: Callable[. ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -129,13 +159,27 @@ def test_lines_edge_color_map_range_update( server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Set active edge attribute @@ -146,6 +190,7 @@ def test_lines_edge_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -177,6 +222,7 @@ def test_lines_edge_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -211,13 +257,27 @@ def test_lines_edge_color_map_red_shift( server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Set active edge attribute @@ -228,6 +288,7 @@ def test_lines_edge_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -259,6 +320,7 @@ def test_lines_edge_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -293,13 +355,27 @@ def test_lines_edge_color_map_rainbow( server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Rainbow Desaturated Map @@ -310,6 +386,7 @@ def test_lines_edge_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -365,6 +442,7 @@ def test_lines_edge_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", diff --git a/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py b/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py index ba95ef23..aff9d617 100644 --- a/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py +++ b/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py @@ -31,13 +31,27 @@ def test_lines_vertex_attribute(server: ServerMonitor, dataset_factory: Callable server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) server.call( @@ -47,6 +61,7 @@ def test_lines_vertex_attribute(server: ServerMonitor, dataset_factory: Callable ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -78,13 +93,27 @@ def test_lines_vertex_color_map(server: ServerMonitor, dataset_factory: Callable server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Set active vertex attribute, item, color map & range @@ -95,6 +124,7 @@ def test_lines_vertex_color_map(server: ServerMonitor, dataset_factory: Callable ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -129,13 +159,27 @@ def test_lines_vertex_color_map_range_update( server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -146,6 +190,7 @@ def test_lines_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -177,6 +222,7 @@ def test_lines_vertex_color_map_range_update( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -211,13 +257,27 @@ def test_lines_vertex_color_map_red_shift( server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -228,6 +288,7 @@ def test_lines_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -259,6 +320,7 @@ def test_lines_vertex_color_map_red_shift( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -293,13 +355,27 @@ def test_lines_vertex_color_map_rainbow( server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only lines server.call( VtkModelLinesView.model_lines_prefix + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(14, 35)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(14, 35)), + "visibility": True, + } + ], ) # Rainbow Desaturated Map @@ -310,6 +386,7 @@ def test_lines_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -365,6 +442,7 @@ def test_lines_vertex_color_map_rainbow( ], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", diff --git a/tests/model/lines/test_model_lines_protocols.py b/tests/model/lines/test_model_lines_protocols.py index 6f812718..7f6b4f90 100644 --- a/tests/model/lines/test_model_lines_protocols.py +++ b/tests/model/lines/test_model_lines_protocols.py @@ -29,6 +29,7 @@ def test_lines_edges_visibility(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -42,6 +43,7 @@ def test_lines_edges_visibility(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -60,6 +62,7 @@ def test_lines_edges_color(server: ServerMonitor, dataset_factory: Callable[..., + VtkModelLinesView.model_lines_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(14, 35)), "color_mode": "constant", @@ -78,6 +81,7 @@ def test_lines_clipping_plane(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [model_id], "planes": [ { @@ -99,6 +103,7 @@ def test_lines_shrink(server: ServerMonitor, dataset_factory: Callable[..., str] VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [model_id], "shrink_factor": 0.8, } diff --git a/tests/model/points/test_model_points_protocols.py b/tests/model/points/test_model_points_protocols.py index e17a4721..e44342fe 100644 --- a/tests/model/points/test_model_points_protocols.py +++ b/tests/model/points/test_model_points_protocols.py @@ -45,7 +45,7 @@ def test_points_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelPointsView.model_points_prefix + VtkModelPointsView.model_points_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "visibility": True}], + [{"scene_id": "scene_1", "id": model_id, "visibility": True}], ) assert server.compare_image("model/points/visibility.jpeg") @@ -57,7 +57,7 @@ def test_points_size(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkModelPointsView.model_points_prefix + VtkModelPointsView.model_points_schemas_dict["size"]["rpc"], - [{"id": model_id, "size": 20}], + [{"scene_id": "scene_1", "id": model_id, "size": 20}], ) assert server.compare_image("model/points/size.jpeg") @@ -69,18 +69,19 @@ def test_surfaces_points_color(server: ServerMonitor, dataset_factory: Callable[ server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": surfaces_ids, "visibility": True}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "visibility": True}], ) server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["size"]["rpc"], - [{"id": model_id, "block_ids": surfaces_ids, "size": 8}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "size": 8}], ) server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, @@ -97,18 +98,19 @@ def test_lines_points_size(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelLinesPointsView.model_lines_points_prefix + VtkModelLinesPointsView.model_lines_points_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": lines_ids, "visibility": True}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": lines_ids, "visibility": True}], ) server.call( VtkModelLinesPointsView.model_lines_points_prefix + VtkModelLinesPointsView.model_lines_points_schemas_dict["size"]["rpc"], - [{"id": model_id, "block_ids": lines_ids, "size": 14}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": lines_ids, "size": 14}], ) server.call( VtkModelLinesPointsView.model_lines_points_prefix + VtkModelLinesPointsView.model_lines_points_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": lines_ids, "color": {"red": 0, "green": 0, "blue": 255, "alpha": 1.0}, @@ -127,7 +129,7 @@ def test_surfaces_points_hidden_blocks( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": surfaces_ids, "visibility": False}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "visibility": False}], ) assert server.compare_image("model/points/surfaces_points_hidden_blocks.jpeg") @@ -140,7 +142,7 @@ def test_surfaces_points_explode( server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"ids": [model_id], "explode_factor": 1.0}], + [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 1.0}], ) assert server.compare_image("model/points/surfaces_points_explode.jpeg") @@ -152,13 +154,14 @@ def test_surface_points_size(server: ServerMonitor, dataset_factory: Callable[.. server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["size"]["rpc"], - [{"id": model_id, "block_ids": [45], "size": 20}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": [45], "size": 20}], ) server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": [45], "color": {"red": 0, "green": 255, "blue": 0, "alpha": 1.0}, @@ -180,6 +183,7 @@ def test_surfaces_points_attribute( + attribute_view.model_surfaces_points_attribute_vertex_schemas_dict["attribute"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "name": "unique vertices", @@ -204,6 +208,7 @@ def test_surfaces_points_opacity( + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 0.2}, diff --git a/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py b/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py index 586f2fd2..37897146 100644 --- a/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py +++ b/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py @@ -60,10 +60,12 @@ def register_model_cube_with_polygon_attribute( ) -> None: dataset_factory(data_id=model_id, viewable_file="cube.vtm") add_polygon_attribute_to_cube(model_id) + server.create_data_scene() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], ) + server.add_to_scene(model_id) assert server.compare_image("model/cube_register.jpeg") @@ -77,13 +79,27 @@ def test_surfaces_polygon_attribute( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) server.call( @@ -93,6 +109,7 @@ def test_surfaces_polygon_attribute( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -126,13 +143,27 @@ def test_surfaces_polygon_color_map( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Set active polygon attribute, item, color map & range @@ -143,6 +174,7 @@ def test_surfaces_polygon_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -177,13 +209,27 @@ def test_surfaces_polygon_color_map_range_update( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Set active polygon attribute @@ -194,6 +240,7 @@ def test_surfaces_polygon_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -225,6 +272,7 @@ def test_surfaces_polygon_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -259,13 +307,27 @@ def test_surfaces_polygon_color_map_red_shift( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Set active polygon attribute @@ -276,6 +338,7 @@ def test_surfaces_polygon_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -307,6 +370,7 @@ def test_surfaces_polygon_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -341,13 +405,27 @@ def test_surfaces_polygon_color_map_rainbow( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Rainbow Desaturated Map @@ -358,6 +436,7 @@ def test_surfaces_polygon_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -413,6 +492,7 @@ def test_surfaces_polygon_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", diff --git a/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py b/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py index 7c8a71dc..a66839b7 100644 --- a/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py +++ b/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py @@ -40,13 +40,27 @@ def test_surfaces_vertex_attribute( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) server.call( @@ -56,6 +70,7 @@ def test_surfaces_vertex_attribute( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -89,13 +104,27 @@ def test_surfaces_vertex_color_map( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Set active vertex attribute, item, color map & range @@ -106,6 +135,7 @@ def test_surfaces_vertex_color_map( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -140,13 +170,27 @@ def test_surfaces_vertex_color_map_range_update( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -157,6 +201,7 @@ def test_surfaces_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -188,6 +233,7 @@ def test_surfaces_vertex_color_map_range_update( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -222,13 +268,27 @@ def test_surfaces_vertex_color_map_red_shift( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Set active vertex attribute @@ -239,6 +299,7 @@ def test_surfaces_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -270,6 +331,7 @@ def test_surfaces_vertex_color_map_red_shift( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -304,13 +366,27 @@ def test_surfaces_vertex_color_map_rainbow( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Rainbow Desaturated Map @@ -321,6 +397,7 @@ def test_surfaces_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -376,6 +453,7 @@ def test_surfaces_vertex_color_map_rainbow( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -433,13 +511,27 @@ def test_surfaces_vertex_attribute_item( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 50)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 50)), + "visibility": False, + } + ], ) # Show only surfaces server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "visibility": True}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "visibility": True, + } + ], ) # Set active vertex attribute with item @@ -450,6 +542,7 @@ def test_surfaces_vertex_attribute_item( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -483,12 +576,19 @@ def test_surfaces_vertex_attribute_interpolates_through_colormap( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 21)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 21)), + "visibility": False, + } + ], ) server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": surface_ids, "visibility": True}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": surface_ids, "visibility": True}], ) server.call( @@ -498,6 +598,7 @@ def test_surfaces_vertex_attribute_interpolates_through_colormap( ]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": surface_ids, "name": "geode_implicit_attribute", diff --git a/tests/model/surfaces/test_model_surfaces_protocols.py b/tests/model/surfaces/test_model_surfaces_protocols.py index ac95e1be..433d7f4c 100644 --- a/tests/model/surfaces/test_model_surfaces_protocols.py +++ b/tests/model/surfaces/test_model_surfaces_protocols.py @@ -31,6 +31,7 @@ def test_surfaces_polygons_visibility( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -44,6 +45,7 @@ def test_surfaces_polygons_visibility( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -65,6 +67,7 @@ def test_surfaces_polygons_color( + VtkModelSurfacesView.model_surfaces_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "color_mode": "constant", @@ -84,7 +87,14 @@ def test_surfaces_polygons_random_color( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["color"]["rpc"], - [{"id": model_id, "block_ids": list(range(36, 47)), "color_mode": "random"}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(36, 47)), + "color_mode": "random", + } + ], ) assert server.compare_image("model/surfaces/random_color.jpeg") @@ -100,6 +110,7 @@ def test_surfaces_polygons_random_collection_id( + VtkModelSurfacesView.model_surfaces_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": list(range(36, 47)), "color_mode": "random", @@ -126,6 +137,7 @@ def test_surfaces_clipping_plane( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { + "scene_id": "scene_1", "ids": [model_id], "planes": [ { @@ -147,6 +159,7 @@ def test_surfaces_shrink(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { + "scene_id": "scene_1", "ids": [model_id], "shrink_factor": 0.8, } diff --git a/tests/model/test_model_protocols.py b/tests/model/test_model_protocols.py index cafecf11..12800640 100644 --- a/tests/model/test_model_protocols.py +++ b/tests/model/test_model_protocols.py @@ -18,20 +18,24 @@ def test_register_model(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=model_id, viewable_file="CrossSection.vtm") + server.create_data_scene() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], ) + server.add_to_scene(model_id) assert server.compare_image("model/register.jpeg") def test_register_model_cube(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=model_id, viewable_file="cube.vtm") + server.create_data_scene() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], ) + server.add_to_scene(model_id) assert server.compare_image("model/cube_register.jpeg") @@ -40,10 +44,12 @@ def test_register_model_implicit_attribute( ) -> None: dataset_factory(data_id=model_id, viewable_file="implicit_attribute.vtm") + server.create_data_scene() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "implicit_attribute.vtm"}], ) + server.add_to_scene(model_id) assert server.compare_image("model/implicit_attribute_register.jpeg") @@ -53,7 +59,7 @@ def test_visibility_model(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "visibility": False}], + [{"scene_id": "scene_1", "id": model_id, "visibility": False}], ) assert server.compare_image("model/visibility.jpeg") @@ -85,13 +91,14 @@ def test_model_cube_side_view(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { + "scene_id": "scene_1", "camera_options": { "focal_point": [5.0, 5.0, 7.5], "view_up": [0.0, 0.0, 1.0], "position": [40.0, -30.0, 20.0], "view_angle": 30.0, "clipping_range": [1.0, 100.0], - } + }, } ], ) @@ -102,7 +109,7 @@ def test_model_explode(server: ServerMonitor, dataset_factory: Callable[..., str test_model_cube_side_view(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"ids": [model_id], "explode_factor": 1.0}], + [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 1.0}], ) assert server.compare_image("model/explode.jpeg") @@ -111,7 +118,7 @@ def test_model_explode_removed(server: ServerMonitor, dataset_factory: Callable[ test_model_explode(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"ids": [model_id], "explode_factor": 0.0}], + [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 0.0}], ) assert server.compare_image("model/cube_side_view.jpeg") @@ -123,13 +130,21 @@ def test_model_explode_blocks_color( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": list(range(1, 48)), "visibility": False}], + [ + { + "scene_id": "scene_1", + "id": model_id, + "block_ids": list(range(1, 48)), + "visibility": False, + } + ], ) server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["color"]["rpc"], [ { + "scene_id": "scene_1", "id": model_id, "block_ids": [48], "color_mode": "constant", @@ -146,7 +161,7 @@ def test_model_explode_then_shrink( test_model_explode(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], - [{"ids": [model_id], "shrink_factor": 0.8}], + [{"scene_id": "scene_1", "ids": [model_id], "shrink_factor": 0.8}], ) assert server.compare_image("model/explode_then_shrink.jpeg") @@ -158,6 +173,6 @@ def test_model_explode_blocks_hidden( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"id": model_id, "block_ids": [48, 49], "visibility": False}], + [{"scene_id": "scene_1", "id": model_id, "block_ids": [48, 49], "visibility": False}], ) assert server.compare_image("model/explode_blocks_hidden.jpeg") diff --git a/tests/test_generic_protocols.py b/tests/test_generic_protocols.py index a982d1bd..c17106c0 100644 --- a/tests/test_generic_protocols.py +++ b/tests/test_generic_protocols.py @@ -18,10 +18,12 @@ def test_register_image(server: ServerMonitor, dataset_factory: Callable[..., st viewer_elements_type="polygons", ) + server.create_data_scene() server.call( VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "hat_lambert2SG.vti"}], ) + server.add_to_scene(data_id) assert server.compare_image("image/register.jpeg") is True @@ -29,10 +31,12 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str data_id = "00000000000000000000000123456789" dataset_factory(data_id=data_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_data_scene() server.call( VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "hat.vtp"}], ) + server.add_to_scene(data_id) assert server.compare_image("mesh/register.jpeg") is True @@ -40,10 +44,12 @@ def test_register_model(server: ServerMonitor, dataset_factory: Callable[..., st data_id = "00000000000000000000000123456789" dataset_factory(data_id=data_id, viewable_file="CrossSection.vtm") + server.create_data_scene() server.call( VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "CrossSection.vtm"}], ) + server.add_to_scene(data_id) assert server.compare_image("model/register.jpeg") is True diff --git a/tests/test_typed_rpcs.py b/tests/test_typed_rpcs.py index 3a8fa5a7..91240373 100644 --- a/tests/test_typed_rpcs.py +++ b/tests/test_typed_rpcs.py @@ -70,32 +70,36 @@ def highlight(self, _params: schemas.Highlight) -> schemas.HighlightResponse: def test_typed_rpc_returns_dict_without_none() -> None: - assert _Protocol().pick({"x": 1, "y": 2}) == {} + assert _Protocol().pick({"scene_id": "scene_1", "x": 1, "y": 2}) == {} def test_typed_rpc_returns_json_serializable_enum() -> None: - payload = _Protocol().highlight({"field_type": "POINT", "ids": ["0" * 32], "x": 1, "y": 2}) + payload = _Protocol().highlight( + {"scene_id": "scene_1", "field_type": "POINT", "ids": ["0" * 32], "x": 1, "y": 2} + ) assert payload["field_type"] == "POINT" json.dumps(payload) def test_typed_rpc_stream_publishes() -> None: protocol = _Protocol() - protocol.pick({"x": 1, "y": 2}, stream=True) - assert protocol.published == [(PREFIX + "pick_colormap", {"x": 1, "y": 2})] + protocol.pick({"scene_id": "scene_1", "x": 1, "y": 2}, stream=True) + assert protocol.published == [ + (PREFIX + "pick_colormap", {"scene_id": "scene_1", "x": 1, "y": 2}) + ] def test_typed_rpc_bad_params() -> None: with pytest.raises(Exception, match="Bad request"): - _Protocol().pick({"x": "not a number", "y": 2}) + _Protocol().pick({"scene_id": "scene_1", "x": "not a number", "y": 2}) def test_typed_rpc_wrong_response_type() -> None: with pytest.raises(TypeError): - _Protocol().wrong_type({"x": 1, "y": 2}) + _Protocol().wrong_type({"scene_id": "scene_1", "x": 1, "y": 2}) def test_typed_rpc_invalid_response(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("PYTHON_ENV", "test") with pytest.raises(fastjsonschema.JsonSchemaException): - _Protocol().invalid_payload({"x": 1, "y": 2}) + _Protocol().invalid_payload({"scene_id": "scene_1", "x": 1, "y": 2}) diff --git a/tests/test_utils_protocols.py b/tests/test_utils_protocols.py index d9e58f4d..68807558 100644 --- a/tests/test_utils_protocols.py +++ b/tests/test_utils_protocols.py @@ -19,10 +19,12 @@ def test_reset_project_after_import( # Mock pre_id = "00000000000000000000000123456789" dataset_factory(data_id=pre_id, viewable_file="hat.vtp", viewer_elements_type="polygons") + server.create_data_scene() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": pre_id, "name": "hat.vtp"}], ) + server.add_to_scene(pre_id) assert server.compare_image("mesh/register.jpeg") is True # Import @@ -40,38 +42,42 @@ def test_reset_project_after_import( VtkUtilsView.utils_prefix + VtkUtilsView.utils_schemas_dict["import_project"]["rpc"] ) - server.call( - VtkViewerView.viewer_prefix - + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"] - ) + # The import disposed of the scenes: the client creates them again + server.create_scene() assert server.compare_image("viewer/reset_visualization.jpeg") is True server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": post_id, "name": "hat.vtp"}], ) + server.add_to_scene(post_id) assert server.compare_image("viewer/import_project.jpeg") is True def test_scene_style_after_import(server: ServerMonitor) -> None: - server.call( - VtkViewerView.viewer_prefix - + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"] - ) + server.create_scene() server.call( VtkUtilsView.utils_prefix + VtkUtilsView.utils_schemas_dict["import_project"]["rpc"] ) server.get_result( VtkUtilsView.utils_prefix + VtkUtilsView.utils_schemas_dict["import_project"]["rpc"] ) + server.create_scene() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], - [{"color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0}], + [ + { + "scene_id": "scene_1", + "color": {"red": 255, "green": 0, "blue": 0}, + "font_family": "arial", + "opacity": 1.0, + } + ], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"marker": "compass"}], + [{"scene_id": "scene_1", "marker": "compass"}], ) assert server.compare_image("viewer/orientation_widget_compass.jpeg") is True diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index c5909de9..684249c0 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -107,6 +107,7 @@ def test_set_text_style_then_attribute( ], [ { + "scene_id": "scene_1", "id": points_mesh_id, "name": "lambert2SG", "item": 0, @@ -613,6 +614,20 @@ def test_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N assert server.compare_image("viewer/shrink.jpeg") +def test_shrink_reaches_every_scene( + server: ServerMonitor, dataset_factory: Callable[..., str] +) -> None: + show_mesh(server, dataset_factory) + server.create_scene("scene_2") + scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": mesh_id}) + server.call( + VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], + [{"scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8}], + ) + # The filter is on the shared data: the other scene shows it too + assert server.compare_image("viewer/shrink.jpeg", "scene_2") + + def test_explode_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: show_mesh(server, dataset_factory) server.call( From 6cce8b5054191232f3720b374d3a39536eb96134 Mon Sep 17 00:00:00 2001 From: MaxNumerique <144453705+MaxNumerique@users.noreply.github.com> Date: Mon, 30 Nov 2026 13:28:23 +0000 Subject: [PATCH 06/22] Apply prepare changes --- opengeodeweb_viewer_typed_schemas.d.ts | 1829 ++++++++--------- requirements.txt | 1 - .../cells/attribute/cell/schemas/attribute.py | 9 +- .../attribute/vertex/schemas/attribute.py | 9 +- .../edges/attribute/edge/schemas/attribute.py | 9 +- .../attribute/vertex/schemas/attribute.py | 9 +- .../attribute/vertex/schemas/attribute.py | 9 +- .../attribute/polygon/schemas/attribute.py | 9 +- .../attribute/vertex/schemas/attribute.py | 9 +- .../attribute/polyhedron/schemas/attribute.py | 9 +- .../attribute/vertex/schemas/attribute.py | 9 +- .../attribute/polyhedron/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../lines/attribute/edge/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../attribute/polygon/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- .../attribute/vertex/schemas/attribute.py | 10 +- 23 files changed, 890 insertions(+), 1141 deletions(-) diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index e804012c..eab5fb9a 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -2,1223 +2,1313 @@ import type json from "./opengeodeweb_viewer_schemas.json"; import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; -import type { - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGB, - ColorRGBA, - EdgeWidth, - Filename, - Opacity, - Point3D, - PointSize, - ViewerId, - Visibility, -} from "@geode/opengeodeweb-viewer/schema_types"; +import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, ViewerId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; export interface GenericRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface GenericRegisterResponse {} +export interface GenericRegisterResponse { +} export interface GenericDeregisterParams { - id: DataId; + id: DataId; } -export interface GenericDeregisterResponse {} +export interface GenericDeregisterResponse { +} export interface ImageVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ImageVisibilityResponse {} +export interface ImageVisibilityResponse { +} export interface ImageRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface ImageRegisterResponse {} +export interface ImageRegisterResponse { +} export interface ImageOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: string; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface ImageOpacityResponse {} +export interface ImageOpacityResponse { +} export interface ImageDeregisterParams { - id: DataId; + id: DataId; } -export interface ImageDeregisterResponse {} +export interface ImageDeregisterResponse { +} export interface MeshCellsAttributeCellAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } /** * Flat array of [value, r, g, b, ...] */ -export interface MeshCellsAttributeCellAttributeResponse {} +export interface MeshCellsAttributeCellAttributeResponse { +} export interface MeshCellsAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshCellsAttributeVertexAttributeResponse {} +export interface MeshCellsAttributeVertexAttributeResponse { +} export interface MeshCellsVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshCellsVisibilityResponse {} +export interface MeshCellsVisibilityResponse { +} export interface MeshCellsOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: string; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshCellsOpacityResponse {} +export interface MeshCellsOpacityResponse { +} export interface MeshCellsColorParams { - color: ColorRGBA; - id: DataId; - scene_id: string; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshCellsColorResponse {} +export interface MeshCellsColorResponse { +} export interface MeshEdgesAttributeEdgeAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshEdgesAttributeEdgeAttributeResponse {} +export interface MeshEdgesAttributeEdgeAttributeResponse { +} export interface MeshEdgesAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshEdgesAttributeVertexAttributeResponse {} +export interface MeshEdgesAttributeVertexAttributeResponse { +} export interface MeshEdgesWidthParams { - id: DataId; - scene_id: string; - width: EdgeWidth; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface MeshEdgesWidthResponse {} +export interface MeshEdgesWidthResponse { +} export interface MeshEdgesVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshEdgesVisibilityResponse {} +export interface MeshEdgesVisibilityResponse { +} export interface MeshEdgesOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: string; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshEdgesOpacityResponse {} +export interface MeshEdgesOpacityResponse { +} export interface MeshEdgesColorParams { - color: ColorRGBA; - id: DataId; - scene_id: string; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshEdgesColorResponse {} +export interface MeshEdgesColorResponse { +} export interface MeshPointsAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPointsAttributeVertexAttributeResponse {} +export interface MeshPointsAttributeVertexAttributeResponse { +} export interface MeshPointsVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } export interface MeshPointsVisibilityResponse { - id: DataId; - visibility: Visibility; + id: DataId; + visibility: Visibility; } export interface MeshPointsSizeParams { - id: DataId; - scene_id: string; - size: PointSize; + id: DataId; + scene_id: string; + size: PointSize; } -export interface MeshPointsSizeResponse {} +export interface MeshPointsSizeResponse { +} export interface MeshPointsOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: string; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshPointsOpacityResponse {} +export interface MeshPointsOpacityResponse { +} export interface MeshPointsColorParams { - color: ColorRGBA; - id: DataId; - scene_id: string; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshPointsColorResponse {} +export interface MeshPointsColorResponse { +} export interface MeshPolygonsAttributePolygonAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolygonsAttributePolygonAttributeResponse {} +export interface MeshPolygonsAttributePolygonAttributeResponse { +} export interface MeshPolygonsAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolygonsAttributeVertexAttributeResponse {} +export interface MeshPolygonsAttributeVertexAttributeResponse { +} export interface MeshPolygonsVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshPolygonsVisibilityResponse {} +export interface MeshPolygonsVisibilityResponse { +} export interface MeshPolygonsOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: string; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshPolygonsOpacityResponse {} +export interface MeshPolygonsOpacityResponse { +} export interface MeshPolygonsColorParams { - color: ColorRGBA; - id: DataId; - scene_id: string; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshPolygonsColorResponse {} +export interface MeshPolygonsColorResponse { +} export interface MeshPolyhedraAttributePolyhedronAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolyhedraAttributePolyhedronAttributeResponse {} +export interface MeshPolyhedraAttributePolyhedronAttributeResponse { +} export interface MeshPolyhedraAttributeVertexAttributeParams { - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface MeshPolyhedraAttributeVertexAttributeResponse {} +export interface MeshPolyhedraAttributeVertexAttributeResponse { +} export interface MeshPolyhedraVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshPolyhedraVisibilityResponse {} +export interface MeshPolyhedraVisibilityResponse { +} export interface MeshPolyhedraOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: string; + id: DataId; + opacity: Opacity; + scene_id: string; } -export interface MeshPolyhedraOpacityResponse {} +export interface MeshPolyhedraOpacityResponse { +} export interface MeshPolyhedraColorParams { - color: ColorRGBA; - id: DataId; - scene_id: string; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshPolyhedraColorResponse {} +export interface MeshPolyhedraColorResponse { +} export interface MeshVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshVisibilityResponse {} +export interface MeshVisibilityResponse { +} export interface MeshRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface MeshRegisterResponse {} +export interface MeshRegisterResponse { +} export interface MeshHighlightParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface MeshHighlightResponse {} +export interface MeshHighlightResponse { +} export interface MeshDeregisterParams { - id: DataId; + id: DataId; } -export interface MeshDeregisterResponse {} +export interface MeshDeregisterResponse { +} export interface MeshColorParams { - color: ColorRGBA; - id: DataId; - scene_id: string; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface MeshColorResponse {} +export interface MeshColorResponse { +} export interface MeshBasemapLayersParams { - id: DataId; - layers: Layer[]; + id: DataId; + layers: Layer[]; } export interface Layer { - crop: boolean; - map: string; - opacity: Opacity; - visible: boolean; + crop: boolean; + map: string; + opacity: Opacity; + visible: boolean; } -export interface MeshBasemapLayersResponse {} +export interface MeshBasemapLayersResponse { +} export interface MeshBasemapDrapeParams { - data_ids: string[]; - id: DataId; + data_ids: string[]; + id: DataId; } -export interface MeshBasemapDrapeResponse {} +export interface MeshBasemapDrapeResponse { +} export interface MeshApplyTexturesParams { - id: DataId; - scene_id: string; - textures: MeshApplyTexturesParamsTexture[]; + id: DataId; + scene_id: string; + textures: MeshApplyTexturesParamsTexture[]; } export interface MeshApplyTexturesParamsTexture { - id: DataId; - texture_name: string; + id: DataId; + texture_name: string; } -export interface MeshApplyTexturesResponse {} +export interface MeshApplyTexturesResponse { +} export interface MeshApplyBasemapParams { - columns: number; - detail_of?: string; - id: DataId; - layers: MapState[]; - maps: Map[]; - rows: number; + columns: number; + detail_of?: string; + id: DataId; + layers: MapState[]; + maps: Map[]; + rows: number; } export interface MapState { - crop: boolean; - map: string; - opacity: Opacity; - visible: boolean; + crop: boolean; + map: string; + opacity: Opacity; + visible: boolean; } export interface Map { - map: string; - sources: string[]; + map: string; + sources: string[]; } -export interface MeshApplyBasemapResponse {} +export interface MeshApplyBasemapResponse { +} export interface ModelBlocksAttributePolyhedronAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksAttributePolyhedronAttributeResponse {} +export interface ModelBlocksAttributePolyhedronAttributeResponse { +} export interface ModelBlocksAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksAttributeVertexAttributeResponse {} +export interface ModelBlocksAttributeVertexAttributeResponse { +} export interface ModelBlocksEdgesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksEdgesAttributeVertexAttributeResponse {} +export interface ModelBlocksEdgesAttributeVertexAttributeResponse { +} export interface ModelBlocksEdgesWidthParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - width: EdgeWidth; + block_ids: BlockIds; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface ModelBlocksEdgesWidthResponse {} +export interface ModelBlocksEdgesWidthResponse { +} export interface ModelBlocksEdgesVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelBlocksEdgesVisibilityResponse {} +export interface ModelBlocksEdgesVisibilityResponse { +} export interface ModelBlocksEdgesColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; - scene_id: string; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelBlocksEdgesColorResponse {} +export interface ModelBlocksEdgesColorResponse { +} export interface ModelBlocksPointsAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelBlocksPointsAttributeVertexAttributeResponse {} +export interface ModelBlocksPointsAttributeVertexAttributeResponse { +} export interface ModelBlocksPointsVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelBlocksPointsVisibilityResponse {} +export interface ModelBlocksPointsVisibilityResponse { +} export interface ModelBlocksPointsSizeParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - size: PointSize; + block_ids: BlockIds; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelBlocksPointsSizeResponse {} +export interface ModelBlocksPointsSizeResponse { +} export interface ModelBlocksPointsColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; - scene_id: string; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelBlocksPointsColorResponse {} +export interface ModelBlocksPointsColorResponse { +} export interface ModelBlocksVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelBlocksVisibilityResponse {} +export interface ModelBlocksVisibilityResponse { +} export interface ModelBlocksColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; - scene_id: string; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export type ColorMode = "constant" | "random"; export interface ModelBlocksColorResponse { - colors: ModelBlocksColorResponseColor[]; + colors: ModelBlocksColorResponseColor[]; } export interface ModelBlocksColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelCornersAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelCornersAttributeVertexAttributeResponse {} +export interface ModelCornersAttributeVertexAttributeResponse { +} export interface ModelCornersVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelCornersVisibilityResponse {} +export interface ModelCornersVisibilityResponse { +} export interface ModelCornersColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; - scene_id: string; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export interface ModelCornersColorResponse { - colors: ModelCornersColorResponseColor[]; + colors: ModelCornersColorResponseColor[]; } export interface ModelCornersColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelEdgesWidthParams { - id: DataId; - scene_id: string; - width: EdgeWidth; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface ModelEdgesWidthResponse {} +export interface ModelEdgesWidthResponse { +} export interface ModelEdgesVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelEdgesVisibilityResponse {} +export interface ModelEdgesVisibilityResponse { +} export interface ModelLinesAttributeEdgeAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelLinesAttributeEdgeAttributeResponse {} +export interface ModelLinesAttributeEdgeAttributeResponse { +} export interface ModelLinesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelLinesAttributeVertexAttributeResponse {} +export interface ModelLinesAttributeVertexAttributeResponse { +} export interface ModelLinesPointsAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelLinesPointsAttributeVertexAttributeResponse {} +export interface ModelLinesPointsAttributeVertexAttributeResponse { +} export interface ModelLinesPointsVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelLinesPointsVisibilityResponse {} +export interface ModelLinesPointsVisibilityResponse { +} export interface ModelLinesPointsSizeParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - size: PointSize; + block_ids: BlockIds; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelLinesPointsSizeResponse {} +export interface ModelLinesPointsSizeResponse { +} export interface ModelLinesPointsColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; - scene_id: string; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelLinesPointsColorResponse {} +export interface ModelLinesPointsColorResponse { +} export interface ModelLinesVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelLinesVisibilityResponse {} +export interface ModelLinesVisibilityResponse { +} export interface ModelLinesColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; - scene_id: string; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export interface ModelLinesColorResponse { - colors: ModelLinesColorResponseColor[]; + colors: ModelLinesColorResponseColor[]; } export interface ModelLinesColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelPointsVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelPointsVisibilityResponse {} +export interface ModelPointsVisibilityResponse { +} export interface ModelPointsSizeParams { - id: DataId; - scene_id: string; - size: PointSize; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelPointsSizeResponse {} +export interface ModelPointsSizeResponse { +} export interface ModelVisibilityParams { - id: DataId; - scene_id: string; - visibility: Visibility; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelVisibilityResponse {} +export interface ModelVisibilityResponse { +} export interface ModelRegisterParams { - id: DataId; - name: string; + id: DataId; + name: string; } -export interface ModelRegisterResponse {} +export interface ModelRegisterResponse { +} export interface ModelHighlightParams { - block_ids: ViewerId[]; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: ViewerId[]; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelHighlightResponse {} +export interface ModelHighlightResponse { +} export interface ModelGetBlocksBoundsParams { - block_ids: ViewerId[]; - id: DataId; + block_ids: ViewerId[]; + id: DataId; } export interface ModelGetBlocksBoundsResponse { - bounds: number[]; + bounds: number[]; } export interface ModelDeregisterParams { - id: DataId; + id: DataId; } -export interface ModelDeregisterResponse {} +export interface ModelDeregisterResponse { +} export interface ModelSurfacesAttributePolygonAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesAttributePolygonAttributeResponse {} +export interface ModelSurfacesAttributePolygonAttributeResponse { +} export interface ModelSurfacesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesAttributeVertexAttributeResponse {} +export interface ModelSurfacesAttributeVertexAttributeResponse { +} export interface ModelSurfacesEdgesAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesEdgesAttributeVertexAttributeResponse {} +export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { +} export interface ModelSurfacesEdgesWidthParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - width: EdgeWidth; + block_ids: BlockIds; + id: DataId; + scene_id: string; + width: EdgeWidth; } -export interface ModelSurfacesEdgesWidthResponse {} +export interface ModelSurfacesEdgesWidthResponse { +} export interface ModelSurfacesEdgesVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelSurfacesEdgesVisibilityResponse {} +export interface ModelSurfacesEdgesVisibilityResponse { +} export interface ModelSurfacesEdgesColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; - scene_id: string; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelSurfacesEdgesColorResponse {} +export interface ModelSurfacesEdgesColorResponse { +} export interface ModelSurfacesPointsAttributeVertexAttributeParams { - block_ids: BlockIds; - id: DataId; - item: AttributeItem; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: AttributeName; - no_data_color?: ColorRGBA; - points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + block_ids: BlockIds; + id: DataId; + item: AttributeItem; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: AttributeName; + no_data_color?: ColorRGBA; + points: ColorMapPoints; // Flat array of [value, r, g, b, ...] + scene_id: string; } -export interface ModelSurfacesPointsAttributeVertexAttributeResponse {} +export interface ModelSurfacesPointsAttributeVertexAttributeResponse { +} export interface ModelSurfacesPointsVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelSurfacesPointsVisibilityResponse {} +export interface ModelSurfacesPointsVisibilityResponse { +} export interface ModelSurfacesPointsSizeParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - size: PointSize; + block_ids: BlockIds; + id: DataId; + scene_id: string; + size: PointSize; } -export interface ModelSurfacesPointsSizeResponse {} +export interface ModelSurfacesPointsSizeResponse { +} export interface ModelSurfacesPointsColorParams { - block_ids: BlockIds; - color: ColorRGBA; - id: DataId; - scene_id: string; + block_ids: BlockIds; + color: ColorRGBA; + id: DataId; + scene_id: string; } -export interface ModelSurfacesPointsColorResponse {} +export interface ModelSurfacesPointsColorResponse { +} export interface ModelSurfacesVisibilityParams { - block_ids: BlockIds; - id: DataId; - scene_id: string; - visibility: Visibility; + block_ids: BlockIds; + id: DataId; + scene_id: string; + visibility: Visibility; } -export interface ModelSurfacesVisibilityResponse {} +export interface ModelSurfacesVisibilityResponse { +} export interface ModelSurfacesColorParams { - block_ids: BlockIds; - collection_id?: GeodeId; - color?: ColorRGBA; - color_mode: ColorMode; - id: DataId; - scene_id: string; + block_ids: BlockIds; + collection_id?: GeodeId; + color?: ColorRGBA; + color_mode: ColorMode; + id: DataId; + scene_id: string; } export interface ModelSurfacesColorResponse { - colors: ModelSurfacesColorResponseColor[]; + colors: ModelSurfacesColorResponseColor[]; } export interface ModelSurfacesColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + color: ColorRGBA; + geode_id: GeodeId; + viewer_id: ViewerId; } export interface ModelSurfacesApplyTexturesParams { - id: DataId; - scene_id: string; - textures: ModelSurfacesApplyTexturesParamsTexture[]; + id: DataId; + scene_id: string; + textures: ModelSurfacesApplyTexturesParamsTexture[]; } export interface ModelSurfacesApplyTexturesParamsTexture { - texture_file_name: string; - texture_name: string; + texture_file_name: string; + texture_name: string; } -export interface ModelSurfacesApplyTexturesResponse {} +export interface ModelSurfacesApplyTexturesResponse { +} -export interface RenderingWarningsParams {} +export interface RenderingWarningsParams { +} export interface RenderingWarningsResponse { - warnings: string[]; + warnings: string[]; } -export interface ReleaseDatabaseParams {} +export interface ReleaseDatabaseParams { +} -export interface ReleaseDatabaseResponse {} +export interface ReleaseDatabaseResponse { +} -export interface KillParams {} +export interface KillParams { +} -export interface KillResponse {} +export interface KillResponse { +} -export interface ImportProjectParams {} +export interface ImportProjectParams { +} -export interface ImportProjectResponse {} +export interface ImportProjectResponse { +} export interface ViewerUpdateDataParams { - id: DataId; - scene_id: string; + id: DataId; + scene_id: string; } -export interface ViewerUpdateDataResponse {} +export interface ViewerUpdateDataResponse { +} export interface ViewerUpdateCameraParams { - camera_options: CameraOptions; - scene_id: string; - [property: string]: any; + camera_options: CameraOptions; + scene_id: string; + [property: string]: any; } export interface CameraOptions { - clipping_range: number[]; - focal_point: number[]; - position: number[]; - view_angle: number; - view_up: number[]; - [property: string]: any; + clipping_range: number[]; + focal_point: number[]; + position: number[]; + view_angle: number; + view_up: number[]; + [property: string]: any; } -export interface ViewerUpdateCameraResponse {} +export interface ViewerUpdateCameraResponse { +} export interface ViewerThresholdParams { - attributes: AttributeElement[]; - ids: DataId[]; - scene_id: string; + attributes: AttributeElement[]; + ids: DataId[]; + scene_id: string; } export interface AttributeElement { - item: AttributeItem; - location: Location; - maximum: AttributeRangeMaximum; - minimum: AttributeRangeMinimum; - name: string; + item: AttributeItem; + location: Location; + maximum: AttributeRangeMaximum; + minimum: AttributeRangeMinimum; + name: string; } export type Location = "point" | "cell"; -export interface ViewerThresholdResponse {} +export interface ViewerThresholdResponse { +} export interface ViewerTakeScreenshotParams { - filename: Filename; - height?: number; - include_background: boolean; - output_extension: OutputExtension; - scene_id: string; - width?: number; + filename: Filename; + height?: number; + include_background: boolean; + output_extension: OutputExtension; + scene_id: string; + width?: number; } export type OutputExtension = "png" | "jpg"; export interface ViewerTakeScreenshotResponse { - blob: any; // Image file content, sent as binary + blob: any; // Image file content, sent as binary } export interface ViewerSliceParams { - ids: DataId[]; - scene_id: string; - slices: Slice[]; + ids: DataId[]; + scene_id: string; + slices: Slice[]; } export interface Slice { - axis: number; - index: number; + axis: number; + index: number; } export interface ViewerSliceResponse { - max_indices: number[]; + max_indices: number[]; } export interface ViewerShrinkParams { - ids: DataId[]; - scene_id: string; - shrink_factor: number; + ids: DataId[]; + scene_id: string; + shrink_factor: number; } -export interface ViewerShrinkResponse {} +export interface ViewerShrinkResponse { +} export interface ViewerSetZScalingParams { - scene_id: string; - z_scale: number; + scene_id: string; + z_scale: number; } -export interface ViewerSetZScalingResponse {} +export interface ViewerSetZScalingResponse { +} export interface ViewerSetTextStyleParams { - color: ColorRGB; - font_family: FontFamily; - opacity: Opacity; - scene_id: string; + color: ColorRGB; + font_family: FontFamily; + opacity: Opacity; + scene_id: string; } export type FontFamily = "arial" | "courier" | "times"; -export interface ViewerSetTextStyleResponse {} +export interface ViewerSetTextStyleResponse { +} export interface ViewerSetOrientationWidgetParams { - marker: Marker; - scene_id: string; + marker: Marker; + scene_id: string; } export type Marker = "axes" | "compass" | "none"; -export interface ViewerSetOrientationWidgetResponse {} +export interface ViewerSetOrientationWidgetResponse { +} export interface ViewerSetBackgroundColorParams { - color: ColorRGB; - scene_id: string; + color: ColorRGB; + scene_id: string; } -export interface ViewerSetBackgroundColorResponse {} +export interface ViewerSetBackgroundColorResponse { +} export interface ViewerRulerParams { - points: Array; - scene_id: string; + points: Array; + scene_id: string; } export interface ViewerRulerResponse { - distance: number; - point1: number[]; - point2?: number[]; + distance: number; + point1: number[]; + point2?: number[]; } export interface ViewerResetVisualizationParams { - scene_id: string; + scene_id: string; } -export interface ViewerResetVisualizationResponse {} +export interface ViewerResetVisualizationResponse { +} export interface ViewerResetRulerParams { - scene_id: string; + scene_id: string; } -export interface ViewerResetRulerResponse {} +export interface ViewerResetRulerResponse { +} export interface ViewerResetCameraParams { - scene_id: string; + scene_id: string; } -export interface ViewerResetCameraResponse {} +export interface ViewerResetCameraResponse { +} export interface ViewerRenderParams { - scene_id: string; + scene_id: string; } -export interface ViewerRenderResponse {} +export interface ViewerRenderResponse { +} export interface ViewerRemoveFromSceneParams { - id: DataId; - scene_id: string; + id: DataId; + scene_id: string; } -export interface ViewerRemoveFromSceneResponse {} +export interface ViewerRemoveFromSceneResponse { +} export interface ViewerPreviewPointsParams { - closed?: boolean; - points: Point3D[]; - scene_id: string; - style: Style; + closed?: boolean; + points: Point3D[]; + scene_id: string; + style: Style; } export type Style = "points" | "curve" | "surface"; -export interface ViewerPreviewPointsResponse {} +export interface ViewerPreviewPointsResponse { +} export interface ViewerPickedIDSParams { - ids: DataId[]; - scene_id: string; - x: number; - y: number; + ids: DataId[]; + scene_id: string; + x: number; + y: number; } export interface ViewerPickedIDSResponse { - array_ids: DataId[]; - viewer_id?: ViewerId; + array_ids: DataId[]; + viewer_id?: ViewerId; } export interface ViewerPickColormapParams { - scene_id: string; - x: number; - y: number; - [property: string]: any; + scene_id: string; + x: number; + y: number; + [property: string]: any; } export interface ViewerPickColormapResponse { - block_ids?: ViewerId[]; - data_id?: string; + block_ids?: ViewerId[]; + data_id?: string; } export interface ViewerHighlightParams { - field_type: PickedFieldType; - ids: DataId[]; - scene_id: string; - x: number; - y: number; + field_type: PickedFieldType; + ids: DataId[]; + scene_id: string; + x: number; + y: number; } export type PickedFieldType = "CELL" | "POINT"; export interface ViewerHighlightResponse { - attributes?: { [key: string]: number[] | number }; - field_type?: PickedFieldType; - geode_id?: GeodeId; - id?: DataId; - picked_id?: number; + attributes?: { [key: string]: number[] | number }; + field_type?: PickedFieldType; + geode_id?: GeodeId; + id?: DataId; + picked_id?: number; } export interface ViewerGridScaleParams { - scene_id: string; - visibility: Visibility; + scene_id: string; + visibility: Visibility; } -export interface ViewerGridScaleResponse {} +export interface ViewerGridScaleResponse { +} export interface ViewerGetPointPositionParams { - scene_id: string; - x: number; - y: number; + scene_id: string; + x: number; + y: number; } export type ViewerGetPointPositionResponse = Point3D; export interface ViewerExplodeParams { - explode_factor: number; - ids: DataId[]; - scene_id: string; + explode_factor: number; + ids: DataId[]; + scene_id: string; } export interface ViewerExplodeResponse { - exploded_bounds: ExplodedBound[]; + exploded_bounds: ExplodedBound[]; } export interface ExplodedBound { - bounds: number[]; - id: DataId; + bounds: number[]; + id: DataId; } export interface ViewerDeleteSceneParams { - scene_id: string; + scene_id: string; } -export interface ViewerDeleteSceneResponse {} +export interface ViewerDeleteSceneResponse { +} export interface ViewerCreateSceneParams { - scene_id: string; + scene_id: string; } export interface ViewerCreateSceneResponse { - view_id: string; + view_id: string; } export interface ViewerClippingPlanesParams { - ids: DataId[]; - planes: Plane[]; - scene_id: string; + ids: DataId[]; + planes: Plane[]; + scene_id: string; } export interface Plane { - color?: ColorRGBA; - normal: number[]; - origin: number[]; + color?: ColorRGBA; + normal: number[]; + origin: number[]; } -export interface ViewerClippingPlanesResponse {} +export interface ViewerClippingPlanesResponse { +} export interface ViewerAxesParams { - scene_id: string; - visibility: Visibility; + scene_id: string; + visibility: Visibility; } -export interface ViewerAxesResponse {} +export interface ViewerAxesResponse { +} export interface ViewerAddToSceneParams { - id: DataId; - scene_id: string; + id: DataId; + scene_id: string; } -export interface ViewerAddToSceneResponse {} +export interface ViewerAddToSceneResponse { +} export interface ErrorResponse { - code: number; - description: string; - name: string; + code: number; + description: string; + name: string; } // `__params` and `__response` only exist at type level, to infer request/response types from a schema. @@ -1231,415 +1321,234 @@ export type TypedSchema = { export interface Schemas { readonly opengeodeweb_viewer: { readonly generic: { - readonly register: (typeof json)["opengeodeweb_viewer"]["generic"]["register"] & - TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["generic"]["deregister"] & - TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["generic"]["register"] & TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["generic"]["deregister"] & TypedSchema; }; readonly image: { - readonly visibility: (typeof json)["opengeodeweb_viewer"]["image"]["visibility"] & - TypedSchema; - readonly register: (typeof json)["opengeodeweb_viewer"]["image"]["register"] & - TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["image"]["opacity"] & - TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["image"]["deregister"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["image"]["visibility"] & TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["image"]["register"] & TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["image"]["opacity"] & TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["image"]["deregister"] & TypedSchema; }; readonly mesh: { readonly cells: { readonly attribute: { readonly cell: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["cell"]["attribute"] & - TypedSchema< - MeshCellsAttributeCellAttributeParams, - MeshCellsAttributeCellAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["cell"]["attribute"] & TypedSchema; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - MeshCellsAttributeVertexAttributeParams, - MeshCellsAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["visibility"] & - TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["opacity"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["visibility"] & TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["opacity"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["cells"]["color"] & TypedSchema; }; readonly edges: { readonly attribute: { readonly edge: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["edge"]["attribute"] & - TypedSchema< - MeshEdgesAttributeEdgeAttributeParams, - MeshEdgesAttributeEdgeAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["edge"]["attribute"] & TypedSchema; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - MeshEdgesAttributeVertexAttributeParams, - MeshEdgesAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly width: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["width"] & - TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["visibility"] & - TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["opacity"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["color"] & - TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["width"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["visibility"] & TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["opacity"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["edges"]["color"] & TypedSchema; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - MeshPointsAttributeVertexAttributeParams, - MeshPointsAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["visibility"] & - TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["size"] & - TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["opacity"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["visibility"] & TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["size"] & TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["opacity"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["points"]["color"] & TypedSchema; }; readonly polygons: { readonly attribute: { readonly polygon: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["polygon"]["attribute"] & - TypedSchema< - MeshPolygonsAttributePolygonAttributeParams, - MeshPolygonsAttributePolygonAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["polygon"]["attribute"] & TypedSchema; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - MeshPolygonsAttributeVertexAttributeParams, - MeshPolygonsAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["visibility"] & - TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["opacity"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["visibility"] & TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["opacity"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polygons"]["color"] & TypedSchema; }; readonly polyhedra: { readonly attribute: { readonly polyhedron: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["polyhedron"]["attribute"] & - TypedSchema< - MeshPolyhedraAttributePolyhedronAttributeParams, - MeshPolyhedraAttributePolyhedronAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["polyhedron"]["attribute"] & TypedSchema; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - MeshPolyhedraAttributeVertexAttributeParams, - MeshPolyhedraAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["visibility"] & - TypedSchema; - readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["opacity"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["visibility"] & TypedSchema; + readonly opacity: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["opacity"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["polyhedra"]["color"] & TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["visibility"] & - TypedSchema; - readonly register: (typeof json)["opengeodeweb_viewer"]["mesh"]["register"] & - TypedSchema; - readonly highlight: (typeof json)["opengeodeweb_viewer"]["mesh"]["highlight"] & - TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["mesh"]["deregister"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["color"] & - TypedSchema; - readonly basemap_layers: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_layers"] & - TypedSchema; - readonly basemap_drape: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_drape"] & - TypedSchema; - readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_textures"] & - TypedSchema; - readonly apply_basemap: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_basemap"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["mesh"]["visibility"] & TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["mesh"]["register"] & TypedSchema; + readonly highlight: (typeof json)["opengeodeweb_viewer"]["mesh"]["highlight"] & TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["mesh"]["deregister"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["mesh"]["color"] & TypedSchema; + readonly basemap_layers: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_layers"] & TypedSchema; + readonly basemap_drape: (typeof json)["opengeodeweb_viewer"]["mesh"]["basemap_drape"] & TypedSchema; + readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_textures"] & TypedSchema; + readonly apply_basemap: (typeof json)["opengeodeweb_viewer"]["mesh"]["apply_basemap"] & TypedSchema; }; readonly model: { readonly blocks: { readonly attribute: { readonly polyhedron: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["polyhedron"]["attribute"] & - TypedSchema< - ModelBlocksAttributePolyhedronAttributeParams, - ModelBlocksAttributePolyhedronAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["polyhedron"]["attribute"] & TypedSchema; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelBlocksAttributeVertexAttributeParams, - ModelBlocksAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; readonly edges: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelBlocksEdgesAttributeVertexAttributeParams, - ModelBlocksEdgesAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["width"] & - TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["visibility"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["color"] & - TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["width"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["visibility"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["edges"]["color"] & TypedSchema; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelBlocksPointsAttributeVertexAttributeParams, - ModelBlocksPointsAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["visibility"] & - TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["size"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["visibility"] & TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["size"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["points"]["color"] & TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["visibility"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["visibility"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["blocks"]["color"] & TypedSchema; }; readonly corners: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelCornersAttributeVertexAttributeParams, - ModelCornersAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["visibility"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["visibility"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["corners"]["color"] & TypedSchema; }; readonly edges: { - readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["width"] & - TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["visibility"] & - TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["width"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["edges"]["visibility"] & TypedSchema; }; readonly lines: { readonly attribute: { readonly edge: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["edge"]["attribute"] & - TypedSchema< - ModelLinesAttributeEdgeAttributeParams, - ModelLinesAttributeEdgeAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["edge"]["attribute"] & TypedSchema; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelLinesAttributeVertexAttributeParams, - ModelLinesAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelLinesPointsAttributeVertexAttributeParams, - ModelLinesPointsAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["visibility"] & - TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["size"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["visibility"] & TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["size"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["points"]["color"] & TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["visibility"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["visibility"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["lines"]["color"] & TypedSchema; }; readonly points: { - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["visibility"] & - TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["size"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["visibility"] & TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["points"]["size"] & TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["visibility"] & - TypedSchema; - readonly register: (typeof json)["opengeodeweb_viewer"]["model"]["register"] & - TypedSchema; - readonly highlight: (typeof json)["opengeodeweb_viewer"]["model"]["highlight"] & - TypedSchema; - readonly get_blocks_bounds: (typeof json)["opengeodeweb_viewer"]["model"]["get_blocks_bounds"] & - TypedSchema; - readonly deregister: (typeof json)["opengeodeweb_viewer"]["model"]["deregister"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["visibility"] & TypedSchema; + readonly register: (typeof json)["opengeodeweb_viewer"]["model"]["register"] & TypedSchema; + readonly highlight: (typeof json)["opengeodeweb_viewer"]["model"]["highlight"] & TypedSchema; + readonly get_blocks_bounds: (typeof json)["opengeodeweb_viewer"]["model"]["get_blocks_bounds"] & TypedSchema; + readonly deregister: (typeof json)["opengeodeweb_viewer"]["model"]["deregister"] & TypedSchema; readonly surfaces: { readonly attribute: { readonly polygon: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["polygon"]["attribute"] & - TypedSchema< - ModelSurfacesAttributePolygonAttributeParams, - ModelSurfacesAttributePolygonAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["polygon"]["attribute"] & TypedSchema; }; readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelSurfacesAttributeVertexAttributeParams, - ModelSurfacesAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; readonly edges: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelSurfacesEdgesAttributeVertexAttributeParams, - ModelSurfacesEdgesAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["width"] & - TypedSchema; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["visibility"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["color"] & - TypedSchema; + readonly width: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["width"] & TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["visibility"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["edges"]["color"] & TypedSchema; }; readonly points: { readonly attribute: { readonly vertex: { - readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["attribute"]["vertex"]["attribute"] & - TypedSchema< - ModelSurfacesPointsAttributeVertexAttributeParams, - ModelSurfacesPointsAttributeVertexAttributeResponse - >; + readonly attribute: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["attribute"]["vertex"]["attribute"] & TypedSchema; }; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["visibility"] & - TypedSchema; - readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["size"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["color"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["visibility"] & TypedSchema; + readonly size: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["size"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["points"]["color"] & TypedSchema; }; - readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["visibility"] & - TypedSchema; - readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["color"] & - TypedSchema; - readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["apply_textures"] & - TypedSchema; + readonly visibility: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["visibility"] & TypedSchema; + readonly color: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["color"] & TypedSchema; + readonly apply_textures: (typeof json)["opengeodeweb_viewer"]["model"]["surfaces"]["apply_textures"] & TypedSchema; }; }; - readonly rendering_warnings: (typeof json)["opengeodeweb_viewer"]["rendering_warnings"] & - TypedSchema; - readonly release_database: (typeof json)["opengeodeweb_viewer"]["release_database"] & - TypedSchema; - readonly kill: (typeof json)["opengeodeweb_viewer"]["kill"] & - TypedSchema; - readonly import_project: (typeof json)["opengeodeweb_viewer"]["import_project"] & - TypedSchema; + readonly rendering_warnings: (typeof json)["opengeodeweb_viewer"]["rendering_warnings"] & TypedSchema; + readonly release_database: (typeof json)["opengeodeweb_viewer"]["release_database"] & TypedSchema; + readonly kill: (typeof json)["opengeodeweb_viewer"]["kill"] & TypedSchema; + readonly import_project: (typeof json)["opengeodeweb_viewer"]["import_project"] & TypedSchema; readonly viewer: { - readonly update_data: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_data"] & - TypedSchema; - readonly update_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_camera"] & - TypedSchema; - readonly threshold: (typeof json)["opengeodeweb_viewer"]["viewer"]["threshold"] & - TypedSchema; - readonly take_screenshot: (typeof json)["opengeodeweb_viewer"]["viewer"]["take_screenshot"] & - TypedSchema; - readonly slice: (typeof json)["opengeodeweb_viewer"]["viewer"]["slice"] & - TypedSchema; - readonly shrink: (typeof json)["opengeodeweb_viewer"]["viewer"]["shrink"] & - TypedSchema; - readonly set_z_scaling: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_z_scaling"] & - TypedSchema; - readonly set_text_style: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_text_style"] & - TypedSchema; - readonly set_orientation_widget: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_orientation_widget"] & - TypedSchema; - readonly set_background_color: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_background_color"] & - TypedSchema; - readonly ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["ruler"] & - TypedSchema; - readonly reset_visualization: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_visualization"] & - TypedSchema; - readonly reset_ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_ruler"] & - TypedSchema; - readonly reset_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_camera"] & - TypedSchema; - readonly render: (typeof json)["opengeodeweb_viewer"]["viewer"]["render"] & - TypedSchema; - readonly remove_from_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["remove_from_scene"] & - TypedSchema; - readonly preview_points: (typeof json)["opengeodeweb_viewer"]["viewer"]["preview_points"] & - TypedSchema; - readonly picked_ids: (typeof json)["opengeodeweb_viewer"]["viewer"]["picked_ids"] & - TypedSchema; - readonly pick_colormap: (typeof json)["opengeodeweb_viewer"]["viewer"]["pick_colormap"] & - TypedSchema; - readonly highlight: (typeof json)["opengeodeweb_viewer"]["viewer"]["highlight"] & - TypedSchema; - readonly grid_scale: (typeof json)["opengeodeweb_viewer"]["viewer"]["grid_scale"] & - TypedSchema; - readonly get_point_position: (typeof json)["opengeodeweb_viewer"]["viewer"]["get_point_position"] & - TypedSchema; - readonly explode: (typeof json)["opengeodeweb_viewer"]["viewer"]["explode"] & - TypedSchema; - readonly delete_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["delete_scene"] & - TypedSchema; - readonly create_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["create_scene"] & - TypedSchema; - readonly clipping_planes: (typeof json)["opengeodeweb_viewer"]["viewer"]["clipping_planes"] & - TypedSchema; - readonly axes: (typeof json)["opengeodeweb_viewer"]["viewer"]["axes"] & - TypedSchema; - readonly add_to_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["add_to_scene"] & - TypedSchema; + readonly update_data: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_data"] & TypedSchema; + readonly update_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["update_camera"] & TypedSchema; + readonly threshold: (typeof json)["opengeodeweb_viewer"]["viewer"]["threshold"] & TypedSchema; + readonly take_screenshot: (typeof json)["opengeodeweb_viewer"]["viewer"]["take_screenshot"] & TypedSchema; + readonly slice: (typeof json)["opengeodeweb_viewer"]["viewer"]["slice"] & TypedSchema; + readonly shrink: (typeof json)["opengeodeweb_viewer"]["viewer"]["shrink"] & TypedSchema; + readonly set_z_scaling: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_z_scaling"] & TypedSchema; + readonly set_text_style: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_text_style"] & TypedSchema; + readonly set_orientation_widget: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_orientation_widget"] & TypedSchema; + readonly set_background_color: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_background_color"] & TypedSchema; + readonly ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["ruler"] & TypedSchema; + readonly reset_visualization: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_visualization"] & TypedSchema; + readonly reset_ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_ruler"] & TypedSchema; + readonly reset_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_camera"] & TypedSchema; + readonly render: (typeof json)["opengeodeweb_viewer"]["viewer"]["render"] & TypedSchema; + readonly remove_from_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["remove_from_scene"] & TypedSchema; + readonly preview_points: (typeof json)["opengeodeweb_viewer"]["viewer"]["preview_points"] & TypedSchema; + readonly picked_ids: (typeof json)["opengeodeweb_viewer"]["viewer"]["picked_ids"] & TypedSchema; + readonly pick_colormap: (typeof json)["opengeodeweb_viewer"]["viewer"]["pick_colormap"] & TypedSchema; + readonly highlight: (typeof json)["opengeodeweb_viewer"]["viewer"]["highlight"] & TypedSchema; + readonly grid_scale: (typeof json)["opengeodeweb_viewer"]["viewer"]["grid_scale"] & TypedSchema; + readonly get_point_position: (typeof json)["opengeodeweb_viewer"]["viewer"]["get_point_position"] & TypedSchema; + readonly explode: (typeof json)["opengeodeweb_viewer"]["viewer"]["explode"] & TypedSchema; + readonly delete_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["delete_scene"] & TypedSchema; + readonly create_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["create_scene"] & TypedSchema; + readonly clipping_planes: (typeof json)["opengeodeweb_viewer"]["viewer"]["clipping_planes"] & TypedSchema; + readonly axes: (typeof json)["opengeodeweb_viewer"]["viewer"]["axes"] & TypedSchema; + readonly add_to_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["add_to_scene"] & TypedSchema; }; }; } diff --git a/requirements.txt b/requirements.txt index 64bd7093..0e8e27eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -61,4 +61,3 @@ wslink==2.6.0 yarl==1.* # via aiohttp -opengeodeweb-microservice==1.*,>=1.5.0 diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py index 7de5145f..85204f9b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py @@ -1,12 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py index f7e0988d..dd8ff179 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py @@ -1,12 +1,4 @@ -from opengeodeweb_viewer.schema_types import ( - AttributeItem, - AttributeName, - AttributeRangeMaximum, - AttributeRangeMinimum, - BlockIds, - ColorMapPoints, - ColorRGBA, -) +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema From b1251c811a2d70f92c16952259f93b82bfed9856 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Mon, 30 Nov 2026 14:40:10 +0100 Subject: [PATCH 07/22] feat(multiScenes): add Scene and SceneObject From 5c7b00873e432f7498eb1b5a07e9d4c26b86362e Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Mon, 30 Nov 2026 15:41:43 +0100 Subject: [PATCH 08/22] feat(viewer): reset every scene reset_scenes (no params) disposes every scene, as delete_scene does, and keeps the data pipelines in the db. A front that connects again, after a reload or to a viewer that outlived it, starts from no scene and creates scene_1 without a conflict. Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 14 +++++++++ opengeodeweb_viewer_typed_schemas.d.ts | 7 +++++ .../rpc/viewer/schemas/__init__.py | 1 + .../rpc/viewer/schemas/reset_scenes.json | 13 ++++++++ .../rpc/viewer/schemas/reset_scenes.py | 30 +++++++++++++++++++ .../rpc/viewer/viewer_protocols.py | 9 ++++++ tests/test_viewer_protocols.py | 8 +++++ 7 files changed, 82 insertions(+) create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.json create mode 100644 src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.py diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index 783e9d7b..b0e59227 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -6026,6 +6026,20 @@ "additionalProperties": false } }, + "reset_scenes": { + "$id": "opengeodeweb_viewer.viewer.reset_scenes", + "rpc": "reset_scenes", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } + }, "reset_ruler": { "$id": "opengeodeweb_viewer.viewer.reset_ruler", "rpc": "reset_ruler", diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index eab5fb9a..5030f615 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -1145,6 +1145,12 @@ export interface ViewerResetVisualizationParams { export interface ViewerResetVisualizationResponse { } +export interface ViewerResetScenesParams { +} + +export interface ViewerResetScenesResponse { +} + export interface ViewerResetRulerParams { scene_id: string; } @@ -1533,6 +1539,7 @@ export interface Schemas { readonly set_background_color: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_background_color"] & TypedSchema; readonly ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["ruler"] & TypedSchema; readonly reset_visualization: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_visualization"] & TypedSchema; + readonly reset_scenes: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_scenes"] & TypedSchema; readonly reset_ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_ruler"] & TypedSchema; readonly reset_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_camera"] & TypedSchema; readonly render: (typeof json)["opengeodeweb_viewer"]["viewer"]["render"] & TypedSchema; diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py index 312f545a..f954bebf 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py @@ -10,6 +10,7 @@ from .set_background_color import * from .ruler import * from .reset_visualization import * +from .reset_scenes import * from .reset_ruler import * from .reset_camera import * from .render import * diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.json new file mode 100644 index 00000000..1441a869 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.json @@ -0,0 +1,13 @@ +{ + "rpc": "reset_scenes", + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false, + "response": { + "type": "object", + "properties": {}, + "required": [], + "additionalProperties": false + } +} diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.py new file mode 100644 index 00000000..7b361aa7 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.py @@ -0,0 +1,30 @@ +from pathlib import Path +from opengeodeweb_microservice.schemas import Route, load_schema +from dataclasses_json import DataClassJsonMixin +from opengeodeweb_microservice.schemas import print_dataclass +from dataclasses import dataclass + + +@dataclass +class ResetScenes(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + pass + + +@dataclass +class ResetScenesResponse(DataClassJsonMixin): + def __post_init__(self) -> None: + print_dataclass(self) + + pass + + +reset_scenes_route = Route( + schema=load_schema(Path(__file__)), + params=ResetScenes, + response=ResetScenesResponse, +) + +__all__ = ["ResetScenes", "ResetScenesResponse", "reset_scenes_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index 1ac8b3fa..55e0cc29 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -75,6 +75,15 @@ def delete_scene(self, params: schemas.DeleteScene) -> schemas.DeleteSceneRespon del self.get_scenes()[params.scene_id] return schemas.DeleteSceneResponse() + @typed_rpc(viewer_prefix, schemas.reset_scenes_route) + def reset_scenes(self, _params: schemas.ResetScenes) -> schemas.ResetScenesResponse: + # A front that connects again starts from no scene: the data pipelines stay in the db + scenes = self.get_scenes() + for scene in scenes.values(): + scene.dispose() + scenes.clear() + return schemas.ResetScenesResponse() + @typed_rpc(viewer_prefix, schemas.add_to_scene_route) def add_to_scene(self, params: schemas.AddToScene) -> schemas.AddToSceneResponse: self.add_object(self.get_scene(params.scene_id), params.id) diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index 684249c0..9c726646 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -787,6 +787,14 @@ def test_delete_scene(server: ServerMonitor, dataset_factory: Callable[..., str] assert "error" in response +def test_reset_scenes(server: ServerMonitor) -> None: + server.create_scene() + server.create_scene("scene_2") + scene_rpc(server, "reset_scenes", {}) + response = scene_rpc(server, "create_scene", {"scene_id": "scene_1"}) + assert "error" not in response + + def test_update_camera_only_moves_its_scene( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: From d59ea2b6544118348b2cc1772c36954a27f50aa5 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Tue, 1 Dec 2026 09:54:15 +0100 Subject: [PATCH 09/22] feat(schemas): share the SceneId type Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 102 +++++++++ opengeodeweb_viewer_typed_schemas.d.ts | 206 +++++++++--------- .../rpc/image/schemas/opacity.json | 3 +- .../rpc/image/schemas/opacity.py | 4 +- .../rpc/image/schemas/visibility.json | 3 +- .../rpc/image/schemas/visibility.py | 4 +- .../attribute/cell/schemas/attribute.json | 3 +- .../cells/attribute/cell/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/cells/schemas/color.json | 3 +- .../rpc/mesh/cells/schemas/color.py | 4 +- .../rpc/mesh/cells/schemas/opacity.json | 3 +- .../rpc/mesh/cells/schemas/opacity.py | 4 +- .../rpc/mesh/cells/schemas/visibility.json | 3 +- .../rpc/mesh/cells/schemas/visibility.py | 4 +- .../attribute/edge/schemas/attribute.json | 3 +- .../edges/attribute/edge/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/edges/schemas/color.json | 3 +- .../rpc/mesh/edges/schemas/color.py | 4 +- .../rpc/mesh/edges/schemas/opacity.json | 3 +- .../rpc/mesh/edges/schemas/opacity.py | 4 +- .../rpc/mesh/edges/schemas/visibility.json | 3 +- .../rpc/mesh/edges/schemas/visibility.py | 4 +- .../rpc/mesh/edges/schemas/width.json | 3 +- .../rpc/mesh/edges/schemas/width.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/points/schemas/color.json | 3 +- .../rpc/mesh/points/schemas/color.py | 4 +- .../rpc/mesh/points/schemas/opacity.json | 3 +- .../rpc/mesh/points/schemas/opacity.py | 4 +- .../rpc/mesh/points/schemas/size.json | 3 +- .../rpc/mesh/points/schemas/size.py | 4 +- .../rpc/mesh/points/schemas/visibility.json | 3 +- .../rpc/mesh/points/schemas/visibility.py | 4 +- .../attribute/polygon/schemas/attribute.json | 3 +- .../attribute/polygon/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/polygons/schemas/color.json | 3 +- .../rpc/mesh/polygons/schemas/color.py | 4 +- .../rpc/mesh/polygons/schemas/opacity.json | 3 +- .../rpc/mesh/polygons/schemas/opacity.py | 4 +- .../rpc/mesh/polygons/schemas/visibility.json | 3 +- .../rpc/mesh/polygons/schemas/visibility.py | 4 +- .../polyhedron/schemas/attribute.json | 3 +- .../attribute/polyhedron/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/polyhedra/schemas/color.json | 3 +- .../rpc/mesh/polyhedra/schemas/color.py | 4 +- .../rpc/mesh/polyhedra/schemas/opacity.json | 3 +- .../rpc/mesh/polyhedra/schemas/opacity.py | 4 +- .../mesh/polyhedra/schemas/visibility.json | 3 +- .../rpc/mesh/polyhedra/schemas/visibility.py | 4 +- .../rpc/mesh/schemas/apply_textures.json | 3 +- .../rpc/mesh/schemas/apply_textures.py | 3 +- .../rpc/mesh/schemas/color.json | 3 +- .../rpc/mesh/schemas/color.py | 4 +- .../rpc/mesh/schemas/highlight.json | 3 +- .../rpc/mesh/schemas/highlight.py | 4 +- .../rpc/mesh/schemas/visibility.json | 3 +- .../rpc/mesh/schemas/visibility.py | 4 +- .../polyhedron/schemas/attribute.json | 3 +- .../attribute/polyhedron/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/model/blocks/edges/schemas/color.json | 3 +- .../rpc/model/blocks/edges/schemas/color.py | 4 +- .../blocks/edges/schemas/visibility.json | 3 +- .../model/blocks/edges/schemas/visibility.py | 4 +- .../rpc/model/blocks/edges/schemas/width.json | 3 +- .../rpc/model/blocks/edges/schemas/width.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../model/blocks/points/schemas/color.json | 3 +- .../rpc/model/blocks/points/schemas/color.py | 4 +- .../rpc/model/blocks/points/schemas/size.json | 3 +- .../rpc/model/blocks/points/schemas/size.py | 4 +- .../blocks/points/schemas/visibility.json | 3 +- .../model/blocks/points/schemas/visibility.py | 4 +- .../rpc/model/blocks/schemas/color.json | 3 +- .../rpc/model/blocks/schemas/color.py | 4 +- .../rpc/model/blocks/schemas/visibility.json | 3 +- .../rpc/model/blocks/schemas/visibility.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/model/corners/schemas/color.json | 3 +- .../rpc/model/corners/schemas/color.py | 4 +- .../rpc/model/corners/schemas/visibility.json | 3 +- .../rpc/model/corners/schemas/visibility.py | 4 +- .../rpc/model/edges/schemas/visibility.json | 3 +- .../rpc/model/edges/schemas/visibility.py | 4 +- .../rpc/model/edges/schemas/width.json | 3 +- .../rpc/model/edges/schemas/width.py | 4 +- .../attribute/edge/schemas/attribute.json | 3 +- .../lines/attribute/edge/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/model/lines/points/schemas/color.json | 3 +- .../rpc/model/lines/points/schemas/color.py | 4 +- .../rpc/model/lines/points/schemas/size.json | 3 +- .../rpc/model/lines/points/schemas/size.py | 4 +- .../lines/points/schemas/visibility.json | 3 +- .../model/lines/points/schemas/visibility.py | 4 +- .../rpc/model/lines/schemas/color.json | 3 +- .../rpc/model/lines/schemas/color.py | 4 +- .../rpc/model/lines/schemas/visibility.json | 3 +- .../rpc/model/lines/schemas/visibility.py | 4 +- .../rpc/model/points/schemas/size.json | 3 +- .../rpc/model/points/schemas/size.py | 4 +- .../rpc/model/points/schemas/visibility.json | 3 +- .../rpc/model/points/schemas/visibility.py | 4 +- .../rpc/model/schemas/highlight.json | 3 +- .../rpc/model/schemas/highlight.py | 4 +- .../rpc/model/schemas/visibility.json | 3 +- .../rpc/model/schemas/visibility.py | 4 +- .../attribute/polygon/schemas/attribute.json | 3 +- .../attribute/polygon/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../model/surfaces/edges/schemas/color.json | 3 +- .../rpc/model/surfaces/edges/schemas/color.py | 4 +- .../surfaces/edges/schemas/visibility.json | 3 +- .../surfaces/edges/schemas/visibility.py | 4 +- .../model/surfaces/edges/schemas/width.json | 3 +- .../rpc/model/surfaces/edges/schemas/width.py | 4 +- .../attribute/vertex/schemas/attribute.json | 3 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../model/surfaces/points/schemas/color.json | 3 +- .../model/surfaces/points/schemas/color.py | 4 +- .../model/surfaces/points/schemas/size.json | 3 +- .../rpc/model/surfaces/points/schemas/size.py | 4 +- .../surfaces/points/schemas/visibility.json | 3 +- .../surfaces/points/schemas/visibility.py | 4 +- .../surfaces/schemas/apply_textures.json | 3 +- .../model/surfaces/schemas/apply_textures.py | 3 +- .../rpc/model/surfaces/schemas/color.json | 3 +- .../rpc/model/surfaces/schemas/color.py | 4 +- .../model/surfaces/schemas/visibility.json | 3 +- .../rpc/model/surfaces/schemas/visibility.py | 4 +- .../rpc/viewer/schemas/add_to_scene.json | 2 +- .../rpc/viewer/schemas/add_to_scene.py | 3 +- .../rpc/viewer/schemas/axes.json | 3 +- .../rpc/viewer/schemas/axes.py | 4 +- .../rpc/viewer/schemas/clipping_planes.json | 3 +- .../rpc/viewer/schemas/clipping_planes.py | 4 +- .../rpc/viewer/schemas/create_scene.json | 2 +- .../rpc/viewer/schemas/create_scene.py | 3 +- .../rpc/viewer/schemas/delete_scene.json | 2 +- .../rpc/viewer/schemas/delete_scene.py | 3 +- .../rpc/viewer/schemas/explode.json | 3 +- .../rpc/viewer/schemas/explode.py | 3 +- .../viewer/schemas/get_point_position.json | 3 +- .../rpc/viewer/schemas/get_point_position.py | 3 +- .../rpc/viewer/schemas/grid_scale.json | 3 +- .../rpc/viewer/schemas/grid_scale.py | 4 +- .../rpc/viewer/schemas/highlight.json | 3 +- .../rpc/viewer/schemas/highlight.py | 3 +- .../rpc/viewer/schemas/pick_colormap.json | 3 +- .../rpc/viewer/schemas/pick_colormap.py | 4 +- .../rpc/viewer/schemas/picked_ids.json | 3 +- .../rpc/viewer/schemas/picked_ids.py | 4 +- .../rpc/viewer/schemas/preview_points.json | 3 +- .../rpc/viewer/schemas/preview_points.py | 4 +- .../rpc/viewer/schemas/remove_from_scene.json | 2 +- .../rpc/viewer/schemas/remove_from_scene.py | 3 +- .../rpc/viewer/schemas/render.json | 3 +- .../rpc/viewer/schemas/render.py | 3 +- .../rpc/viewer/schemas/reset_camera.json | 3 +- .../rpc/viewer/schemas/reset_camera.py | 3 +- .../rpc/viewer/schemas/reset_ruler.json | 3 +- .../rpc/viewer/schemas/reset_ruler.py | 3 +- .../viewer/schemas/reset_visualization.json | 3 +- .../rpc/viewer/schemas/reset_visualization.py | 3 +- .../rpc/viewer/schemas/ruler.json | 3 +- .../rpc/viewer/schemas/ruler.py | 3 +- .../viewer/schemas/set_background_color.json | 3 +- .../viewer/schemas/set_background_color.py | 4 +- .../schemas/set_orientation_widget.json | 3 +- .../viewer/schemas/set_orientation_widget.py | 3 +- .../rpc/viewer/schemas/set_text_style.json | 3 +- .../rpc/viewer/schemas/set_text_style.py | 4 +- .../rpc/viewer/schemas/set_z_scaling.json | 3 +- .../rpc/viewer/schemas/set_z_scaling.py | 3 +- .../rpc/viewer/schemas/shrink.json | 3 +- .../rpc/viewer/schemas/shrink.py | 3 +- .../rpc/viewer/schemas/slice.json | 3 +- .../rpc/viewer/schemas/slice.py | 3 +- .../rpc/viewer/schemas/take_screenshot.json | 3 +- .../rpc/viewer/schemas/take_screenshot.py | 4 +- .../rpc/viewer/schemas/threshold.json | 3 +- .../rpc/viewer/schemas/threshold.py | 4 +- .../rpc/viewer/schemas/update_camera.json | 3 +- .../rpc/viewer/schemas/update_camera.py | 3 +- .../rpc/viewer/schemas/update_data.json | 3 +- .../rpc/viewer/schemas/update_data.py | 3 +- .../schema_definitions.json | 4 + src/opengeodeweb_viewer/schema_types.d.ts | 1 + src/opengeodeweb_viewer/schema_types.json | 4 + src/opengeodeweb_viewer/schema_types.py | 2 + 210 files changed, 522 insertions(+), 487 deletions(-) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index b0e59227..f052a227 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -59,6 +59,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -119,6 +120,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -182,6 +184,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -277,6 +280,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -372,6 +376,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -405,6 +410,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -440,6 +446,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -506,6 +513,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -601,6 +609,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -696,6 +705,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -729,6 +739,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -762,6 +773,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -797,6 +809,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -863,6 +876,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -958,6 +972,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1005,6 +1020,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1038,6 +1054,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1073,6 +1090,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1139,6 +1157,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1234,6 +1253,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1329,6 +1349,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1362,6 +1383,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1397,6 +1419,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1463,6 +1486,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1558,6 +1582,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1653,6 +1678,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1686,6 +1712,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1721,6 +1748,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1784,6 +1812,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1844,6 +1873,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -1900,6 +1930,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2047,6 +2078,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2202,6 +2234,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2307,6 +2340,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2415,6 +2449,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2520,6 +2555,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2563,6 +2599,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2606,6 +2643,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2682,6 +2720,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2787,6 +2826,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2830,6 +2870,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2873,6 +2914,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2946,6 +2988,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -2989,6 +3032,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3139,6 +3183,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3244,6 +3289,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3287,6 +3333,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3435,6 +3482,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3468,6 +3516,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3505,6 +3554,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3610,6 +3660,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3718,6 +3769,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3823,6 +3875,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3866,6 +3919,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3909,6 +3963,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -3982,6 +4037,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4025,6 +4081,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4173,6 +4230,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4206,6 +4264,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4240,6 +4299,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4300,6 +4360,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4409,6 +4470,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4514,6 +4576,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4622,6 +4685,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4727,6 +4791,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4770,6 +4835,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4813,6 +4879,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4889,6 +4956,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -4994,6 +5062,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5037,6 +5106,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5080,6 +5150,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5153,6 +5224,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5196,6 +5268,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5342,6 +5415,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5461,6 +5535,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5489,6 +5564,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5557,6 +5633,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5629,6 +5706,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5685,6 +5763,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5750,6 +5829,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5787,6 +5867,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5813,6 +5894,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5878,6 +5960,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5908,6 +5991,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -5957,6 +6041,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6011,6 +6096,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 } @@ -6046,6 +6132,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 } @@ -6067,6 +6154,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 } @@ -6088,6 +6176,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 } @@ -6109,6 +6198,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6137,6 +6227,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6195,6 +6286,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6251,6 +6343,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6290,6 +6383,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6375,6 +6469,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6401,6 +6496,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6444,6 +6540,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6511,6 +6608,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 } @@ -6532,6 +6630,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 } @@ -6559,6 +6658,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6653,6 +6753,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, @@ -6679,6 +6780,7 @@ "type": "object", "properties": { "scene_id": { + "title": "SceneId", "type": "string", "minLength": 1 }, diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 5030f615..31189f88 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -2,7 +2,7 @@ import type json from "./opengeodeweb_viewer_schemas.json"; import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; -import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, ViewerId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; +import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, SceneId, ViewerId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; export interface GenericRegisterParams { id: DataId; @@ -21,7 +21,7 @@ export interface GenericDeregisterResponse { export interface ImageVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -39,7 +39,7 @@ export interface ImageRegisterResponse { export interface ImageOpacityParams { id: DataId; opacity: Opacity; - scene_id: string; + scene_id: SceneId; } export interface ImageOpacityResponse { @@ -60,7 +60,7 @@ export interface MeshCellsAttributeCellAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } /** @@ -77,7 +77,7 @@ export interface MeshCellsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshCellsAttributeVertexAttributeResponse { @@ -85,7 +85,7 @@ export interface MeshCellsAttributeVertexAttributeResponse { export interface MeshCellsVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -95,7 +95,7 @@ export interface MeshCellsVisibilityResponse { export interface MeshCellsOpacityParams { id: DataId; opacity: Opacity; - scene_id: string; + scene_id: SceneId; } export interface MeshCellsOpacityResponse { @@ -104,7 +104,7 @@ export interface MeshCellsOpacityResponse { export interface MeshCellsColorParams { color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface MeshCellsColorResponse { @@ -118,7 +118,7 @@ export interface MeshEdgesAttributeEdgeAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshEdgesAttributeEdgeAttributeResponse { @@ -132,7 +132,7 @@ export interface MeshEdgesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshEdgesAttributeVertexAttributeResponse { @@ -140,7 +140,7 @@ export interface MeshEdgesAttributeVertexAttributeResponse { export interface MeshEdgesWidthParams { id: DataId; - scene_id: string; + scene_id: SceneId; width: EdgeWidth; } @@ -149,7 +149,7 @@ export interface MeshEdgesWidthResponse { export interface MeshEdgesVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -159,7 +159,7 @@ export interface MeshEdgesVisibilityResponse { export interface MeshEdgesOpacityParams { id: DataId; opacity: Opacity; - scene_id: string; + scene_id: SceneId; } export interface MeshEdgesOpacityResponse { @@ -168,7 +168,7 @@ export interface MeshEdgesOpacityResponse { export interface MeshEdgesColorParams { color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface MeshEdgesColorResponse { @@ -182,7 +182,7 @@ export interface MeshPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshPointsAttributeVertexAttributeResponse { @@ -190,7 +190,7 @@ export interface MeshPointsAttributeVertexAttributeResponse { export interface MeshPointsVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -201,7 +201,7 @@ export interface MeshPointsVisibilityResponse { export interface MeshPointsSizeParams { id: DataId; - scene_id: string; + scene_id: SceneId; size: PointSize; } @@ -211,7 +211,7 @@ export interface MeshPointsSizeResponse { export interface MeshPointsOpacityParams { id: DataId; opacity: Opacity; - scene_id: string; + scene_id: SceneId; } export interface MeshPointsOpacityResponse { @@ -220,7 +220,7 @@ export interface MeshPointsOpacityResponse { export interface MeshPointsColorParams { color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface MeshPointsColorResponse { @@ -234,7 +234,7 @@ export interface MeshPolygonsAttributePolygonAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshPolygonsAttributePolygonAttributeResponse { @@ -248,7 +248,7 @@ export interface MeshPolygonsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshPolygonsAttributeVertexAttributeResponse { @@ -256,7 +256,7 @@ export interface MeshPolygonsAttributeVertexAttributeResponse { export interface MeshPolygonsVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -266,7 +266,7 @@ export interface MeshPolygonsVisibilityResponse { export interface MeshPolygonsOpacityParams { id: DataId; opacity: Opacity; - scene_id: string; + scene_id: SceneId; } export interface MeshPolygonsOpacityResponse { @@ -275,7 +275,7 @@ export interface MeshPolygonsOpacityResponse { export interface MeshPolygonsColorParams { color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface MeshPolygonsColorResponse { @@ -289,7 +289,7 @@ export interface MeshPolyhedraAttributePolyhedronAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshPolyhedraAttributePolyhedronAttributeResponse { @@ -303,7 +303,7 @@ export interface MeshPolyhedraAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface MeshPolyhedraAttributeVertexAttributeResponse { @@ -311,7 +311,7 @@ export interface MeshPolyhedraAttributeVertexAttributeResponse { export interface MeshPolyhedraVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -321,7 +321,7 @@ export interface MeshPolyhedraVisibilityResponse { export interface MeshPolyhedraOpacityParams { id: DataId; opacity: Opacity; - scene_id: string; + scene_id: SceneId; } export interface MeshPolyhedraOpacityResponse { @@ -330,7 +330,7 @@ export interface MeshPolyhedraOpacityResponse { export interface MeshPolyhedraColorParams { color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface MeshPolyhedraColorResponse { @@ -338,7 +338,7 @@ export interface MeshPolyhedraColorResponse { export interface MeshVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -355,7 +355,7 @@ export interface MeshRegisterResponse { export interface MeshHighlightParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -372,7 +372,7 @@ export interface MeshDeregisterResponse { export interface MeshColorParams { color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface MeshColorResponse { @@ -403,7 +403,7 @@ export interface MeshBasemapDrapeResponse { export interface MeshApplyTexturesParams { id: DataId; - scene_id: string; + scene_id: SceneId; textures: MeshApplyTexturesParamsTexture[]; } @@ -448,7 +448,7 @@ export interface ModelBlocksAttributePolyhedronAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelBlocksAttributePolyhedronAttributeResponse { @@ -463,7 +463,7 @@ export interface ModelBlocksAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelBlocksAttributeVertexAttributeResponse { @@ -478,7 +478,7 @@ export interface ModelBlocksEdgesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelBlocksEdgesAttributeVertexAttributeResponse { @@ -487,7 +487,7 @@ export interface ModelBlocksEdgesAttributeVertexAttributeResponse { export interface ModelBlocksEdgesWidthParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; width: EdgeWidth; } @@ -497,7 +497,7 @@ export interface ModelBlocksEdgesWidthResponse { export interface ModelBlocksEdgesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -508,7 +508,7 @@ export interface ModelBlocksEdgesColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelBlocksEdgesColorResponse { @@ -523,7 +523,7 @@ export interface ModelBlocksPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelBlocksPointsAttributeVertexAttributeResponse { @@ -532,7 +532,7 @@ export interface ModelBlocksPointsAttributeVertexAttributeResponse { export interface ModelBlocksPointsVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -542,7 +542,7 @@ export interface ModelBlocksPointsVisibilityResponse { export interface ModelBlocksPointsSizeParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; size: PointSize; } @@ -553,7 +553,7 @@ export interface ModelBlocksPointsColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelBlocksPointsColorResponse { @@ -562,7 +562,7 @@ export interface ModelBlocksPointsColorResponse { export interface ModelBlocksVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -575,7 +575,7 @@ export interface ModelBlocksColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: string; + scene_id: SceneId; } export type ColorMode = "constant" | "random"; @@ -599,7 +599,7 @@ export interface ModelCornersAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelCornersAttributeVertexAttributeResponse { @@ -608,7 +608,7 @@ export interface ModelCornersAttributeVertexAttributeResponse { export interface ModelCornersVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -621,7 +621,7 @@ export interface ModelCornersColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelCornersColorResponse { @@ -636,7 +636,7 @@ export interface ModelCornersColorResponseColor { export interface ModelEdgesWidthParams { id: DataId; - scene_id: string; + scene_id: SceneId; width: EdgeWidth; } @@ -645,7 +645,7 @@ export interface ModelEdgesWidthResponse { export interface ModelEdgesVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -661,7 +661,7 @@ export interface ModelLinesAttributeEdgeAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelLinesAttributeEdgeAttributeResponse { @@ -676,7 +676,7 @@ export interface ModelLinesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelLinesAttributeVertexAttributeResponse { @@ -691,7 +691,7 @@ export interface ModelLinesPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelLinesPointsAttributeVertexAttributeResponse { @@ -700,7 +700,7 @@ export interface ModelLinesPointsAttributeVertexAttributeResponse { export interface ModelLinesPointsVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -710,7 +710,7 @@ export interface ModelLinesPointsVisibilityResponse { export interface ModelLinesPointsSizeParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; size: PointSize; } @@ -721,7 +721,7 @@ export interface ModelLinesPointsColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelLinesPointsColorResponse { @@ -730,7 +730,7 @@ export interface ModelLinesPointsColorResponse { export interface ModelLinesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -743,7 +743,7 @@ export interface ModelLinesColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelLinesColorResponse { @@ -758,7 +758,7 @@ export interface ModelLinesColorResponseColor { export interface ModelPointsVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -767,7 +767,7 @@ export interface ModelPointsVisibilityResponse { export interface ModelPointsSizeParams { id: DataId; - scene_id: string; + scene_id: SceneId; size: PointSize; } @@ -776,7 +776,7 @@ export interface ModelPointsSizeResponse { export interface ModelVisibilityParams { id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -794,7 +794,7 @@ export interface ModelRegisterResponse { export interface ModelHighlightParams { block_ids: ViewerId[]; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -826,7 +826,7 @@ export interface ModelSurfacesAttributePolygonAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelSurfacesAttributePolygonAttributeResponse { @@ -841,7 +841,7 @@ export interface ModelSurfacesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelSurfacesAttributeVertexAttributeResponse { @@ -856,7 +856,7 @@ export interface ModelSurfacesEdgesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { @@ -865,7 +865,7 @@ export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { export interface ModelSurfacesEdgesWidthParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; width: EdgeWidth; } @@ -875,7 +875,7 @@ export interface ModelSurfacesEdgesWidthResponse { export interface ModelSurfacesEdgesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -886,7 +886,7 @@ export interface ModelSurfacesEdgesColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelSurfacesEdgesColorResponse { @@ -901,7 +901,7 @@ export interface ModelSurfacesPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: string; + scene_id: SceneId; } export interface ModelSurfacesPointsAttributeVertexAttributeResponse { @@ -910,7 +910,7 @@ export interface ModelSurfacesPointsAttributeVertexAttributeResponse { export interface ModelSurfacesPointsVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -920,7 +920,7 @@ export interface ModelSurfacesPointsVisibilityResponse { export interface ModelSurfacesPointsSizeParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; size: PointSize; } @@ -931,7 +931,7 @@ export interface ModelSurfacesPointsColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelSurfacesPointsColorResponse { @@ -940,7 +940,7 @@ export interface ModelSurfacesPointsColorResponse { export interface ModelSurfacesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -953,7 +953,7 @@ export interface ModelSurfacesColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ModelSurfacesColorResponse { @@ -968,7 +968,7 @@ export interface ModelSurfacesColorResponseColor { export interface ModelSurfacesApplyTexturesParams { id: DataId; - scene_id: string; + scene_id: SceneId; textures: ModelSurfacesApplyTexturesParamsTexture[]; } @@ -1007,7 +1007,7 @@ export interface ImportProjectResponse { export interface ViewerUpdateDataParams { id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ViewerUpdateDataResponse { @@ -1015,7 +1015,7 @@ export interface ViewerUpdateDataResponse { export interface ViewerUpdateCameraParams { camera_options: CameraOptions; - scene_id: string; + scene_id: SceneId; [property: string]: any; } @@ -1034,7 +1034,7 @@ export interface ViewerUpdateCameraResponse { export interface ViewerThresholdParams { attributes: AttributeElement[]; ids: DataId[]; - scene_id: string; + scene_id: SceneId; } export interface AttributeElement { @@ -1055,7 +1055,7 @@ export interface ViewerTakeScreenshotParams { height?: number; include_background: boolean; output_extension: OutputExtension; - scene_id: string; + scene_id: SceneId; width?: number; } @@ -1067,7 +1067,7 @@ export interface ViewerTakeScreenshotResponse { export interface ViewerSliceParams { ids: DataId[]; - scene_id: string; + scene_id: SceneId; slices: Slice[]; } @@ -1082,7 +1082,7 @@ export interface ViewerSliceResponse { export interface ViewerShrinkParams { ids: DataId[]; - scene_id: string; + scene_id: SceneId; shrink_factor: number; } @@ -1090,7 +1090,7 @@ export interface ViewerShrinkResponse { } export interface ViewerSetZScalingParams { - scene_id: string; + scene_id: SceneId; z_scale: number; } @@ -1101,7 +1101,7 @@ export interface ViewerSetTextStyleParams { color: ColorRGB; font_family: FontFamily; opacity: Opacity; - scene_id: string; + scene_id: SceneId; } export type FontFamily = "arial" | "courier" | "times"; @@ -1111,7 +1111,7 @@ export interface ViewerSetTextStyleResponse { export interface ViewerSetOrientationWidgetParams { marker: Marker; - scene_id: string; + scene_id: SceneId; } export type Marker = "axes" | "compass" | "none"; @@ -1121,7 +1121,7 @@ export interface ViewerSetOrientationWidgetResponse { export interface ViewerSetBackgroundColorParams { color: ColorRGB; - scene_id: string; + scene_id: SceneId; } export interface ViewerSetBackgroundColorResponse { @@ -1129,7 +1129,7 @@ export interface ViewerSetBackgroundColorResponse { export interface ViewerRulerParams { points: Array; - scene_id: string; + scene_id: SceneId; } export interface ViewerRulerResponse { @@ -1139,7 +1139,7 @@ export interface ViewerRulerResponse { } export interface ViewerResetVisualizationParams { - scene_id: string; + scene_id: SceneId; } export interface ViewerResetVisualizationResponse { @@ -1152,21 +1152,21 @@ export interface ViewerResetScenesResponse { } export interface ViewerResetRulerParams { - scene_id: string; + scene_id: SceneId; } export interface ViewerResetRulerResponse { } export interface ViewerResetCameraParams { - scene_id: string; + scene_id: SceneId; } export interface ViewerResetCameraResponse { } export interface ViewerRenderParams { - scene_id: string; + scene_id: SceneId; } export interface ViewerRenderResponse { @@ -1174,7 +1174,7 @@ export interface ViewerRenderResponse { export interface ViewerRemoveFromSceneParams { id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ViewerRemoveFromSceneResponse { @@ -1183,7 +1183,7 @@ export interface ViewerRemoveFromSceneResponse { export interface ViewerPreviewPointsParams { closed?: boolean; points: Point3D[]; - scene_id: string; + scene_id: SceneId; style: Style; } @@ -1194,7 +1194,7 @@ export interface ViewerPreviewPointsResponse { export interface ViewerPickedIDSParams { ids: DataId[]; - scene_id: string; + scene_id: SceneId; x: number; y: number; } @@ -1205,7 +1205,7 @@ export interface ViewerPickedIDSResponse { } export interface ViewerPickColormapParams { - scene_id: string; + scene_id: SceneId; x: number; y: number; [property: string]: any; @@ -1219,7 +1219,7 @@ export interface ViewerPickColormapResponse { export interface ViewerHighlightParams { field_type: PickedFieldType; ids: DataId[]; - scene_id: string; + scene_id: SceneId; x: number; y: number; } @@ -1235,7 +1235,7 @@ export interface ViewerHighlightResponse { } export interface ViewerGridScaleParams { - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -1243,7 +1243,7 @@ export interface ViewerGridScaleResponse { } export interface ViewerGetPointPositionParams { - scene_id: string; + scene_id: SceneId; x: number; y: number; } @@ -1253,7 +1253,7 @@ export type ViewerGetPointPositionResponse = Point3D; export interface ViewerExplodeParams { explode_factor: number; ids: DataId[]; - scene_id: string; + scene_id: SceneId; } export interface ViewerExplodeResponse { @@ -1266,14 +1266,14 @@ export interface ExplodedBound { } export interface ViewerDeleteSceneParams { - scene_id: string; + scene_id: SceneId; } export interface ViewerDeleteSceneResponse { } export interface ViewerCreateSceneParams { - scene_id: string; + scene_id: SceneId; } export interface ViewerCreateSceneResponse { @@ -1283,7 +1283,7 @@ export interface ViewerCreateSceneResponse { export interface ViewerClippingPlanesParams { ids: DataId[]; planes: Plane[]; - scene_id: string; + scene_id: SceneId; } export interface Plane { @@ -1296,7 +1296,7 @@ export interface ViewerClippingPlanesResponse { } export interface ViewerAxesParams { - scene_id: string; + scene_id: SceneId; visibility: Visibility; } @@ -1305,7 +1305,7 @@ export interface ViewerAxesResponse { export interface ViewerAddToSceneParams { id: DataId; - scene_id: string; + scene_id: SceneId; } export interface ViewerAddToSceneResponse { diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json index 144acafb..456ea1d6 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py index fc989d04..57035b64 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json index 980dcd29..ed78d6a3 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py index d393b62e..42cfe374 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json index 144acafb..456ea1d6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py index fc989d04..57035b64 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json index 980dcd29..ed78d6a3 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py index d393b62e..42cfe374 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json index 144acafb..456ea1d6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py index fc989d04..57035b64 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json index 36e72ec6..7c7edd1f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py index 9042029b..0404515f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import EdgeWidth +from opengeodeweb_viewer.schema_types import EdgeWidth, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json index 980dcd29..ed78d6a3 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py index d393b62e..42cfe374 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json index 144acafb..456ea1d6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py index fc989d04..57035b64 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json index 00e3f1c9..204255ad 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py index 005af0df..1ce22bc6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import PointSize +from opengeodeweb_viewer.schema_types import PointSize, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json index 185e2a7a..02435f87 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py index 8c16d658..8bdec0ff 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json index 980dcd29..ed78d6a3 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py index d393b62e..42cfe374 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json index 144acafb..456ea1d6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py index fc989d04..57035b64 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json index c53628af..f2a05d5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py index 85204f9b..bfa86269 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json index 980dcd29..ed78d6a3 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py index d393b62e..42cfe374 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json index 144acafb..456ea1d6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py index fc989d04..57035b64 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json index 74acdcdd..a3e74c98 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py index c918d1b6..2880acd2 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -22,7 +23,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId textures: List[Texture] diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json index 980dcd29..ed78d6a3 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py index d393b62e..42cfe374 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json index f33f73e6..fc8b198f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py index 2d8bdc65..723c97fa 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility +from opengeodeweb_viewer.schema_types import SceneId, Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json index 470a5412..b3a02075 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py index d0bcb155..b163d73a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json index 2bbc41c2..39099e81 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py index 1c66bc84..9af342c2 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth +from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json index 470a5412..b3a02075 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py index d0bcb155..b163d73a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json index c8781d29..0f244110 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py index 037d1dcb..7cb38e1d 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, PointSize +from opengeodeweb_viewer.schema_types import BlockIds, PointSize, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json index 3ceebae6..b99d1814 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py index 91579462..78ac0673 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: str + scene_id: SceneId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json index 3ceebae6..b99d1814 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py index 91579462..78ac0673 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: str + scene_id: SceneId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json index 36e72ec6..7c7edd1f 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py index 9042029b..0404515f 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import EdgeWidth +from opengeodeweb_viewer.schema_types import EdgeWidth, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json index 470a5412..b3a02075 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py index d0bcb155..b163d73a 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json index c8781d29..0f244110 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py index 037d1dcb..7cb38e1d 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, PointSize +from opengeodeweb_viewer.schema_types import BlockIds, PointSize, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json index 3ceebae6..b99d1814 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py index 91579462..78ac0673 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: str + scene_id: SceneId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json index 00e3f1c9..204255ad 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py index 005af0df..1ce22bc6 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import PointSize +from opengeodeweb_viewer.schema_types import PointSize, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json index 6905f954..94656677 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py index 7c2ff87b..3445f097 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ViewerId, Visibility +from opengeodeweb_viewer.schema_types import SceneId, ViewerId, Visibility from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: List[ViewerId] id: DataId - scene_id: str + scene_id: SceneId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json index a2153d2d..7a2afb61 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py index a94e6110..b7bf5686 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json index 470a5412..b3a02075 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py index d0bcb155..b163d73a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json index 2bbc41c2..39099e81 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py index 1c66bc84..9af342c2 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth +from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json index 4d5584e0..2df73b10 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py index dd8ff179..3d7341bc 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: str + scene_id: SceneId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json index 470a5412..b3a02075 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py index d0bcb155..b163d73a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json index c8781d29..0f244110 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py index 037d1dcb..7cb38e1d 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, PointSize +from opengeodeweb_viewer.schema_types import BlockIds, PointSize, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId size: PointSize diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json index 9510f084..396d8e51 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py index ee291db4..03fedf7b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -22,7 +23,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId textures: List[Texture] diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json index 3ceebae6..b99d1814 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py index 91579462..78ac0673 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: str + scene_id: SceneId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json index 50a8769e..af2407e8 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py index 0c648ad9..43f9959e 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: str + scene_id: SceneId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json index 58bbb0b1..b2050d4e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json @@ -1,7 +1,7 @@ { "rpc": "add_to_scene", "type": "object", - "properties": {"scene_id": { "type": "string", "minLength": 1 }, "id": {"title": "DataId"}}, + "properties": {"scene_id": { "title": "SceneId" }, "id": {"title": "DataId"}}, "required": ["scene_id", "id"], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py index bf78ade8..82c22f56 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json index cbd82d12..a87dad4a 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "visibility": { "title": "Visibility" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py index 6754f83b..4c445053 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import Visibility +from opengeodeweb_viewer.schema_types import SceneId, Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class Axes(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json index 3727e73c..858a1f77 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "ids": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py index 556b1826..dbeb420d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA +from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -25,7 +25,7 @@ def __post_init__(self) -> None: ids: List[DataId] planes: List[Plane] - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json index 05bec578..40f9dad5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json @@ -1,7 +1,7 @@ { "rpc": "create_scene", "type": "object", - "properties": {"scene_id": { "type": "string", "minLength": 1 }}, + "properties": {"scene_id": { "title": "SceneId" }}, "required": ["scene_id"], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py index c682d176..f22ffc68 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class CreateScene(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json index 81a9498f..4aa9778c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json @@ -1,7 +1,7 @@ { "rpc": "delete_scene", "type": "object", - "properties": {"scene_id": { "type": "string", "minLength": 1 }}, + "properties": {"scene_id": { "title": "SceneId" }}, "required": ["scene_id"], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py index efbe1716..a87de98f 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class DeleteScene(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json index 114b4a92..15ec562d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "ids": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py index 59b9a9f1..55065bde 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +15,7 @@ def __post_init__(self) -> None: explode_factor: float ids: List[DataId] - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json index 5f42839d..40dfb5b6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "x": { "type": "integer" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py index 32210300..fd285c9a 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class GetPointPosition(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId x: int y: int diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json index e79e7b42..50773e98 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "visibility": { "title": "Visibility" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py index cf41dfd2..37350d50 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import Visibility +from opengeodeweb_viewer.schema_types import SceneId, Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class GridScale(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json index e3538b86..ec81a350 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "x": { "type": "number" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py index 7763703c..90708001 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId, GeodeId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Dict, List, Union, Optional @@ -21,7 +22,7 @@ def __post_init__(self) -> None: field_type: FieldType ids: List[DataId] - scene_id: str + scene_id: SceneId x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json index f632f03d..b3c790e8 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json @@ -4,8 +4,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "x": { "type": "number" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py index 87603569..b1389291 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ViewerId +from opengeodeweb_viewer.schema_types import SceneId, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -12,7 +12,7 @@ class PickColormap(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json index c14e7373..0a0ea0ae 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "x": { "type": "number" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index 982f8160..98d4ccd7 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ViewerId +from opengeodeweb_viewer.schema_types import SceneId, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -15,7 +15,7 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] - scene_id: str + scene_id: SceneId x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json index db8196ac..180527d0 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "points": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py index 805796a1..8b448678 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import Point3D +from opengeodeweb_viewer.schema_types import Point3D, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -20,7 +20,7 @@ def __post_init__(self) -> None: print_dataclass(self) points: List[Point3D] - scene_id: str + scene_id: SceneId style: Style closed: Optional[bool] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json index faefcb5e..8546846f 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json @@ -1,7 +1,7 @@ { "rpc": "remove_from_scene", "type": "object", - "properties": {"scene_id": { "type": "string", "minLength": 1 }, "id": {"title": "DataId"}}, + "properties": {"scene_id": { "title": "SceneId" }, "id": {"title": "DataId"}}, "required": ["scene_id", "id"], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py index ebc848cc..f43dce26 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json index c285dc9e..e2731fa5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py index f147642c..657c79ba 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class Render(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json index 7f1786d9..48307831 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py index 6ad616d9..34568015 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class ResetCamera(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json index c99a60c1..02cf5faf 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py index bf3a98a6..32e7304e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class ResetRuler(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json index ad6af7f6..f7422a16 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py index be3a181c..11d0274c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class ResetVisualization(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json index fe2c973e..be283703 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "points": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py index 605688d1..25270c18 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -13,7 +14,7 @@ def __post_init__(self) -> None: print_dataclass(self) points: List[List[float]] - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json index 64c14185..1f97e737 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "color": { "title": "ColorRGB" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py index 2915cfbd..5ef88769 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ColorRGB +from opengeodeweb_viewer.schema_types import ColorRGB, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -12,7 +12,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGB - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json index 9f5851da..1c2228a3 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "marker": { "type": "string", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py index 88e4a139..6692dc33 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -18,7 +19,7 @@ def __post_init__(self) -> None: print_dataclass(self) marker: Marker - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json index e8292104..07e28aab 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "color": { "title": "ColorRGB" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py index d8e070ba..e9b975e5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ColorRGB, Opacity +from opengeodeweb_viewer.schema_types import ColorRGB, Opacity, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: color: ColorRGB font_family: FontFamily opacity: Opacity - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json index e3554043..7fb9cb0e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "z_scale": { "type": "number", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py index 013da681..9363c466 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -10,7 +11,7 @@ class SetZScaling(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: str + scene_id: SceneId z_scale: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json index 977768f4..c711f259 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "ids": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py index 1bee6b18..e5e373ee 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +14,7 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] - scene_id: str + scene_id: SceneId shrink_factor: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json index 09cc08c6..660ec6cb 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "ids": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py index 4313c21e..35a40d14 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -22,7 +23,7 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] - scene_id: str + scene_id: SceneId slices: List[SliceElement] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json index 519870a3..5da09125 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "filename": { "title": "Filename" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py index ec65c316..015adddb 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import Filename +from opengeodeweb_viewer.schema_types import Filename, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Any @@ -22,7 +22,7 @@ def __post_init__(self) -> None: filename: Filename include_background: bool output_extension: OutputExtension - scene_id: str + scene_id: SceneId height: Optional[int] = None width: Optional[int] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json index 831f1592..b50711cf 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "ids": { "type": "array", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py index 238155c0..4a3ef4a2 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, SceneId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -33,7 +33,7 @@ def __post_init__(self) -> None: attributes: List[Attribute] ids: List[DataId] - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json index 8acb8adf..e1c97531 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "camera_options": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py index 7d3f0f45..1b1de9a0 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py @@ -1,3 +1,4 @@ +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -24,7 +25,7 @@ def __post_init__(self) -> None: print_dataclass(self) camera_options: CameraOptions - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json index e2aad745..3ff89e99 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json @@ -3,8 +3,7 @@ "type": "object", "properties": { "scene_id": { - "type": "string", - "minLength": 1 + "title": "SceneId" }, "id": { "title": "DataId" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py index 2ef31227..ab90e19c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py @@ -1,4 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId +from opengeodeweb_viewer.schema_types import SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -12,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: str + scene_id: SceneId @dataclass diff --git a/src/opengeodeweb_viewer/schema_definitions.json b/src/opengeodeweb_viewer/schema_definitions.json index 358750a0..f5a8db4e 100644 --- a/src/opengeodeweb_viewer/schema_definitions.json +++ b/src/opengeodeweb_viewer/schema_definitions.json @@ -239,6 +239,10 @@ "PointSize": { "type": "number" }, + "SceneId": { + "type": "string", + "minLength": 1 + }, "ViewerElementsType": { "type": "string", "enum": [ diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts index cdeab9a0..04fc9da6 100644 --- a/src/opengeodeweb_viewer/schema_types.d.ts +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -12,6 +12,7 @@ export type ColorMapPoints = number[]; export type AttributeItem = number; export type AttributeRangeMinimum = number; export type AttributeRangeMaximum = number; +export type SceneId = string; export interface Point3D { x: number; diff --git a/src/opengeodeweb_viewer/schema_types.json b/src/opengeodeweb_viewer/schema_types.json index 5b31a7e5..76df7b8c 100644 --- a/src/opengeodeweb_viewer/schema_types.json +++ b/src/opengeodeweb_viewer/schema_types.json @@ -107,5 +107,9 @@ }, "AttributeRangeMaximum": { "type": "number" + }, + "SceneId": { + "type": "string", + "minLength": 1 } } diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py index a68e0676..a17f5298 100644 --- a/src/opengeodeweb_viewer/schema_types.py +++ b/src/opengeodeweb_viewer/schema_types.py @@ -17,6 +17,7 @@ AttributeItem = int AttributeRangeMinimum = float AttributeRangeMaximum = float +SceneId = str @dataclass @@ -58,6 +59,7 @@ class ColorRGBA(ColorRGB): "Opacity", "Point3D", "PointSize", + "SceneId", "ViewerId", "Visibility", ] From 7aaadfaa0fbb75e8d9b390408a6f10ee6ddb8061 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Tue, 1 Dec 2026 10:49:53 +0100 Subject: [PATCH 10/22] fix(viewer): push the stale image of every scene The vtkWeb publisher keeps one stale timestamp and one re-push slot for all views, so a second scene rendered right after the first never got its final image. Track both per view. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/app.py | 3 +- src/opengeodeweb_viewer/image_delivery.py | 77 +++++++++++++++++++++++ tests/test_image_delivery.py | 60 ++++++++++++++++++ 3 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 src/opengeodeweb_viewer/image_delivery.py create mode 100644 tests/test_image_delivery.py diff --git a/src/opengeodeweb_viewer/app.py b/src/opengeodeweb_viewer/app.py index c895fee6..9a69ff70 100644 --- a/src/opengeodeweb_viewer/app.py +++ b/src/opengeodeweb_viewer/app.py @@ -17,6 +17,7 @@ # Local application imports from opengeodeweb_viewer.config import Config, DevConfig, ProdConfig, TestConfig from opengeodeweb_viewer.egl_device import select_egl_device +from opengeodeweb_viewer.image_delivery import SceneImageDelivery from opengeodeweb_viewer.rpc.generic.generic_protocols import VtkGenericView from opengeodeweb_viewer.rpc.image.image_protocols import VtkImageView from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView @@ -58,7 +59,7 @@ def initialize(self) -> None: # Bring used components self.registerVtkWebProtocol(vtk_protocols.vtkWebMouseHandler()) self.registerVtkWebProtocol(vtk_protocols.vtkWebViewPort()) - publisher = vtk_protocols.vtkWebPublishImageDelivery(decode=False) # type: ignore[no-untyped-call] + publisher = SceneImageDelivery(decode=False) publisher.deltaStaleTimeBeforeRender = 0.1 self.registerVtkWebProtocol(publisher) self.setSharedObject("db", {}) diff --git a/src/opengeodeweb_viewer/image_delivery.py b/src/opengeodeweb_viewer/image_delivery.py new file mode 100644 index 00000000..92252433 --- /dev/null +++ b/src/opengeodeweb_viewer/image_delivery.py @@ -0,0 +1,77 @@ +# Standard library imports +import base64 +import time +from typing import Any, override + +# Third party imports +from vtkmodules.web import protocols as vtk_protocols +from wslink import schedule_callback # type: ignore[import-untyped] + + +class SceneImageDelivery(vtk_protocols.vtkWebPublishImageDelivery): + """Image publisher tracking the stale state of each view independently. + + The base class keeps a single stale timestamp and a single re-push slot for + all views: when two scenes render back to back, only the first one gets its + final image. + """ + + def __init__(self, decode: bool = True) -> None: # noqa: FBT001, FBT002 vtkWeb API + super().__init__(decode=decode) # type: ignore[no-untyped-call] + self.last_stale_time: dict[str, float] = {} + self.stale_handler_count: dict[str, int] = {} + + @override + def pushRender( + self, + vId: str, + ignoreAnimation: bool = False, + ) -> None: + if vId not in self.trackingViews or not self.trackingViews[vId]["enabled"]: + return + if not ignoreAnimation and len(self.viewsInAnimations) > 0: + return + + tracking = self.trackingViews[vId] + if "originalSize" not in tracking: + tracking["originalSize"] = list(self.getView(vId).GetSize()) # type: ignore[no-untyped-call] + if "ratio" not in tracking: + tracking["ratio"] = 1 + size = [int(s * tracking["ratio"]) for s in tracking["originalSize"]] + + reply: dict[str, Any] = self.stillRender( # type: ignore[no-untyped-call] + {"view": vId, "mtime": tracking["mtime"], "quality": tracking["quality"], "size": size} + ) + if reply["image"]: + if self.decode: + reply["image"] = base64.standard_b64decode(reply["image"]) + reply["image"] = self.addAttachment(reply["image"]) + reply["format"] = "jpeg" + tracking["mtime"] = reply["mtime"] + reply["id"] = vId + self.publish("viewport.image.push.subscription", reply) + if reply["stale"]: + self.last_stale_time[vId] = time.time() + if self.stale_handler_count.get(vId, 0) == 0: + self.stale_handler_count[vId] = 1 + schedule_callback( + self.deltaStaleTimeBeforeRender, lambda: self.renderStaleImage(vId) + ) + else: + self.last_stale_time[vId] = 0 + + @override + def renderStaleImage(self, vId: str) -> None: + self.stale_handler_count[vId] = self.stale_handler_count.get(vId, 0) - 1 + last_stale_time = self.last_stale_time.get(vId, 0) + if last_stale_time == 0: + return + delta = time.time() - last_stale_time + if delta >= self.deltaStaleTimeBeforeRender: + self.pushRender(vId) + else: + self.stale_handler_count[vId] += 1 + schedule_callback( + self.deltaStaleTimeBeforeRender - delta + 0.001, + lambda: self.renderStaleImage(vId), + ) diff --git a/tests/test_image_delivery.py b/tests/test_image_delivery.py new file mode 100644 index 00000000..50a9e516 --- /dev/null +++ b/tests/test_image_delivery.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any + +from vtkmodules.web import protocols as vtk_protocols + +from opengeodeweb_viewer import image_delivery +from opengeodeweb_viewer.image_delivery import SceneImageDelivery + +if TYPE_CHECKING: + from collections.abc import Callable + + import pytest + + +def push_two_stale_views(monkeypatch: pytest.MonkeyPatch, delivery_class: type) -> list[str]: + callbacks: list[Callable[[], None]] = [] + + def schedule(_delay: float, callback: Callable[[], None]) -> None: + callbacks.append(callback) + + monkeypatch.setattr(image_delivery, "schedule_callback", schedule) + monkeypatch.setattr(vtk_protocols, "schedule_callback", schedule) + + delivery: Any = delivery_class(decode=False) + delivery.deltaStaleTimeBeforeRender = 0 + delivery.trackingViews = { + view_id: { + "enabled": True, + "mtime": 0, + "quality": 100, + "originalSize": [10, 10], + "ratio": 1, + } + for view_id in ("1", "3") + } + pushed: list[str] = [] + stale = {"1": True, "3": True} + + def still_render(options: dict[str, Any]) -> dict[str, Any]: + view_id = options["view"] + pushed.append(view_id) + is_stale = stale[view_id] + stale[view_id] = False + return {"image": None, "stale": is_stale, "mtime": 1} + + delivery.stillRender = still_render + delivery.pushRender("1") + delivery.pushRender("3") + while callbacks: + callbacks.pop(0)() + return pushed + + +def test_every_stale_view_is_pushed_again(monkeypatch: pytest.MonkeyPatch) -> None: + pushed = push_two_stale_views(monkeypatch, SceneImageDelivery) + assert sorted(pushed) == ["1", "1", "3", "3"] + + +def test_base_publisher_drops_second_view(monkeypatch: pytest.MonkeyPatch) -> None: + pushed = push_two_stale_views(monkeypatch, vtk_protocols.vtkWebPublishImageDelivery) + assert pushed.count("3") == 1 From 8e402a02b4874334ce84e880a0e15230acaf1305 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 09:36:54 +0100 Subject: [PATCH 11/22] feat(viewer): give each scene object its own filters The filter chain, the explode factor and the filtered blocks move from the shared VtkPipeline to a SceneFilters held by each SceneObject. A basemap drapes over the clipping and the explosion of its own scene. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/basemap_pipeline.py | 31 ++-- .../object/object_methods.py | 49 +++--- .../rpc/mesh/mesh_protocols.py | 14 +- .../rpc/model/model_protocols.py | 49 +++--- .../rpc/viewer/viewer_protocols.py | 21 +-- src/opengeodeweb_viewer/scene/__init__.py | 3 +- .../scene/scene_filters.py | 33 ++++ src/opengeodeweb_viewer/scene/scene_object.py | 69 ++++---- src/opengeodeweb_viewer/vtk_pipeline.py | 46 +++--- src/opengeodeweb_viewer/vtk_protocol.py | 150 +++++++++++------- tests/mesh/test_mesh_protocols.py | 83 +++++++--- tests/test_basemap_drape.py | 4 +- tests/test_scene.py | 8 +- tests/test_vtk_pipeline.py | 12 +- 14 files changed, 338 insertions(+), 234 deletions(-) create mode 100644 src/opengeodeweb_viewer/scene/scene_filters.py diff --git a/src/opengeodeweb_viewer/basemap_pipeline.py b/src/opengeodeweb_viewer/basemap_pipeline.py index bdaf4c20..5a8ee2ee 100644 --- a/src/opengeodeweb_viewer/basemap_pipeline.py +++ b/src/opengeodeweb_viewer/basemap_pipeline.py @@ -72,19 +72,20 @@ def pipeline_surface_pairs( if not scene_object.actor.GetVisibility(): return [] mapper = scene_object.mapper + filters = scene_object.filters if isinstance(mapper, vtkCompositePolyDataMapper): attributes = mapper.GetCompositeDataDisplayAttributes() types = pipeline.block_component_types() # The filter output is the data before explosion, with the same flat indices originals = ( - pipeline.extract_blocks(pipeline.filter.GetOutputDataObject(0)) - if pipeline.explode_factor > 0 - else pipeline.block_data_sets + pipeline.extract_blocks(filters.filter.GetOutputDataObject(0)) + if filters.explode_factor > 0 + else filters.block_data_sets ) return [ (block, original) for index, (block, original) in enumerate( - zip(pipeline.block_data_sets, originals, strict=False) + zip(filters.block_data_sets, originals, strict=False) ) if types.get(index) == "surfaces" and isinstance(block, vtkPolyData) @@ -94,30 +95,36 @@ def pipeline_surface_pairs( # Solids are unstructured grids: only polydata readers hold surfaces if not isinstance(pipeline.reader.GetOutputDataObject(0), vtkPolyData): return [] - output = pipeline.filter.GetOutput() + output = filters.filter.GetOutput() return [(output, output)] if output.GetNumberOfPolys() > 0 else [] -def drape_planes(database: Mapping[str, VtkPipeline], basemap: BasemapState) -> list[Plane]: - """The clipping planes of the georeferenced data the basemap lies under.""" +def drape_planes(scene: Scene, basemap: BasemapState) -> list[Plane]: + """The clipping planes, in the scene, of the georeferenced data the basemap lies under.""" return next( ( - database[data_id].clipping_planes + scene.objects[data_id].filters.clipping_planes for data_id in basemap.drape_ids - if data_id in database and database[data_id].clipping_planes + if data_id in scene.objects and scene.objects[data_id].filters.clipping_planes ), [], ) -def basemaps_follow(database: Mapping[str, VtkPipeline], data_ids: Iterable[str]) -> bool: +def basemaps_follow( + database: Mapping[str, VtkPipeline], scenes: Iterable[Scene], data_ids: Iterable[str] +) -> bool: draped = {data_id for _, basemap in basemaps(database) for data_id in basemap.drape_ids} + scenes = list(scenes) # Exploded data lift the flat map, and an unknown id may be anything return any( data_id in draped or (pipeline := database.get(data_id)) is None or pipeline.basemap is not None - or pipeline.explode_factor > 0 + or any( + data_id in scene.objects and scene.objects[data_id].filters.explode_factor > 0 + for scene in scenes + ) for data_id in data_ids ) @@ -148,7 +155,7 @@ def update_basemaps(database: Mapping[str, VtkPipeline], scene: Scene) -> None: scene_object.actor.GetBounds()[5] for data_id, scene_object in scene.objects.items() if database[data_id].basemap is None - and database[data_id].explode_factor > 0 + and scene_object.filters.explode_factor > 0 and scene_object.actor.GetVisibility() ] # A detail reads what its base just drew diff --git a/src/opengeodeweb_viewer/object/object_methods.py b/src/opengeodeweb_viewer/object/object_methods.py index 2c08d3fb..0c55e80d 100644 --- a/src/opengeodeweb_viewer/object/object_methods.py +++ b/src/opengeodeweb_viewer/object/object_methods.py @@ -17,7 +17,7 @@ ) # Local application imports -from opengeodeweb_viewer.basemap_pipeline import style_basemap_object +from opengeodeweb_viewer.basemap_pipeline import drape_planes, style_basemap_object from opengeodeweb_viewer.scene import SceneObject from opengeodeweb_viewer.vtk_pipeline import VtkPipeline from opengeodeweb_viewer.vtk_protocol import VtkView, scene_object_of @@ -67,18 +67,26 @@ def add_object(self, scene: Scene, data_id: str) -> None: if data_id in scene.objects: return pipeline = self.get_vtk_pipeline(data_id) - geometry_output = pipeline.filter.GetOutputDataObject(0) + source_output = pipeline.filter.GetOutputDataObject(0) mapper: vtkMapper - if isinstance(geometry_output, vtkMultiBlockDataSet): + if isinstance(source_output, vtkMultiBlockDataSet): mapper = vtkCompositePolyDataMapper() mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) - mapper.SetInputDataObject(geometry_output) else: mapper = vtkDataSetMapper() scene_object = SceneObject(mapper) - if not isinstance(geometry_output, vtkMultiBlockDataSet): - scene_object.connect_mappers(pipeline) - self.highlight(pipeline, scene_object) + # No filter yet: the output of the scene is the source + filters = scene_object.filters + filters.filter.SetInputConnection(pipeline.reader.GetOutputPort()) + filters.filter.Update() + if isinstance(source_output, vtkMultiBlockDataSet): + geometry_output = filters.filter.GetOutputDataObject(0) + geometry_output.SetObjectName(source_output.GetObjectName()) + filters.block_data_sets = pipeline.extract_blocks(geometry_output) + mapper.SetInputDataObject(geometry_output) + else: + scene_object.connect_mappers() + self.highlight(scene_object) scene.objects[data_id] = scene_object scene_object.actor.SetMapper(mapper) self.configure_actor(scene_object, data_id) @@ -101,6 +109,9 @@ def add_object(self, scene: Scene, data_id: str) -> None: renderer.AddViewProp(scene_object.scalar_bar) if should_reset_camera: renderer.ResetCamera() + if pipeline.basemap is not None and drape_planes(scene, pipeline.basemap): + # Added under data already clipped in this scene: cut like it at once + self.clip_basemap(scene, data_id) self.mark_basemaps_dirty([data_id]) def remove_object(self, scene: Scene, data_id: str) -> None: @@ -258,14 +269,12 @@ def set_points_size(self, scene_id: str, data_id: str, size: float) -> None: scene_object.points_actor.GetProperty().SetPointSize(size) @staticmethod - def ensure_points_actor( - pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject - ) -> vtkActor: + def ensure_points_actor(scene: Scene, scene_object: SceneObject) -> vtkActor: # Points get their own actor so their scalars stay independent from the polygons if scene_object.points_actor is not None: return scene_object.points_actor mapper = vtkDataSetMapper() - mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + mapper.SetInputConnection(scene_object.filters.filter.GetOutputPort()) mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) actor = vtkActor() actor.SetMapper(mapper) @@ -349,14 +358,12 @@ def match_edges_depth_to_polygons(mapper: vtkMapper) -> None: EDGES_DEPTH_FACTOR_SHARE * (float(polygon_factor) - float(line_factor)), 0.0 ) - def ensure_edges_actor( - self, pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject - ) -> vtkActor: + def ensure_edges_actor(self, scene: Scene, scene_object: SceneObject) -> vtkActor: # Edges get their own actor so their scalars stay independent from the polygons if scene_object.edges_actor is not None: return scene_object.edges_actor mapper = vtkDataSetMapper() - mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + mapper.SetInputConnection(scene_object.filters.filter.GetOutputPort()) mapper.ScalarVisibilityOff() self.match_edges_depth_to_polygons(mapper) actor = vtkActor() @@ -415,13 +422,13 @@ def set_blocks_visibility( if not isinstance(mapper, vtkCompositePolyDataMapper): msg = "Mapper is not a vtkCompositePolyDataMapper" raise TypeError(msg) - blocks = pipeline.block_data_sets + blocks = scene_object.filters.block_data_sets visibility_attributes = mapper.GetCompositeDataDisplayAttributes() logger.debug("visibility_attributes=%s", visibility_attributes) for block_id in block_ids: visibility_attributes.SetBlockVisibility(blocks[block_id], visibility) - scene_object.update_points_size_actors(pipeline) - scene_object.update_edges_width_actors(pipeline) + scene_object.update_points_size_actors() + scene_object.update_edges_width_actors() self.mark_basemaps_dirty([data_id]) dataset = mapper.GetInputDataObject(0, 0) if not isinstance(dataset, vtkMultiBlockDataSet): @@ -449,12 +456,10 @@ def _apply_highlight_style(self, actor: vtkActor, mapper: vtkDataSetMapper) -> N actor.VisibilityOff() actor.UseBoundsOff() - def highlight(self, pipeline: VtkPipeline, scene_object: SceneObject) -> None: + def highlight(self, scene_object: SceneObject) -> None: highlight = scene_object.highlight self._apply_highlight_style(highlight.actor, highlight.mapper) - if pipeline.filter.GetNumberOfInputConnections(0) == 0: - pipeline.filter.SetInputConnection(pipeline.reader.GetOutputPort()) - input_port = pipeline.filter.GetOutputPort() + input_port = scene_object.filters.filter.GetOutputPort() highlight.selection.AddNode(highlight.selection_node) highlight.extract_selection.SetInputConnection(0, input_port) highlight.extract_selection.SetInputData(1, highlight.selection) diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py index fcb7c148..9a42e914 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py @@ -108,8 +108,7 @@ def mesh_apply_textures(self, params: schemas.ApplyTextures) -> schemas.ApplyTex array = output.GetPointData().GetArray(tex_info.texture_name) if array: output.GetPointData().SetTCoords(array) - pipeline.filter.Modified() - pipeline.filter.Update() + self.refresh_filters(pipeline) scene_object.actor.SetTexture(texture) return schemas.ApplyTexturesResponse() @@ -143,8 +142,7 @@ def mesh_apply_basemap(self, params: schemas.ApplyBasemap) -> schemas.ApplyBasem compose(basemap, (params.rows * tile_shape[0], params.columns * tile_shape[1])) output = pipeline.reader.GetOutputAsDataSet() output.GetPointData().SetTCoords(output.GetPointData().GetArray("basemap_uv")) - pipeline.filter.Modified() - pipeline.filter.Update() + self.refresh_filters(pipeline) # A basemap is a global setting: every scene showing the data draws it for scene_object in self.scene_objects_of(pipeline): style_basemap_object(basemap, scene_object) @@ -152,7 +150,7 @@ def mesh_apply_basemap(self, params: schemas.ApplyBasemap) -> schemas.ApplyBasem basemap.drape_ids = pipeline.basemap.drape_ids pipeline.basemap = basemap # A basemap rebuilt while the data is clipped or exploded follows it at once - self.clip_basemap(pipeline) + self.clip_basemaps(params.id) self.mark_basemaps_dirty() return schemas.ApplyBasemapResponse() @@ -184,7 +182,7 @@ def mesh_basemap_drape(self, params: schemas.BasemapDrape) -> schemas.BasemapDra raise ValueError(msg) pipeline.basemap.drape_ids = list(params.data_ids) # Cut like the data it now lies under - self.clip_basemap(pipeline) + self.clip_basemaps(params.id) self.mark_basemaps_dirty() return schemas.BasemapDrapeResponse() @@ -199,7 +197,7 @@ def display_attribute_on_points( self, scene_id: str, data_id: str, attribute: AttributeProtocol ) -> None: scene, scene_object = self.scene_and_object(scene_id, data_id) - self.ensure_points_actor(self.get_vtk_pipeline(data_id), scene, scene_object) + self.ensure_points_actor(scene, scene_object) if scene_object.points_mapper is None: return scene_object.points_color_map_key = self.display_attribute_on_style_mapper( @@ -212,7 +210,7 @@ def display_attribute_on_edges( self, scene_id: str, data_id: str, attribute: AttributeProtocol ) -> None: scene, scene_object = self.scene_and_object(scene_id, data_id) - self.ensure_edges_actor(self.get_vtk_pipeline(data_id), scene, scene_object) + self.ensure_edges_actor(scene, scene_object) if scene_object.edges_mapper is None: return scene_object.edges_color_map_key = self.display_attribute_on_style_mapper( diff --git a/src/opengeodeweb_viewer/rpc/model/model_protocols.py b/src/opengeodeweb_viewer/rpc/model/model_protocols.py index 062640b0..4b700022 100644 --- a/src/opengeodeweb_viewer/rpc/model/model_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/model_protocols.py @@ -124,8 +124,8 @@ def apply_color(self, params: ModelColorParams) -> list[ColorResult]: colors: list[ColorResult] = [] for block_id in params.block_ids: scene_object.get_block_style(block_id) - scene_object.clear_block_scalars(pipeline, block_id) - block_dataset = pipeline.block_data_sets[block_id] + scene_object.clear_block_scalars(block_id) + block_dataset = scene_object.filters.block_data_sets[block_id] if isinstance(block_dataset, vtkDataSet): if color_mode == "random": geode_id = pipeline.block_geode_ids[block_id] @@ -251,7 +251,6 @@ def display_attribute_on_blocks( attribute: AttributeProtocol, location: Literal["point", "cell"], ) -> None: - pipeline = self.get_vtk_pipeline(data_id) scene, scene_object = self.scene_and_object(scene_id, data_id) for block_id in block_ids: style = scene_object.get_block_style(block_id) @@ -262,7 +261,7 @@ def display_attribute_on_blocks( style["minimum"] = attribute.minimum style["maximum"] = attribute.maximum style["no_data_color"] = attribute.no_data_color - scene_object.update_block_colors(pipeline, block_id) + scene_object.update_block_colors(block_id) self.setup_model_color_map(scene, scene_object) @staticmethod @@ -283,9 +282,7 @@ def ensure_model_points_styles( return scene_object.points_block_styles @staticmethod - def sync_points_size_actors( - pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject - ) -> None: + def sync_points_size_actors(scene: Scene, scene_object: SceneObject) -> None: renderer = scene.renderer sizes = {style.size for style in scene_object.points_block_styles.values()} for size in list(scene_object.points_size_actors): @@ -311,7 +308,7 @@ def sync_points_size_actors( for size in sorted(scene_object.points_size_actors, reverse=True): renderer.RemoveActor(scene_object.points_size_actors[size].actor) renderer.AddActor(scene_object.points_size_actors[size].actor) - scene_object.update_points_size_actors(pipeline) + scene_object.update_points_size_actors() def update_component_points( self, @@ -329,7 +326,7 @@ def update_component_points( for block_id in block_ids: if block_id in styles and component_types.get(block_id) == component_type: update(styles[block_id]) - self.sync_points_size_actors(pipeline, scene, scene_object) + self.sync_points_size_actors(scene, scene_object) self.setup_model_color_map(scene, scene_object) def set_component_points_visibility( @@ -385,23 +382,21 @@ def update(style: ModelPointsStyle) -> None: def set_model_points_visibility_on_all( self, scene_id: str, data_id: str, *, visibility: bool ) -> None: - pipeline = self.get_vtk_pipeline(data_id) scene, scene_object = self.scene_and_object(scene_id, data_id) if not scene_object.points_block_styles: self.set_points_visibility(scene_id, data_id, visibility=visibility) return for style in scene_object.points_block_styles.values(): style.visibility = visibility - self.sync_points_size_actors(pipeline, scene, scene_object) + self.sync_points_size_actors(scene, scene_object) self.setup_model_color_map(scene, scene_object) def set_model_points_size_on_all(self, scene_id: str, data_id: str, size: float) -> None: - pipeline = self.get_vtk_pipeline(data_id) scene, scene_object = self.scene_and_object(scene_id, data_id) self.set_points_size(scene_id, data_id, size) for style in scene_object.points_block_styles.values(): style.size = size - self.sync_points_size_actors(pipeline, scene, scene_object) + self.sync_points_size_actors(scene, scene_object) @staticmethod def ensure_model_edges_styles( @@ -422,9 +417,7 @@ def ensure_model_edges_styles( main_property.EdgeVisibilityOff() return scene_object.edges_block_styles - def sync_edges_width_actors( - self, pipeline: VtkPipeline, scene: Scene, scene_object: SceneObject - ) -> None: + def sync_edges_width_actors(self, scene: Scene, scene_object: SceneObject) -> None: renderer = scene.renderer widths = {style.width for style in scene_object.edges_block_styles.values()} for width in list(scene_object.edges_width_actors): @@ -445,7 +438,7 @@ def sync_edges_width_actors( edges_property.SetLineWidth(width) scene_object.edges_width_actors[width] = EdgesWidthActor(mapper=mapper, actor=actor) renderer.AddActor(actor) - scene_object.update_edges_width_actors(pipeline) + scene_object.update_edges_width_actors() def update_component_edges( self, @@ -463,7 +456,7 @@ def update_component_edges( for block_id in block_ids: if block_id in styles and component_types.get(block_id) == component_type: update(styles[block_id]) - self.sync_edges_width_actors(pipeline, scene, scene_object) + self.sync_edges_width_actors(scene, scene_object) self.setup_model_color_map(scene, scene_object) def set_component_edges_visibility( @@ -519,14 +512,13 @@ def update(style: ModelEdgesStyle) -> None: def set_model_edges_visibility_on_all( self, scene_id: str, data_id: str, *, visibility: bool ) -> None: - pipeline = self.get_vtk_pipeline(data_id) scene, scene_object = self.scene_and_object(scene_id, data_id) if not scene_object.edges_block_styles: self.set_edges_visibility(scene_id, data_id, visibility=visibility) return for style in scene_object.edges_block_styles.values(): style.visibility = visibility - self.sync_edges_width_actors(pipeline, scene, scene_object) + self.sync_edges_width_actors(scene, scene_object) self.setup_model_color_map(scene, scene_object) def set_model_edges_width_on_all(self, scene_id: str, data_id: str, width: float) -> None: @@ -536,7 +528,7 @@ def set_model_edges_width_on_all(self, scene_id: str, data_id: str, width: float scene_object.actor.GetProperty().SetEdgeWidth(width) for style in self.ensure_model_edges_styles(pipeline, scene_object).values(): style.width = width - self.sync_edges_width_actors(pipeline, scene, scene_object) + self.sync_edges_width_actors(scene, scene_object) @typed_rpc(model_prefix, schemas.register_route) def register_model(self, params: schemas.Register) -> schemas.RegisterResponse: @@ -558,10 +550,8 @@ def register_model(self, params: schemas.Register) -> schemas.RegisterResponse: block = iterator.GetCurrentDataObject() if block is not None: flat_index = iterator.GetCurrentFlatIndex() - while flat_index > len(data.block_data_sets): - data.block_data_sets.append(None) + while flat_index > len(data.block_geode_ids): data.block_geode_ids.append("") - data.block_data_sets.append(block) meta = iterator.GetCurrentMetaData() name = meta.Get(vtkCompositeDataSet.NAME()) data.block_geode_ids.append(name) @@ -587,12 +577,13 @@ def set_model_visibility(self, params: schemas.Visibility) -> schemas.Visibility @typed_rpc(model_prefix, schemas.highlight_route) def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: - pipeline = self.get_vtk_pipeline(params.id) - highlight = self.get_scene_object(params.scene_id, params.id).highlight + scene_object = self.get_scene_object(params.scene_id, params.id) + highlight = scene_object.highlight if params.visibility and params.block_ids: append = vtkAppendDataSets() + block_data_sets = scene_object.filters.block_data_sets for i in params.block_ids: - block = pipeline.block_data_sets[i] if i < len(pipeline.block_data_sets) else None + block = block_data_sets[i] if i < len(block_data_sets) else None if isinstance(block, vtkDataSet): append.AddInputData(block) append.Update() @@ -606,9 +597,11 @@ def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightRes @typed_rpc(model_prefix, schemas.get_blocks_bounds_route) def get_blocks_bounds(self, params: schemas.GetBlocksBounds) -> schemas.GetBlocksBoundsResponse: pipeline = self.get_vtk_pipeline(params.id) + # Data only: the bounds of the source, whatever the filters of the scenes + blocks = pipeline.extract_blocks(pipeline.filter.GetOutputDataObject(0)) bbox = vtkBoundingBox() for block_id in params.block_ids: - if isinstance(block := pipeline.block_data_sets[block_id], vtkDataSet): + if isinstance(block := blocks[block_id], vtkDataSet): bbox.AddBounds(block.GetBounds()) bounds = [0.0] * 6 diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index 55e0cc29..82d3087a 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -372,20 +372,20 @@ def set_clipping_planes_rpc( self, params: schemas.ClippingPlanes ) -> schemas.ClippingPlanesResponse: scene = self.get_scene(params.scene_id) - self.set_clipping_planes(params.ids, params.planes) + self.set_clipping_planes(scene, params.ids, params.planes) self._update_clipping_plane_previews(scene, params.ids, params.planes) return schemas.ClippingPlanesResponse() @typed_rpc(viewer_prefix, schemas.shrink_route) def set_shrink_rpc(self, params: schemas.Shrink) -> schemas.ShrinkResponse: - self.get_scene(params.scene_id) - self.set_shrink(params.ids, params.shrink_factor) + scene = self.get_scene(params.scene_id) + self.set_shrink(scene, params.ids, params.shrink_factor) return schemas.ShrinkResponse() @typed_rpc(viewer_prefix, schemas.explode_route) def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: - self.get_scene(params.scene_id) - exploded_bounds = self.set_explode(params.ids, params.explode_factor) + scene = self.get_scene(params.scene_id) + exploded_bounds = self.set_explode(scene, params.ids, params.explode_factor) return schemas.ExplodeResponse( exploded_bounds=[ ExplodedBound(id=data_id, bounds=bounds) @@ -395,13 +395,13 @@ def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: @typed_rpc(viewer_prefix, schemas.slice_route) def set_slice_rpc(self, params: schemas.Slice) -> schemas.SliceResponse: - self.get_scene(params.scene_id) - return schemas.SliceResponse(max_indices=self.set_slice(params.ids, params.slices)) + scene = self.get_scene(params.scene_id) + return schemas.SliceResponse(max_indices=self.set_slice(scene, params.ids, params.slices)) @typed_rpc(viewer_prefix, schemas.threshold_route) def set_threshold_rpc(self, params: schemas.Threshold) -> schemas.ThresholdResponse: - self.get_scene(params.scene_id) - self.set_threshold(params.ids, params.attributes) + scene = self.get_scene(params.scene_id) + self.set_threshold(scene, params.ids, params.attributes) return schemas.ThresholdResponse() @typed_rpc(viewer_prefix, schemas.set_z_scaling_route) @@ -459,7 +459,8 @@ def _update_clipping_plane_previews( ) -> None: # Unclipping some data must keep the previews of the data still clipped if not planes_data and any( - self.get_vtk_pipeline(data_id).clipping_filter is not None for data_id in scene.objects + scene_object.filters.clipping_filter is not None + for scene_object in scene.objects.values() ): return renderer = scene.renderer diff --git a/src/opengeodeweb_viewer/scene/__init__.py b/src/opengeodeweb_viewer/scene/__init__.py index 3421cf20..4ea18504 100644 --- a/src/opengeodeweb_viewer/scene/__init__.py +++ b/src/opengeodeweb_viewer/scene/__init__.py @@ -1,4 +1,5 @@ from opengeodeweb_viewer.scene.scene import Scene +from opengeodeweb_viewer.scene.scene_filters import SceneFilters from opengeodeweb_viewer.scene.scene_object import SceneObject, sync_composite_pipeline -__all__ = ["Scene", "SceneObject", "sync_composite_pipeline"] +__all__ = ["Scene", "SceneFilters", "SceneObject", "sync_composite_pipeline"] diff --git a/src/opengeodeweb_viewer/scene/scene_filters.py b/src/opengeodeweb_viewer/scene/scene_filters.py new file mode 100644 index 00000000..e6aa70cc --- /dev/null +++ b/src/opengeodeweb_viewer/scene/scene_filters.py @@ -0,0 +1,33 @@ +# Standard library imports +from __future__ import annotations + +from dataclasses import dataclass, field +from typing import TYPE_CHECKING + +# Third party imports +from vtkmodules.vtkFiltersGeometry import vtkGeometryFilter + +if TYPE_CHECKING: + from vtkmodules.vtkCommonDataModel import vtkDataObject + from vtkmodules.vtkFiltersCore import vtkAppendFilter, vtkThreshold + from vtkmodules.vtkFiltersExtraction import vtkExtractGeometry + from vtkmodules.vtkFiltersGeneral import vtkShrinkFilter, vtkTableBasedClipDataSet + + from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane + + +@dataclass +class SceneFilters: + """The filter chain of a data in one scene: a filter acts on its scene only.""" + + # The filtered output of the scene, the input of its mappers + filter: vtkGeometryFilter = field(default_factory=vtkGeometryFilter) + slice_filter: vtkAppendFilter | None = None + clipping_filter: vtkExtractGeometry | vtkTableBasedClipDataSet | None = None + # The planes of clipping_filter + clipping_planes: list[Plane] = field(default_factory=list) + threshold_filters: list[vtkThreshold] = field(default_factory=list) + shrink_filter: vtkShrinkFilter | None = None + explode_factor: float = 0.0 + # The blocks of the filtered output, which the display attributes of the scene key on + block_data_sets: list[vtkDataObject | None] = field(default_factory=list) diff --git a/src/opengeodeweb_viewer/scene/scene_object.py b/src/opengeodeweb_viewer/scene/scene_object.py index 82100654..718fd9ff 100644 --- a/src/opengeodeweb_viewer/scene/scene_object.py +++ b/src/opengeodeweb_viewer/scene/scene_object.py @@ -24,6 +24,7 @@ ) # Local application imports +from opengeodeweb_viewer.scene.scene_filters import SceneFilters from opengeodeweb_viewer.utils_functions import create_color_transfer_function from opengeodeweb_viewer.vtk_pipeline import ( BlockStyle, @@ -50,6 +51,8 @@ class SceneObject: actor: vtkActor = field(default_factory=vtkActor) # Set by set_visibility: the basemap actors also hide on their own, without forgetting it visibility: bool = True + # The filters of the data in this scene only: the shared data is never filtered + filters: SceneFilters = field(default_factory=SceneFilters) highlight: HighlightPipeline = field(default_factory=HighlightPipeline) scalar_bar: vtkScalarBarActor = field(default_factory=vtkScalarBarActor) scalar_bars: dict[str, ModelScalarBar] = field(default_factory=dict) @@ -81,12 +84,13 @@ class SceneObject: # Base only: the top surfaces it drapes in this scene, for its detail draped_surfaces: list[vtkPolyData] = field(default_factory=list) - def connect_mappers(self, pipeline: VtkPipeline) -> None: - self.mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + def connect_mappers(self) -> None: + output_port = self.filters.filter.GetOutputPort() + self.mapper.SetInputConnection(output_port) if self.points_mapper is not None: - self.points_mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + self.points_mapper.SetInputConnection(output_port) if self.edges_mapper is not None: - self.edges_mapper.SetInputConnection(pipeline.filter.GetOutputPort()) + self.edges_mapper.SetInputConnection(output_port) def get_block_style(self, block_id: int) -> BlockStyle: if block_id not in self.block_styles: @@ -102,12 +106,12 @@ def get_block_style(self, block_id: int) -> BlockStyle: self.block_styles[block_id] = style return self.block_styles[block_id] - def clear_block_scalars(self, pipeline: VtkPipeline, block_id: int) -> None: + def clear_block_scalars(self, block_id: int) -> None: if block_id in self.block_styles: self.block_styles[block_id]["name"] = "" - if block_id >= len(pipeline.block_data_sets): + if block_id >= len(self.filters.block_data_sets): return - block = pipeline.block_data_sets[block_id] + block = self.filters.block_data_sets[block_id] if not isinstance(block, vtkDataSet): return if isinstance(self.mapper, vtkCompositePolyDataMapper): @@ -121,20 +125,20 @@ def clear_block_scalars(self, pipeline: VtkPipeline, block_id: int) -> None: attributes.RemoveBlockScalarMode(block) attributes.RemoveBlockInterpolateScalarsBeforeMapping(block) - def clear_blocks_scalars(self, pipeline: VtkPipeline) -> None: + def clear_blocks_scalars(self) -> None: self.block_styles.clear() - for block_id in range(len(pipeline.block_data_sets)): - self.clear_block_scalars(pipeline, block_id) + for block_id in range(len(self.filters.block_data_sets)): + self.clear_block_scalars(block_id) - def update_block_colors(self, pipeline: VtkPipeline, block_id: int) -> None: - if block_id >= len(pipeline.block_data_sets): + def update_block_colors(self, block_id: int) -> None: + if block_id >= len(self.filters.block_data_sets): return - block = pipeline.block_data_sets[block_id] + block = self.filters.block_data_sets[block_id] if not isinstance(block, vtkDataSet): return style = self.get_block_style(block_id) if not style["name"]: - self.clear_block_scalars(pipeline, block_id) + self.clear_block_scalars(block_id) return is_point = style["attribute_location"] == "point" field_data = block.GetPointData() if is_point else block.GetCellData() @@ -188,7 +192,6 @@ def color_by_array(self, name: str, item: int, *, is_point: bool) -> None: def update_style_actor_attributes( self, - pipeline: VtkPipeline, mapper: vtkCompositePolyDataMapper, styles: Mapping[int, ModelPointsStyle | ModelEdgesStyle], actor_key: float, @@ -197,7 +200,7 @@ def update_style_actor_attributes( main_mapper = cast("vtkCompositePolyDataMapper", self.mapper) attributes = main_mapper.GetCompositeDataDisplayAttributes() actor_attributes = vtkCompositeDataDisplayAttributes() - for block_id, block in enumerate(pipeline.block_data_sets): + for block_id, block in enumerate(self.filters.block_data_sets): if not isinstance(block, vtkDataSet): continue style = styles.get(block_id) @@ -220,17 +223,13 @@ def update_style_actor_attributes( mapper.SetCompositeDataDisplayAttributes(actor_attributes) mapper.Modified() - def update_points_size_actors(self, pipeline: VtkPipeline) -> None: + def update_points_size_actors(self) -> None: for size, size_actor in self.points_size_actors.items(): - self.update_style_actor_attributes( - pipeline, size_actor.mapper, self.points_block_styles, size - ) + self.update_style_actor_attributes(size_actor.mapper, self.points_block_styles, size) - def update_edges_width_actors(self, pipeline: VtkPipeline) -> None: + def update_edges_width_actors(self) -> None: for width, width_actor in self.edges_width_actors.items(): - self.update_style_actor_attributes( - pipeline, width_actor.mapper, self.edges_block_styles, width - ) + self.update_style_actor_attributes(width_actor.mapper, self.edges_block_styles, width) @staticmethod def set_block_point_attribute( @@ -292,11 +291,11 @@ def sync_block_display_attributes( mapper = cast("vtkCompositePolyDataMapper", self.mapper) self.sync_mapper_display_attributes(mapper, source_blocks, new_blocks) - def update_block_actors(self, pipeline: VtkPipeline) -> None: - self.update_points_size_actors(pipeline) - self.update_edges_width_actors(pipeline) + def update_block_actors(self) -> None: + self.update_points_size_actors() + self.update_edges_width_actors() for block_id in self.block_styles: - self.update_block_colors(pipeline, block_id) + self.update_block_colors(block_id) def set_composite_input(self, pipeline: VtkPipeline, dataset: vtkDataObject) -> None: self.mapper.SetInputDataObject(dataset) @@ -311,13 +310,11 @@ def set_composite_input(self, pipeline: VtkPipeline, dataset: vtkDataObject) -> def sync_composite_pipeline( - pipeline: VtkPipeline, scene_objects: list[SceneObject], dataset: vtkDataObject + pipeline: VtkPipeline, scene_object: SceneObject, dataset: vtkDataObject ) -> None: - """Swap the shared blocks of the data, keeping the block styles of every scene showing it.""" + """Swap the blocks of the data in a scene, keeping the block styles of this scene.""" new_blocks = pipeline.extract_blocks(dataset) - for scene_object in scene_objects: - scene_object.sync_block_display_attributes(pipeline.block_data_sets, new_blocks) - pipeline.block_data_sets = new_blocks - for scene_object in scene_objects: - scene_object.update_block_actors(pipeline) - scene_object.set_composite_input(pipeline, dataset) + scene_object.sync_block_display_attributes(scene_object.filters.block_data_sets, new_blocks) + scene_object.filters.block_data_sets = new_blocks + scene_object.update_block_actors() + scene_object.set_composite_input(pipeline, dataset) diff --git a/src/opengeodeweb_viewer/vtk_pipeline.py b/src/opengeodeweb_viewer/vtk_pipeline.py index 1f00dcf0..1a307a31 100644 --- a/src/opengeodeweb_viewer/vtk_pipeline.py +++ b/src/opengeodeweb_viewer/vtk_pipeline.py @@ -21,13 +21,10 @@ from vtkmodules.vtkCommonTransforms import vtkTransform from vtkmodules.vtkFiltersCore import vtkAppendPolyData, vtkCleanPolyData, vtkCutter from vtkmodules.vtkFiltersExtraction import ( - vtkExtractGeometry, vtkExtractSelection, ) from vtkmodules.vtkFiltersGeneral import ( vtkContourTriangulator, - vtkShrinkFilter, - vtkTableBasedClipDataSet, vtkTransformFilter, ) from vtkmodules.vtkFiltersGeometry import vtkGeometryFilter @@ -58,11 +55,9 @@ ViewerObjectType, ) from vtkmodules.vtkCommonExecutionModel import vtkAlgorithm - from vtkmodules.vtkFiltersCore import vtkAppendFilter, vtkThreshold from vtkmodules.vtkIOXML import vtkXMLReader from opengeodeweb_viewer.basemap_compose import LayerState - from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane from opengeodeweb_viewer.utils_functions import ( ColorClassProtocol, ) @@ -348,19 +343,11 @@ class VtkPipeline: reader: vtkXMLReader filter: vtkGeometryFilter = field(default_factory=vtkGeometryFilter) - slice_filter: vtkAppendFilter | None = None - clipping_filter: vtkExtractGeometry | vtkTableBasedClipDataSet | None = None - # The planes of clipping_filter, followed by the basemaps lying over this data - clipping_planes: list[Plane] = field(default_factory=list) - threshold_filters: list[vtkThreshold] = field(default_factory=list) - shrink_filter: vtkShrinkFilter | None = None - explode_factor: float = 0.0 # The z shifts of each source component at full explosion, # with the source time they were computed at explode_shifts: tuple[int, dict[int, list[float]]] | None = None # Set by apply_basemap: the data is a map under the other data basemap: BasemapState | None = None - block_data_sets: list[vtkDataObject | None] = field(default_factory=list) block_geode_ids: list[str] = field(default_factory=list) def extract_blocks(self, multiblock: vtkDataObject | None) -> list[vtkDataObject | None]: @@ -560,18 +547,20 @@ def component_shifts(self) -> dict[int, list[float]]: self.explode_shifts = (source_time, shifts) return shifts - def explode_blocks(self, dataset: vtkMultiBlockDataSet) -> vtkMultiBlockDataSet: - return self.translate_blocks(dataset, self.component_shifts()) + def explode_blocks( + self, dataset: vtkMultiBlockDataSet, explode_factor: float + ) -> vtkMultiBlockDataSet: + return self.translate_blocks(dataset, self.component_shifts(), explode_factor) - def exploded_bounds(self) -> list[float] | None: - """The bounds of the whole data, unfiltered, at the current explode factor.""" - shifts = self.component_shifts() if self.explode_factor > 0 else {} + def exploded_bounds(self, explode_factor: float) -> list[float] | None: + """The bounds of the whole data, unfiltered, at an explode factor.""" + shifts = self.component_shifts() if explode_factor > 0 else {} exploded_bbox = vtkBoundingBox() for flat_index, component in self.source_components().items(): for z_shift in shifts.get(flat_index, [0.0]): bounds = [component.bbox.GetBound(index) for index in range(6)] - bounds[4] += z_shift * self.explode_factor - bounds[5] += z_shift * self.explode_factor + bounds[4] += z_shift * explode_factor + bounds[5] += z_shift * explode_factor exploded_bbox.AddBounds(bounds) if not exploded_bbox.IsValid(): return None @@ -589,18 +578,23 @@ def translated(block: vtkDataSet, z_shift: float) -> vtkDataSet: transform_filter.Update() return cast("vtkDataSet", transform_filter.GetOutput()) - def translated_copies(self, block: vtkDataSet, z_shifts: list[float]) -> vtkDataSet: + def translated_copies( + self, block: vtkDataSet, z_shifts: list[float], explode_factor: float + ) -> vtkDataSet: """The block translated by each shift, all in one dataset to keep its styles.""" if len(z_shifts) == 1 or not isinstance(block, vtkPolyData): - return self.translated(block, z_shifts[0] * self.explode_factor) + return self.translated(block, z_shifts[0] * explode_factor) copies = vtkAppendPolyData() for z_shift in z_shifts: - copies.AddInputData(self.translated(block, z_shift * self.explode_factor)) + copies.AddInputData(self.translated(block, z_shift * explode_factor)) copies.Update() return cast("vtkPolyData", copies.GetOutput()) def translate_blocks( - self, dataset: vtkMultiBlockDataSet, z_shifts: dict[int, list[float]] + self, + dataset: vtkMultiBlockDataSet, + z_shifts: dict[int, list[float]], + explode_factor: float, ) -> vtkMultiBlockDataSet: translated_dataset = vtkMultiBlockDataSet() translated_dataset.CopyStructure(dataset) @@ -610,7 +604,9 @@ def translate_blocks( block = iterator.GetCurrentDataObject() if isinstance(block, vtkDataSet): block_shifts = z_shifts.get(iterator.GetCurrentFlatIndex(), [0.0]) - translated_dataset.SetDataSet(iterator, self.translated_copies(block, block_shifts)) + translated_dataset.SetDataSet( + iterator, self.translated_copies(block, block_shifts, explode_factor) + ) elif block is not None: translated_dataset.SetDataSet(iterator, block) iterator.GoToNextItem() diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index c7d4bb05..949093f3 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -40,9 +40,9 @@ from opengeodeweb_viewer.basemap_pipeline import ( basemap_actors, - basemaps, basemaps_follow, drape_planes, + scene_basemaps, update_basemaps, ) from opengeodeweb_viewer.rpc.viewer.schemas.threshold import Attribute, Location @@ -239,86 +239,110 @@ def scene_objects_of(self, pipeline: VtkPipeline) -> list[SceneObject]: if data_id in scene.objects ] - def update_pipeline_filter(self, pipeline: VtkPipeline) -> None: + def refresh_filters(self, pipeline: VtkPipeline) -> None: + """Recompute the data side and the filtered output of every scene after a source change.""" + pipeline.filter.Modified() + pipeline.filter.Update() + for scene_object in self.scene_objects_of(pipeline): + scene_object.filters.filter.Modified() + scene_object.filters.filter.Update() + + def update_scene_filter(self, scene_object: SceneObject, pipeline: VtkPipeline) -> None: + """Run the filter chain of a data in one scene: other scenes keep their own.""" + filters = scene_object.filters current_input_port = ( - pipeline.slice_filter.GetOutputPort() - if pipeline.slice_filter is not None + filters.slice_filter.GetOutputPort() + if filters.slice_filter is not None else pipeline.reader.GetOutputPort() ) active_filters = [ filter_obj for filter_obj in ( - pipeline.clipping_filter, - *pipeline.threshold_filters, - pipeline.shrink_filter, + filters.clipping_filter, + *filters.threshold_filters, + filters.shrink_filter, ) if filter_obj is not None ] for filter_obj in active_filters: filter_obj.SetInputConnection(current_input_port) current_input_port = filter_obj.GetOutputPort() - pipeline.filter.SetInputConnection(current_input_port) - pipeline.filter.Update() - filtered_dataset = pipeline.filter.GetOutputDataObject(0) + filters.filter.SetInputConnection(current_input_port) + filters.filter.Update() + filtered_dataset = filters.filter.GetOutputDataObject(0) if isinstance(filtered_dataset, vtkPointSet) and (points := filtered_dataset.GetPoints()): # Unfiltered input points are passed through, older than the cached filtered bounds points.Modified() - scene_objects = self.scene_objects_of(pipeline) if isinstance(filtered_dataset, vtkMultiBlockDataSet): - if pipeline.explode_factor > 0: - filtered_dataset = pipeline.explode_blocks(filtered_dataset) - sync_composite_pipeline(pipeline, scene_objects, filtered_dataset) + if filters.explode_factor > 0: + filtered_dataset = pipeline.explode_blocks(filtered_dataset, filters.explode_factor) + sync_composite_pipeline(pipeline, scene_object, filtered_dataset) else: - for scene_object in scene_objects: - scene_object.connect_mappers(pipeline) + scene_object.connect_mappers() target_dataset = ( cast("vtkDataSet", filtered_dataset) - if active_filters or pipeline.slice_filter is not None + if active_filters or filters.slice_filter is not None else pipeline.reader.GetOutputAsDataSet() ) pipeline.restore_active_scalars(target_dataset) # A shown grid scale keeps its bounds on render, so refit it on geometry changes self.fit_grid_scale() - def set_clipping_planes(self, data_ids: list[str], planes_data: list[Plane]) -> None: + def set_clipping_planes( + self, scene: Scene, data_ids: list[str], planes_data: list[Plane] + ) -> None: database = self.get_data_base() for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) # A basemap is cut like the data it lies under, below if pipeline.basemap is not None: continue - pipeline.clipping_planes = planes_data + scene_object = scene_object_of(scene, data_id) + filters = scene_object.filters + filters.clipping_planes = planes_data if planes_data: clipping_filter = vtkExtractGeometry() clipping_filter.SetImplicitFunction(_clipping_function(planes_data)) - pipeline.clipping_filter = clipping_filter + filters.clipping_filter = clipping_filter else: - pipeline.clipping_filter = None - self.update_pipeline_filter(pipeline) - for pipeline, basemap in basemaps(database): + filters.clipping_filter = None + self.update_scene_filter(scene_object, pipeline) + for data_id, basemap in scene_basemaps(database, scene): if not set(basemap.drape_ids).isdisjoint(data_ids): - self.clip_basemap(pipeline) - self.mark_basemaps_dirty(data_ids) - - def clip_basemap(self, pipeline: VtkPipeline) -> None: - """The basemap is cut like the georeferenced data it lies under.""" - planes_data = ( - [] if pipeline.basemap is None else drape_planes(self.get_data_base(), pipeline.basemap) + self.clip_basemap(scene, data_id) + self.mark_basemaps_dirty(data_ids, scene) + + def clip_basemap(self, scene: Scene, data_id: str) -> None: + """The basemap is cut like the georeferenced data it lies under in the scene.""" + pipeline = self.get_vtk_pipeline(data_id) + scene_object = scene_object_of(scene, data_id) + planes_data = [] if pipeline.basemap is None else drape_planes(scene, pipeline.basemap) + scene_object.filters.clipping_filter = ( + basemap_clipping_filter(planes_data) if planes_data else None ) - pipeline.clipping_filter = basemap_clipping_filter(planes_data) if planes_data else None - self.update_pipeline_filter(pipeline) + self.update_scene_filter(scene_object, pipeline) - def mark_basemaps_dirty(self, data_ids: Iterable[str] | None = None) -> None: - """The drapes of every scene are rebuilt once, at its next render, when a change on - data_ids moves them.""" - if data_ids is None or basemaps_follow(self.get_data_base(), data_ids): - for scene in self.get_scenes().values(): - scene.basemaps_dirty = True + def clip_basemaps(self, data_id: str) -> None: + """Cut a basemap in every scene showing it, like the data it lies under there.""" + for scene in self.get_scenes().values(): + if data_id in scene.objects: + self.clip_basemap(scene, data_id) - def set_threshold(self, data_ids: list[str], attributes: list[Attribute]) -> None: + def mark_basemaps_dirty( + self, data_ids: Iterable[str] | None = None, scene: Scene | None = None + ) -> None: + """The drapes of the scene, or of every scene, are rebuilt once, at its next render, + when a change on data_ids moves them.""" + scenes = list(self.get_scenes().values()) if scene is None else [scene] + if data_ids is None or basemaps_follow(self.get_data_base(), scenes, data_ids): + for dirty_scene in scenes: + dirty_scene.basemaps_dirty = True + + def set_threshold(self, scene: Scene, data_ids: list[str], attributes: list[Attribute]) -> None: for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) - pipeline.threshold_filters = [] + scene_object = scene_object_of(scene, data_id) + scene_object.filters.threshold_filters = [] for attribute in attributes: threshold_filter = vtkThreshold() threshold_filter.SetInputArrayToProcess( @@ -335,54 +359,59 @@ def set_threshold(self, data_ids: list[str], attributes: list[Attribute]) -> Non threshold_filter.SetSelectedComponent(attribute.item) threshold_filter.SetLowerThreshold(attribute.minimum) threshold_filter.SetUpperThreshold(attribute.maximum) - pipeline.threshold_filters.append(threshold_filter) - self.update_pipeline_filter(pipeline) - self.mark_basemaps_dirty(data_ids) + scene_object.filters.threshold_filters.append(threshold_filter) + self.update_scene_filter(scene_object, pipeline) + self.mark_basemaps_dirty(data_ids, scene) - def set_shrink(self, data_ids: list[str], shrink_factor: float) -> None: + def set_shrink(self, scene: Scene, data_ids: list[str], shrink_factor: float) -> None: for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) + scene_object = scene_object_of(scene, data_id) if shrink_factor < 1.0: shrink_filter = vtkShrinkFilter() shrink_filter.SetShrinkFactor(shrink_factor) - pipeline.shrink_filter = shrink_filter + scene_object.filters.shrink_filter = shrink_filter else: - pipeline.shrink_filter = None - self.update_pipeline_filter(pipeline) - self.mark_basemaps_dirty(data_ids) + scene_object.filters.shrink_filter = None + self.update_scene_filter(scene_object, pipeline) + self.mark_basemaps_dirty(data_ids, scene) - def set_explode(self, data_ids: list[str], explode_factor: float) -> dict[str, list[float]]: + def set_explode( + self, scene: Scene, data_ids: list[str], explode_factor: float + ) -> dict[str, list[float]]: """Returns the bounds of each exploded data, for the simplified view of the client.""" exploded_bounds: dict[str, list[float]] = {} for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) if not isinstance(pipeline.filter.GetOutputDataObject(0), vtkMultiBlockDataSet): continue - pipeline.explode_factor = explode_factor - self.update_pipeline_filter(pipeline) - bounds = pipeline.exploded_bounds() + scene_object = scene_object_of(scene, data_id) + scene_object.filters.explode_factor = explode_factor + self.update_scene_filter(scene_object, pipeline) + bounds = pipeline.exploded_bounds(explode_factor) if bounds is not None: exploded_bounds[data_id] = bounds # Even back to 0: the flat map was lifted over the exploded blocks - self.mark_basemaps_dirty() + self.mark_basemaps_dirty(scene=scene) return exploded_bounds - def set_slice(self, data_ids: list[str], slices: list[SliceElement]) -> list[int]: + def set_slice(self, scene: Scene, data_ids: list[str], slices: list[SliceElement]) -> list[int]: max_indices = [0, 0, 0] for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) image = pipeline.reader.GetOutputAsDataSet() if not isinstance(image, vtkImageData): continue + scene_object = scene_object_of(scene, data_id) extent = image.GetExtent() last_indices = [extent[2 * axis + 1] - extent[2 * axis] for axis in range(3)] max_indices = [ max(current, last) for current, last in zip(max_indices, last_indices, strict=True) ] if not slices: - if pipeline.slice_filter is None: + if scene_object.filters.slice_filter is None: continue - pipeline.slice_filter = None + scene_object.filters.slice_filter = None else: slice_filter = vtkAppendFilter() for slice_item in slices: @@ -393,8 +422,8 @@ def set_slice(self, data_ids: list[str], slices: list[SliceElement]) -> list[int extract_voi.SetInputConnection(pipeline.reader.GetOutputPort()) extract_voi.SetVOI(voi) slice_filter.AddInputConnection(extract_voi.GetOutputPort()) - pipeline.slice_filter = slice_filter - self.update_pipeline_filter(pipeline) + scene_object.filters.slice_filter = slice_filter + self.update_scene_filter(scene_object, pipeline) return max_indices def swap_pick_mappers( @@ -461,9 +490,10 @@ def get_composite_block_info( if not isinstance(scene_object.mapper, vtkCompositePolyDataMapper): return None, None flat_index = picker.GetFlatBlockIndex() - if not (0 <= flat_index < len(pipeline.block_data_sets)): + block_data_sets = scene_object.filters.block_data_sets + if not (0 <= flat_index < len(block_data_sets)): return None, None - dataset = pipeline.block_data_sets[flat_index] + dataset = block_data_sets[flat_index] geode_id = ( pipeline.block_geode_ids[flat_index] if flat_index < len(pipeline.block_geode_ids) diff --git a/tests/mesh/test_mesh_protocols.py b/tests/mesh/test_mesh_protocols.py index 9f5a229c..5088207e 100644 --- a/tests/mesh/test_mesh_protocols.py +++ b/tests/mesh/test_mesh_protocols.py @@ -10,6 +10,7 @@ from vtkmodules.vtkRenderingAnnotation import vtkCubeAxesActor from vtkmodules.vtkRenderingCore import ( vtkActor, + vtkDataSetMapper, vtkPolyDataMapper, vtkRenderer, ) @@ -21,7 +22,7 @@ check_source_folder, ) from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane -from opengeodeweb_viewer.scene import Scene +from opengeodeweb_viewer.scene import Scene, SceneObject from opengeodeweb_viewer.vtk_pipeline import BasemapState, VtkPipeline from opengeodeweb_viewer.vtk_protocol import VtkView, basemap_clipping_filter @@ -225,8 +226,19 @@ def setSharedObject(self, key: str, value: object) -> None: # noqa: N802 wslink self.objects[key] = value -def _view_with_basemap() -> tuple[VtkView, VtkPipeline]: - """A view holding a basemap draped on "data", and an "other" data.""" +def _show(view: VtkView, scene: Scene, data_id: str) -> SceneObject: + """The data in a scene, without filter.""" + scene_object = SceneObject(vtkDataSetMapper()) + pipeline = view.get_vtk_pipeline(data_id) + scene_object.filters.filter.SetInputConnection(pipeline.reader.GetOutputPort()) + scene_object.filters.filter.Update() + scene_object.connect_mappers() + scene.objects[data_id] = scene_object + return scene_object + + +def _view_with_basemap() -> tuple[VtkView, Scene]: + """A view holding a basemap draped on "data", and an "other" data, all in "scene_1".""" view = VtkView() view.coreServer = _SharedObjects() database = view.get_data_base() @@ -235,27 +247,62 @@ def _view_with_basemap() -> tuple[VtkView, VtkPipeline]: reader.SetFileName(str(Path(__file__).parent.parent / "data" / "basemap.vtp")) reader.Update() database[data_id] = VtkPipeline(reader) - basemap = database["basemap"] - basemap.basemap = BasemapState(maps=[], images={}, layers={}, drape_ids=["data"]) - return view, basemap + database["basemap"].basemap = BasemapState(maps=[], images={}, layers={}, drape_ids=["data"]) + scene = Scene.create("scene_1", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["scene_1"] = scene + for data_id in database: + _show(view, scene, data_id) + return view, scene def test_basemap_follows_the_clipping_of_its_draped_data() -> None: - view, basemap = _view_with_basemap() - view.set_clipping_planes(["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) - assert basemap.clipping_filter is not None + view, scene = _view_with_basemap() + basemap_filters = scene.objects["basemap"].filters + view.set_clipping_planes(scene, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) + assert basemap_filters.clipping_filter is not None # Unclipping data the basemap does not lie over leaves it cut - view.set_clipping_planes(["other"], []) - assert basemap.clipping_filter is not None - view.set_clipping_planes(["data"], []) - assert basemap.clipping_filter is None + view.set_clipping_planes(scene, ["other"], []) + assert basemap_filters.clipping_filter is not None + view.set_clipping_planes(scene, ["data"], []) + assert basemap_filters.clipping_filter is None + + +def test_basemap_follows_the_clipping_of_its_scene_only() -> None: + view, scene = _view_with_basemap() + other_scene = Scene.create("scene_2", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["scene_2"] = other_scene + _show(view, other_scene, "data") + _show(view, other_scene, "basemap") + view.set_clipping_planes(scene, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) + assert scene.objects["basemap"].filters.clipping_filter is not None + assert other_scene.objects["data"].filters.clipping_filter is None + assert other_scene.objects["basemap"].filters.clipping_filter is None def test_basemap_drape_dirty_only_for_its_draped_data() -> None: - view, _ = _view_with_basemap() - scene = Scene.create("scene_1", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["scene_1"] = scene - view.set_shrink(["other"], 0.5) + view, scene = _view_with_basemap() + view.set_shrink(scene, ["other"], 0.5) assert not scene.basemaps_dirty - view.set_shrink(["data"], 0.5) + view.set_shrink(scene, ["data"], 0.5) assert scene.basemaps_dirty + + +def test_filters_stay_in_their_scene() -> None: + view, scene = _view_with_basemap() + other_scene = Scene.create("scene_2", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["scene_2"] = other_scene + _show(view, other_scene, "data") + unfiltered_bounds = other_scene.objects["data"].filters.filter.GetOutput().GetBounds() + cells = other_scene.objects["data"].filters.filter.GetOutput().GetNumberOfCells() + + view.set_clipping_planes(scene, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) + view.set_shrink(scene, ["data"], 0.5) + + clipped = scene.objects["data"].filters.filter.GetOutput() + assert clipped.GetBounds()[1] < unfiltered_bounds[1] + other = other_scene.objects["data"].filters.filter.GetOutput() + assert other.GetBounds() == unfiltered_bounds + assert other.GetNumberOfCells() == cells + assert not other_scene.basemaps_dirty + assert other_scene.objects["data"].filters.shrink_filter is None + assert other_scene.objects["data"].filters.clipping_planes == [] diff --git a/tests/test_basemap_drape.py b/tests/test_basemap_drape.py index e62683e9..14409df7 100644 --- a/tests/test_basemap_drape.py +++ b/tests/test_basemap_drape.py @@ -121,8 +121,8 @@ def test_pipeline_surfaces_of_a_surface_mesh(tmp_path: Path) -> None: reader.Update() pipeline = VtkPipeline(reader) scene_object = SceneObject(vtkDataSetMapper()) - pipeline.filter.SetInputConnection(reader.GetOutputPort()) - pipeline.filter.Update() + scene_object.filters.filter.SetInputConnection(reader.GetOutputPort()) + scene_object.filters.filter.Update() [surface] = pipeline_surfaces(pipeline, scene_object) assert surface.GetNumberOfPolys() == 1 # Hidden data is never draped diff --git a/tests/test_scene.py b/tests/test_scene.py index 3479210d..6d746037 100644 --- a/tests/test_scene.py +++ b/tests/test_scene.py @@ -3,7 +3,6 @@ # Third party imports from vtkmodules.vtkCommonCore import vtkFloatArray from vtkmodules.vtkCommonDataModel import vtkPolyData -from vtkmodules.vtkCommonExecutionModel import vtkTrivialProducer from vtkmodules.vtkRenderingCore import ( VTK_SCALAR_MODE_USE_POINT_FIELD_DATA, vtkActor, @@ -15,7 +14,7 @@ # Local application imports from opengeodeweb_viewer.scene import Scene, SceneObject -from opengeodeweb_viewer.vtk_pipeline import BlockStyle, VtkPipeline +from opengeodeweb_viewer.vtk_pipeline import BlockStyle def test_scenes_have_distinct_render_windows() -> None: @@ -54,10 +53,9 @@ def composite_scene_object() -> SceneObject: def test_scenes_colour_shared_block_by_their_own_array() -> None: block = block_with_arrays(["first", "second"]) - pipeline = VtkPipeline(vtkTrivialProducer()) # type: ignore[arg-type] - pipeline.block_data_sets = [block] scene_objects = {name: composite_scene_object() for name in ("first", "second")} for name, scene_object in scene_objects.items(): + scene_object.filters.block_data_sets = [block] scene_object.block_styles[0] = BlockStyle( name=name, attribute_location="point", @@ -67,7 +65,7 @@ def test_scenes_colour_shared_block_by_their_own_array() -> None: item=0, no_data_color=None, ) - scene_object.update_block_colors(pipeline, 0) + scene_object.update_block_colors(0) for name, scene_object in scene_objects.items(): mapper = scene_object.mapper diff --git a/tests/test_vtk_pipeline.py b/tests/test_vtk_pipeline.py index e6ec3c2e..7000089c 100644 --- a/tests/test_vtk_pipeline.py +++ b/tests/test_vtk_pipeline.py @@ -119,14 +119,13 @@ def explode( pipeline.filter.SetInputConnection(shrink_filter.GetOutputPort()) pipeline.filter.Update() filtered_model = pipeline.filter.GetOutputDataObject(0) - pipeline.block_data_sets = pipeline.extract_blocks(filtered_model) + filtered_blocks = pipeline.extract_blocks(filtered_model) for block_id in hidden_block_ids: mapper.GetCompositeDataDisplayAttributes().SetBlockVisibility( - pipeline.block_data_sets[block_id], + filtered_blocks[block_id], False, # noqa: FBT003 VTK API ) - pipeline.explode_factor = explode_factor - exploded_model = pipeline.explode_blocks(filtered_model) + exploded_model = pipeline.explode_blocks(filtered_model, explode_factor) return ( [ block @@ -229,6 +228,5 @@ def test_exploded_bounds_follow_explode_factor() -> None: model_source = vtkTrivialProducer() model_source.SetOutput(stacked_model()) pipeline = VtkPipeline(model_source) # type: ignore[arg-type] - assert pipeline.exploded_bounds() == pytest.approx([0, 30, 0, 10, 0, 10]) - pipeline.explode_factor = 0.5 - assert pipeline.exploded_bounds() == pytest.approx([0, 30, 0, 10, 0, 10 + (4 + GAP) / 2]) + assert pipeline.exploded_bounds(0.0) == pytest.approx([0, 30, 0, 10, 0, 10]) + assert pipeline.exploded_bounds(0.5) == pytest.approx([0, 30, 0, 10, 0, 10 + (4 + GAP) / 2]) From 2e3e662a89d4d2f14f321367489eeae388c093e9 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 09:36:54 +0100 Subject: [PATCH 12/22] fix(viewer): filter a data in one scene only Co-Authored-By: Claude Opus 5.5 --- tests/model/test_model_protocols.py | 37 +++++++++++++++++++++++++++++ tests/test_viewer_protocols.py | 7 +++--- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/tests/model/test_model_protocols.py b/tests/model/test_model_protocols.py index 12800640..d7a55145 100644 --- a/tests/model/test_model_protocols.py +++ b/tests/model/test_model_protocols.py @@ -1,10 +1,18 @@ from typing import TYPE_CHECKING +import pytest +from vtkmodules.vtkCommonExecutionModel import vtkTrivialProducer +from vtkmodules.vtkWebCore import vtkWebApplication + from opengeodeweb_viewer.rpc.model.blocks.model_blocks_protocols import ( VtkModelBlocksView, ) from opengeodeweb_viewer.rpc.model.model_protocols import VtkModelView from opengeodeweb_viewer.rpc.viewer.viewer_protocols import VtkViewerView +from opengeodeweb_viewer.scene import Scene +from opengeodeweb_viewer.vtk_pipeline import ViewerData, VtkPipeline +from tests.mesh.test_mesh_protocols import _SharedObjects +from tests.test_vtk_pipeline import stacked_model if TYPE_CHECKING: from collections.abc import Callable @@ -176,3 +184,32 @@ def test_model_explode_blocks_hidden( [{"scene_id": "scene_1", "id": model_id, "block_ids": [48, 49], "visibility": False}], ) assert server.compare_image("model/explode_blocks_hidden.jpeg") + + +def test_explode_stays_in_its_scene(monkeypatch: pytest.MonkeyPatch) -> None: + view = VtkModelView() + view.coreServer = _SharedObjects() + monkeypatch.setattr( + view, + "get_viewer_data", + lambda data_id: ViewerData(data_id, "stacked.vtm", "model", "polygons"), + ) + source = vtkTrivialProducer() + source.SetOutput(stacked_model()) + pipeline = VtkPipeline(source) # type: ignore[arg-type] + view.setup_pipeline(pipeline, "stacked") + view.get_data_base()[model_id] = pipeline + scenes = [Scene.create(name, vtkWebApplication().GetObjectIdMap()) for name in ("a", "b")] + for scene in scenes: + view.get_scenes()[scene.scene_id] = scene + view.add_object(scene, model_id) + + view.set_explode(scenes[0], [model_id], 1.0) + + exploded, unexploded = (scene.objects[model_id] for scene in scenes) + assert exploded.filters.explode_factor == 1.0 + assert exploded.actor.GetBounds()[5] > 10 + assert unexploded.filters.explode_factor == 0.0 + assert unexploded.actor.GetBounds() == pytest.approx((0, 30, 0, 10, 0, 10)) + # The blocks of each scene are its own (flat index 2: the first leaf) + assert exploded.filters.block_data_sets[2] is not unexploded.filters.block_data_sets[2] diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index 9c726646..c3ad5305 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -614,7 +614,7 @@ def test_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N assert server.compare_image("viewer/shrink.jpeg") -def test_shrink_reaches_every_scene( +def test_shrink_stays_in_its_scene( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: show_mesh(server, dataset_factory) @@ -624,8 +624,9 @@ def test_shrink_reaches_every_scene( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [{"scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8}], ) - # The filter is on the shared data: the other scene shows it too - assert server.compare_image("viewer/shrink.jpeg", "scene_2") + # The filter is on the data of its scene only: the other scene is not shrunk + assert server.compare_image("viewer/shrink.jpeg", "scene_1") + assert not server.compare_image("viewer/shrink.jpeg", "scene_2") def test_explode_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: From e0640a7681238141068e7c545803eeabdf7d5280 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 10:06:01 +0100 Subject: [PATCH 13/22] feat(viewer): name the block of a model component block_id Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 104 +++++++++--------- opengeodeweb_viewer_typed_schemas.d.ts | 36 +++--- .../rpc/model/blocks/schemas/color.json | 6 +- .../rpc/model/blocks/schemas/color.py | 4 +- .../rpc/model/corners/schemas/color.json | 6 +- .../rpc/model/corners/schemas/color.py | 4 +- .../rpc/model/lines/schemas/color.json | 6 +- .../rpc/model/lines/schemas/color.py | 4 +- .../rpc/model/model_protocols.py | 4 +- .../rpc/model/schemas/get_blocks_bounds.json | 2 +- .../rpc/model/schemas/get_blocks_bounds.py | 4 +- .../rpc/model/schemas/highlight.json | 2 +- .../rpc/model/schemas/highlight.py | 4 +- .../rpc/model/surfaces/schemas/color.json | 6 +- .../rpc/model/surfaces/schemas/color.py | 4 +- .../rpc/viewer/schemas/pick_colormap.json | 2 +- .../rpc/viewer/schemas/pick_colormap.py | 4 +- .../rpc/viewer/schemas/picked_ids.json | 4 +- .../rpc/viewer/schemas/picked_ids.py | 4 +- .../rpc/viewer/viewer_protocols.py | 4 +- .../schema_definitions.json | 8 +- src/opengeodeweb_viewer/schema_types.d.ts | 4 +- src/opengeodeweb_viewer/schema_types.json | 4 +- src/opengeodeweb_viewer/schema_types.py | 6 +- src/opengeodeweb_viewer/vtk_protocol.py | 6 +- 25 files changed, 121 insertions(+), 121 deletions(-) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index f052a227..59d1ca2e 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -2248,7 +2248,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2354,7 +2354,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2463,7 +2463,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2569,7 +2569,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2613,7 +2613,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2657,7 +2657,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2734,7 +2734,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2840,7 +2840,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2884,7 +2884,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -2928,7 +2928,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3002,7 +3002,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3046,7 +3046,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3114,8 +3114,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId", + "block_id": { + "title": "BlockId", "type": "integer" }, "geode_id": { @@ -3159,7 +3159,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], @@ -3197,7 +3197,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3303,7 +3303,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3347,7 +3347,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3415,8 +3415,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId", + "block_id": { + "title": "BlockId", "type": "integer" }, "geode_id": { @@ -3460,7 +3460,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], @@ -3568,7 +3568,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3674,7 +3674,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3783,7 +3783,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3889,7 +3889,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3933,7 +3933,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -3977,7 +3977,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4051,7 +4051,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4095,7 +4095,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4163,8 +4163,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId", + "block_id": { + "title": "BlockId", "type": "integer" }, "geode_id": { @@ -4208,7 +4208,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], @@ -4373,7 +4373,7 @@ "block_ids": { "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" } }, @@ -4410,7 +4410,7 @@ "block_ids": { "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" } } @@ -4484,7 +4484,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4590,7 +4590,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4699,7 +4699,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4805,7 +4805,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4849,7 +4849,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4893,7 +4893,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -4970,7 +4970,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -5076,7 +5076,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -5120,7 +5120,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -5164,7 +5164,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -5238,7 +5238,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -5282,7 +5282,7 @@ "title": "BlockIds", "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -5350,8 +5350,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId", + "block_id": { + "title": "BlockId", "type": "integer" }, "geode_id": { @@ -5395,7 +5395,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], @@ -6325,8 +6325,8 @@ "maxLength": 32 } }, - "viewer_id": { - "title": "ViewerId", + "block_id": { + "title": "BlockId", "type": "integer" } }, @@ -6368,7 +6368,7 @@ "block_ids": { "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" } } diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 31189f88..9924ba14 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -2,7 +2,7 @@ import type json from "./opengeodeweb_viewer_schemas.json"; import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; -import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, SceneId, ViewerId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; +import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockId, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, SceneId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; export interface GenericRegisterParams { id: DataId; @@ -585,9 +585,9 @@ export interface ModelBlocksColorResponse { } export interface ModelBlocksColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + block_id: BlockId; + color: ColorRGBA; + geode_id: GeodeId; } export interface ModelCornersAttributeVertexAttributeParams { @@ -629,9 +629,9 @@ export interface ModelCornersColorResponse { } export interface ModelCornersColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + block_id: BlockId; + color: ColorRGBA; + geode_id: GeodeId; } export interface ModelEdgesWidthParams { @@ -751,9 +751,9 @@ export interface ModelLinesColorResponse { } export interface ModelLinesColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + block_id: BlockId; + color: ColorRGBA; + geode_id: GeodeId; } export interface ModelPointsVisibilityParams { @@ -792,7 +792,7 @@ export interface ModelRegisterResponse { } export interface ModelHighlightParams { - block_ids: ViewerId[]; + block_ids: BlockId[]; id: DataId; scene_id: SceneId; visibility: Visibility; @@ -802,7 +802,7 @@ export interface ModelHighlightResponse { } export interface ModelGetBlocksBoundsParams { - block_ids: ViewerId[]; + block_ids: BlockId[]; id: DataId; } @@ -961,9 +961,9 @@ export interface ModelSurfacesColorResponse { } export interface ModelSurfacesColorResponseColor { - color: ColorRGBA; - geode_id: GeodeId; - viewer_id: ViewerId; + block_id: BlockId; + color: ColorRGBA; + geode_id: GeodeId; } export interface ModelSurfacesApplyTexturesParams { @@ -1200,8 +1200,8 @@ export interface ViewerPickedIDSParams { } export interface ViewerPickedIDSResponse { - array_ids: DataId[]; - viewer_id?: ViewerId; + array_ids: DataId[]; + block_id?: BlockId; } export interface ViewerPickColormapParams { @@ -1212,7 +1212,7 @@ export interface ViewerPickColormapParams { } export interface ViewerPickColormapResponse { - block_ids?: ViewerId[]; + block_ids?: BlockId[]; data_id?: string; } diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json index b99d1814..3f2523e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json @@ -41,8 +41,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId" + "block_id": { + "title": "BlockId" }, "geode_id": { "title": "GeodeId" @@ -52,7 +52,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py index 78ac0673..9aab4562 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -33,9 +33,9 @@ class ColorResult(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + block_id: BlockId color: ColorRGBA geode_id: GeodeId - viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json index b99d1814..3f2523e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json @@ -41,8 +41,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId" + "block_id": { + "title": "BlockId" }, "geode_id": { "title": "GeodeId" @@ -52,7 +52,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py index 78ac0673..9aab4562 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -33,9 +33,9 @@ class ColorResult(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + block_id: BlockId color: ColorRGBA geode_id: GeodeId - viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json index b99d1814..3f2523e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json @@ -41,8 +41,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId" + "block_id": { + "title": "BlockId" }, "geode_id": { "title": "GeodeId" @@ -52,7 +52,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py index 78ac0673..9aab4562 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -33,9 +33,9 @@ class ColorResult(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + block_id: BlockId color: ColorRGBA geode_id: GeodeId - viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/model_protocols.py b/src/opengeodeweb_viewer/rpc/model/model_protocols.py index 4b700022..0fd4bf7c 100644 --- a/src/opengeodeweb_viewer/rpc/model/model_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/model_protocols.py @@ -81,7 +81,7 @@ class ColorRGBA(TypedDict): class ColorResult(TypedDict): - viewer_id: int + block_id: int geode_id: str color: ColorRGBA @@ -136,7 +136,7 @@ def apply_color(self, params: ModelColorParams) -> list[ColorResult]: attr.SetBlockOpacity(block_dataset, 1.0) colors.append( { - "viewer_id": block_id, + "block_id": block_id, "geode_id": str(geode_id), "color": { "red": round(red * 255), diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json index e18d81eb..eada1570 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.json @@ -8,7 +8,7 @@ "block_ids": { "type": "array", "items": { - "title": "ViewerId" + "title": "BlockId" } } }, diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py index 52c25f36..62e83583 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/get_blocks_bounds.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ViewerId +from opengeodeweb_viewer.schema_types import BlockId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -13,7 +13,7 @@ class GetBlocksBounds(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[ViewerId] + block_ids: List[BlockId] id: DataId diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json index 94656677..ed9dda82 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json @@ -11,7 +11,7 @@ "block_ids": { "type": "array", "items": { - "title": "ViewerId" + "title": "BlockId" } }, "visibility": { diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py index 3445f097..58c81978 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId, ViewerId, Visibility +from opengeodeweb_viewer.schema_types import BlockId, SceneId, Visibility from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -13,7 +13,7 @@ class Highlight(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: List[ViewerId] + block_ids: List[BlockId] id: DataId scene_id: SceneId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json index b99d1814..3f2523e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json @@ -41,8 +41,8 @@ "type": "object", "title": "ColorResult", "properties": { - "viewer_id": { - "title": "ViewerId" + "block_id": { + "title": "BlockId" }, "geode_id": { "title": "GeodeId" @@ -52,7 +52,7 @@ } }, "required": [ - "viewer_id", + "block_id", "geode_id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py index 78ac0673..9aab4562 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId, ViewerId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -33,9 +33,9 @@ class ColorResult(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) + block_id: BlockId color: ColorRGBA geode_id: GeodeId - viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json index b3c790e8..8a7f00e1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json @@ -27,7 +27,7 @@ "block_ids": { "type": "array", "items": { - "title": "ViewerId" + "title": "BlockId" } } }, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py index b1389291..6b403aff 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId, ViewerId +from opengeodeweb_viewer.schema_types import BlockId, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -22,7 +22,7 @@ class PickColormapResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - block_ids: Optional[List[ViewerId]] = None + block_ids: Optional[List[BlockId]] = None data_id: Optional[str] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json index 0a0ea0ae..edf6a888 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json @@ -34,8 +34,8 @@ "title": "DataId" } }, - "viewer_id": { - "title": "ViewerId" + "block_id": { + "title": "BlockId" } }, "required": [ diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index 98d4ccd7..7218f6fa 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, ViewerId +from opengeodeweb_viewer.schema_types import BlockId, SceneId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -26,7 +26,7 @@ def __post_init__(self) -> None: print_dataclass(self) array_ids: List[DataId] - viewer_id: Optional[ViewerId] = None + block_id: Optional[BlockId] = None picked_ids_route = Route( diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index 82d3087a..23aad93a 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -302,8 +302,8 @@ def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: ] if not array_ids: return schemas.PickedIDSResponse(array_ids=[]) - viewer_id = flat_index if flat_index != -1 else None - return schemas.PickedIDSResponse(array_ids=array_ids, viewer_id=viewer_id) + block_id = flat_index if flat_index != -1 else None + return schemas.PickedIDSResponse(array_ids=array_ids, block_id=block_id) @typed_rpc(viewer_prefix, schemas.grid_scale_route) def toggle_grid_scale(self, params: schemas.GridScale) -> schemas.GridScaleResponse: diff --git a/src/opengeodeweb_viewer/schema_definitions.json b/src/opengeodeweb_viewer/schema_definitions.json index f5a8db4e..700032fa 100644 --- a/src/opengeodeweb_viewer/schema_definitions.json +++ b/src/opengeodeweb_viewer/schema_definitions.json @@ -13,10 +13,13 @@ "AttributeRangeMinimum": { "type": "number" }, + "BlockId": { + "type": "integer" + }, "BlockIds": { "type": "array", "items": { - "title": "ViewerId", + "title": "BlockId", "type": "integer" }, "minItems": 1 @@ -253,9 +256,6 @@ "default" ] }, - "ViewerId": { - "type": "integer" - }, "ViewerObjectType": { "type": "string", "enum": [ diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts index 04fc9da6..9ed4dbf1 100644 --- a/src/opengeodeweb_viewer/schema_types.d.ts +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -1,9 +1,9 @@ // Generated by generate_schema_types.js from schema_types.json: do not edit -export type ViewerId = number; +export type BlockId = number; export type AttributeName = string; export type Filename = string; -export type BlockIds = ViewerId[]; +export type BlockIds = BlockId[]; export type Visibility = boolean; export type Opacity = number; export type PointSize = number; diff --git a/src/opengeodeweb_viewer/schema_types.json b/src/opengeodeweb_viewer/schema_types.json index 76df7b8c..1b89c412 100644 --- a/src/opengeodeweb_viewer/schema_types.json +++ b/src/opengeodeweb_viewer/schema_types.json @@ -1,5 +1,5 @@ { - "ViewerId": { + "BlockId": { "type": "integer" }, "AttributeName": { @@ -33,7 +33,7 @@ "BlockIds": { "type": "array", "items": { - "title": "ViewerId" + "title": "BlockId" }, "minItems": 1 }, diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py index a17f5298..637fc356 100644 --- a/src/opengeodeweb_viewer/schema_types.py +++ b/src/opengeodeweb_viewer/schema_types.py @@ -5,10 +5,10 @@ from dataclasses_json import DataClassJsonMixin from opengeodeweb_microservice.schemas import print_dataclass -ViewerId = int +BlockId = int AttributeName = str Filename = str -BlockIds = list[ViewerId] +BlockIds = list[BlockId] Visibility = bool Opacity = float PointSize = float @@ -50,6 +50,7 @@ class ColorRGBA(ColorRGB): "AttributeName", "AttributeRangeMaximum", "AttributeRangeMinimum", + "BlockId", "BlockIds", "ColorMapPoints", "ColorRGB", @@ -60,6 +61,5 @@ class ColorRGBA(ColorRGB): "Point3D", "PointSize", "SceneId", - "ViewerId", "Visibility", ] diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index 949093f3..a64c4048 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -469,10 +469,10 @@ def pick_actors_under_coordinate( renderer = scene.renderer self.swap_pick_mappers(scene, data_ids, use_pick_mapper=True) actors = [] - viewer_id = -1 + block_id = -1 try: picker.Pick(x, y, 0, renderer) - viewer_id = picker.GetFlatBlockIndex() + block_id = picker.GetFlatBlockIndex() while (actor := picker.GetActor()) is not None: actors.append(actor) actor.PickableOff() @@ -481,7 +481,7 @@ def pick_actors_under_coordinate( for actor in actors: actor.PickableOn() self.swap_pick_mappers(scene, data_ids, use_pick_mapper=False) - return actors, viewer_id + return actors, block_id def get_composite_block_info( self, pipeline: VtkPipeline, scene_object: SceneObject, picker: vtkCellPicker From 7f8f2495756095a4de0023d1c37530961e4fea6d Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 10:07:42 +0100 Subject: [PATCH 14/22] feat(viewer): name the id of a view viewer_id and its rpcs after the viewer Co-Authored-By: Claude Opus 5.5 --- opengeodeweb_viewer_schemas.json | 642 +++++++++--------- opengeodeweb_viewer_typed_schemas.d.ts | 350 +++++----- .../object/object_methods.py | 64 +- .../rpc/image/image_protocols.py | 4 +- .../rpc/image/schemas/opacity.json | 6 +- .../rpc/image/schemas/opacity.py | 4 +- .../rpc/image/schemas/visibility.json | 6 +- .../rpc/image/schemas/visibility.py | 4 +- .../cell/cells_attribute_cell_protocols.py | 2 +- .../attribute/cell/schemas/attribute.json | 6 +- .../cells/attribute/cell/schemas/attribute.py | 4 +- .../cells_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/cells/cells_protocols.py | 6 +- .../rpc/mesh/cells/schemas/color.json | 6 +- .../rpc/mesh/cells/schemas/color.py | 4 +- .../rpc/mesh/cells/schemas/opacity.json | 6 +- .../rpc/mesh/cells/schemas/opacity.py | 4 +- .../rpc/mesh/cells/schemas/visibility.json | 6 +- .../rpc/mesh/cells/schemas/visibility.py | 4 +- .../edge/edges_attribute_edge_protocols.py | 2 +- .../attribute/edge/schemas/attribute.json | 6 +- .../edges/attribute/edge/schemas/attribute.py | 4 +- .../edges_attribute_vertex_protocols.py | 4 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/edges/edges_protocols.py | 8 +- .../rpc/mesh/edges/schemas/color.json | 6 +- .../rpc/mesh/edges/schemas/color.py | 4 +- .../rpc/mesh/edges/schemas/opacity.json | 6 +- .../rpc/mesh/edges/schemas/opacity.py | 4 +- .../rpc/mesh/edges/schemas/visibility.json | 6 +- .../rpc/mesh/edges/schemas/visibility.py | 4 +- .../rpc/mesh/edges/schemas/width.json | 6 +- .../rpc/mesh/edges/schemas/width.py | 4 +- .../rpc/mesh/mesh_protocols.py | 26 +- .../points_attribute_vertex_protocols.py | 4 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/points/points_protocols.py | 8 +- .../rpc/mesh/points/schemas/color.json | 6 +- .../rpc/mesh/points/schemas/color.py | 4 +- .../rpc/mesh/points/schemas/opacity.json | 6 +- .../rpc/mesh/points/schemas/opacity.py | 4 +- .../rpc/mesh/points/schemas/size.json | 6 +- .../rpc/mesh/points/schemas/size.py | 4 +- .../rpc/mesh/points/schemas/visibility.json | 6 +- .../rpc/mesh/points/schemas/visibility.py | 4 +- .../polygons_attribute_polygon_protocols.py | 2 +- .../attribute/polygon/schemas/attribute.json | 6 +- .../attribute/polygon/schemas/attribute.py | 4 +- .../polygons_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/polygons/polygons_protocols.py | 6 +- .../rpc/mesh/polygons/schemas/color.json | 6 +- .../rpc/mesh/polygons/schemas/color.py | 4 +- .../rpc/mesh/polygons/schemas/opacity.json | 6 +- .../rpc/mesh/polygons/schemas/opacity.py | 4 +- .../rpc/mesh/polygons/schemas/visibility.json | 6 +- .../rpc/mesh/polygons/schemas/visibility.py | 4 +- ...olyhedra_attribute_polyhedron_protocols.py | 2 +- .../polyhedron/schemas/attribute.json | 6 +- .../attribute/polyhedron/schemas/attribute.py | 4 +- .../polyhedra_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/mesh/polyhedra/polyhedra_protocols.py | 6 +- .../rpc/mesh/polyhedra/schemas/color.json | 6 +- .../rpc/mesh/polyhedra/schemas/color.py | 4 +- .../rpc/mesh/polyhedra/schemas/opacity.json | 6 +- .../rpc/mesh/polyhedra/schemas/opacity.py | 4 +- .../mesh/polyhedra/schemas/visibility.json | 6 +- .../rpc/mesh/polyhedra/schemas/visibility.py | 4 +- .../rpc/mesh/schemas/apply_textures.json | 6 +- .../rpc/mesh/schemas/apply_textures.py | 4 +- .../rpc/mesh/schemas/color.json | 6 +- .../rpc/mesh/schemas/color.py | 4 +- .../rpc/mesh/schemas/highlight.json | 6 +- .../rpc/mesh/schemas/highlight.py | 4 +- .../rpc/mesh/schemas/visibility.json | 6 +- .../rpc/mesh/schemas/visibility.py | 4 +- .../blocks_attribute_polyhedron_protocols.py | 2 +- .../polyhedron/schemas/attribute.json | 6 +- .../attribute/polyhedron/schemas/attribute.py | 4 +- .../blocks_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- ...blocks_edges_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../edges/model_blocks_edges_protocols.py | 6 +- .../rpc/model/blocks/edges/schemas/color.json | 6 +- .../rpc/model/blocks/edges/schemas/color.py | 4 +- .../blocks/edges/schemas/visibility.json | 6 +- .../model/blocks/edges/schemas/visibility.py | 4 +- .../rpc/model/blocks/edges/schemas/width.json | 6 +- .../rpc/model/blocks/edges/schemas/width.py | 4 +- .../model/blocks/model_blocks_protocols.py | 2 +- ...locks_points_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../points/model_blocks_points_protocols.py | 6 +- .../model/blocks/points/schemas/color.json | 6 +- .../rpc/model/blocks/points/schemas/color.py | 4 +- .../rpc/model/blocks/points/schemas/size.json | 6 +- .../rpc/model/blocks/points/schemas/size.py | 4 +- .../blocks/points/schemas/visibility.json | 6 +- .../model/blocks/points/schemas/visibility.py | 4 +- .../rpc/model/blocks/schemas/color.json | 6 +- .../rpc/model/blocks/schemas/color.py | 4 +- .../rpc/model/blocks/schemas/visibility.json | 6 +- .../rpc/model/blocks/schemas/visibility.py | 4 +- .../corners_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../model/corners/model_corners_protocols.py | 2 +- .../rpc/model/corners/schemas/color.json | 6 +- .../rpc/model/corners/schemas/color.py | 4 +- .../rpc/model/corners/schemas/visibility.json | 6 +- .../rpc/model/corners/schemas/visibility.py | 4 +- .../rpc/model/edges/model_edges_protocols.py | 4 +- .../rpc/model/edges/schemas/visibility.json | 6 +- .../rpc/model/edges/schemas/visibility.py | 4 +- .../rpc/model/edges/schemas/width.json | 6 +- .../rpc/model/edges/schemas/width.py | 4 +- .../edge/lines_attribute_edge_protocols.py | 2 +- .../attribute/edge/schemas/attribute.json | 6 +- .../lines/attribute/edge/schemas/attribute.py | 4 +- .../lines_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../rpc/model/lines/model_lines_protocols.py | 2 +- ...lines_points_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../points/model_lines_points_protocols.py | 6 +- .../rpc/model/lines/points/schemas/color.json | 6 +- .../rpc/model/lines/points/schemas/color.py | 4 +- .../rpc/model/lines/points/schemas/size.json | 6 +- .../rpc/model/lines/points/schemas/size.py | 4 +- .../lines/points/schemas/visibility.json | 6 +- .../model/lines/points/schemas/visibility.py | 4 +- .../rpc/model/lines/schemas/color.json | 6 +- .../rpc/model/lines/schemas/color.py | 4 +- .../rpc/model/lines/schemas/visibility.json | 6 +- .../rpc/model/lines/schemas/visibility.py | 4 +- .../rpc/model/model_protocols.py | 86 +-- .../model/points/model_points_protocols.py | 4 +- .../rpc/model/points/schemas/size.json | 6 +- .../rpc/model/points/schemas/size.py | 4 +- .../rpc/model/points/schemas/visibility.json | 6 +- .../rpc/model/points/schemas/visibility.py | 4 +- .../rpc/model/schemas/highlight.json | 6 +- .../rpc/model/schemas/highlight.py | 4 +- .../rpc/model/schemas/visibility.json | 6 +- .../rpc/model/schemas/visibility.py | 4 +- .../attribute/polygon/schemas/attribute.json | 6 +- .../attribute/polygon/schemas/attribute.py | 4 +- .../surfaces_attribute_polygon_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- .../surfaces_attribute_vertex_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- ...rfaces_edges_attribute_vertex_protocols.py | 2 +- .../edges/model_surfaces_edges_protocols.py | 6 +- .../model/surfaces/edges/schemas/color.json | 6 +- .../rpc/model/surfaces/edges/schemas/color.py | 4 +- .../surfaces/edges/schemas/visibility.json | 6 +- .../surfaces/edges/schemas/visibility.py | 4 +- .../model/surfaces/edges/schemas/width.json | 6 +- .../rpc/model/surfaces/edges/schemas/width.py | 4 +- .../surfaces/model_surfaces_protocols.py | 2 +- .../attribute/vertex/schemas/attribute.json | 6 +- .../attribute/vertex/schemas/attribute.py | 4 +- ...faces_points_attribute_vertex_protocols.py | 2 +- .../points/model_surfaces_points_protocols.py | 6 +- .../model/surfaces/points/schemas/color.json | 6 +- .../model/surfaces/points/schemas/color.py | 4 +- .../model/surfaces/points/schemas/size.json | 6 +- .../rpc/model/surfaces/points/schemas/size.py | 4 +- .../surfaces/points/schemas/visibility.json | 6 +- .../surfaces/points/schemas/visibility.py | 4 +- .../surfaces/schemas/apply_textures.json | 6 +- .../model/surfaces/schemas/apply_textures.py | 4 +- .../rpc/model/surfaces/schemas/color.json | 6 +- .../rpc/model/surfaces/schemas/color.py | 4 +- .../model/surfaces/schemas/visibility.json | 6 +- .../rpc/model/surfaces/schemas/visibility.py | 4 +- .../rpc/viewer/schemas/__init__.py | 10 +- .../{add_to_scene.json => add_to_viewer.json} | 6 +- .../{add_to_scene.py => add_to_viewer.py} | 16 +- .../rpc/viewer/schemas/axes.json | 6 +- .../rpc/viewer/schemas/axes.py | 4 +- .../rpc/viewer/schemas/clipping_planes.json | 6 +- .../rpc/viewer/schemas/clipping_planes.py | 4 +- .../{create_scene.json => create_viewer.json} | 6 +- .../{create_scene.py => create_viewer.py} | 16 +- .../{delete_scene.json => delete_viewer.json} | 6 +- .../{delete_scene.py => delete_viewer.py} | 16 +- .../rpc/viewer/schemas/explode.json | 6 +- .../rpc/viewer/schemas/explode.py | 4 +- .../viewer/schemas/get_point_position.json | 6 +- .../rpc/viewer/schemas/get_point_position.py | 4 +- .../rpc/viewer/schemas/grid_scale.json | 6 +- .../rpc/viewer/schemas/grid_scale.py | 4 +- .../rpc/viewer/schemas/highlight.json | 6 +- .../rpc/viewer/schemas/highlight.py | 4 +- .../rpc/viewer/schemas/pick_colormap.json | 6 +- .../rpc/viewer/schemas/pick_colormap.py | 4 +- .../rpc/viewer/schemas/picked_ids.json | 6 +- .../rpc/viewer/schemas/picked_ids.py | 4 +- .../rpc/viewer/schemas/preview_points.json | 6 +- .../rpc/viewer/schemas/preview_points.py | 4 +- ...rom_scene.json => remove_from_viewer.json} | 6 +- ...ve_from_scene.py => remove_from_viewer.py} | 16 +- .../rpc/viewer/schemas/render.json | 6 +- .../rpc/viewer/schemas/render.py | 4 +- .../rpc/viewer/schemas/reset_camera.json | 6 +- .../rpc/viewer/schemas/reset_camera.py | 4 +- .../rpc/viewer/schemas/reset_ruler.json | 6 +- .../rpc/viewer/schemas/reset_ruler.py | 4 +- .../{reset_scenes.json => reset_viewers.json} | 2 +- .../{reset_scenes.py => reset_viewers.py} | 12 +- .../viewer/schemas/reset_visualization.json | 6 +- .../rpc/viewer/schemas/reset_visualization.py | 4 +- .../rpc/viewer/schemas/ruler.json | 6 +- .../rpc/viewer/schemas/ruler.py | 4 +- .../viewer/schemas/set_background_color.json | 6 +- .../viewer/schemas/set_background_color.py | 4 +- .../schemas/set_orientation_widget.json | 6 +- .../viewer/schemas/set_orientation_widget.py | 4 +- .../rpc/viewer/schemas/set_text_style.json | 6 +- .../rpc/viewer/schemas/set_text_style.py | 4 +- .../rpc/viewer/schemas/set_z_scaling.json | 6 +- .../rpc/viewer/schemas/set_z_scaling.py | 4 +- .../rpc/viewer/schemas/shrink.json | 6 +- .../rpc/viewer/schemas/shrink.py | 4 +- .../rpc/viewer/schemas/slice.json | 6 +- .../rpc/viewer/schemas/slice.py | 4 +- .../rpc/viewer/schemas/take_screenshot.json | 6 +- .../rpc/viewer/schemas/take_screenshot.py | 4 +- .../rpc/viewer/schemas/threshold.json | 6 +- .../rpc/viewer/schemas/threshold.py | 4 +- .../rpc/viewer/schemas/update_camera.json | 6 +- .../rpc/viewer/schemas/update_camera.py | 4 +- .../rpc/viewer/schemas/update_data.json | 6 +- .../rpc/viewer/schemas/update_data.py | 4 +- .../rpc/viewer/viewer_protocols.py | 110 +-- src/opengeodeweb_viewer/scene/scene.py | 6 +- .../schema_definitions.json | 8 +- src/opengeodeweb_viewer/schema_types.d.ts | 2 +- src/opengeodeweb_viewer/schema_types.json | 2 +- src/opengeodeweb_viewer/schema_types.py | 4 +- src/opengeodeweb_viewer/vtk_protocol.py | 20 +- tests/conftest.py | 32 +- .../{add_to_scene.jpeg => add_to_viewer.jpeg} | Bin tests/image/test_image_protocols.py | 24 +- .../test_cells_attribute_cell_protocols.py | 18 +- .../test_cells_attribute_vertex_protocols.py | 18 +- tests/mesh/cells/test_mesh_cells_protocols.py | 28 +- .../test_edges_attribute_edge_protocols.py | 14 +- .../test_edges_attribute_vertex_protocols.py | 42 +- tests/mesh/edges/test_mesh_edges_protocols.py | 14 +- .../test_points_attribute_vertex_protocols.py | 32 +- .../mesh/points/test_mesh_points_protocols.py | 26 +- ...st_polygons_attribute_polygon_protocols.py | 18 +- ...est_polygons_attribute_vertex_protocols.py | 24 +- .../polygons/test_mesh_polygons_protocols.py | 10 +- ...olyhedra_attribute_polyhedron_protocols.py | 18 +- ...st_polyhedra_attribute_vertex_protocols.py | 18 +- .../test_mesh_polyhedra_protocols.py | 10 +- tests/mesh/test_mesh_protocols.py | 24 +- ...l_blocks_attribute_polyhedron_protocols.py | 40 +- ...model_blocks_attribute_vertex_protocols.py | 42 +- .../blocks/test_model_blocks_protocols.py | 12 +- ...odel_corners_attribute_vertex_protocols.py | 36 +- .../corners/test_model_corners_protocols.py | 8 +- .../model/edges/test_model_edges_protocols.py | 20 +- ...st_model_lines_attribute_edge_protocols.py | 36 +- ..._model_lines_attribute_vertex_protocols.py | 36 +- .../model/lines/test_model_lines_protocols.py | 10 +- .../points/test_model_points_protocols.py | 28 +- ...el_surfaces_attribute_polygon_protocols.py | 38 +- ...del_surfaces_attribute_vertex_protocols.py | 48 +- .../surfaces/test_model_surfaces_protocols.py | 14 +- tests/model/test_model_protocols.py | 24 +- tests/test_generic_protocols.py | 6 +- tests/test_scene.py | 6 +- tests/test_typed_rpcs.py | 14 +- tests/test_utils_protocols.py | 14 +- tests/test_viewer_protocols.py | 232 +++---- 294 files changed, 1791 insertions(+), 1785 deletions(-) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{add_to_scene.json => add_to_viewer.json} (54%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{add_to_scene.py => add_to_viewer.py} (61%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{create_scene.json => create_viewer.json} (65%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{create_scene.py => create_viewer.py} (58%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{delete_scene.json => delete_viewer.json} (61%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{delete_scene.py => delete_viewer.py} (57%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{remove_from_scene.json => remove_from_viewer.json} (54%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{remove_from_scene.py => remove_from_viewer.py} (59%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{reset_scenes.json => reset_viewers.json} (89%) rename src/opengeodeweb_viewer/rpc/viewer/schemas/{reset_scenes.py => reset_viewers.py} (64%) rename tests/data/images/viewer/{add_to_scene.jpeg => add_to_viewer.jpeg} (100%) diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json index 59d1ca2e..1865006d 100644 --- a/opengeodeweb_viewer_schemas.json +++ b/opengeodeweb_viewer_schemas.json @@ -58,8 +58,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -75,7 +75,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -119,8 +119,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -138,7 +138,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], @@ -183,8 +183,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -256,7 +256,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -279,8 +279,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -352,7 +352,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -375,8 +375,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -392,7 +392,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -409,8 +409,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -428,7 +428,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], @@ -445,8 +445,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -491,7 +491,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], @@ -512,8 +512,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -585,7 +585,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -608,8 +608,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -681,7 +681,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -704,8 +704,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -721,7 +721,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "width" ], @@ -738,8 +738,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -755,7 +755,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -772,8 +772,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -791,7 +791,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], @@ -808,8 +808,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -854,7 +854,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], @@ -875,8 +875,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -948,7 +948,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -971,8 +971,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -988,7 +988,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -1019,8 +1019,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1036,7 +1036,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "size" ], @@ -1053,8 +1053,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1072,7 +1072,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], @@ -1089,8 +1089,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1135,7 +1135,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], @@ -1156,8 +1156,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1229,7 +1229,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -1252,8 +1252,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1325,7 +1325,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -1348,8 +1348,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1365,7 +1365,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -1382,8 +1382,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1401,7 +1401,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], @@ -1418,8 +1418,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1464,7 +1464,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], @@ -1485,8 +1485,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1558,7 +1558,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -1581,8 +1581,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1654,7 +1654,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", @@ -1677,8 +1677,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1694,7 +1694,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -1711,8 +1711,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1730,7 +1730,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], @@ -1747,8 +1747,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1793,7 +1793,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], @@ -1811,8 +1811,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1828,7 +1828,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -1872,8 +1872,8 @@ "rpc": "highlight", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1889,7 +1889,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -1929,8 +1929,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -1975,7 +1975,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], @@ -2077,8 +2077,8 @@ "rpc": "apply_textures", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2114,7 +2114,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "textures" ], @@ -2233,8 +2233,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2315,7 +2315,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -2339,8 +2339,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2421,7 +2421,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -2448,8 +2448,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2530,7 +2530,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -2554,8 +2554,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2580,7 +2580,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "width" @@ -2598,8 +2598,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2624,7 +2624,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -2642,8 +2642,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2697,7 +2697,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" @@ -2719,8 +2719,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2801,7 +2801,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -2825,8 +2825,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2851,7 +2851,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -2869,8 +2869,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2895,7 +2895,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "size" @@ -2913,8 +2913,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -2968,7 +2968,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" @@ -2987,8 +2987,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3013,7 +3013,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -3031,8 +3031,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3099,7 +3099,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" @@ -3182,8 +3182,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3264,7 +3264,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -3288,8 +3288,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3314,7 +3314,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -3332,8 +3332,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3400,7 +3400,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" @@ -3481,8 +3481,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3498,7 +3498,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "width" ], @@ -3515,8 +3515,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3532,7 +3532,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -3553,8 +3553,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3635,7 +3635,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -3659,8 +3659,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3741,7 +3741,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -3768,8 +3768,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3850,7 +3850,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -3874,8 +3874,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3900,7 +3900,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -3918,8 +3918,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -3944,7 +3944,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "size" @@ -3962,8 +3962,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4017,7 +4017,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" @@ -4036,8 +4036,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4062,7 +4062,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -4080,8 +4080,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4148,7 +4148,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" @@ -4229,8 +4229,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4246,7 +4246,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -4263,8 +4263,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4280,7 +4280,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "size" ], @@ -4298,8 +4298,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4315,7 +4315,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], @@ -4359,8 +4359,8 @@ "rpc": "highlight", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4383,7 +4383,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -4469,8 +4469,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4551,7 +4551,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -4575,8 +4575,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4657,7 +4657,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -4684,8 +4684,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4766,7 +4766,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -4790,8 +4790,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4816,7 +4816,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "width" @@ -4834,8 +4834,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4860,7 +4860,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -4878,8 +4878,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -4933,7 +4933,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" @@ -4955,8 +4955,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5037,7 +5037,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", @@ -5061,8 +5061,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5087,7 +5087,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -5105,8 +5105,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5131,7 +5131,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "size" @@ -5149,8 +5149,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5204,7 +5204,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" @@ -5223,8 +5223,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5249,7 +5249,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" @@ -5267,8 +5267,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5335,7 +5335,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" @@ -5414,8 +5414,8 @@ "rpc": "apply_textures", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5449,7 +5449,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "textures" ], @@ -5534,8 +5534,8 @@ "rpc": "update_data", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5547,7 +5547,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id" ], "additionalProperties": false, @@ -5563,8 +5563,8 @@ "rpc": "update_camera", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5617,7 +5617,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "camera_options" ], "response": { @@ -5632,8 +5632,8 @@ "rpc": "threshold", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5688,7 +5688,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "attributes" ], @@ -5705,8 +5705,8 @@ "rpc": "take_screenshot", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5738,7 +5738,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "filename", "output_extension", "include_background" @@ -5762,8 +5762,8 @@ "rpc": "slice", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5800,7 +5800,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "slices" ], @@ -5828,8 +5828,8 @@ "rpc": "shrink", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5849,7 +5849,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "shrink_factor" ], @@ -5866,8 +5866,8 @@ "rpc": "set_z_scaling", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5877,7 +5877,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "z_scale" ], "additionalProperties": false, @@ -5893,8 +5893,8 @@ "rpc": "set_text_style", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5941,7 +5941,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "color", "font_family", "opacity" @@ -5959,8 +5959,8 @@ "rpc": "set_orientation_widget", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -5974,7 +5974,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "marker" ], "additionalProperties": false, @@ -5990,8 +5990,8 @@ "rpc": "set_background_color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6024,7 +6024,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "color" ], "additionalProperties": false, @@ -6040,8 +6040,8 @@ "rpc": "ruler", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6060,7 +6060,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "points" ], "additionalProperties": false, @@ -6095,14 +6095,14 @@ "rpc": "reset_visualization", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { @@ -6112,9 +6112,9 @@ "additionalProperties": false } }, - "reset_scenes": { - "$id": "opengeodeweb_viewer.viewer.reset_scenes", - "rpc": "reset_scenes", + "reset_viewers": { + "$id": "opengeodeweb_viewer.viewer.reset_viewers", + "rpc": "reset_viewers", "type": "object", "properties": {}, "required": [], @@ -6131,14 +6131,14 @@ "rpc": "reset_ruler", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { @@ -6153,14 +6153,14 @@ "rpc": "reset_camera", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { @@ -6175,14 +6175,14 @@ "rpc": "render", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { @@ -6192,13 +6192,13 @@ "additionalProperties": false } }, - "remove_from_scene": { - "$id": "opengeodeweb_viewer.viewer.remove_from_scene", - "rpc": "remove_from_scene", + "remove_from_viewer": { + "$id": "opengeodeweb_viewer.viewer.remove_from_viewer", + "rpc": "remove_from_viewer", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6210,7 +6210,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id" ], "additionalProperties": false, @@ -6226,8 +6226,8 @@ "rpc": "preview_points", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6268,7 +6268,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "points", "style" ], @@ -6285,8 +6285,8 @@ "rpc": "picked_ids", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6307,7 +6307,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y", "ids" @@ -6342,8 +6342,8 @@ "rpc": "pick_colormap", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6355,7 +6355,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y" ], @@ -6382,8 +6382,8 @@ "rpc": "highlight", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6410,7 +6410,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y", "field_type", @@ -6468,8 +6468,8 @@ "rpc": "grid_scale", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6479,7 +6479,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "visibility" ], "additionalProperties": false, @@ -6495,8 +6495,8 @@ "rpc": "get_point_position", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6508,7 +6508,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y" ], @@ -6539,8 +6539,8 @@ "rpc": "explode", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6560,7 +6560,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "explode_factor" ], @@ -6602,19 +6602,19 @@ "additionalProperties": false } }, - "delete_scene": { - "$id": "opengeodeweb_viewer.viewer.delete_scene", - "rpc": "delete_scene", + "delete_viewer": { + "$id": "opengeodeweb_viewer.viewer.delete_viewer", + "rpc": "delete_viewer", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { @@ -6624,19 +6624,19 @@ "additionalProperties": false } }, - "create_scene": { - "$id": "opengeodeweb_viewer.viewer.create_scene", - "rpc": "create_scene", + "create_viewer": { + "$id": "opengeodeweb_viewer.viewer.create_viewer", + "rpc": "create_viewer", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { @@ -6657,8 +6657,8 @@ "rpc": "clipping_planes", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6735,7 +6735,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "planes" ], @@ -6752,8 +6752,8 @@ "rpc": "axes", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6763,7 +6763,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "visibility" ], "additionalProperties": false, @@ -6774,13 +6774,13 @@ "additionalProperties": false } }, - "add_to_scene": { - "$id": "opengeodeweb_viewer.viewer.add_to_scene", - "rpc": "add_to_scene", + "add_to_viewer": { + "$id": "opengeodeweb_viewer.viewer.add_to_viewer", + "rpc": "add_to_viewer", "type": "object", "properties": { - "scene_id": { - "title": "SceneId", + "viewer_id": { + "title": "ViewerId", "type": "string", "minLength": 1 }, @@ -6792,7 +6792,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id" ], "additionalProperties": false, diff --git a/opengeodeweb_viewer_typed_schemas.d.ts b/opengeodeweb_viewer_typed_schemas.d.ts index 9924ba14..020a13e8 100644 --- a/opengeodeweb_viewer_typed_schemas.d.ts +++ b/opengeodeweb_viewer_typed_schemas.d.ts @@ -2,7 +2,7 @@ import type json from "./opengeodeweb_viewer_schemas.json"; import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types"; -import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockId, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, SceneId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; +import type { AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockId, BlockIds, ColorMapPoints, ColorRGB, ColorRGBA, EdgeWidth, Filename, Opacity, Point3D, PointSize, ViewerId, Visibility } from "@geode/opengeodeweb-viewer/schema_types"; export interface GenericRegisterParams { id: DataId; @@ -21,7 +21,7 @@ export interface GenericDeregisterResponse { export interface ImageVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -37,9 +37,9 @@ export interface ImageRegisterResponse { } export interface ImageOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: SceneId; + id: DataId; + opacity: Opacity; + viewer_id: ViewerId; } export interface ImageOpacityResponse { @@ -60,7 +60,7 @@ export interface MeshCellsAttributeCellAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } /** @@ -77,7 +77,7 @@ export interface MeshCellsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshCellsAttributeVertexAttributeResponse { @@ -85,7 +85,7 @@ export interface MeshCellsAttributeVertexAttributeResponse { export interface MeshCellsVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -93,18 +93,18 @@ export interface MeshCellsVisibilityResponse { } export interface MeshCellsOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: SceneId; + id: DataId; + opacity: Opacity; + viewer_id: ViewerId; } export interface MeshCellsOpacityResponse { } export interface MeshCellsColorParams { - color: ColorRGBA; - id: DataId; - scene_id: SceneId; + color: ColorRGBA; + id: DataId; + viewer_id: ViewerId; } export interface MeshCellsColorResponse { @@ -118,7 +118,7 @@ export interface MeshEdgesAttributeEdgeAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshEdgesAttributeEdgeAttributeResponse { @@ -132,16 +132,16 @@ export interface MeshEdgesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshEdgesAttributeVertexAttributeResponse { } export interface MeshEdgesWidthParams { - id: DataId; - scene_id: SceneId; - width: EdgeWidth; + id: DataId; + viewer_id: ViewerId; + width: EdgeWidth; } export interface MeshEdgesWidthResponse { @@ -149,7 +149,7 @@ export interface MeshEdgesWidthResponse { export interface MeshEdgesVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -157,18 +157,18 @@ export interface MeshEdgesVisibilityResponse { } export interface MeshEdgesOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: SceneId; + id: DataId; + opacity: Opacity; + viewer_id: ViewerId; } export interface MeshEdgesOpacityResponse { } export interface MeshEdgesColorParams { - color: ColorRGBA; - id: DataId; - scene_id: SceneId; + color: ColorRGBA; + id: DataId; + viewer_id: ViewerId; } export interface MeshEdgesColorResponse { @@ -182,7 +182,7 @@ export interface MeshPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshPointsAttributeVertexAttributeResponse { @@ -190,7 +190,7 @@ export interface MeshPointsAttributeVertexAttributeResponse { export interface MeshPointsVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -200,27 +200,27 @@ export interface MeshPointsVisibilityResponse { } export interface MeshPointsSizeParams { - id: DataId; - scene_id: SceneId; - size: PointSize; + id: DataId; + size: PointSize; + viewer_id: ViewerId; } export interface MeshPointsSizeResponse { } export interface MeshPointsOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: SceneId; + id: DataId; + opacity: Opacity; + viewer_id: ViewerId; } export interface MeshPointsOpacityResponse { } export interface MeshPointsColorParams { - color: ColorRGBA; - id: DataId; - scene_id: SceneId; + color: ColorRGBA; + id: DataId; + viewer_id: ViewerId; } export interface MeshPointsColorResponse { @@ -234,7 +234,7 @@ export interface MeshPolygonsAttributePolygonAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshPolygonsAttributePolygonAttributeResponse { @@ -248,7 +248,7 @@ export interface MeshPolygonsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshPolygonsAttributeVertexAttributeResponse { @@ -256,7 +256,7 @@ export interface MeshPolygonsAttributeVertexAttributeResponse { export interface MeshPolygonsVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -264,18 +264,18 @@ export interface MeshPolygonsVisibilityResponse { } export interface MeshPolygonsOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: SceneId; + id: DataId; + opacity: Opacity; + viewer_id: ViewerId; } export interface MeshPolygonsOpacityResponse { } export interface MeshPolygonsColorParams { - color: ColorRGBA; - id: DataId; - scene_id: SceneId; + color: ColorRGBA; + id: DataId; + viewer_id: ViewerId; } export interface MeshPolygonsColorResponse { @@ -289,7 +289,7 @@ export interface MeshPolyhedraAttributePolyhedronAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshPolyhedraAttributePolyhedronAttributeResponse { @@ -303,7 +303,7 @@ export interface MeshPolyhedraAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface MeshPolyhedraAttributeVertexAttributeResponse { @@ -311,7 +311,7 @@ export interface MeshPolyhedraAttributeVertexAttributeResponse { export interface MeshPolyhedraVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -319,18 +319,18 @@ export interface MeshPolyhedraVisibilityResponse { } export interface MeshPolyhedraOpacityParams { - id: DataId; - opacity: Opacity; - scene_id: SceneId; + id: DataId; + opacity: Opacity; + viewer_id: ViewerId; } export interface MeshPolyhedraOpacityResponse { } export interface MeshPolyhedraColorParams { - color: ColorRGBA; - id: DataId; - scene_id: SceneId; + color: ColorRGBA; + id: DataId; + viewer_id: ViewerId; } export interface MeshPolyhedraColorResponse { @@ -338,7 +338,7 @@ export interface MeshPolyhedraColorResponse { export interface MeshVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -355,7 +355,7 @@ export interface MeshRegisterResponse { export interface MeshHighlightParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -370,9 +370,9 @@ export interface MeshDeregisterResponse { } export interface MeshColorParams { - color: ColorRGBA; - id: DataId; - scene_id: SceneId; + color: ColorRGBA; + id: DataId; + viewer_id: ViewerId; } export interface MeshColorResponse { @@ -402,9 +402,9 @@ export interface MeshBasemapDrapeResponse { } export interface MeshApplyTexturesParams { - id: DataId; - scene_id: SceneId; - textures: MeshApplyTexturesParamsTexture[]; + id: DataId; + textures: MeshApplyTexturesParamsTexture[]; + viewer_id: ViewerId; } export interface MeshApplyTexturesParamsTexture { @@ -448,7 +448,7 @@ export interface ModelBlocksAttributePolyhedronAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelBlocksAttributePolyhedronAttributeResponse { @@ -463,7 +463,7 @@ export interface ModelBlocksAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelBlocksAttributeVertexAttributeResponse { @@ -478,7 +478,7 @@ export interface ModelBlocksEdgesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelBlocksEdgesAttributeVertexAttributeResponse { @@ -487,7 +487,7 @@ export interface ModelBlocksEdgesAttributeVertexAttributeResponse { export interface ModelBlocksEdgesWidthParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; width: EdgeWidth; } @@ -497,7 +497,7 @@ export interface ModelBlocksEdgesWidthResponse { export interface ModelBlocksEdgesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -508,7 +508,7 @@ export interface ModelBlocksEdgesColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelBlocksEdgesColorResponse { @@ -523,7 +523,7 @@ export interface ModelBlocksPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelBlocksPointsAttributeVertexAttributeResponse { @@ -532,7 +532,7 @@ export interface ModelBlocksPointsAttributeVertexAttributeResponse { export interface ModelBlocksPointsVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -542,8 +542,8 @@ export interface ModelBlocksPointsVisibilityResponse { export interface ModelBlocksPointsSizeParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; size: PointSize; + viewer_id: ViewerId; } export interface ModelBlocksPointsSizeResponse { @@ -553,7 +553,7 @@ export interface ModelBlocksPointsColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelBlocksPointsColorResponse { @@ -562,7 +562,7 @@ export interface ModelBlocksPointsColorResponse { export interface ModelBlocksVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -575,7 +575,7 @@ export interface ModelBlocksColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export type ColorMode = "constant" | "random"; @@ -599,7 +599,7 @@ export interface ModelCornersAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelCornersAttributeVertexAttributeResponse { @@ -608,7 +608,7 @@ export interface ModelCornersAttributeVertexAttributeResponse { export interface ModelCornersVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -621,7 +621,7 @@ export interface ModelCornersColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelCornersColorResponse { @@ -635,9 +635,9 @@ export interface ModelCornersColorResponseColor { } export interface ModelEdgesWidthParams { - id: DataId; - scene_id: SceneId; - width: EdgeWidth; + id: DataId; + viewer_id: ViewerId; + width: EdgeWidth; } export interface ModelEdgesWidthResponse { @@ -645,7 +645,7 @@ export interface ModelEdgesWidthResponse { export interface ModelEdgesVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -661,7 +661,7 @@ export interface ModelLinesAttributeEdgeAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelLinesAttributeEdgeAttributeResponse { @@ -676,7 +676,7 @@ export interface ModelLinesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelLinesAttributeVertexAttributeResponse { @@ -691,7 +691,7 @@ export interface ModelLinesPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelLinesPointsAttributeVertexAttributeResponse { @@ -700,7 +700,7 @@ export interface ModelLinesPointsAttributeVertexAttributeResponse { export interface ModelLinesPointsVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -710,8 +710,8 @@ export interface ModelLinesPointsVisibilityResponse { export interface ModelLinesPointsSizeParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; size: PointSize; + viewer_id: ViewerId; } export interface ModelLinesPointsSizeResponse { @@ -721,7 +721,7 @@ export interface ModelLinesPointsColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelLinesPointsColorResponse { @@ -730,7 +730,7 @@ export interface ModelLinesPointsColorResponse { export interface ModelLinesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -743,7 +743,7 @@ export interface ModelLinesColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelLinesColorResponse { @@ -758,7 +758,7 @@ export interface ModelLinesColorResponseColor { export interface ModelPointsVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -766,9 +766,9 @@ export interface ModelPointsVisibilityResponse { } export interface ModelPointsSizeParams { - id: DataId; - scene_id: SceneId; - size: PointSize; + id: DataId; + size: PointSize; + viewer_id: ViewerId; } export interface ModelPointsSizeResponse { @@ -776,7 +776,7 @@ export interface ModelPointsSizeResponse { export interface ModelVisibilityParams { id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -794,7 +794,7 @@ export interface ModelRegisterResponse { export interface ModelHighlightParams { block_ids: BlockId[]; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -826,7 +826,7 @@ export interface ModelSurfacesAttributePolygonAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelSurfacesAttributePolygonAttributeResponse { @@ -841,7 +841,7 @@ export interface ModelSurfacesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelSurfacesAttributeVertexAttributeResponse { @@ -856,7 +856,7 @@ export interface ModelSurfacesEdgesAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { @@ -865,7 +865,7 @@ export interface ModelSurfacesEdgesAttributeVertexAttributeResponse { export interface ModelSurfacesEdgesWidthParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; width: EdgeWidth; } @@ -875,7 +875,7 @@ export interface ModelSurfacesEdgesWidthResponse { export interface ModelSurfacesEdgesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -886,7 +886,7 @@ export interface ModelSurfacesEdgesColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelSurfacesEdgesColorResponse { @@ -901,7 +901,7 @@ export interface ModelSurfacesPointsAttributeVertexAttributeParams { name: AttributeName; no_data_color?: ColorRGBA; points: ColorMapPoints; // Flat array of [value, r, g, b, ...] - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelSurfacesPointsAttributeVertexAttributeResponse { @@ -910,7 +910,7 @@ export interface ModelSurfacesPointsAttributeVertexAttributeResponse { export interface ModelSurfacesPointsVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -920,8 +920,8 @@ export interface ModelSurfacesPointsVisibilityResponse { export interface ModelSurfacesPointsSizeParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; size: PointSize; + viewer_id: ViewerId; } export interface ModelSurfacesPointsSizeResponse { @@ -931,7 +931,7 @@ export interface ModelSurfacesPointsColorParams { block_ids: BlockIds; color: ColorRGBA; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelSurfacesPointsColorResponse { @@ -940,7 +940,7 @@ export interface ModelSurfacesPointsColorResponse { export interface ModelSurfacesVisibilityParams { block_ids: BlockIds; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -953,7 +953,7 @@ export interface ModelSurfacesColorParams { color?: ColorRGBA; color_mode: ColorMode; id: DataId; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ModelSurfacesColorResponse { @@ -967,9 +967,9 @@ export interface ModelSurfacesColorResponseColor { } export interface ModelSurfacesApplyTexturesParams { - id: DataId; - scene_id: SceneId; - textures: ModelSurfacesApplyTexturesParamsTexture[]; + id: DataId; + textures: ModelSurfacesApplyTexturesParamsTexture[]; + viewer_id: ViewerId; } export interface ModelSurfacesApplyTexturesParamsTexture { @@ -1006,8 +1006,8 @@ export interface ImportProjectResponse { } export interface ViewerUpdateDataParams { - id: DataId; - scene_id: SceneId; + id: DataId; + viewer_id: ViewerId; } export interface ViewerUpdateDataResponse { @@ -1015,7 +1015,7 @@ export interface ViewerUpdateDataResponse { export interface ViewerUpdateCameraParams { camera_options: CameraOptions; - scene_id: SceneId; + viewer_id: ViewerId; [property: string]: any; } @@ -1034,7 +1034,7 @@ export interface ViewerUpdateCameraResponse { export interface ViewerThresholdParams { attributes: AttributeElement[]; ids: DataId[]; - scene_id: SceneId; + viewer_id: ViewerId; } export interface AttributeElement { @@ -1055,7 +1055,7 @@ export interface ViewerTakeScreenshotParams { height?: number; include_background: boolean; output_extension: OutputExtension; - scene_id: SceneId; + viewer_id: ViewerId; width?: number; } @@ -1066,9 +1066,9 @@ export interface ViewerTakeScreenshotResponse { } export interface ViewerSliceParams { - ids: DataId[]; - scene_id: SceneId; - slices: Slice[]; + ids: DataId[]; + slices: Slice[]; + viewer_id: ViewerId; } export interface Slice { @@ -1082,16 +1082,16 @@ export interface ViewerSliceResponse { export interface ViewerShrinkParams { ids: DataId[]; - scene_id: SceneId; shrink_factor: number; + viewer_id: ViewerId; } export interface ViewerShrinkResponse { } export interface ViewerSetZScalingParams { - scene_id: SceneId; - z_scale: number; + viewer_id: ViewerId; + z_scale: number; } export interface ViewerSetZScalingResponse { @@ -1101,7 +1101,7 @@ export interface ViewerSetTextStyleParams { color: ColorRGB; font_family: FontFamily; opacity: Opacity; - scene_id: SceneId; + viewer_id: ViewerId; } export type FontFamily = "arial" | "courier" | "times"; @@ -1110,8 +1110,8 @@ export interface ViewerSetTextStyleResponse { } export interface ViewerSetOrientationWidgetParams { - marker: Marker; - scene_id: SceneId; + marker: Marker; + viewer_id: ViewerId; } export type Marker = "axes" | "compass" | "none"; @@ -1120,16 +1120,16 @@ export interface ViewerSetOrientationWidgetResponse { } export interface ViewerSetBackgroundColorParams { - color: ColorRGB; - scene_id: SceneId; + color: ColorRGB; + viewer_id: ViewerId; } export interface ViewerSetBackgroundColorResponse { } export interface ViewerRulerParams { - points: Array; - scene_id: SceneId; + points: Array; + viewer_id: ViewerId; } export interface ViewerRulerResponse { @@ -1139,52 +1139,52 @@ export interface ViewerRulerResponse { } export interface ViewerResetVisualizationParams { - scene_id: SceneId; + viewer_id: ViewerId; } export interface ViewerResetVisualizationResponse { } -export interface ViewerResetScenesParams { +export interface ViewerResetViewersParams { } -export interface ViewerResetScenesResponse { +export interface ViewerResetViewersResponse { } export interface ViewerResetRulerParams { - scene_id: SceneId; + viewer_id: ViewerId; } export interface ViewerResetRulerResponse { } export interface ViewerResetCameraParams { - scene_id: SceneId; + viewer_id: ViewerId; } export interface ViewerResetCameraResponse { } export interface ViewerRenderParams { - scene_id: SceneId; + viewer_id: ViewerId; } export interface ViewerRenderResponse { } -export interface ViewerRemoveFromSceneParams { - id: DataId; - scene_id: SceneId; +export interface ViewerRemoveFromViewerParams { + id: DataId; + viewer_id: ViewerId; } -export interface ViewerRemoveFromSceneResponse { +export interface ViewerRemoveFromViewerResponse { } export interface ViewerPreviewPointsParams { - closed?: boolean; - points: Point3D[]; - scene_id: SceneId; - style: Style; + closed?: boolean; + points: Point3D[]; + style: Style; + viewer_id: ViewerId; } export type Style = "points" | "curve" | "surface"; @@ -1193,10 +1193,10 @@ export interface ViewerPreviewPointsResponse { } export interface ViewerPickedIDSParams { - ids: DataId[]; - scene_id: SceneId; - x: number; - y: number; + ids: DataId[]; + viewer_id: ViewerId; + x: number; + y: number; } export interface ViewerPickedIDSResponse { @@ -1205,9 +1205,9 @@ export interface ViewerPickedIDSResponse { } export interface ViewerPickColormapParams { - scene_id: SceneId; - x: number; - y: number; + viewer_id: ViewerId; + x: number; + y: number; [property: string]: any; } @@ -1219,7 +1219,7 @@ export interface ViewerPickColormapResponse { export interface ViewerHighlightParams { field_type: PickedFieldType; ids: DataId[]; - scene_id: SceneId; + viewer_id: ViewerId; x: number; y: number; } @@ -1235,7 +1235,7 @@ export interface ViewerHighlightResponse { } export interface ViewerGridScaleParams { - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } @@ -1243,9 +1243,9 @@ export interface ViewerGridScaleResponse { } export interface ViewerGetPointPositionParams { - scene_id: SceneId; - x: number; - y: number; + viewer_id: ViewerId; + x: number; + y: number; } export type ViewerGetPointPositionResponse = Point3D; @@ -1253,7 +1253,7 @@ export type ViewerGetPointPositionResponse = Point3D; export interface ViewerExplodeParams { explode_factor: number; ids: DataId[]; - scene_id: SceneId; + viewer_id: ViewerId; } export interface ViewerExplodeResponse { @@ -1265,25 +1265,25 @@ export interface ExplodedBound { id: DataId; } -export interface ViewerDeleteSceneParams { - scene_id: SceneId; +export interface ViewerDeleteViewerParams { + viewer_id: ViewerId; } -export interface ViewerDeleteSceneResponse { +export interface ViewerDeleteViewerResponse { } -export interface ViewerCreateSceneParams { - scene_id: SceneId; +export interface ViewerCreateViewerParams { + viewer_id: ViewerId; } -export interface ViewerCreateSceneResponse { +export interface ViewerCreateViewerResponse { view_id: string; } export interface ViewerClippingPlanesParams { - ids: DataId[]; - planes: Plane[]; - scene_id: SceneId; + ids: DataId[]; + planes: Plane[]; + viewer_id: ViewerId; } export interface Plane { @@ -1296,19 +1296,19 @@ export interface ViewerClippingPlanesResponse { } export interface ViewerAxesParams { - scene_id: SceneId; + viewer_id: ViewerId; visibility: Visibility; } export interface ViewerAxesResponse { } -export interface ViewerAddToSceneParams { - id: DataId; - scene_id: SceneId; +export interface ViewerAddToViewerParams { + id: DataId; + viewer_id: ViewerId; } -export interface ViewerAddToSceneResponse { +export interface ViewerAddToViewerResponse { } export interface ErrorResponse { @@ -1539,11 +1539,11 @@ export interface Schemas { readonly set_background_color: (typeof json)["opengeodeweb_viewer"]["viewer"]["set_background_color"] & TypedSchema; readonly ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["ruler"] & TypedSchema; readonly reset_visualization: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_visualization"] & TypedSchema; - readonly reset_scenes: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_scenes"] & TypedSchema; + readonly reset_viewers: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_viewers"] & TypedSchema; readonly reset_ruler: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_ruler"] & TypedSchema; readonly reset_camera: (typeof json)["opengeodeweb_viewer"]["viewer"]["reset_camera"] & TypedSchema; readonly render: (typeof json)["opengeodeweb_viewer"]["viewer"]["render"] & TypedSchema; - readonly remove_from_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["remove_from_scene"] & TypedSchema; + readonly remove_from_viewer: (typeof json)["opengeodeweb_viewer"]["viewer"]["remove_from_viewer"] & TypedSchema; readonly preview_points: (typeof json)["opengeodeweb_viewer"]["viewer"]["preview_points"] & TypedSchema; readonly picked_ids: (typeof json)["opengeodeweb_viewer"]["viewer"]["picked_ids"] & TypedSchema; readonly pick_colormap: (typeof json)["opengeodeweb_viewer"]["viewer"]["pick_colormap"] & TypedSchema; @@ -1551,11 +1551,11 @@ export interface Schemas { readonly grid_scale: (typeof json)["opengeodeweb_viewer"]["viewer"]["grid_scale"] & TypedSchema; readonly get_point_position: (typeof json)["opengeodeweb_viewer"]["viewer"]["get_point_position"] & TypedSchema; readonly explode: (typeof json)["opengeodeweb_viewer"]["viewer"]["explode"] & TypedSchema; - readonly delete_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["delete_scene"] & TypedSchema; - readonly create_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["create_scene"] & TypedSchema; + readonly delete_viewer: (typeof json)["opengeodeweb_viewer"]["viewer"]["delete_viewer"] & TypedSchema; + readonly create_viewer: (typeof json)["opengeodeweb_viewer"]["viewer"]["create_viewer"] & TypedSchema; readonly clipping_planes: (typeof json)["opengeodeweb_viewer"]["viewer"]["clipping_planes"] & TypedSchema; readonly axes: (typeof json)["opengeodeweb_viewer"]["viewer"]["axes"] & TypedSchema; - readonly add_to_scene: (typeof json)["opengeodeweb_viewer"]["viewer"]["add_to_scene"] & TypedSchema; + readonly add_to_viewer: (typeof json)["opengeodeweb_viewer"]["viewer"]["add_to_viewer"] & TypedSchema; }; }; } diff --git a/src/opengeodeweb_viewer/object/object_methods.py b/src/opengeodeweb_viewer/object/object_methods.py index 0c55e80d..1b65d48b 100644 --- a/src/opengeodeweb_viewer/object/object_methods.py +++ b/src/opengeodeweb_viewer/object/object_methods.py @@ -149,12 +149,12 @@ def deregister_dataset(self, data_id: str) -> None: self.mark_basemaps_dirty([data_id]) self.deregister_object(data_id) - def scene_and_object(self, scene_id: str, data_id: str) -> tuple[Scene, SceneObject]: - scene = self.get_scene(scene_id) + def scene_and_object(self, viewer_id: str, data_id: str) -> tuple[Scene, SceneObject]: + scene = self.get_scene(viewer_id) return scene, scene_object_of(scene, data_id) - def set_visibility(self, scene_id: str, data_id: str, *, visibility: bool) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + def set_visibility(self, viewer_id: str, data_id: str, *, visibility: bool) -> None: + scene, scene_object = self.scene_and_object(viewer_id, data_id) scene_object.visibility = visibility scene_object.actor.SetVisibility(visibility) self.set_style_actors_visibility(scene_object, visibility=visibility) @@ -184,12 +184,12 @@ def set_style_actors_visibility(scene_object: SceneObject, *, visibility: bool) for width_actor in scene_object.edges_width_actors.values(): width_actor.actor.SetVisibility(visibility) - def set_opacity(self, scene_id: str, data_id: str, opacity: float) -> None: - actor = self.get_scene_object(scene_id, data_id).actor + def set_opacity(self, viewer_id: str, data_id: str, opacity: float) -> None: + actor = self.get_scene_object(viewer_id, data_id).actor actor.GetProperty().SetOpacity(opacity) - def set_color(self, scene_id: str, data_id: str, color: ColorClassProtocol) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + def set_color(self, viewer_id: str, data_id: str, color: ColorClassProtocol) -> None: + scene, scene_object = self.scene_and_object(viewer_id, data_id) scene_object.mapper.ScalarVisibilityOff() actor = scene_object.actor actor.GetProperty().SetColor([color.red / 255, color.green / 255, color.blue / 255]) @@ -199,11 +199,11 @@ def set_color(self, scene_id: str, data_id: str, color: ColorClassProtocol) -> N self.update_style_scalar_bars_visibility(scene_object) self.update_scalar_bars_layout(scene) - def set_edges_visibility(self, scene_id: str, data_id: str, *, visibility: bool) -> None: + def set_edges_visibility(self, viewer_id: str, data_id: str, *, visibility: bool) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": - self.set_visibility(scene_id, data_id, visibility=visibility) + self.set_visibility(viewer_id, data_id, visibility=visibility) return - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) if scene_object.edges_actor is None: scene_object.actor.GetProperty().SetEdgeVisibility(visibility) return @@ -212,8 +212,8 @@ def set_edges_visibility(self, scene_id: str, data_id: str, *, visibility: bool) self.update_style_scalar_bars_visibility(scene_object) self.update_scalar_bars_layout(scene) - def set_edges_width(self, scene_id: str, data_id: str, width: float) -> None: - scene_object = self.get_scene_object(scene_id, data_id) + def set_edges_width(self, viewer_id: str, data_id: str, width: float) -> None: + scene_object = self.get_scene_object(viewer_id, data_id) if self.get_viewer_data(data_id).viewer_elements_type == "edges": scene_object.actor.GetProperty().SetLineWidth(width) return @@ -222,11 +222,11 @@ def set_edges_width(self, scene_id: str, data_id: str, width: float) -> None: if scene_object.edges_actor is not None: scene_object.edges_actor.GetProperty().SetLineWidth(width) - def set_edges_color(self, scene_id: str, data_id: str, color: ColorClassProtocol) -> None: + def set_edges_color(self, viewer_id: str, data_id: str, color: ColorClassProtocol) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": - self.set_color(scene_id, data_id, color) + self.set_color(viewer_id, data_id, color) return - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) rgb = [color.red / 255, color.green / 255, color.blue / 255] scene_object.actor.GetProperty().SetEdgeColor(rgb) if scene_object.edges_actor is None or scene_object.edges_mapper is None: @@ -241,19 +241,19 @@ def set_edges_color(self, scene_id: str, data_id: str, color: ColorClassProtocol self.update_style_scalar_bars_visibility(scene_object) self.update_scalar_bars_layout(scene) - def set_edges_opacity(self, scene_id: str, data_id: str, opacity: float) -> None: + def set_edges_opacity(self, viewer_id: str, data_id: str, opacity: float) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": - self.set_opacity(scene_id, data_id, opacity) + self.set_opacity(viewer_id, data_id, opacity) return - scene_object = self.get_scene_object(scene_id, data_id) + scene_object = self.get_scene_object(viewer_id, data_id) if scene_object.edges_actor is not None: scene_object.edges_actor.GetProperty().SetOpacity(opacity) - def set_points_visibility(self, scene_id: str, data_id: str, *, visibility: bool) -> None: + def set_points_visibility(self, viewer_id: str, data_id: str, *, visibility: bool) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": - self.set_visibility(scene_id, data_id, visibility=visibility) + self.set_visibility(viewer_id, data_id, visibility=visibility) return - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) if scene_object.points_actor is not None: scene_object.points_visibility = visibility scene_object.points_actor.SetVisibility(visibility) @@ -262,8 +262,8 @@ def set_points_visibility(self, scene_id: str, data_id: str, *, visibility: bool else: scene_object.actor.GetProperty().SetVertexVisibility(visibility) - def set_points_size(self, scene_id: str, data_id: str, size: float) -> None: - scene_object = self.get_scene_object(scene_id, data_id) + def set_points_size(self, viewer_id: str, data_id: str, size: float) -> None: + scene_object = self.get_scene_object(viewer_id, data_id) scene_object.actor.GetProperty().SetPointSize(size) if scene_object.points_actor is not None: scene_object.points_actor.GetProperty().SetPointSize(size) @@ -386,11 +386,11 @@ def ensure_edges_actor(self, scene: Scene, scene_object: SceneObject) -> vtkActo scene_object.edges_scalar_bar = scalar_bar return actor - def set_points_color(self, scene_id: str, data_id: str, color: ColorClassProtocol) -> None: + def set_points_color(self, viewer_id: str, data_id: str, color: ColorClassProtocol) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": - self.set_color(scene_id, data_id, color) + self.set_color(viewer_id, data_id, color) return - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) rgb = [color.red / 255, color.green / 255, color.blue / 255] scene_object.actor.GetProperty().SetVertexColor(rgb) if scene_object.points_actor is None or scene_object.points_mapper is None: @@ -405,19 +405,19 @@ def set_points_color(self, scene_id: str, data_id: str, color: ColorClassProtoco self.update_style_scalar_bars_visibility(scene_object) self.update_scalar_bars_layout(scene) - def set_points_opacity(self, scene_id: str, data_id: str, opacity: float) -> None: + def set_points_opacity(self, viewer_id: str, data_id: str, opacity: float) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": - self.set_opacity(scene_id, data_id, opacity) + self.set_opacity(viewer_id, data_id, opacity) return - scene_object = self.get_scene_object(scene_id, data_id) + scene_object = self.get_scene_object(viewer_id, data_id) if scene_object.points_actor is not None: scene_object.points_actor.GetProperty().SetOpacity(opacity) def set_blocks_visibility( - self, scene_id: str, data_id: str, block_ids: list[int], *, visibility: bool + self, viewer_id: str, data_id: str, block_ids: list[int], *, visibility: bool ) -> None: pipeline = self.get_vtk_pipeline(data_id) - scene_object = self.get_scene_object(scene_id, data_id) + scene_object = self.get_scene_object(viewer_id, data_id) mapper = scene_object.mapper if not isinstance(mapper, vtkCompositePolyDataMapper): msg = "Mapper is not a vtkCompositePolyDataMapper" diff --git a/src/opengeodeweb_viewer/rpc/image/image_protocols.py b/src/opengeodeweb_viewer/rpc/image/image_protocols.py index 023ed908..8ce19d7f 100644 --- a/src/opengeodeweb_viewer/rpc/image/image_protocols.py +++ b/src/opengeodeweb_viewer/rpc/image/image_protocols.py @@ -31,10 +31,10 @@ def deregister_image(self, params: schemas.Deregister) -> schemas.DeregisterResp @typed_rpc(image_prefix, schemas.visibility_route) def set_image_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_visibility(params.viewer_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(image_prefix, schemas.opacity_route) def set_image_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.scene_id, params.id, params.opacity) + self.set_opacity(params.viewer_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json index 456ea1d6..a4229362 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.json @@ -2,8 +2,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py index 57035b64..41583235 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/image/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/image/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py index 2cf3f23f..a671562d 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py @@ -20,5 +20,5 @@ def __init__(self) -> None: @typed_rpc(mesh_cells_attribute_cell_prefix, schemas.attribute_route) def set_mesh_cells_cell_attribute(self, params: schemas.Attribute) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.scene_id, params.id, params) + self.display_attribute_on_cells(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py index 1ea56f8d..6af4bdc9 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_mesh_cells_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.scene_id, params.id, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py index 2a5f87b6..d1b57c0a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py @@ -20,16 +20,16 @@ def __init__(self) -> None: @typed_rpc(mesh_cells_prefix, schemas.visibility_route) def set_mesh_cells_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_visibility(params.viewer_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_cells_prefix, schemas.color_route) def set_mesh_cells_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.scene_id, params.id, color) + self.set_color(params.viewer_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_cells_prefix, schemas.opacity_route) def set_mesh_cells_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.scene_id, params.id, params.opacity) + self.set_opacity(params.viewer_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json index ed78d6a3..35e5f1b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py index 42cfe374..bad11541 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json index 456ea1d6..a4229362 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.json @@ -2,8 +2,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py index 57035b64..41583235 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py index eedc8ae6..8230b01e 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py @@ -20,5 +20,5 @@ def __init__(self) -> None: @typed_rpc(mesh_edges_attribute_edge_prefix, schemas.attribute_route) def set_mesh_edges_edge_attribute(self, params: schemas.Attribute) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.scene_id, params.id, params) + self.display_attribute_on_cells(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py index ffc65809..034ab38c 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py @@ -23,7 +23,7 @@ def set_mesh_edges_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: if self.get_viewer_data(params.id).viewer_elements_type == "edges": - self.display_attribute_on_vertices(params.scene_id, params.id, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params) else: - self.display_attribute_on_edges(params.scene_id, params.id, params) + self.display_attribute_on_edges(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py index 5bc7a136..3ebcdf65 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py @@ -20,21 +20,21 @@ def __init__(self) -> None: @typed_rpc(mesh_edges_prefix, schemas.visibility_route) def set_mesh_edges_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_edges_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_edges_visibility(params.viewer_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_edges_prefix, schemas.color_route) def set_mesh_edges_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_edges_color(params.scene_id, params.id, color) + self.set_edges_color(params.viewer_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_edges_prefix, schemas.width_route) def set_mesh_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: - self.set_edges_width(params.scene_id, params.id, params.width) + self.set_edges_width(params.viewer_id, params.id, params.width) return schemas.WidthResponse() @typed_rpc(mesh_edges_prefix, schemas.opacity_route) def set_mesh_edges_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_edges_opacity(params.scene_id, params.id, params.opacity) + self.set_edges_opacity(params.viewer_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json index ed78d6a3..35e5f1b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py index 42cfe374..bad11541 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json index 456ea1d6..a4229362 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.json @@ -2,8 +2,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py index 57035b64..41583235 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json index 7c7edd1f..d3c661a8 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json @@ -2,8 +2,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "width" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py index 0404515f..81f21d05 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import EdgeWidth, SceneId +from opengeodeweb_viewer.schema_types import EdgeWidth, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py index 9a42e914..de2d0fcb 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py @@ -75,19 +75,19 @@ def deregister_mesh(self, params: schemas.Deregister) -> schemas.DeregisterRespo @typed_rpc(mesh_prefix, schemas.visibility_route) def set_mesh_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_visibility(params.viewer_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_prefix, schemas.color_route) def set_mesh_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.scene_id, params.id, color) + self.set_color(params.viewer_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_prefix, schemas.apply_textures_route) def mesh_apply_textures(self, params: schemas.ApplyTextures) -> schemas.ApplyTexturesResponse: mesh_id = params.id - scene_object = self.get_scene_object(params.scene_id, mesh_id) + scene_object = self.get_scene_object(params.viewer_id, mesh_id) for tex_info in params.textures: texture_id = tex_info.id texture_data = Data.get(texture_id) @@ -187,16 +187,16 @@ def mesh_basemap_drape(self, params: schemas.BasemapDrape) -> schemas.BasemapDra return schemas.BasemapDrapeResponse() def display_attribute_on_vertices( - self, scene_id: str, data_id: str, attribute: AttributeProtocol + self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) scene_object.color_by_array(attribute.name, attribute.item, is_point=True) self.setup_color_map(scene, scene_object, attribute) def display_attribute_on_points( - self, scene_id: str, data_id: str, attribute: AttributeProtocol + self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) self.ensure_points_actor(scene, scene_object) if scene_object.points_mapper is None: return @@ -207,9 +207,9 @@ def display_attribute_on_points( self.update_scalar_bars_layout(scene) def display_attribute_on_edges( - self, scene_id: str, data_id: str, attribute: AttributeProtocol + self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) self.ensure_edges_actor(scene, scene_object) if scene_object.edges_mapper is None: return @@ -253,9 +253,9 @@ def display_attribute_on_style_mapper( ) def display_attribute_on_cells( - self, scene_id: str, data_id: str, attribute: AttributeProtocol + self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) scene_object.color_by_array(attribute.name, attribute.item, is_point=False) self.setup_color_map(scene, scene_object, attribute) @@ -284,12 +284,12 @@ def setup_color_map( @typed_rpc(mesh_prefix, schemas.highlight_route) def set_mesh_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: pipeline = self.get_vtk_pipeline(params.id) - highlight = self.get_scene_object(params.scene_id, params.id).highlight + highlight = self.get_scene_object(params.viewer_id, params.id).highlight if params.visibility: dataset = pipeline.reader.GetOutputDataObject(0) highlight.mapper.SetInputDataObject(dataset) else: highlight.mapper.SetInputConnection(highlight.extract_selection.GetOutputPort()) highlight.actor.SetVisibility(params.visibility) - self.render(params.scene_id) + self.render(params.viewer_id) return schemas.HighlightResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py index d0815575..26b7d004 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py @@ -23,7 +23,7 @@ def set_mesh_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: if self.get_viewer_data(params.id).viewer_elements_type == "points": - self.display_attribute_on_vertices(params.scene_id, params.id, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params) else: - self.display_attribute_on_points(params.scene_id, params.id, params) + self.display_attribute_on_points(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py index d3644679..aa4ff6b9 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py @@ -20,21 +20,21 @@ def __init__(self) -> None: @typed_rpc(mesh_points_prefix, schemas.visibility_route) def set_mesh_points_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_points_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_points_visibility(params.viewer_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse(id=params.id, visibility=params.visibility) @typed_rpc(mesh_points_prefix, schemas.color_route) def set_mesh_points_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_points_color(params.scene_id, params.id, color) + self.set_points_color(params.viewer_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_points_prefix, schemas.size_route) def set_mesh_points_size(self, params: schemas.Size) -> schemas.SizeResponse: - self.set_points_size(params.scene_id, params.id, params.size) + self.set_points_size(params.viewer_id, params.id, params.size) return schemas.SizeResponse() @typed_rpc(mesh_points_prefix, schemas.opacity_route) def set_mesh_points_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_points_opacity(params.scene_id, params.id, params.opacity) + self.set_points_opacity(params.viewer_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json index ed78d6a3..35e5f1b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py index 42cfe374..bad11541 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json index 456ea1d6..a4229362 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.json @@ -2,8 +2,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py index 57035b64..41583235 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json index 204255ad..77c9655c 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.json @@ -2,8 +2,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "size" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py index 1ce22bc6..b46d14c1 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/size.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import PointSize, SceneId +from opengeodeweb_viewer.schema_types import PointSize, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,8 +13,8 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId size: PointSize + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json index 02435f87..6efa6f29 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py index 8bdec0ff..e1677ca8 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py index c9664d5e..cc1c8eda 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_mesh_polygons_polygon_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.scene_id, params.id, params) + self.display_attribute_on_cells(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py index e861b95b..e795d2ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_mesh_polygons_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.scene_id, params.id, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py index 09a1aebd..682f8693 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py @@ -22,16 +22,16 @@ def __init__(self) -> None: def set_mesh_polygons_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_visibility(params.viewer_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_polygons_prefix, schemas.color_route) def set_mesh_polygons_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.scene_id, params.id, color) + self.set_color(params.viewer_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_polygons_prefix, schemas.opacity_route) def set_mesh_polygons_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.scene_id, params.id, params.opacity) + self.set_opacity(params.viewer_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json index ed78d6a3..35e5f1b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py index 42cfe374..bad11541 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json index 456ea1d6..a4229362 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.json @@ -2,8 +2,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py index 57035b64..41583235 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py index ab6900d9..4e241f93 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py @@ -26,5 +26,5 @@ def __init__(self) -> None: def set_mesh_polyhedra_polyhedron_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.scene_id, params.id, params) + self.display_attribute_on_cells(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py index f0ca7685..6ea1669a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_mesh_polyhedra_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.scene_id, params.id, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json index f2a05d5a..666be128 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -28,7 +28,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "name", "item", diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py index bfa86269..b1a4f7ae 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/attribute.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, ColorMapPoints, ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py index 1d3873f5..71a043e0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py @@ -22,16 +22,16 @@ def __init__(self) -> None: def set_mesh_polyhedra_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: - self.set_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_visibility(params.viewer_id, params.id, visibility=params.visibility) return schemas.VisibilityResponse() @typed_rpc(mesh_polyhedra_prefix, schemas.color_route) def set_mesh_polyhedra_color(self, params: schemas.Color) -> schemas.ColorResponse: color = params.color - self.set_color(params.scene_id, params.id, color) + self.set_color(params.viewer_id, params.id, color) return schemas.ColorResponse() @typed_rpc(mesh_polyhedra_prefix, schemas.opacity_route) def set_mesh_polyhedra_opacity(self, params: schemas.Opacity) -> schemas.OpacityResponse: - self.set_opacity(params.scene_id, params.id, params.opacity) + self.set_opacity(params.viewer_id, params.id, params.opacity) return schemas.OpacityResponse() diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json index ed78d6a3..35e5f1b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py index 42cfe374..bad11541 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json index 456ea1d6..a4229362 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.json @@ -2,8 +2,8 @@ "rpc": "opacity", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "opacity" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py index 57035b64..41583235 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/opacity.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import Opacity as OpacityType, SceneId +from opengeodeweb_viewer.schema_types import Opacity as OpacityType, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: id: DataId opacity: OpacityType - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json index a3e74c98..11839b55 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.json @@ -2,8 +2,8 @@ "rpc": "apply_textures", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "textures" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py index 2880acd2..418e53fc 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/apply_textures.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -23,8 +23,8 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId textures: List[Texture] + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json index ed78d6a3..35e5f1b6 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "color" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py index 42cfe374..bad11541 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/color.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,7 +14,7 @@ def __post_init__(self) -> None: color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json index fc8b198f..14471b4c 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.json @@ -2,8 +2,8 @@ "rpc": "highlight", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py index 723c97fa..e7594141 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/highlight.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility +from opengeodeweb_viewer.schema_types import ViewerId, Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/mesh/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py index a304d653..7211d6fe 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/blocks_attribute_polyhedron_protocols.py @@ -26,5 +26,5 @@ def __init__(self) -> None: def set_model_blocks_polyhedron_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.scene_id, params.id, params.block_ids, params) + self.display_attribute_on_cells(params.viewer_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/polyhedron/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py index 96803758..75a4d407 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/blocks_attribute_vertex_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_model_blocks_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py index 3cc73e47..292741e7 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/blocks_edges_attribute_vertex_protocols.py @@ -27,6 +27,6 @@ def set_model_blocks_edges_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: self.set_component_edges_attribute( - params.scene_id, params.id, "blocks", params.block_ids, params + params.viewer_id, params.id, "blocks", params.block_ids, params ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py index b698fa7f..e3a3a8c4 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/model_blocks_edges_protocols.py @@ -23,20 +23,20 @@ def set_model_blocks_edges_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_edges_visibility( - params.scene_id, params.id, "blocks", params.block_ids, visibility=params.visibility + params.viewer_id, params.id, "blocks", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_blocks_edges_prefix, schemas.color_route) def set_model_blocks_edges_color(self, params: schemas.Color) -> schemas.ColorResponse: self.set_component_edges_color( - params.scene_id, params.id, "blocks", params.block_ids, params.color + params.viewer_id, params.id, "blocks", params.block_ids, params.color ) return schemas.ColorResponse() @typed_rpc(model_blocks_edges_prefix, schemas.width_route) def set_model_blocks_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: self.set_component_edges_width( - params.scene_id, params.id, "blocks", params.block_ids, params.width + params.viewer_id, params.id, "blocks", params.block_ids, params.width ) return schemas.WidthResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json index b3a02075..4a402c99 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py index b163d73a..8ad7b3ea 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json index 39099e81..22330fe6 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.json @@ -2,8 +2,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "width" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py index 9af342c2..dd9f6af6 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/edges/schemas/width.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py index 84093aa0..63c32a4f 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/model_blocks_protocols.py @@ -23,7 +23,7 @@ def set_model_blocks_polyhedra_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_blocks_visibility( - params.scene_id, params.id, params.block_ids, visibility=params.visibility + params.viewer_id, params.id, params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py index b129a651..1c889705 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/blocks_points_attribute_vertex_protocols.py @@ -27,6 +27,6 @@ def set_model_blocks_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: self.set_component_points_attribute( - params.scene_id, params.id, "blocks", params.block_ids, params + params.viewer_id, params.id, "blocks", params.block_ids, params ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py index 33b90f10..5ba4fe8e 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/model_blocks_points_protocols.py @@ -23,20 +23,20 @@ def set_model_blocks_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_points_visibility( - params.scene_id, params.id, "blocks", params.block_ids, visibility=params.visibility + params.viewer_id, params.id, "blocks", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_blocks_points_prefix, schemas.color_route) def set_model_blocks_points_color(self, params: schemas.Color) -> schemas.ColorResponse: self.set_component_points_color( - params.scene_id, params.id, "blocks", params.block_ids, params.color + params.viewer_id, params.id, "blocks", params.block_ids, params.color ) return schemas.ColorResponse() @typed_rpc(model_blocks_points_prefix, schemas.size_route) def set_model_blocks_points_size(self, params: schemas.Size) -> schemas.SizeResponse: self.set_component_points_size( - params.scene_id, params.id, "blocks", params.block_ids, params.size + params.viewer_id, params.id, "blocks", params.block_ids, params.size ) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json index b3a02075..4a402c99 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py index b163d73a..8ad7b3ea 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json index 0f244110..eb1cd950 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.json @@ -2,8 +2,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "size" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py index 7cb38e1d..d8b00649 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/size.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, PointSize, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, PointSize, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,8 +14,8 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId size: PointSize + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/points/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json index 3f2523e1..6dae29f8 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -26,7 +26,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py index 9aab4562..7f926635 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: SceneId + viewer_id: ViewerId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/blocks/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py index 96c4980f..7cb64cbc 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/corners_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_model_corners_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py b/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py index 643164c1..24c1d5c0 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/model_corners_protocols.py @@ -23,7 +23,7 @@ def set_model_corners_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_blocks_visibility( - params.scene_id, params.id, params.block_ids, visibility=params.visibility + params.viewer_id, params.id, params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json index 3f2523e1..6dae29f8 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -26,7 +26,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py index 9aab4562..7f926635 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: SceneId + viewer_id: ViewerId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/corners/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py b/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py index 3178386a..6db2aa28 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/model_edges_protocols.py @@ -21,11 +21,11 @@ def __init__(self) -> None: @typed_rpc(model_edges_prefix, schemas.visibility_route) def set_model_edges_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: self.set_model_edges_visibility_on_all( - params.scene_id, params.id, visibility=params.visibility + params.viewer_id, params.id, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_edges_prefix, schemas.width_route) def set_model_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: - self.set_model_edges_width_on_all(params.scene_id, params.id, params.width) + self.set_model_edges_width_on_all(params.viewer_id, params.id, params.width) return schemas.WidthResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json index 7c7edd1f..d3c661a8 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.json @@ -2,8 +2,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "width" ], diff --git a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py index 0404515f..81f21d05 100644 --- a/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/edges/schemas/width.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import EdgeWidth, SceneId +from opengeodeweb_viewer.schema_types import EdgeWidth, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py index f0fb91fc..256b8eca 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/lines_attribute_edge_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_model_lines_edge_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.scene_id, params.id, params.block_ids, params) + self.display_attribute_on_cells(params.viewer_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/edge/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py index 2a3b4fed..0ec3ae56 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/lines_attribute_vertex_protocols.py @@ -22,5 +22,5 @@ def __init__(self) -> None: def set_model_lines_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py index 54d9954d..6afe6429 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/model_lines_protocols.py @@ -23,7 +23,7 @@ def set_model_lines_edges_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_blocks_visibility( - params.scene_id, params.id, params.block_ids, visibility=params.visibility + params.viewer_id, params.id, params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py index 741ac9ca..5fd97ada 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/lines_points_attribute_vertex_protocols.py @@ -27,6 +27,6 @@ def set_model_lines_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: self.set_component_points_attribute( - params.scene_id, params.id, "lines", params.block_ids, params + params.viewer_id, params.id, "lines", params.block_ids, params ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py index 94dde7d1..d1062055 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/model_lines_points_protocols.py @@ -23,20 +23,20 @@ def set_model_lines_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_points_visibility( - params.scene_id, params.id, "lines", params.block_ids, visibility=params.visibility + params.viewer_id, params.id, "lines", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_lines_points_prefix, schemas.color_route) def set_model_lines_points_color(self, params: schemas.Color) -> schemas.ColorResponse: self.set_component_points_color( - params.scene_id, params.id, "lines", params.block_ids, params.color + params.viewer_id, params.id, "lines", params.block_ids, params.color ) return schemas.ColorResponse() @typed_rpc(model_lines_points_prefix, schemas.size_route) def set_model_lines_points_size(self, params: schemas.Size) -> schemas.SizeResponse: self.set_component_points_size( - params.scene_id, params.id, "lines", params.block_ids, params.size + params.viewer_id, params.id, "lines", params.block_ids, params.size ) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json index b3a02075..4a402c99 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py index b163d73a..8ad7b3ea 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json index 0f244110..eb1cd950 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.json @@ -2,8 +2,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "size" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py index 7cb38e1d..d8b00649 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/size.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, PointSize, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, PointSize, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,8 +14,8 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId size: PointSize + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/points/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json index 3f2523e1..6dae29f8 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -26,7 +26,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py index 9aab4562..7f926635 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: SceneId + viewer_id: ViewerId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/lines/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/model_protocols.py b/src/opengeodeweb_viewer/rpc/model/model_protocols.py index 0fd4bf7c..63cab767 100644 --- a/src/opengeodeweb_viewer/rpc/model/model_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/model_protocols.py @@ -60,7 +60,7 @@ class ModelColorParams(Protocol): """The params of the color RPC of every model component.""" @property - def scene_id(self) -> str: ... + def viewer_id(self) -> str: ... @property def id(self) -> str: ... @property @@ -112,7 +112,7 @@ def __init__(self) -> None: def apply_color(self, params: ModelColorParams) -> list[ColorResult]: pipeline = self.get_vtk_pipeline(params.id) - scene, scene_object = self.scene_and_object(params.scene_id, params.id) + scene, scene_object = self.scene_and_object(params.viewer_id, params.id) color_mode = params.color_mode.value color = params.color collection_id = params.collection_id @@ -234,24 +234,24 @@ def setup_model_color_map(self, scene: Scene, scene_object: SceneObject) -> None self.update_scalar_bars_layout(scene) def display_attribute_on_vertices( - self, scene_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol + self, viewer_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol ) -> None: - self.display_attribute_on_blocks(scene_id, data_id, block_ids, attribute, "point") + self.display_attribute_on_blocks(viewer_id, data_id, block_ids, attribute, "point") def display_attribute_on_cells( - self, scene_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol + self, viewer_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol ) -> None: - self.display_attribute_on_blocks(scene_id, data_id, block_ids, attribute, "cell") + self.display_attribute_on_blocks(viewer_id, data_id, block_ids, attribute, "cell") def display_attribute_on_blocks( self, - scene_id: str, + viewer_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol, location: Literal["point", "cell"], ) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) for block_id in block_ids: style = scene_object.get_block_style(block_id) style["name"] = attribute.name @@ -312,7 +312,7 @@ def sync_points_size_actors(scene: Scene, scene_object: SceneObject) -> None: def update_component_points( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -320,7 +320,7 @@ def update_component_points( ) -> None: """Apply update to the points style of each component, then redraw the points actors.""" pipeline = self.get_vtk_pipeline(data_id) - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) styles = self.ensure_model_points_styles(pipeline, scene_object) component_types = pipeline.block_component_types() for block_id in block_ids: @@ -331,7 +331,7 @@ def update_component_points( def set_component_points_visibility( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -341,11 +341,11 @@ def set_component_points_visibility( def update(style: ModelPointsStyle) -> None: style.visibility = visibility - self.update_component_points(scene_id, data_id, component_type, block_ids, update) + self.update_component_points(viewer_id, data_id, component_type, block_ids, update) def set_component_points_color( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -356,11 +356,11 @@ def update(style: ModelPointsStyle) -> None: style.opacity = color.alpha style.attribute = None - self.update_component_points(scene_id, data_id, component_type, block_ids, update) + self.update_component_points(viewer_id, data_id, component_type, block_ids, update) def set_component_points_attribute( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -369,31 +369,31 @@ def set_component_points_attribute( def update(style: ModelPointsStyle) -> None: style.attribute = block_style(attribute) - self.update_component_points(scene_id, data_id, component_type, block_ids, update) + self.update_component_points(viewer_id, data_id, component_type, block_ids, update) def set_component_points_size( - self, scene_id: str, data_id: str, component_type: str, block_ids: list[int], size: float + self, viewer_id: str, data_id: str, component_type: str, block_ids: list[int], size: float ) -> None: def update(style: ModelPointsStyle) -> None: style.size = size - self.update_component_points(scene_id, data_id, component_type, block_ids, update) + self.update_component_points(viewer_id, data_id, component_type, block_ids, update) def set_model_points_visibility_on_all( - self, scene_id: str, data_id: str, *, visibility: bool + self, viewer_id: str, data_id: str, *, visibility: bool ) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) if not scene_object.points_block_styles: - self.set_points_visibility(scene_id, data_id, visibility=visibility) + self.set_points_visibility(viewer_id, data_id, visibility=visibility) return for style in scene_object.points_block_styles.values(): style.visibility = visibility self.sync_points_size_actors(scene, scene_object) self.setup_model_color_map(scene, scene_object) - def set_model_points_size_on_all(self, scene_id: str, data_id: str, size: float) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) - self.set_points_size(scene_id, data_id, size) + def set_model_points_size_on_all(self, viewer_id: str, data_id: str, size: float) -> None: + scene, scene_object = self.scene_and_object(viewer_id, data_id) + self.set_points_size(viewer_id, data_id, size) for style in scene_object.points_block_styles.values(): style.size = size self.sync_points_size_actors(scene, scene_object) @@ -442,7 +442,7 @@ def sync_edges_width_actors(self, scene: Scene, scene_object: SceneObject) -> No def update_component_edges( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -450,7 +450,7 @@ def update_component_edges( ) -> None: """Apply update to the edges style of each component, then redraw the edges actors.""" pipeline = self.get_vtk_pipeline(data_id) - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) styles = self.ensure_model_edges_styles(pipeline, scene_object) component_types = pipeline.block_component_types() for block_id in block_ids: @@ -461,7 +461,7 @@ def update_component_edges( def set_component_edges_visibility( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -471,11 +471,11 @@ def set_component_edges_visibility( def update(style: ModelEdgesStyle) -> None: style.visibility = visibility - self.update_component_edges(scene_id, data_id, component_type, block_ids, update) + self.update_component_edges(viewer_id, data_id, component_type, block_ids, update) def set_component_edges_color( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -486,11 +486,11 @@ def update(style: ModelEdgesStyle) -> None: style.opacity = color.alpha style.attribute = None - self.update_component_edges(scene_id, data_id, component_type, block_ids, update) + self.update_component_edges(viewer_id, data_id, component_type, block_ids, update) def set_component_edges_attribute( self, - scene_id: str, + viewer_id: str, data_id: str, component_type: str, block_ids: list[int], @@ -499,32 +499,32 @@ def set_component_edges_attribute( def update(style: ModelEdgesStyle) -> None: style.attribute = block_style(attribute) - self.update_component_edges(scene_id, data_id, component_type, block_ids, update) + self.update_component_edges(viewer_id, data_id, component_type, block_ids, update) def set_component_edges_width( - self, scene_id: str, data_id: str, component_type: str, block_ids: list[int], width: float + self, viewer_id: str, data_id: str, component_type: str, block_ids: list[int], width: float ) -> None: def update(style: ModelEdgesStyle) -> None: style.width = width - self.update_component_edges(scene_id, data_id, component_type, block_ids, update) + self.update_component_edges(viewer_id, data_id, component_type, block_ids, update) def set_model_edges_visibility_on_all( - self, scene_id: str, data_id: str, *, visibility: bool + self, viewer_id: str, data_id: str, *, visibility: bool ) -> None: - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) if not scene_object.edges_block_styles: - self.set_edges_visibility(scene_id, data_id, visibility=visibility) + self.set_edges_visibility(viewer_id, data_id, visibility=visibility) return for style in scene_object.edges_block_styles.values(): style.visibility = visibility self.sync_edges_width_actors(scene, scene_object) self.setup_model_color_map(scene, scene_object) - def set_model_edges_width_on_all(self, scene_id: str, data_id: str, width: float) -> None: + def set_model_edges_width_on_all(self, viewer_id: str, data_id: str, width: float) -> None: # The main actor line width would also resize the lines, so edges always use their styles pipeline = self.get_vtk_pipeline(data_id) - scene, scene_object = self.scene_and_object(scene_id, data_id) + scene, scene_object = self.scene_and_object(viewer_id, data_id) scene_object.actor.GetProperty().SetEdgeWidth(width) for style in self.ensure_model_edges_styles(pipeline, scene_object).values(): style.width = width @@ -569,15 +569,15 @@ def deregister_model(self, params: schemas.Deregister) -> schemas.DeregisterResp @typed_rpc(model_prefix, schemas.visibility_route) def set_model_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: - self.set_visibility(params.scene_id, params.id, visibility=params.visibility) + self.set_visibility(params.viewer_id, params.id, visibility=params.visibility) if params.visibility: # Bars come back from the displayed attributes, hidden components' ones stay hidden - self.setup_model_color_map(*self.scene_and_object(params.scene_id, params.id)) + self.setup_model_color_map(*self.scene_and_object(params.viewer_id, params.id)) return schemas.VisibilityResponse() @typed_rpc(model_prefix, schemas.highlight_route) def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: - scene_object = self.get_scene_object(params.scene_id, params.id) + scene_object = self.get_scene_object(params.viewer_id, params.id) highlight = scene_object.highlight if params.visibility and params.block_ids: append = vtkAppendDataSets() @@ -591,7 +591,7 @@ def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightRes else: highlight.mapper.SetInputConnection(highlight.extract_selection.GetOutputPort()) highlight.actor.SetVisibility(params.visibility) - self.render(params.scene_id) + self.render(params.viewer_id) return schemas.HighlightResponse() @typed_rpc(model_prefix, schemas.get_blocks_bounds_route) diff --git a/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py index bd78a435..9c471307 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/points/model_points_protocols.py @@ -21,11 +21,11 @@ def __init__(self) -> None: @typed_rpc(model_points_prefix, schemas.visibility_route) def set_model_points_visibility(self, params: schemas.Visibility) -> schemas.VisibilityResponse: self.set_model_points_visibility_on_all( - params.scene_id, params.id, visibility=params.visibility + params.viewer_id, params.id, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_points_prefix, schemas.size_route) def set_model_points_size(self, params: schemas.Size) -> schemas.SizeResponse: - self.set_model_points_size_on_all(params.scene_id, params.id, params.size) + self.set_model_points_size_on_all(params.viewer_id, params.id, params.size) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json index 204255ad..77c9655c 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.json @@ -2,8 +2,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "size" ], diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py index 1ce22bc6..b46d14c1 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/size.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import PointSize, SceneId +from opengeodeweb_viewer.schema_types import PointSize, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,8 +13,8 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId size: PointSize + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/points/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json index ed9dda82..a548d970 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.json @@ -2,8 +2,8 @@ "rpc": "highlight", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -19,7 +19,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py index 58c81978..3beb6e7c 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/highlight.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockId, SceneId, Visibility +from opengeodeweb_viewer.schema_types import BlockId, ViewerId, Visibility from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: List[BlockId] id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json index 7a2afb61..f2082f0b 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "visibility" ], diff --git a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py index b7bf5686..027dbdc0 100644 --- a/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/schemas/visibility.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import ViewerId, Visibility as VisibilityType from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py index e9ce2549..389cbbcc 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/polygon/surfaces_attribute_polygon_protocols.py @@ -26,5 +26,5 @@ def __init__(self) -> None: def set_model_surfaces_polygon_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_cells(params.scene_id, params.id, params.block_ids, params) + self.display_attribute_on_cells(params.viewer_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py index 611aeddb..f6453922 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/attribute/vertex/surfaces_attribute_vertex_protocols.py @@ -24,5 +24,5 @@ def __init__(self) -> None: def set_model_surfaces_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: - self.display_attribute_on_vertices(params.scene_id, params.id, params.block_ids, params) + self.display_attribute_on_vertices(params.viewer_id, params.id, params.block_ids, params) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py index aa53c0d3..2469ad38 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/attribute/vertex/surfaces_edges_attribute_vertex_protocols.py @@ -27,6 +27,6 @@ def set_model_surfaces_edges_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: self.set_component_edges_attribute( - params.scene_id, params.id, "surfaces", params.block_ids, params + params.viewer_id, params.id, "surfaces", params.block_ids, params ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py index 08f8caa0..65795583 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/model_surfaces_edges_protocols.py @@ -23,20 +23,20 @@ def set_model_surfaces_edges_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_edges_visibility( - params.scene_id, params.id, "surfaces", params.block_ids, visibility=params.visibility + params.viewer_id, params.id, "surfaces", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_surfaces_edges_prefix, schemas.color_route) def set_model_surfaces_edges_color(self, params: schemas.Color) -> schemas.ColorResponse: self.set_component_edges_color( - params.scene_id, params.id, "surfaces", params.block_ids, params.color + params.viewer_id, params.id, "surfaces", params.block_ids, params.color ) return schemas.ColorResponse() @typed_rpc(model_surfaces_edges_prefix, schemas.width_route) def set_model_surfaces_edges_width(self, params: schemas.Width) -> schemas.WidthResponse: self.set_component_edges_width( - params.scene_id, params.id, "surfaces", params.block_ids, params.width + params.viewer_id, params.id, "surfaces", params.block_ids, params.width ) return schemas.WidthResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json index b3a02075..4a402c99 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py index b163d73a..8ad7b3ea 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json index 39099e81..22330fe6 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.json @@ -2,8 +2,8 @@ "rpc": "width", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "width" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py index 9af342c2..dd9f6af6 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/edges/schemas/width.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, EdgeWidth, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId width: EdgeWidth diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py index a1730cb9..41d93872 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/model_surfaces_protocols.py @@ -23,7 +23,7 @@ def set_model_surfaces_polygons_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_blocks_visibility( - params.scene_id, params.id, params.block_ids, visibility=params.visibility + params.viewer_id, params.id, params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json index 2df73b10..0e446b92 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.json @@ -2,8 +2,8 @@ "rpc": "attribute", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "name", diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py index 3d7341bc..94cbe65a 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/schemas/attribute.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeName, AttributeRangeMaximum, AttributeRangeMinimum, BlockIds, ColorMapPoints, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -22,7 +22,7 @@ def __post_init__(self) -> None: points: ColorMapPoints """Flat array of [value, r, g, b, ...]""" - scene_id: SceneId + viewer_id: ViewerId no_data_color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py index a0861c39..912cd31b 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/attribute/vertex/surfaces_points_attribute_vertex_protocols.py @@ -27,6 +27,6 @@ def set_model_surfaces_points_vertex_attribute( self, params: schemas.Attribute ) -> schemas.AttributeResponse: self.set_component_points_attribute( - params.scene_id, params.id, "surfaces", params.block_ids, params + params.viewer_id, params.id, "surfaces", params.block_ids, params ) return schemas.AttributeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py index 3fd0f8cb..d70cc4d2 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/model_surfaces_points_protocols.py @@ -23,20 +23,20 @@ def set_model_surfaces_points_visibility( self, params: schemas.Visibility ) -> schemas.VisibilityResponse: self.set_component_points_visibility( - params.scene_id, params.id, "surfaces", params.block_ids, visibility=params.visibility + params.viewer_id, params.id, "surfaces", params.block_ids, visibility=params.visibility ) return schemas.VisibilityResponse() @typed_rpc(model_surfaces_points_prefix, schemas.color_route) def set_model_surfaces_points_color(self, params: schemas.Color) -> schemas.ColorResponse: self.set_component_points_color( - params.scene_id, params.id, "surfaces", params.block_ids, params.color + params.viewer_id, params.id, "surfaces", params.block_ids, params.color ) return schemas.ColorResponse() @typed_rpc(model_surfaces_points_prefix, schemas.size_route) def set_model_surfaces_points_size(self, params: schemas.Size) -> schemas.SizeResponse: self.set_component_points_size( - params.scene_id, params.id, "surfaces", params.block_ids, params.size + params.viewer_id, params.id, "surfaces", params.block_ids, params.size ) return schemas.SizeResponse() diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json index b3a02075..4a402c99 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py index b163d73a..8ad7b3ea 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -15,7 +15,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color: ColorRGBA id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json index 0f244110..eb1cd950 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.json @@ -2,8 +2,8 @@ "rpc": "size", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "size" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py index 7cb38e1d..d8b00649 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/size.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, PointSize, SceneId +from opengeodeweb_viewer.schema_types import BlockIds, PointSize, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,8 +14,8 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId size: PointSize + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/points/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json index 396d8e51..bfd202a2 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.json @@ -2,8 +2,8 @@ "rpc": "apply_textures", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -32,7 +32,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "textures" ], diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py index 03fedf7b..54b7ad46 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/apply_textures.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -23,8 +23,8 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId textures: List[Texture] + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json index 3f2523e1..6dae29f8 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.json @@ -2,8 +2,8 @@ "rpc": "color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -26,7 +26,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "color_mode" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py index 9aab4562..7f926635 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import BlockId, BlockIds, ColorRGBA, ViewerId from opengeodeweb_microservice.schema_types import DataId, GeodeId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -23,7 +23,7 @@ def __post_init__(self) -> None: block_ids: BlockIds color_mode: ColorMode id: DataId - scene_id: SceneId + viewer_id: ViewerId collection_id: Optional[GeodeId] = None color: Optional[ColorRGBA] = None diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json index af2407e8..f8ddc9e1 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.json @@ -2,8 +2,8 @@ "rpc": "visibility", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" @@ -16,7 +16,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "id", "block_ids", "visibility" diff --git a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py index 43f9959e..144f3af7 100644 --- a/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py +++ b/src/opengeodeweb_viewer/rpc/model/surfaces/schemas/visibility.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockIds, SceneId, Visibility as VisibilityType +from opengeodeweb_viewer.schema_types import BlockIds, ViewerId, Visibility as VisibilityType from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -14,7 +14,7 @@ def __post_init__(self) -> None: block_ids: BlockIds id: DataId - scene_id: SceneId + viewer_id: ViewerId visibility: VisibilityType diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py index f954bebf..d06c3aba 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/__init__.py @@ -10,11 +10,11 @@ from .set_background_color import * from .ruler import * from .reset_visualization import * -from .reset_scenes import * +from .reset_viewers import * from .reset_ruler import * from .reset_camera import * from .render import * -from .remove_from_scene import * +from .remove_from_viewer import * from .preview_points import * from .picked_ids import * from .pick_colormap import * @@ -22,8 +22,8 @@ from .grid_scale import * from .get_point_position import * from .explode import * -from .delete_scene import * -from .create_scene import * +from .delete_viewer import * +from .create_viewer import * from .clipping_planes import * from .axes import * -from .add_to_scene import * +from .add_to_viewer import * diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_viewer.json similarity index 54% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json rename to src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_viewer.json index b2050d4e..cec578f1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_viewer.json @@ -1,8 +1,8 @@ { - "rpc": "add_to_scene", + "rpc": "add_to_viewer", "type": "object", - "properties": {"scene_id": { "title": "SceneId" }, "id": {"title": "DataId"}}, - "required": ["scene_id", "id"], + "properties": {"viewer_id": { "title": "ViewerId" }, "id": {"title": "DataId"}}, + "required": ["viewer_id", "id"], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_viewer.py similarity index 61% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py rename to src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_viewer.py index 82c22f56..285ca567 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/add_to_viewer.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -8,26 +8,26 @@ @dataclass -class AddToScene(DataClassJsonMixin): +class AddToViewer(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass -class AddToSceneResponse(DataClassJsonMixin): +class AddToViewerResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) pass -add_to_scene_route = Route( +add_to_viewer_route = Route( schema=load_schema(Path(__file__)), - params=AddToScene, - response=AddToSceneResponse, + params=AddToViewer, + response=AddToViewerResponse, ) -__all__ = ["AddToScene", "AddToSceneResponse", "add_to_scene_route"] +__all__ = ["AddToViewer", "AddToViewerResponse", "add_to_viewer_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json index a87dad4a..fddb9e81 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.json @@ -2,15 +2,15 @@ "rpc": "axes", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "visibility": { "title": "Visibility" } }, "required": [ - "scene_id", + "viewer_id", "visibility" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py index 4c445053..8f9ca90c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/axes.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId, Visibility +from opengeodeweb_viewer.schema_types import ViewerId, Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class Axes(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json index 858a1f77..244a28ca 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.json @@ -2,8 +2,8 @@ "rpc": "clipping_planes", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "ids": { "type": "array", @@ -45,7 +45,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "planes" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py index dbeb420d..d392f3ad 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/clipping_planes.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import ColorRGBA, SceneId +from opengeodeweb_viewer.schema_types import ColorRGBA, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -25,7 +25,7 @@ def __post_init__(self) -> None: ids: List[DataId] planes: List[Plane] - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_viewer.json similarity index 65% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json rename to src/opengeodeweb_viewer/rpc/viewer/schemas/create_viewer.json index 40f9dad5..28eeb547 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_viewer.json @@ -1,8 +1,8 @@ { - "rpc": "create_scene", + "rpc": "create_viewer", "type": "object", - "properties": {"scene_id": { "title": "SceneId" }}, - "required": ["scene_id"], + "properties": {"viewer_id": { "title": "ViewerId" }}, + "required": ["viewer_id"], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_viewer.py similarity index 58% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py rename to src/opengeodeweb_viewer/rpc/viewer/schemas/create_viewer.py index f22ffc68..e553188b 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/create_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/create_viewer.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -7,25 +7,25 @@ @dataclass -class CreateScene(DataClassJsonMixin): +class CreateViewer(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId @dataclass -class CreateSceneResponse(DataClassJsonMixin): +class CreateViewerResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) view_id: str -create_scene_route = Route( +create_viewer_route = Route( schema=load_schema(Path(__file__)), - params=CreateScene, - response=CreateSceneResponse, + params=CreateViewer, + response=CreateViewerResponse, ) -__all__ = ["CreateScene", "CreateSceneResponse", "create_scene_route"] +__all__ = ["CreateViewer", "CreateViewerResponse", "create_viewer_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_viewer.json similarity index 61% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json rename to src/opengeodeweb_viewer/rpc/viewer/schemas/delete_viewer.json index 4aa9778c..9fe1742a 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_viewer.json @@ -1,8 +1,8 @@ { - "rpc": "delete_scene", + "rpc": "delete_viewer", "type": "object", - "properties": {"scene_id": { "title": "SceneId" }}, - "required": ["scene_id"], + "properties": {"viewer_id": { "title": "ViewerId" }}, + "required": ["viewer_id"], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_viewer.py similarity index 57% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py rename to src/opengeodeweb_viewer/rpc/viewer/schemas/delete_viewer.py index a87de98f..3b2b3f18 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/delete_viewer.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -7,25 +7,25 @@ @dataclass -class DeleteScene(DataClassJsonMixin): +class DeleteViewer(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId @dataclass -class DeleteSceneResponse(DataClassJsonMixin): +class DeleteViewerResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) pass -delete_scene_route = Route( +delete_viewer_route = Route( schema=load_schema(Path(__file__)), - params=DeleteScene, - response=DeleteSceneResponse, + params=DeleteViewer, + response=DeleteViewerResponse, ) -__all__ = ["DeleteScene", "DeleteSceneResponse", "delete_scene_route"] +__all__ = ["DeleteViewer", "DeleteViewerResponse", "delete_viewer_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json index 15ec562d..6dca8793 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.json @@ -2,8 +2,8 @@ "rpc": "explode", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "ids": { "type": "array", @@ -18,7 +18,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "explode_factor" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py index 55065bde..7d5f5cca 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/explode.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -15,7 +15,7 @@ def __post_init__(self) -> None: explode_factor: float ids: List[DataId] - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json index 40dfb5b6..6e9ca785 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.json @@ -2,8 +2,8 @@ "rpc": "get_point_position", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "x": { "type": "integer" @@ -13,7 +13,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py index fd285c9a..d026e5df 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/get_point_position.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class GetPointPosition(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId x: int y: int diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json index 50773e98..01361f19 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.json @@ -2,15 +2,15 @@ "rpc": "grid_scale", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "visibility": { "title": "Visibility" } }, "required": [ - "scene_id", + "viewer_id", "visibility" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py index 37350d50..b17d0b3e 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/grid_scale.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId, Visibility +from opengeodeweb_viewer.schema_types import ViewerId, Visibility from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class GridScale(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId visibility: Visibility diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json index ec81a350..7c6699c1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.json @@ -2,8 +2,8 @@ "rpc": "highlight", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "x": { "type": "number" @@ -25,7 +25,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y", "field_type", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py index 90708001..ba7d777d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/highlight.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId, GeodeId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Dict, List, Union, Optional @@ -22,7 +22,7 @@ def __post_init__(self) -> None: field_type: FieldType ids: List[DataId] - scene_id: SceneId + viewer_id: ViewerId x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json index 8a7f00e1..ca61a7ab 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.json @@ -3,8 +3,8 @@ "rpc": "pick_colormap", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "x": { "type": "number" @@ -14,7 +14,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py index 6b403aff..bb6b959f 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/pick_colormap.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import BlockId, SceneId +from opengeodeweb_viewer.schema_types import BlockId, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -12,7 +12,7 @@ class PickColormap(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json index edf6a888..dfebb917 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.json @@ -2,8 +2,8 @@ "rpc": "picked_ids", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "x": { "type": "number" @@ -19,7 +19,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "x", "y", "ids" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py index 7218f6fa..e6fdf9c5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/picked_ids.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import BlockId, SceneId +from opengeodeweb_viewer.schema_types import BlockId, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -15,7 +15,7 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] - scene_id: SceneId + viewer_id: ViewerId x: float y: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json index 180527d0..8f4d2953 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.json @@ -2,8 +2,8 @@ "rpc": "preview_points", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "points": { "type": "array", @@ -24,7 +24,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "points", "style" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py index 8b448678..83e6a7f0 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/preview_points.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import Point3D, SceneId +from opengeodeweb_viewer.schema_types import Point3D, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -20,8 +20,8 @@ def __post_init__(self) -> None: print_dataclass(self) points: List[Point3D] - scene_id: SceneId style: Style + viewer_id: ViewerId closed: Optional[bool] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_viewer.json similarity index 54% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json rename to src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_viewer.json index 8546846f..819133e5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_viewer.json @@ -1,8 +1,8 @@ { - "rpc": "remove_from_scene", + "rpc": "remove_from_viewer", "type": "object", - "properties": {"scene_id": { "title": "SceneId" }, "id": {"title": "DataId"}}, - "required": ["scene_id", "id"], + "properties": {"viewer_id": { "title": "ViewerId" }, "id": {"title": "DataId"}}, + "required": ["viewer_id", "id"], "additionalProperties": false, "response": { "type": "object", diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_viewer.py similarity index 59% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py rename to src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_viewer.py index f43dce26..b443f831 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_scene.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/remove_from_viewer.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -8,26 +8,26 @@ @dataclass -class RemoveFromScene(DataClassJsonMixin): +class RemoveFromViewer(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass -class RemoveFromSceneResponse(DataClassJsonMixin): +class RemoveFromViewerResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) pass -remove_from_scene_route = Route( +remove_from_viewer_route = Route( schema=load_schema(Path(__file__)), - params=RemoveFromScene, - response=RemoveFromSceneResponse, + params=RemoveFromViewer, + response=RemoveFromViewerResponse, ) -__all__ = ["RemoveFromScene", "RemoveFromSceneResponse", "remove_from_scene_route"] +__all__ = ["RemoveFromViewer", "RemoveFromViewerResponse", "remove_from_viewer_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json index e2731fa5..7b41efc5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.json @@ -2,12 +2,12 @@ "rpc": "render", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py index 657c79ba..b15c901d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/render.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class Render(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json index 48307831..dcaf785a 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.json @@ -2,12 +2,12 @@ "rpc": "reset_camera", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py index 34568015..fbffedb1 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_camera.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class ResetCamera(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json index 02cf5faf..3d94bdb5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.json @@ -2,12 +2,12 @@ "rpc": "reset_ruler", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py index 32e7304e..3850078d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_ruler.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class ResetRuler(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_viewers.json similarity index 89% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.json rename to src/opengeodeweb_viewer/rpc/viewer/schemas/reset_viewers.json index 1441a869..e1d1a17c 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_viewers.json @@ -1,5 +1,5 @@ { - "rpc": "reset_scenes", + "rpc": "reset_viewers", "type": "object", "properties": {}, "required": [], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_viewers.py similarity index 64% rename from src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.py rename to src/opengeodeweb_viewer/rpc/viewer/schemas/reset_viewers.py index 7b361aa7..151c866f 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_scenes.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_viewers.py @@ -6,7 +6,7 @@ @dataclass -class ResetScenes(DataClassJsonMixin): +class ResetViewers(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) @@ -14,17 +14,17 @@ def __post_init__(self) -> None: @dataclass -class ResetScenesResponse(DataClassJsonMixin): +class ResetViewersResponse(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) pass -reset_scenes_route = Route( +reset_viewers_route = Route( schema=load_schema(Path(__file__)), - params=ResetScenes, - response=ResetScenesResponse, + params=ResetViewers, + response=ResetViewersResponse, ) -__all__ = ["ResetScenes", "ResetScenesResponse", "reset_scenes_route"] +__all__ = ["ResetViewers", "ResetViewersResponse", "reset_viewers_route"] diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json index f7422a16..89e7bbbb 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.json @@ -2,12 +2,12 @@ "rpc": "reset_visualization", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" } }, "required": [ - "scene_id" + "viewer_id" ], "additionalProperties": false, "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py index 11d0274c..be233cdb 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/reset_visualization.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class ResetVisualization(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json index be283703..4330a47f 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.json @@ -2,8 +2,8 @@ "rpc": "ruler", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "points": { "type": "array", @@ -20,7 +20,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "points" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py index 25270c18..ee29072b 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/ruler.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import List, Optional @@ -14,7 +14,7 @@ def __post_init__(self) -> None: print_dataclass(self) points: List[List[float]] - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json index 1f97e737..9a9737b5 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.json @@ -2,15 +2,15 @@ "rpc": "set_background_color", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "color": { "title": "ColorRGB" } }, "required": [ - "scene_id", + "viewer_id", "color" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py index 5ef88769..58a26e6d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_background_color.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ColorRGB, SceneId +from opengeodeweb_viewer.schema_types import ColorRGB, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -12,7 +12,7 @@ def __post_init__(self) -> None: print_dataclass(self) color: ColorRGB - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json index 1c2228a3..d69d8eb2 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.json @@ -2,8 +2,8 @@ "rpc": "set_orientation_widget", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "marker": { "type": "string", @@ -15,7 +15,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "marker" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py index 6692dc33..d4baeda6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_orientation_widget.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -19,7 +19,7 @@ def __post_init__(self) -> None: print_dataclass(self) marker: Marker - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json index 07e28aab..526675ba 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.json @@ -2,8 +2,8 @@ "rpc": "set_text_style", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "color": { "title": "ColorRGB" @@ -21,7 +21,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "color", "font_family", "opacity" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py index e9b975e5..be46edea 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_text_style.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import ColorRGB, Opacity, SceneId +from opengeodeweb_viewer.schema_types import ColorRGB, Opacity, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -21,7 +21,7 @@ def __post_init__(self) -> None: color: ColorRGB font_family: FontFamily opacity: Opacity - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json index 7fb9cb0e..918cca93 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.json @@ -2,8 +2,8 @@ "rpc": "set_z_scaling", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "z_scale": { "type": "number", @@ -11,7 +11,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "z_scale" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py index 9363c466..7a24102d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/set_z_scaling.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -11,7 +11,7 @@ class SetZScaling(DataClassJsonMixin): def __post_init__(self) -> None: print_dataclass(self) - scene_id: SceneId + viewer_id: ViewerId z_scale: float diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json index c711f259..15533a8d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.json @@ -2,8 +2,8 @@ "rpc": "shrink", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "ids": { "type": "array", @@ -18,7 +18,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "shrink_factor" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py index e5e373ee..45580d84 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/shrink.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -14,8 +14,8 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] - scene_id: SceneId shrink_factor: float + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json index 660ec6cb..8620e95d 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.json @@ -2,8 +2,8 @@ "rpc": "slice", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "ids": { "type": "array", @@ -35,7 +35,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "slices" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py index 35a40d14..31d87550 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/slice.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -23,8 +23,8 @@ def __post_init__(self) -> None: print_dataclass(self) ids: List[DataId] - scene_id: SceneId slices: List[SliceElement] + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json index 5da09125..d9cabf47 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.json @@ -2,8 +2,8 @@ "rpc": "take_screenshot", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "filename": { "title": "Filename" @@ -31,7 +31,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "filename", "output_extension", "include_background" diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py index 015adddb..5f274c47 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/take_screenshot.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import Filename, SceneId +from opengeodeweb_viewer.schema_types import Filename, ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from typing import Any @@ -22,7 +22,7 @@ def __post_init__(self) -> None: filename: Filename include_background: bool output_extension: OutputExtension - scene_id: SceneId + viewer_id: ViewerId height: Optional[int] = None width: Optional[int] = None diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json index b50711cf..4da50bc3 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.json @@ -2,8 +2,8 @@ "rpc": "threshold", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "ids": { "type": "array", @@ -49,7 +49,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "ids", "attributes" ], diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py index 4a3ef4a2..d5c10e98 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/threshold.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, SceneId +from opengeodeweb_viewer.schema_types import AttributeItem, AttributeRangeMaximum, AttributeRangeMinimum, ViewerId from opengeodeweb_microservice.schema_types import DataId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema @@ -33,7 +33,7 @@ def __post_init__(self) -> None: attributes: List[Attribute] ids: List[DataId] - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json index e1c97531..14134fb4 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json @@ -2,8 +2,8 @@ "rpc": "update_camera", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "camera_options": { "type": "object", @@ -54,7 +54,7 @@ } }, "required": [ - "scene_id", + "viewer_id", "camera_options" ], "response": { diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py index 1b1de9a0..8113dfe4 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py @@ -1,4 +1,4 @@ -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -25,7 +25,7 @@ def __post_init__(self) -> None: print_dataclass(self) camera_options: CameraOptions - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json index 3ff89e99..e5fc7a04 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.json @@ -2,15 +2,15 @@ "rpc": "update_data", "type": "object", "properties": { - "scene_id": { - "title": "SceneId" + "viewer_id": { + "title": "ViewerId" }, "id": { "title": "DataId" } }, "required": [ - "scene_id", + "viewer_id", "id" ], "additionalProperties": false, diff --git a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py index ab90e19c..bcb91db6 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py +++ b/src/opengeodeweb_viewer/rpc/viewer/schemas/update_data.py @@ -1,5 +1,5 @@ from opengeodeweb_microservice.schema_types import DataId -from opengeodeweb_viewer.schema_types import SceneId +from opengeodeweb_viewer.schema_types import ViewerId from pathlib import Path from opengeodeweb_microservice.schemas import Route, load_schema from dataclasses_json import DataClassJsonMixin @@ -13,7 +13,7 @@ def __post_init__(self) -> None: print_dataclass(self) id: DataId - scene_id: SceneId + viewer_id: ViewerId @dataclass diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index 23aad93a..793399bc 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -53,52 +53,54 @@ class VtkViewerView(VtkObjectView): def __init__(self) -> None: super().__init__() - @typed_rpc(viewer_prefix, schemas.create_scene_route) - def create_scene(self, params: schemas.CreateScene) -> schemas.CreateSceneResponse: + @typed_rpc(viewer_prefix, schemas.create_viewer_route) + def create_viewer(self, params: schemas.CreateViewer) -> schemas.CreateViewerResponse: scenes = self.get_scenes() - if params.scene_id in scenes: + if params.viewer_id in scenes: raise ValueError( { "code": 409, "name": "Conflict", - "description": f"Scene {params.scene_id} already exists", + "description": f"Scene {params.viewer_id} already exists", } ) - scene = Scene.create(params.scene_id, self.getApplication().GetObjectIdMap()) - scenes[params.scene_id] = scene - return schemas.CreateSceneResponse(view_id=scene.view_id) + scene = Scene.create(params.viewer_id, self.getApplication().GetObjectIdMap()) + scenes[params.viewer_id] = scene + return schemas.CreateViewerResponse(view_id=scene.view_id) - @typed_rpc(viewer_prefix, schemas.delete_scene_route) - def delete_scene(self, params: schemas.DeleteScene) -> schemas.DeleteSceneResponse: + @typed_rpc(viewer_prefix, schemas.delete_viewer_route) + def delete_viewer(self, params: schemas.DeleteViewer) -> schemas.DeleteViewerResponse: # The data pipelines stay in the db: only the scene and its objects go - self.get_scene(params.scene_id).dispose() - del self.get_scenes()[params.scene_id] - return schemas.DeleteSceneResponse() + self.get_scene(params.viewer_id).dispose() + del self.get_scenes()[params.viewer_id] + return schemas.DeleteViewerResponse() - @typed_rpc(viewer_prefix, schemas.reset_scenes_route) - def reset_scenes(self, _params: schemas.ResetScenes) -> schemas.ResetScenesResponse: + @typed_rpc(viewer_prefix, schemas.reset_viewers_route) + def reset_viewers(self, _params: schemas.ResetViewers) -> schemas.ResetViewersResponse: # A front that connects again starts from no scene: the data pipelines stay in the db scenes = self.get_scenes() for scene in scenes.values(): scene.dispose() scenes.clear() - return schemas.ResetScenesResponse() + return schemas.ResetViewersResponse() - @typed_rpc(viewer_prefix, schemas.add_to_scene_route) - def add_to_scene(self, params: schemas.AddToScene) -> schemas.AddToSceneResponse: - self.add_object(self.get_scene(params.scene_id), params.id) - return schemas.AddToSceneResponse() + @typed_rpc(viewer_prefix, schemas.add_to_viewer_route) + def add_to_viewer(self, params: schemas.AddToViewer) -> schemas.AddToViewerResponse: + self.add_object(self.get_scene(params.viewer_id), params.id) + return schemas.AddToViewerResponse() - @typed_rpc(viewer_prefix, schemas.remove_from_scene_route) - def remove_from_scene(self, params: schemas.RemoveFromScene) -> schemas.RemoveFromSceneResponse: - self.remove_object(self.get_scene(params.scene_id), params.id) - return schemas.RemoveFromSceneResponse() + @typed_rpc(viewer_prefix, schemas.remove_from_viewer_route) + def remove_from_viewer( + self, params: schemas.RemoveFromViewer + ) -> schemas.RemoveFromViewerResponse: + self.remove_object(self.get_scene(params.viewer_id), params.id) + return schemas.RemoveFromViewerResponse() @typed_rpc(viewer_prefix, schemas.reset_visualization_route) def reset_visualization( self, params: schemas.ResetVisualization ) -> schemas.ResetVisualizationResponse: - self.get_scene(params.scene_id).reset() + self.get_scene(params.viewer_id).reset() return schemas.ResetVisualizationResponse() @typed_rpc(viewer_prefix, schemas.set_background_color_route) @@ -106,27 +108,27 @@ def set_background_color( self, params: schemas.SetBackgroundColor ) -> schemas.SetBackgroundColorResponse: color = params.color - renderer = self.get_scene(params.scene_id).renderer + renderer = self.get_scene(params.viewer_id).renderer renderer.SetBackground([color.red / 255, color.green / 255, color.blue / 255]) return schemas.SetBackgroundColorResponse() @typed_rpc(viewer_prefix, schemas.set_text_style_route) def update_text_style(self, params: schemas.SetTextStyle) -> schemas.SetTextStyleResponse: color = params.color - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) scene.text_style = TextStyle( color=(color.red, color.green, color.blue), font_family=params.font_family.value, opacity=params.opacity, ) - self.apply_scene_text_style(params.scene_id) + self.apply_scene_text_style(params.viewer_id) return schemas.SetTextStyleResponse() @typed_rpc(viewer_prefix, schemas.set_orientation_widget_route) def update_orientation_widget( self, params: schemas.SetOrientationWidget ) -> schemas.SetOrientationWidgetResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) widget = scene.widget visibility = widget.GetOrientationMarker().GetVisibility() widget.EnabledOff() @@ -146,12 +148,12 @@ def update_orientation_widget( @typed_rpc(viewer_prefix, schemas.reset_camera_route) def reset_camera(self, params: schemas.ResetCamera) -> schemas.ResetCameraResponse: - self.get_scene(params.scene_id).renderer.ResetCamera() + self.get_scene(params.viewer_id).renderer.ResetCamera() return schemas.ResetCameraResponse() @typed_rpc(viewer_prefix, schemas.take_screenshot_route) def take_screenshot(self, params: schemas.TakeScreenshot) -> schemas.TakeScreenshotResponse: - render_window = self.get_scene(params.scene_id).render_window + render_window = self.get_scene(params.viewer_id).render_window w2if = vtkWindowToImageFilter() include_background = params.include_background @@ -206,7 +208,7 @@ def take_screenshot(self, params: schemas.TakeScreenshot) -> schemas.TakeScreens def update_data(self, params: schemas.UpdateData) -> schemas.UpdateDataResponse: data = self.get_vtk_pipeline(params.id) # Validates the scene: the new data reaches every scene showing it - self.get_scene_object(params.scene_id, params.id) + self.get_scene_object(params.viewer_id, params.id) reader = data.reader reader.Update() output = reader.GetOutputDataObject(0) @@ -232,7 +234,7 @@ def update_data(self, params: schemas.UpdateData) -> schemas.UpdateDataResponse: def get_point_position( self, params: schemas.GetPointPosition ) -> schemas.GetPointPositionResponse: - renderer = self.get_scene(params.scene_id).renderer + renderer = self.get_scene(params.viewer_id).renderer # If clicking on an object prop_picker = vtkPropPicker() if prop_picker.Pick(params.x, params.y, 0.0, renderer): @@ -246,7 +248,7 @@ def get_point_position( @typed_rpc(viewer_prefix, schemas.pick_colormap_route) def pick_colormap(self, params: schemas.PickColormap) -> schemas.PickColormapResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) size = scene.render_window.GetSize() nx = params.x / size[0] ny = 1.0 - (params.y / size[1]) @@ -289,7 +291,7 @@ def compute_epsilon(self, renderer: vtkRenderer, z: float) -> float: @typed_rpc(viewer_prefix, schemas.picked_ids_route) def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: picker = vtkCellPicker(tolerance=0.005) - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) # Retrieve all actors under the clicked coordinates actors, flat_index = self.pick_actors_under_coordinate( scene, params.ids, params.x, params.y, picker @@ -298,7 +300,7 @@ def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: array_ids = [ data_id for data_id in params.ids - if self.get_scene_object(params.scene_id, data_id).actor in actors + if self.get_scene_object(params.viewer_id, data_id).actor in actors ] if not array_ids: return schemas.PickedIDSResponse(array_ids=[]) @@ -307,12 +309,12 @@ def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: @typed_rpc(viewer_prefix, schemas.grid_scale_route) def toggle_grid_scale(self, params: schemas.GridScale) -> schemas.GridScaleResponse: - self.get_scene(params.scene_id).grid_scale.SetVisibility(params.visibility) + self.get_scene(params.viewer_id).grid_scale.SetVisibility(params.visibility) return schemas.GridScaleResponse() @typed_rpc(viewer_prefix, schemas.axes_route) def toggle_axes(self, params: schemas.Axes) -> schemas.AxesResponse: - self.get_scene(params.scene_id).widget.GetOrientationMarker().SetVisibility( + self.get_scene(params.viewer_id).widget.GetOrientationMarker().SetVisibility( params.visibility ) return schemas.AxesResponse() @@ -320,7 +322,7 @@ def toggle_axes(self, params: schemas.Axes) -> schemas.AxesResponse: @typed_rpc(viewer_prefix, schemas.update_camera_route) def update_camera(self, params: schemas.UpdateCamera) -> schemas.UpdateCameraResponse: camera_options = params.camera_options - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) camera = scene.renderer.GetActiveCamera() camera.SetFocalPoint(camera_options.focal_point) @@ -333,12 +335,12 @@ def update_camera(self, params: schemas.UpdateCamera) -> schemas.UpdateCameraRes @typed_rpc(viewer_prefix, schemas.render_route) def render_now(self, params: schemas.Render) -> schemas.RenderResponse: - self.render(params.scene_id) + self.render(params.viewer_id) return schemas.RenderResponse() @typed_rpc(viewer_prefix, schemas.highlight_route) def set_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) # Clear previous highlights self.clear_highlights(scene, params.ids) picker = vtkCellPicker(tolerance=0.005) @@ -347,15 +349,15 @@ def set_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: scene, params.ids, (params.x, params.y), params.field_type.value, picker ) if not data_id or id_to_select == -1: - self.render(params.scene_id) + self.render(params.viewer_id) return schemas.HighlightResponse() # Retrieve picked composite block information pipeline = self.get_vtk_pipeline(data_id) - scene_object = self.get_scene_object(params.scene_id, data_id) + scene_object = self.get_scene_object(params.viewer_id, data_id) dataset, geode_id = self.get_composite_block_info(pipeline, scene_object, picker) # Update highlight visibility and extract attributes from the picked element self.update_highlight(scene_object, id_to_select, params.field_type.value, dataset) - self.render(params.scene_id) + self.render(params.viewer_id) data_attributes = self.extract_picked_attributes( scene_object, id_to_select, params.field_type.value, dataset ) @@ -371,20 +373,20 @@ def set_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: def set_clipping_planes_rpc( self, params: schemas.ClippingPlanes ) -> schemas.ClippingPlanesResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) self.set_clipping_planes(scene, params.ids, params.planes) self._update_clipping_plane_previews(scene, params.ids, params.planes) return schemas.ClippingPlanesResponse() @typed_rpc(viewer_prefix, schemas.shrink_route) def set_shrink_rpc(self, params: schemas.Shrink) -> schemas.ShrinkResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) self.set_shrink(scene, params.ids, params.shrink_factor) return schemas.ShrinkResponse() @typed_rpc(viewer_prefix, schemas.explode_route) def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) exploded_bounds = self.set_explode(scene, params.ids, params.explode_factor) return schemas.ExplodeResponse( exploded_bounds=[ @@ -395,18 +397,18 @@ def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: @typed_rpc(viewer_prefix, schemas.slice_route) def set_slice_rpc(self, params: schemas.Slice) -> schemas.SliceResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) return schemas.SliceResponse(max_indices=self.set_slice(scene, params.ids, params.slices)) @typed_rpc(viewer_prefix, schemas.threshold_route) def set_threshold_rpc(self, params: schemas.Threshold) -> schemas.ThresholdResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) self.set_threshold(scene, params.ids, params.attributes) return schemas.ThresholdResponse() @typed_rpc(viewer_prefix, schemas.set_z_scaling_route) def set_z_scaling(self, params: schemas.SetZScaling) -> schemas.SetZScalingResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) cam = scene.renderer.GetActiveCamera() transform = vtkTransform() transform.Scale(1, 1, params.z_scale) @@ -416,7 +418,7 @@ def set_z_scaling(self, params: schemas.SetZScaling) -> schemas.SetZScalingRespo @typed_rpc(viewer_prefix, schemas.preview_points_route) def preview_points(self, params: schemas.PreviewPoints) -> schemas.PreviewPointsResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) points_data = params.points style_name = params.style.value if hasattr(params.style, "value") else params.style @@ -424,7 +426,7 @@ def preview_points(self, params: schemas.PreviewPoints) -> schemas.PreviewPoints if scene.preview_actor is not None: scene.renderer.RemoveActor(scene.preview_actor) scene.preview_actor = None - self.render(params.scene_id) + self.render(params.viewer_id) return schemas.PreviewPointsResponse() polydata = self._ensure_preview_polydata(scene) points = polydata.GetPoints() @@ -451,7 +453,7 @@ def preview_points(self, params: schemas.PreviewPoints) -> schemas.PreviewPoints polydata.SetLines(lines) polydata.SetPolys(polys) polydata.Modified() - self.render(params.scene_id) + self.render(params.viewer_id) return schemas.PreviewPointsResponse() def _update_clipping_plane_previews( @@ -525,7 +527,7 @@ def _preview_cells( @typed_rpc(viewer_prefix, schemas.ruler_route) def set_ruler_rpc(self, params: schemas.Ruler) -> schemas.RulerResponse: - scene = self.get_scene(params.scene_id) + scene = self.get_scene(params.viewer_id) point1 = params.points[0] point2 = params.points[1] if len(params.points) > 1 else None distance = scene.ruler.set_endpoints(point1, point2, renderer=scene.renderer) @@ -533,5 +535,5 @@ def set_ruler_rpc(self, params: schemas.Ruler) -> schemas.RulerResponse: @typed_rpc(viewer_prefix, schemas.reset_ruler_route) def reset_ruler(self, params: schemas.ResetRuler) -> schemas.ResetRulerResponse: - self.get_scene(params.scene_id).ruler.reset() + self.get_scene(params.viewer_id).ruler.reset() return schemas.ResetRulerResponse() diff --git a/src/opengeodeweb_viewer/scene/scene.py b/src/opengeodeweb_viewer/scene/scene.py index 79ea9925..8ab87747 100644 --- a/src/opengeodeweb_viewer/scene/scene.py +++ b/src/opengeodeweb_viewer/scene/scene.py @@ -30,7 +30,7 @@ class Scene: """Everything one view shows: its own render window, scene widgets and data render side.""" - scene_id: str + viewer_id: str view_id: str renderer: vtkRenderer render_window: vtkRenderWindow @@ -50,13 +50,13 @@ def __post_init__(self) -> None: self.reset() @classmethod - def create(cls, scene_id: str, object_id_map: vtkObjectIdMap) -> Scene: + def create(cls, viewer_id: str, object_id_map: vtkObjectIdMap) -> Scene: renderer = vtkRenderer() render_window = vtkRenderWindow() render_window.AddRenderer(renderer) render_window.SetOffScreenRendering(True) # noqa: FBT003 VTK API view_id = str(object_id_map.GetGlobalId(render_window)) - return cls(scene_id, view_id, renderer, render_window, object_id_map) + return cls(viewer_id, view_id, renderer, render_window, object_id_map) def dispose(self) -> None: self.widget.EnabledOff() diff --git a/src/opengeodeweb_viewer/schema_definitions.json b/src/opengeodeweb_viewer/schema_definitions.json index 700032fa..55c35b10 100644 --- a/src/opengeodeweb_viewer/schema_definitions.json +++ b/src/opengeodeweb_viewer/schema_definitions.json @@ -242,10 +242,6 @@ "PointSize": { "type": "number" }, - "SceneId": { - "type": "string", - "minLength": 1 - }, "ViewerElementsType": { "type": "string", "enum": [ @@ -256,6 +252,10 @@ "default" ] }, + "ViewerId": { + "type": "string", + "minLength": 1 + }, "ViewerObjectType": { "type": "string", "enum": [ diff --git a/src/opengeodeweb_viewer/schema_types.d.ts b/src/opengeodeweb_viewer/schema_types.d.ts index 9ed4dbf1..6a9063e8 100644 --- a/src/opengeodeweb_viewer/schema_types.d.ts +++ b/src/opengeodeweb_viewer/schema_types.d.ts @@ -12,7 +12,7 @@ export type ColorMapPoints = number[]; export type AttributeItem = number; export type AttributeRangeMinimum = number; export type AttributeRangeMaximum = number; -export type SceneId = string; +export type ViewerId = string; export interface Point3D { x: number; diff --git a/src/opengeodeweb_viewer/schema_types.json b/src/opengeodeweb_viewer/schema_types.json index 1b89c412..c96c9b70 100644 --- a/src/opengeodeweb_viewer/schema_types.json +++ b/src/opengeodeweb_viewer/schema_types.json @@ -108,7 +108,7 @@ "AttributeRangeMaximum": { "type": "number" }, - "SceneId": { + "ViewerId": { "type": "string", "minLength": 1 } diff --git a/src/opengeodeweb_viewer/schema_types.py b/src/opengeodeweb_viewer/schema_types.py index 637fc356..43bd9336 100644 --- a/src/opengeodeweb_viewer/schema_types.py +++ b/src/opengeodeweb_viewer/schema_types.py @@ -17,7 +17,7 @@ AttributeItem = int AttributeRangeMinimum = float AttributeRangeMaximum = float -SceneId = str +ViewerId = str @dataclass @@ -60,6 +60,6 @@ class ColorRGBA(ColorRGB): "Opacity", "Point3D", "PointSize", - "SceneId", + "ViewerId", "Visibility", ] diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index a64c4048..01809f9d 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -81,7 +81,7 @@ def not_found(description: str) -> ValueError: def scene_object_of(scene: Scene, data_id: str) -> SceneObject: scene_object = scene.objects.get(data_id) if scene_object is None: - msg = f"Data {data_id} is not in scene {scene.scene_id}" + msg = f"Data {data_id} is not in scene {scene.viewer_id}" raise not_found(msg) return scene_object @@ -138,18 +138,18 @@ def get_vtk_pipeline(self, data_id: str) -> VtkPipeline: def get_scenes(self) -> dict[str, Scene]: return cast("dict[str, Scene]", self.getSharedObject("scenes")) - def get_scene(self, scene_id: str) -> Scene: - scene = self.get_scenes().get(scene_id) + def get_scene(self, viewer_id: str) -> Scene: + scene = self.get_scenes().get(viewer_id) if scene is None: - msg = f"Scene {scene_id} not found" + msg = f"Scene {viewer_id} not found" raise not_found(msg) return scene - def get_scene_object(self, scene_id: str, data_id: str) -> SceneObject: - return scene_object_of(self.get_scene(scene_id), data_id) + def get_scene_object(self, viewer_id: str, data_id: str) -> SceneObject: + return scene_object_of(self.get_scene(viewer_id), data_id) - def apply_scene_text_style(self, scene_id: str) -> None: - scene = self.get_scene(scene_id) + def apply_scene_text_style(self, viewer_id: str) -> None: + scene = self.get_scene(viewer_id) scene.apply_text_style() self.update_scalar_bars_layout(scene) @@ -727,9 +727,9 @@ def update_scalar_bars_layout(self, scene: Scene) -> None: bar.SetWidth(actual_width) bar.SetHeight(bar_height) - def render(self, scene_id: str) -> None: + def render(self, viewer_id: str) -> None: """Push the image of a scene.""" - scene = self.get_scene(scene_id) + scene = self.get_scene(viewer_id) if scene.basemaps_dirty: scene.basemaps_dirty = False update_basemaps(self.get_data_base(), scene) diff --git a/tests/conftest.py b/tests/conftest.py index b281374a..65c110ce 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -114,40 +114,42 @@ def images_diff(self, first_image_path: Path, second_image_path: Path) -> float: logger.info("thresholded error=%s", images_diff.GetThresholdedError()) return images_diff.GetThresholdedError() - def create_scene(self, scene_id: str = "scene_1") -> str: - self.call("opengeodeweb_viewer.viewer.create_scene", [{"scene_id": scene_id}]) - view_id = str(self.get_result("opengeodeweb_viewer.viewer.create_scene")["view_id"]) - self.view_ids[scene_id] = view_id + def create_viewer(self, viewer_id: str = "viewer_1") -> str: + self.call("opengeodeweb_viewer.viewer.create_viewer", [{"viewer_id": viewer_id}]) + view_id = str(self.get_result("opengeodeweb_viewer.viewer.create_viewer")["view_id"]) + self.view_ids[viewer_id] = view_id self.call("viewport.image.push.observer.add", [view_id]) self._drain_initial_messages(view_id) return view_id - def create_data_scene(self, scene_id: str = "scene_1") -> str: + def create_data_scene(self, viewer_id: str = "viewer_1") -> str: """A scene drawn like the data references: black background, no orientation widget. Kept as it is when the test already created it.""" - if scene_id in self.view_ids: - return self.view_ids[scene_id] - view_id = self.create_scene(scene_id) + if viewer_id in self.view_ids: + return self.view_ids[viewer_id] + view_id = self.create_viewer(viewer_id) for name, params in ( ("set_background_color", {"color": {"red": 0, "green": 0, "blue": 0}}), ("set_orientation_widget", {"marker": "none"}), ): rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict[name]["rpc"] - self.call(rpc, [{"scene_id": scene_id, **params}]) + self.call(rpc, [{"viewer_id": viewer_id, **params}]) self.get_result(rpc) return view_id - def add_to_scene(self, data_id: str, scene_id: str = "scene_1") -> None: - rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["add_to_scene"]["rpc"] - self.call(rpc, [{"scene_id": scene_id, "id": data_id}]) + def add_to_viewer(self, data_id: str, viewer_id: str = "viewer_1") -> None: + rpc = ( + VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["add_to_viewer"]["rpc"] + ) + self.call(rpc, [{"viewer_id": viewer_id, "id": data_id}]) self.get_result(rpc) - def compare_image(self, filename: str, scene_id: str = "scene_1") -> bool: - view_id = self.view_ids[scene_id] + def compare_image(self, filename: str, viewer_id: str = "viewer_1") -> bool: + view_id = self.view_ids[viewer_id] render_rpc = ( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["render"]["rpc"] ) - self.call(render_rpc, [{"scene_id": scene_id}]) + self.call(render_rpc, [{"viewer_id": viewer_id}]) while True: response = self.get_response() if response.get("id") == "rpc:" + render_rpc and "error" in response: diff --git a/tests/data/images/viewer/add_to_scene.jpeg b/tests/data/images/viewer/add_to_viewer.jpeg similarity index 100% rename from tests/data/images/viewer/add_to_scene.jpeg rename to tests/data/images/viewer/add_to_viewer.jpeg diff --git a/tests/image/test_image_protocols.py b/tests/image/test_image_protocols.py index 7270f128..9c6c5743 100644 --- a/tests/image/test_image_protocols.py +++ b/tests/image/test_image_protocols.py @@ -52,7 +52,7 @@ def _register_image( ) server.create_data_scene() server.call(_image_rpc("register"), [{"id": image_id, "name": viewable_file}]) - server.add_to_scene(image_id) + server.add_to_viewer(image_id) def register_image_2d(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -69,7 +69,7 @@ def _screenshot(server: ServerMonitor) -> vtkImageData: rpc, [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "filename": "image_colors", "output_extension": "png", "include_background": True, @@ -165,18 +165,18 @@ def test_register_image_3d_true_colors( def test_image_visibility(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: register_image_2d(server, dataset_factory) server.call( - _image_rpc("visibility"), [{"scene_id": "scene_1", "id": image_id, "visibility": False}] + _image_rpc("visibility"), [{"viewer_id": "viewer_1", "id": image_id, "visibility": False}] ) assert server.compare_image("image/visibility.jpeg") server.call( - _image_rpc("visibility"), [{"scene_id": "scene_1", "id": image_id, "visibility": True}] + _image_rpc("visibility"), [{"viewer_id": "viewer_1", "id": image_id, "visibility": True}] ) assert server.compare_image("image/register.jpeg") def test_image_opacity(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: register_image_2d(server, dataset_factory) - server.call(_image_rpc("opacity"), [{"scene_id": "scene_1", "id": image_id, "opacity": 0.3}]) + server.call(_image_rpc("opacity"), [{"viewer_id": "viewer_1", "id": image_id, "opacity": 0.3}]) assert server.compare_image("image/opacity.jpeg") @@ -193,7 +193,7 @@ def test_image_is_not_pickable(server: ServerMonitor, dataset_factory: Callable[ # The image is drawn under the picked pixel _assert_between(_pixel(screenshot, x, y), _hat_bar_colors()) rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["picked_ids"]["rpc"] - server.call(rpc, [{"scene_id": "scene_1", "x": x, "y": y, "ids": [image_id]}]) + server.call(rpc, [{"viewer_id": "viewer_1", "x": x, "y": y, "ids": [image_id]}]) assert server.get_result(rpc)["array_ids"] == [] @@ -215,8 +215,8 @@ def _image_scene( pipeline = VtkPipeline(reader) view.setup_pipeline(pipeline, image_id) view.get_data_base()[image_id] = pipeline - scene = Scene.create("scene_1", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["scene_1"] = scene + scene = Scene.create("viewer_1", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["viewer_1"] = scene view.add_object(scene, image_id) return scene.objects[image_id] @@ -224,16 +224,16 @@ def _image_scene( def test_image_visibility_keeps_scalar_bar_hidden(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkImageView() scene_object = _image_scene(view, monkeypatch, "image") - view.set_visibility("scene_1", image_id, visibility=False) - view.set_visibility("scene_1", image_id, visibility=True) + view.set_visibility("viewer_1", image_id, visibility=False) + view.set_visibility("viewer_1", image_id, visibility=True) assert not scene_object.scalar_bar.GetVisibility() def test_mesh_visibility_shows_its_scalar_bar(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkMeshView() scene_object = _image_scene(view, monkeypatch, "mesh") - view.set_visibility("scene_1", image_id, visibility=False) - view.set_visibility("scene_1", image_id, visibility=True) + view.set_visibility("viewer_1", image_id, visibility=False) + view.set_visibility("viewer_1", image_id, visibility=True) assert scene_object.scalar_bar.GetVisibility() diff --git a/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py b/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py index 1fc6fd66..1e2f708f 100644 --- a/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py +++ b/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py @@ -33,7 +33,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_cells_cell_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -46,7 +46,7 @@ def test_cells_cell_color_map(server: ServerMonitor, dataset_factory: Callable[. + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -82,7 +82,7 @@ def test_cells_cell_color_map_range_update( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -111,7 +111,7 @@ def test_cells_cell_color_map_range_update( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -147,7 +147,7 @@ def test_cells_cell_color_map_red_shift( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -176,7 +176,7 @@ def test_cells_cell_color_map_red_shift( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -212,7 +212,7 @@ def test_cells_cell_color_map_rainbow( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -265,7 +265,7 @@ def test_cells_cell_color_map_rainbow( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 0, @@ -324,7 +324,7 @@ def test_cells_cell_attribute_item( + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "RGB_data", "item": 1, diff --git a/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py b/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py index b7cf36c7..cdf99437 100644 --- a/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py +++ b/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py @@ -33,7 +33,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_cells_vertex_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -48,7 +48,7 @@ def test_cells_vertex_color_map(server: ServerMonitor, dataset_factory: Callable ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 0, @@ -86,7 +86,7 @@ def test_cells_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 0, @@ -117,7 +117,7 @@ def test_cells_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 0, @@ -155,7 +155,7 @@ def test_cells_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 0, @@ -186,7 +186,7 @@ def test_cells_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 0, @@ -224,7 +224,7 @@ def test_cells_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 0, @@ -279,7 +279,7 @@ def test_cells_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 0, @@ -340,7 +340,7 @@ def test_cells_vertex_attribute_item( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 1, diff --git a/tests/mesh/cells/test_mesh_cells_protocols.py b/tests/mesh/cells/test_mesh_cells_protocols.py index 195582e8..0480af65 100644 --- a/tests/mesh/cells/test_mesh_cells_protocols.py +++ b/tests/mesh/cells/test_mesh_cells_protocols.py @@ -32,7 +32,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) assert server.compare_image("mesh/cells/register.jpeg") @@ -45,7 +45,7 @@ def test_cells_color(server: ServerMonitor, dataset_factory: Callable[..., str]) + VtkMeshCellsView.mesh_cells_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 0.5}, } @@ -61,7 +61,7 @@ def test_cells_opacity(server: ServerMonitor, dataset_factory: Callable[..., str server.call( VtkMeshCellsView.mesh_cells_prefix + VtkMeshCellsView.mesh_cells_schemas_dict["opacity"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], + [{"viewer_id": "viewer_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/cells/opacity.jpeg") @@ -73,7 +73,7 @@ def test_cells_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshCellsView.mesh_cells_prefix + VtkMeshCellsView.mesh_cells_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/cells/visibility.jpeg") @@ -86,7 +86,7 @@ def test_cells_clipping_plane(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "planes": [ { @@ -108,7 +108,7 @@ def test_cells_shrink(server: ServerMonitor, dataset_factory: Callable[..., str] VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -133,12 +133,12 @@ def register_grid_3d(server: ServerMonitor, dataset_factory: Callable[..., str]) VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": grid_3d_id, "name": "regular_grid_3d.vti"}], ) - server.add_to_scene(grid_3d_id) + server.add_to_viewer(grid_3d_id) assert server.compare_image("mesh/cells/slice_grid_3d_register.jpeg") def call_slice(server: ServerMonitor, ids: list[str], slices: list[dict[str, int]]) -> object: - server.call(slice_rpc, [{"scene_id": "scene_1", "ids": ids, "slices": slices}]) + server.call(slice_rpc, [{"viewer_id": "viewer_1", "ids": ids, "slices": slices}]) return server.get_result(slice_rpc) @@ -178,7 +178,7 @@ def test_slice_then_clipping(server: ServerMonitor, dataset_factory: Callable[.. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [grid_3d_id], "planes": [{"origin": [50.0, 40.0, 30.0], "normal": [1.0, 0.0, 0.0]}], } @@ -205,7 +205,7 @@ def test_slice_on_non_grid_removed( [{"id": other_mesh_id, "name": "hat.vtp"}], ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) - server.add_to_scene(other_mesh_id) + server.add_to_viewer(other_mesh_id) result = call_slice(server, [other_mesh_id], []) assert result == {"max_indices": [0, 0, 0]} @@ -222,7 +222,7 @@ def test_slice_on_non_grid_ignored( [{"id": other_mesh_id, "name": "hat.vtp"}], ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) - server.add_to_scene(other_mesh_id) + server.add_to_viewer(other_mesh_id) result = call_slice(server, [other_mesh_id, grid_3d_id], [{"axis": 2, "index": 3}]) assert result == {"max_indices": [10, 8, 6]} @@ -252,7 +252,7 @@ def test_cells_threshold(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "attributes": [ { @@ -270,7 +270,7 @@ def test_cells_threshold(server: ServerMonitor, dataset_factory: Callable[..., s server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], - [{"scene_id": "scene_1", "ids": [mesh_id], "attributes": []}], + [{"viewer_id": "viewer_1", "ids": [mesh_id], "attributes": []}], ) assert server.compare_image("mesh/cells/register.jpeg") @@ -285,7 +285,7 @@ def test_cells_multiple_thresholds( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "attributes": [ { diff --git a/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py b/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py index 2e8f7e3e..306e5185 100644 --- a/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py +++ b/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py @@ -33,7 +33,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "edged_curve3D.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_edges_edge_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -46,7 +46,7 @@ def test_edges_edge_color_map(server: ServerMonitor, dataset_factory: Callable[. + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -82,7 +82,7 @@ def test_edges_edge_color_map_range_update( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -111,7 +111,7 @@ def test_edges_edge_color_map_range_update( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -147,7 +147,7 @@ def test_edges_edge_color_map_rainbow( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -200,7 +200,7 @@ def test_edges_edge_color_map_rainbow( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "cycle_id", "item": 0, @@ -259,7 +259,7 @@ def test_edges_edge_attribute_item( + VtkMeshEdgesAttributeEdgeView.mesh_edges_attribute_edge_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "cycle_id", "item": 1, diff --git a/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py b/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py index c8e7c5d2..06208599 100644 --- a/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py +++ b/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py @@ -46,7 +46,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "attributed_edged_curve.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_edges_vertex_color_map(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -61,7 +61,7 @@ def test_edges_vertex_color_map(server: ServerMonitor, dataset_factory: Callable ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -99,7 +99,7 @@ def test_edges_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -130,7 +130,7 @@ def test_edges_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -168,7 +168,7 @@ def test_edges_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -199,7 +199,7 @@ def test_edges_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -237,7 +237,7 @@ def test_edges_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -292,7 +292,7 @@ def test_edges_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "vertex_attribute", "item": 0, @@ -353,7 +353,7 @@ def test_edges_vertex_attribute_item( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 1, @@ -393,16 +393,16 @@ def register_hat_with_edges(server: ServerMonitor, dataset_factory: Callable[... VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": True}], ) server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["width"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "width": 4}], + [{"viewer_id": "viewer_1", "id": mesh_id, "width": 4}], ) @@ -412,7 +412,7 @@ def set_edges_vertex_attribute(server: ServerMonitor, attribute: dict[str, objec + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict["attribute"][ "rpc" ], - [{"scene_id": "scene_1", "id": mesh_id, **attribute}], + [{"viewer_id": "viewer_1", "id": mesh_id, **attribute}], ) @@ -436,7 +436,7 @@ def test_polygons_edges_shared_scalar_bar( + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[ "attribute" ]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, **HAT_ATTRIBUTE}], + [{"viewer_id": "viewer_1", "id": mesh_id, **HAT_ATTRIBUTE}], ) set_edges_vertex_attribute(server, HAT_ATTRIBUTE) # Same attribute and color map: one scalar bar only @@ -454,7 +454,7 @@ def test_polygons_edges_attribute_then_color( + VtkMeshEdgesView.mesh_edges_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, } @@ -473,7 +473,7 @@ def test_polygons_edges_attribute_then_opacity( server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["opacity"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], + [{"viewer_id": "viewer_1", "id": mesh_id, "opacity": 0.5}], ) # Edges keep their color map, only more transparent assert server.compare_image("mesh/edges/polygons_edges_attribute_then_opacity.jpeg") @@ -487,7 +487,7 @@ def test_polygons_edges_hidden_with_object( set_edges_vertex_attribute(server, HAT_ATTRIBUTE) server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": False}], ) # Empty scene: no edges, no scalar bar assert server.compare_image("mesh/edges/polygons_edges_hidden_with_object.jpeg") @@ -501,14 +501,14 @@ def test_polygons_points_and_edges_shared_scalar_bar( server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": True}], ) server.call( VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict["attribute"][ "rpc" ], - [{"scene_id": "scene_1", "id": mesh_id, **HAT_ATTRIBUTE}], + [{"viewer_id": "viewer_1", "id": mesh_id, **HAT_ATTRIBUTE}], ) set_edges_vertex_attribute(server, HAT_ATTRIBUTE) # Same attribute and color map on points and edges: one scalar bar only @@ -521,7 +521,7 @@ def set_polygons_vertex_attribute(server: ServerMonitor) -> None: + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[ "attribute" ]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, **HAT_ATTRIBUTE}], + [{"viewer_id": "viewer_1", "id": mesh_id, **HAT_ATTRIBUTE}], ) @@ -546,7 +546,7 @@ def test_polygons_color_after_shared_scalar_bar( + VtkMeshPolygonsView.mesh_polygons_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 255, "blue": 255, "alpha": 1.0}, } diff --git a/tests/mesh/edges/test_mesh_edges_protocols.py b/tests/mesh/edges/test_mesh_edges_protocols.py index bd441234..2608728d 100644 --- a/tests/mesh/edges/test_mesh_edges_protocols.py +++ b/tests/mesh/edges/test_mesh_edges_protocols.py @@ -26,7 +26,7 @@ def test_edges_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": True}], ) assert server.compare_image("mesh/edges/visibility.jpeg") @@ -39,7 +39,7 @@ def test_edges_color(server: ServerMonitor, dataset_factory: Callable[..., str]) + VtkMeshEdgesView.mesh_edges_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 0.5}, } @@ -56,7 +56,7 @@ def test_edges_with_edged_curve(server: ServerMonitor, dataset_factory: Callable VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "edged_curve.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) assert server.compare_image("mesh/edges/register_edged_curve.jpeg") server.call( @@ -64,7 +64,7 @@ def test_edges_with_edged_curve(server: ServerMonitor, dataset_factory: Callable + VtkMeshEdgesView.mesh_edges_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}, } @@ -75,7 +75,7 @@ def test_edges_with_edged_curve(server: ServerMonitor, dataset_factory: Callable server.call( VtkMeshEdgesView.mesh_edges_prefix + VtkMeshEdgesView.mesh_edges_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/edges/edged_curve_visibility.jpeg") @@ -87,7 +87,7 @@ def test_edges_clipping_plane(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "planes": [ { @@ -108,7 +108,7 @@ def test_edges_shrink(server: ServerMonitor, dataset_factory: Callable[..., str] VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8, } diff --git a/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py b/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py index cbe817a4..86aed88a 100644 --- a/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py +++ b/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py @@ -40,7 +40,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_points_vertex_attribute( @@ -56,7 +56,7 @@ def test_points_vertex_attribute( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -84,7 +84,7 @@ def test_points_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -115,7 +115,7 @@ def test_points_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -153,7 +153,7 @@ def test_points_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -184,7 +184,7 @@ def test_points_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -222,7 +222,7 @@ def test_points_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -277,7 +277,7 @@ def test_points_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -338,7 +338,7 @@ def test_points_vertex_attribute_item( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 1, @@ -378,23 +378,23 @@ def display_points_attribute( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": viewable_file}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": True}], ) server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["size"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "size": 15}], + [{"viewer_id": "viewer_1", "id": mesh_id, "size": 15}], ) server.call( VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict["attribute"][ "rpc" ], - [{"scene_id": "scene_1", "id": mesh_id, **attribute}], + [{"viewer_id": "viewer_1", "id": mesh_id, **attribute}], ) @@ -483,7 +483,7 @@ def test_polygons_points_shared_scalar_bar( ) -> None: attribute = { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -520,7 +520,7 @@ def test_polygons_points_attribute_then_color( + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, } @@ -538,7 +538,7 @@ def test_polygons_points_attribute_then_opacity( server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["opacity"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], + [{"viewer_id": "viewer_1", "id": mesh_id, "opacity": 0.5}], ) # Points keep their color map, only more transparent assert server.compare_image("mesh/points/polygons_points_attribute_then_opacity.jpeg") diff --git a/tests/mesh/points/test_mesh_points_protocols.py b/tests/mesh/points/test_mesh_points_protocols.py index 7cec0935..43d5095b 100644 --- a/tests/mesh/points/test_mesh_points_protocols.py +++ b/tests/mesh/points/test_mesh_points_protocols.py @@ -24,7 +24,7 @@ def test_points_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": True}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": True}], ) assert server.compare_image("mesh/points/visibility.jpeg") @@ -36,7 +36,7 @@ def test_points_size(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["size"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "size": 15}], + [{"viewer_id": "viewer_1", "id": mesh_id, "size": 15}], ) assert server.compare_image("mesh/points/size.jpeg") @@ -50,7 +50,7 @@ def test_points_color(server: ServerMonitor, dataset_factory: Callable[..., str] + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}, } @@ -68,13 +68,13 @@ def test_points_with_point_set(server: ServerMonitor, dataset_factory: Callable[ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "points.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) assert server.compare_image("mesh/points/register_point_set.jpeg") server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["size"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "size": 10}], + [{"viewer_id": "viewer_1", "id": mesh_id, "size": 10}], ) assert server.compare_image("mesh/points/point_set_size.jpeg") @@ -83,7 +83,7 @@ def test_points_with_point_set(server: ServerMonitor, dataset_factory: Callable[ + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, } @@ -94,7 +94,7 @@ def test_points_with_point_set(server: ServerMonitor, dataset_factory: Callable[ server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/points/point_set_visibility.jpeg") @@ -104,13 +104,13 @@ def test_points_color_is_per_scene( ) -> None: mesh_id = "12345678901234567890123456789012" test_points_size(server, dataset_factory) - server.create_data_scene("scene_2") - server.add_to_scene(mesh_id, "scene_2") + server.create_data_scene("viewer_2") + server.add_to_viewer(mesh_id, "viewer_2") for name, value in (("visibility", True), ("size", 15)): server.call( VtkMeshPointsView.mesh_points_prefix + VtkMeshPointsView.mesh_points_schemas_dict[name]["rpc"], - [{"scene_id": "scene_2", "id": mesh_id, name: value}], + [{"viewer_id": "viewer_2", "id": mesh_id, name: value}], ) server.call( @@ -118,11 +118,11 @@ def test_points_color_is_per_scene( + VtkMeshPointsView.mesh_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1}, } ], ) - assert server.compare_image("mesh/points/color.jpeg", "scene_1") - assert server.compare_image("mesh/points/size.jpeg", "scene_2") + assert server.compare_image("mesh/points/color.jpeg", "viewer_1") + assert server.compare_image("mesh/points/size.jpeg", "viewer_2") diff --git a/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py b/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py index e5a27e8e..48123302 100644 --- a/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py +++ b/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py @@ -36,7 +36,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "triangulated_surface2d.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_polygons_polygon_color_map( @@ -53,7 +53,7 @@ def test_polygons_polygon_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -91,7 +91,7 @@ def test_polygons_polygon_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -122,7 +122,7 @@ def test_polygons_polygon_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -160,7 +160,7 @@ def test_polygons_polygon_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -191,7 +191,7 @@ def test_polygons_polygon_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -229,7 +229,7 @@ def test_polygons_polygon_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -284,7 +284,7 @@ def test_polygons_polygon_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 0, @@ -345,7 +345,7 @@ def test_polygons_polygon_attribute_item( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "triangle_vertices", "item": 1, diff --git a/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py b/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py index aab22c28..99e833a6 100644 --- a/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py +++ b/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py @@ -33,7 +33,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_polygons_vertex_color_map( @@ -50,7 +50,7 @@ def test_polygons_vertex_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -88,7 +88,7 @@ def test_polygons_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -119,7 +119,7 @@ def test_polygons_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -157,7 +157,7 @@ def test_polygons_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -188,7 +188,7 @@ def test_polygons_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -226,7 +226,7 @@ def test_polygons_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -281,7 +281,7 @@ def test_polygons_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "lambert2SG", "item": 0, @@ -341,7 +341,7 @@ def test_polygons_vertex_attribute_item( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 1, @@ -379,7 +379,7 @@ def test_polygons_vertex_no_data( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polygon_attribute.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) server.call( VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix @@ -388,7 +388,7 @@ def test_polygons_vertex_no_data( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "gradient_3d_attribute", "item": 0, @@ -422,6 +422,6 @@ def test_polygons_vertex_color_map_opacity( server.call( VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["opacity"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], + [{"viewer_id": "viewer_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/polygons/vertex_color_map_opacity.jpeg") diff --git a/tests/mesh/polygons/test_mesh_polygons_protocols.py b/tests/mesh/polygons/test_mesh_polygons_protocols.py index 186cf3b6..65ae7553 100644 --- a/tests/mesh/polygons/test_mesh_polygons_protocols.py +++ b/tests/mesh/polygons/test_mesh_polygons_protocols.py @@ -27,7 +27,7 @@ def test_polygons_color(server: ServerMonitor, dataset_factory: Callable[..., st + VtkMeshPolygonsView.mesh_polygons_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, } @@ -43,7 +43,7 @@ def test_polygons_visibility(server: ServerMonitor, dataset_factory: Callable[.. server.call( VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/polygons/visibility.jpeg") @@ -58,7 +58,7 @@ def test_polygons_clipping_plane( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "planes": [ { @@ -80,7 +80,7 @@ def test_polygons_shrink(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -96,6 +96,6 @@ def test_polygons_opacity(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["opacity"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], + [{"viewer_id": "viewer_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/polygons/opacity.jpeg") diff --git a/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py b/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py index 0078bb13..4e397453 100644 --- a/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py +++ b/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py @@ -36,7 +36,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_polyhedra_polyhedron_color_map( @@ -53,7 +53,7 @@ def test_polyhedra_polyhedron_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -91,7 +91,7 @@ def test_polyhedra_polyhedron_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -122,7 +122,7 @@ def test_polyhedra_polyhedron_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -160,7 +160,7 @@ def test_polyhedra_polyhedron_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -191,7 +191,7 @@ def test_polyhedra_polyhedron_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -229,7 +229,7 @@ def test_polyhedra_polyhedron_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -284,7 +284,7 @@ def test_polyhedra_polyhedron_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 0, @@ -345,7 +345,7 @@ def test_polyhedra_polyhedron_attribute_item( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_polyhedra", "item": 1, diff --git a/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py b/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py index 74bec67c..b4c99358 100644 --- a/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py +++ b/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py @@ -36,7 +36,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) def test_polyhedra_vertex_color_map( @@ -53,7 +53,7 @@ def test_polyhedra_vertex_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -91,7 +91,7 @@ def test_polyhedra_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -122,7 +122,7 @@ def test_polyhedra_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -160,7 +160,7 @@ def test_polyhedra_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -191,7 +191,7 @@ def test_polyhedra_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -229,7 +229,7 @@ def test_polyhedra_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -284,7 +284,7 @@ def test_polyhedra_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "toto_on_vertices", "item": 0, @@ -345,7 +345,7 @@ def test_polyhedra_vertex_attribute_item( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "name": "points", "item": 1, diff --git a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py index ac2161f0..a148bf2b 100644 --- a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py +++ b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py @@ -32,7 +32,7 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) assert server.compare_image("mesh/polyhedra/register.jpeg") @@ -44,7 +44,7 @@ def test_polyhedra_color(server: ServerMonitor, dataset_factory: Callable[..., s + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, } @@ -59,7 +59,7 @@ def test_polyhedra_opacity(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkMeshPolyhedraView.mesh_polyhedra_prefix + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["opacity"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "opacity": 0.5}], + [{"viewer_id": "viewer_1", "id": mesh_id, "opacity": 0.5}], ) assert server.compare_image("mesh/polyhedra/opacity.jpeg") @@ -70,7 +70,7 @@ def test_polyhedra_visibility(server: ServerMonitor, dataset_factory: Callable[. server.call( VtkMeshPolyhedraView.mesh_polyhedra_prefix + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/polyhedra/visibility.jpeg") @@ -85,7 +85,7 @@ def test_polyhedra_clipping_plane( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "planes": [ { diff --git a/tests/mesh/test_mesh_protocols.py b/tests/mesh/test_mesh_protocols.py index 5088207e..64f08118 100644 --- a/tests/mesh/test_mesh_protocols.py +++ b/tests/mesh/test_mesh_protocols.py @@ -43,7 +43,7 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], ) - server.add_to_scene(mesh_id) + server.add_to_viewer(mesh_id) assert server.compare_image("mesh/register.jpeg") @@ -63,7 +63,7 @@ def test_visibility(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": mesh_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": mesh_id, "visibility": False}], ) assert server.compare_image("mesh/visibility.jpeg") @@ -75,7 +75,7 @@ def test_color(server: ServerMonitor, dataset_factory: Callable[..., str]) -> No VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "color": {"red": 50, "green": 2, "blue": 250, "alpha": 1.0}, } @@ -96,7 +96,7 @@ def test_apply_textures(server: ServerMonitor, dataset_factory: Callable[..., st VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["apply_textures"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": mesh_id, "textures": [ { @@ -125,7 +125,7 @@ def _apply_basemap(server: ServerMonitor, dataset_factory: Callable[..., str]) - VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": basemap_id, "name": "basemap"}], ) - server.add_to_scene(basemap_id) + server.add_to_viewer(basemap_id) server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["apply_basemap"]["rpc"], [ @@ -238,7 +238,7 @@ def _show(view: VtkView, scene: Scene, data_id: str) -> SceneObject: def _view_with_basemap() -> tuple[VtkView, Scene]: - """A view holding a basemap draped on "data", and an "other" data, all in "scene_1".""" + """A view holding a basemap draped on "data", and an "other" data, all in "viewer_1".""" view = VtkView() view.coreServer = _SharedObjects() database = view.get_data_base() @@ -248,8 +248,8 @@ def _view_with_basemap() -> tuple[VtkView, Scene]: reader.Update() database[data_id] = VtkPipeline(reader) database["basemap"].basemap = BasemapState(maps=[], images={}, layers={}, drape_ids=["data"]) - scene = Scene.create("scene_1", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["scene_1"] = scene + scene = Scene.create("viewer_1", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["viewer_1"] = scene for data_id in database: _show(view, scene, data_id) return view, scene @@ -269,8 +269,8 @@ def test_basemap_follows_the_clipping_of_its_draped_data() -> None: def test_basemap_follows_the_clipping_of_its_scene_only() -> None: view, scene = _view_with_basemap() - other_scene = Scene.create("scene_2", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["scene_2"] = other_scene + other_scene = Scene.create("viewer_2", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["viewer_2"] = other_scene _show(view, other_scene, "data") _show(view, other_scene, "basemap") view.set_clipping_planes(scene, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) @@ -289,8 +289,8 @@ def test_basemap_drape_dirty_only_for_its_draped_data() -> None: def test_filters_stay_in_their_scene() -> None: view, scene = _view_with_basemap() - other_scene = Scene.create("scene_2", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["scene_2"] = other_scene + other_scene = Scene.create("viewer_2", vtkWebApplication().GetObjectIdMap()) + view.get_scenes()["viewer_2"] = other_scene _show(view, other_scene, "data") unfiltered_bounds = other_scene.objects["data"].filters.filter.GetOutput().GetBounds() cells = other_scene.objects["data"].filters.filter.GetOutput().GetNumberOfCells() diff --git a/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py b/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py index 5501c40f..c12bffba 100644 --- a/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py +++ b/tests/model/blocks/attribute/polyhedron/test_model_blocks_attribute_polyhedron_protocols.py @@ -41,7 +41,7 @@ def test_blocks_polyhedron_attribute( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -54,7 +54,7 @@ def test_blocks_polyhedron_attribute( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -69,7 +69,7 @@ def test_blocks_polyhedron_attribute( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -105,7 +105,7 @@ def test_blocks_polyhedron_color_map( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -118,7 +118,7 @@ def test_blocks_polyhedron_color_map( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -134,7 +134,7 @@ def test_blocks_polyhedron_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -171,7 +171,7 @@ def test_blocks_polyhedron_color_map_range_update( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -184,7 +184,7 @@ def test_blocks_polyhedron_color_map_range_update( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -200,7 +200,7 @@ def test_blocks_polyhedron_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -232,7 +232,7 @@ def test_blocks_polyhedron_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -269,7 +269,7 @@ def test_blocks_polyhedron_color_map_red_shift( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -282,7 +282,7 @@ def test_blocks_polyhedron_color_map_red_shift( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -298,7 +298,7 @@ def test_blocks_polyhedron_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -330,7 +330,7 @@ def test_blocks_polyhedron_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -367,7 +367,7 @@ def test_blocks_polyhedron_color_map_rainbow( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -380,7 +380,7 @@ def test_blocks_polyhedron_color_map_rainbow( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -396,7 +396,7 @@ def test_blocks_polyhedron_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -452,7 +452,7 @@ def test_blocks_polyhedron_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -514,7 +514,7 @@ def test_pick_blocks_polyhedron_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "tetrahedron_vertices", @@ -530,5 +530,5 @@ def test_pick_blocks_polyhedron_color_map( pick_rpc = ( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["pick_colormap"]["rpc"] ) - server.call(pick_rpc, [{"scene_id": "scene_1", "x": 81, "y": 276}]) + server.call(pick_rpc, [{"viewer_id": "viewer_1", "x": 81, "y": 276}]) assert server.get_result(pick_rpc) == {"data_id": model_id, "block_ids": [48, 49]} diff --git a/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py b/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py index 6dd75752..0d4ed399 100644 --- a/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py +++ b/tests/model/blocks/attribute/vertex/test_model_blocks_attribute_vertex_protocols.py @@ -39,7 +39,7 @@ def test_blocks_vertex_attribute( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -52,7 +52,7 @@ def test_blocks_vertex_attribute( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -67,7 +67,7 @@ def test_blocks_vertex_attribute( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -103,7 +103,7 @@ def test_blocks_vertex_color_map( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -116,7 +116,7 @@ def test_blocks_vertex_color_map( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -132,7 +132,7 @@ def test_blocks_vertex_color_map( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -169,7 +169,7 @@ def test_blocks_vertex_color_map_range_update( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -182,7 +182,7 @@ def test_blocks_vertex_color_map_range_update( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -198,7 +198,7 @@ def test_blocks_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -230,7 +230,7 @@ def test_blocks_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -267,7 +267,7 @@ def test_blocks_vertex_color_map_green_shift( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -280,7 +280,7 @@ def test_blocks_vertex_color_map_green_shift( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -296,7 +296,7 @@ def test_blocks_vertex_color_map_green_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -328,7 +328,7 @@ def test_blocks_vertex_color_map_green_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -365,7 +365,7 @@ def test_blocks_vertex_color_map_rainbow( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -378,7 +378,7 @@ def test_blocks_vertex_color_map_rainbow( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -394,7 +394,7 @@ def test_blocks_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -450,7 +450,7 @@ def test_blocks_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", @@ -511,7 +511,7 @@ def test_blocks_vertex_attribute_item( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -524,7 +524,7 @@ def test_blocks_vertex_attribute_item( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -539,7 +539,7 @@ def test_blocks_vertex_attribute_item( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "name": "unique vertices", diff --git a/tests/model/blocks/test_model_blocks_protocols.py b/tests/model/blocks/test_model_blocks_protocols.py index 1fa4ef97..e6f449c2 100644 --- a/tests/model/blocks/test_model_blocks_protocols.py +++ b/tests/model/blocks/test_model_blocks_protocols.py @@ -31,7 +31,7 @@ def test_blocks_polyhedra_visibility( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -46,7 +46,7 @@ def test_blocks_polyhedra_visibility( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "visibility": True, @@ -66,7 +66,7 @@ def test_blocks_polyhedra_color(server: ServerMonitor, dataset_factory: Callable + VtkModelBlocksView.model_blocks_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(48, 50)), "color_mode": "constant", @@ -85,7 +85,7 @@ def test_blocks_clipping_plane(server: ServerMonitor, dataset_factory: Callable[ VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [model_id], "planes": [ { @@ -107,7 +107,7 @@ def test_blocks_shrink(server: ServerMonitor, dataset_factory: Callable[..., str VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [model_id], "shrink_factor": 0.8, } @@ -124,7 +124,7 @@ def test_blocks_threshold(server: ServerMonitor, dataset_factory: Callable[..., VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["threshold"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [model_id], "attributes": [ { diff --git a/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py b/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py index 19db3fb2..23650cf1 100644 --- a/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py +++ b/tests/model/corners/attribute/vertex/test_model_corners_attribute_vertex_protocols.py @@ -39,7 +39,7 @@ def test_corners_vertex_attribute( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -52,7 +52,7 @@ def test_corners_vertex_attribute( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "visibility": True, @@ -67,7 +67,7 @@ def test_corners_vertex_attribute( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -103,7 +103,7 @@ def test_corners_vertex_color_map( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -116,7 +116,7 @@ def test_corners_vertex_color_map( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "visibility": True, @@ -132,7 +132,7 @@ def test_corners_vertex_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -169,7 +169,7 @@ def test_corners_vertex_color_map_range_update( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -182,7 +182,7 @@ def test_corners_vertex_color_map_range_update( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "visibility": True, @@ -198,7 +198,7 @@ def test_corners_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -230,7 +230,7 @@ def test_corners_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -267,7 +267,7 @@ def test_corners_vertex_color_map_red_shift( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -280,7 +280,7 @@ def test_corners_vertex_color_map_red_shift( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "visibility": True, @@ -296,7 +296,7 @@ def test_corners_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -328,7 +328,7 @@ def test_corners_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -365,7 +365,7 @@ def test_corners_vertex_color_map_rainbow( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -378,7 +378,7 @@ def test_corners_vertex_color_map_rainbow( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "visibility": True, @@ -394,7 +394,7 @@ def test_corners_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", @@ -450,7 +450,7 @@ def test_corners_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "name": "unique vertices", diff --git a/tests/model/corners/test_model_corners_protocols.py b/tests/model/corners/test_model_corners_protocols.py index aaa213f1..a29ad8d1 100644 --- a/tests/model/corners/test_model_corners_protocols.py +++ b/tests/model/corners/test_model_corners_protocols.py @@ -30,7 +30,7 @@ def test_corners_points_visibility( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -44,7 +44,7 @@ def test_corners_points_visibility( + VtkModelCornersView.model_corners_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "visibility": True, @@ -63,7 +63,7 @@ def test_corners_points_color(server: ServerMonitor, dataset_factory: Callable[. + VtkModelCornersView.model_corners_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "color_mode": "constant", @@ -85,7 +85,7 @@ def test_corners_points_random_color( + VtkModelCornersView.model_corners_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 13)), "color_mode": "random", diff --git a/tests/model/edges/test_model_edges_protocols.py b/tests/model/edges/test_model_edges_protocols.py index 0ccd2634..6952f7f3 100644 --- a/tests/model/edges/test_model_edges_protocols.py +++ b/tests/model/edges/test_model_edges_protocols.py @@ -50,7 +50,7 @@ def test_edges_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelEdgesView.model_edges_prefix + VtkModelEdgesView.model_edges_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "visibility": True}], + [{"viewer_id": "viewer_1", "id": model_id, "visibility": True}], ) assert server.compare_image("model/edges/visibility.jpeg") @@ -62,7 +62,7 @@ def test_edges_width(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkModelEdgesView.model_edges_prefix + VtkModelEdgesView.model_edges_schemas_dict["width"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "width": 6}], + [{"viewer_id": "viewer_1", "id": model_id, "width": 6}], ) assert server.compare_image("model/edges/width.jpeg") @@ -71,7 +71,7 @@ def call_surfaces_edges(server: ServerMonitor, route: str, params: dict[str, obj view = VtkModelSurfacesEdgesView server.call( view.model_surfaces_edges_prefix + view.model_surfaces_edges_schemas_dict[route]["rpc"], - [{"scene_id": "scene_1", "id": model_id, **params}], + [{"viewer_id": "viewer_1", "id": model_id, **params}], ) @@ -106,7 +106,7 @@ def test_surfaces_edges_attribute( + view.model_surfaces_edges_attribute_vertex_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "name": "unique vertices", @@ -128,7 +128,7 @@ def test_surfaces_edges_attribute_model_hidden_then_shown( for visibility in (False, True): server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "visibility": visibility}], + [{"viewer_id": "viewer_1", "id": model_id, "visibility": visibility}], ) # The edges scalar bar comes back with the model assert server.compare_image("model/edges/surfaces_edges_attribute.jpeg") @@ -153,7 +153,7 @@ def test_surfaces_edges_hidden_blocks( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "visibility": False}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "visibility": False}], ) # Hidden surfaces take their edges with them assert server.compare_image("model/edges/surfaces_edges_hidden_blocks.jpeg") @@ -164,7 +164,7 @@ def test_surfaces_edges_explode(server: ServerMonitor, dataset_factory: Callable test_surfaces_edges_color(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 1.0}], + [{"viewer_id": "viewer_1", "ids": [model_id], "explode_factor": 1.0}], ) assert server.compare_image("model/edges/surfaces_edges_explode.jpeg") @@ -180,7 +180,7 @@ def test_surfaces_edges_behind_surface( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "camera_options": { "focal_point": [5.0, 0.0, 5.0], "view_up": [0.0, 0.0, 1.0], @@ -203,7 +203,7 @@ def test_model_edges_width_after_component_width( server.call( VtkModelEdgesView.model_edges_prefix + VtkModelEdgesView.model_edges_schemas_dict["width"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "width": 1}], + [{"viewer_id": "viewer_1", "id": model_id, "width": 1}], ) # Model width overrides every component width, block 45 included assert server.compare_image("model/edges/width_after_component_width.jpeg") @@ -219,6 +219,6 @@ def test_blocks_edges_color(server: ServerMonitor, dataset_factory: Callable[... ): server.call( view.model_blocks_edges_prefix + view.model_blocks_edges_schemas_dict[route]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": blocks_ids, **params}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": blocks_ids, **params}], ) assert server.compare_image("model/edges/blocks_edges_color.jpeg") diff --git a/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py b/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py index 585749af..f8626774 100644 --- a/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py +++ b/tests/model/lines/attribute/edge/test_model_lines_attribute_edge_protocols.py @@ -33,7 +33,7 @@ def test_lines_edge_attribute(server: ServerMonitor, dataset_factory: Callable[. + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -46,7 +46,7 @@ def test_lines_edge_attribute(server: ServerMonitor, dataset_factory: Callable[. + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -61,7 +61,7 @@ def test_lines_edge_attribute(server: ServerMonitor, dataset_factory: Callable[. ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -95,7 +95,7 @@ def test_lines_edge_color_map(server: ServerMonitor, dataset_factory: Callable[. + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -108,7 +108,7 @@ def test_lines_edge_color_map(server: ServerMonitor, dataset_factory: Callable[. + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -124,7 +124,7 @@ def test_lines_edge_color_map(server: ServerMonitor, dataset_factory: Callable[. ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -161,7 +161,7 @@ def test_lines_edge_color_map_range_update( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -174,7 +174,7 @@ def test_lines_edge_color_map_range_update( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -190,7 +190,7 @@ def test_lines_edge_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -222,7 +222,7 @@ def test_lines_edge_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -259,7 +259,7 @@ def test_lines_edge_color_map_red_shift( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -272,7 +272,7 @@ def test_lines_edge_color_map_red_shift( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -288,7 +288,7 @@ def test_lines_edge_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -320,7 +320,7 @@ def test_lines_edge_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -357,7 +357,7 @@ def test_lines_edge_color_map_rainbow( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -370,7 +370,7 @@ def test_lines_edge_color_map_rainbow( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -386,7 +386,7 @@ def test_lines_edge_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", @@ -442,7 +442,7 @@ def test_lines_edge_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "edges", diff --git a/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py b/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py index aff9d617..4f5d6fad 100644 --- a/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py +++ b/tests/model/lines/attribute/vertex/test_model_lines_attribute_vertex_protocols.py @@ -33,7 +33,7 @@ def test_lines_vertex_attribute(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -46,7 +46,7 @@ def test_lines_vertex_attribute(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -61,7 +61,7 @@ def test_lines_vertex_attribute(server: ServerMonitor, dataset_factory: Callable ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -95,7 +95,7 @@ def test_lines_vertex_color_map(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -108,7 +108,7 @@ def test_lines_vertex_color_map(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -124,7 +124,7 @@ def test_lines_vertex_color_map(server: ServerMonitor, dataset_factory: Callable ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -161,7 +161,7 @@ def test_lines_vertex_color_map_range_update( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -174,7 +174,7 @@ def test_lines_vertex_color_map_range_update( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -190,7 +190,7 @@ def test_lines_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -222,7 +222,7 @@ def test_lines_vertex_color_map_range_update( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -259,7 +259,7 @@ def test_lines_vertex_color_map_red_shift( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -272,7 +272,7 @@ def test_lines_vertex_color_map_red_shift( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -288,7 +288,7 @@ def test_lines_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -320,7 +320,7 @@ def test_lines_vertex_color_map_red_shift( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -357,7 +357,7 @@ def test_lines_vertex_color_map_rainbow( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -370,7 +370,7 @@ def test_lines_vertex_color_map_rainbow( + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -386,7 +386,7 @@ def test_lines_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", @@ -442,7 +442,7 @@ def test_lines_vertex_color_map_rainbow( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "name": "unique vertices", diff --git a/tests/model/lines/test_model_lines_protocols.py b/tests/model/lines/test_model_lines_protocols.py index 7f6b4f90..8f2e3825 100644 --- a/tests/model/lines/test_model_lines_protocols.py +++ b/tests/model/lines/test_model_lines_protocols.py @@ -29,7 +29,7 @@ def test_lines_edges_visibility(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -43,7 +43,7 @@ def test_lines_edges_visibility(server: ServerMonitor, dataset_factory: Callable + VtkModelLinesView.model_lines_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "visibility": True, @@ -62,7 +62,7 @@ def test_lines_edges_color(server: ServerMonitor, dataset_factory: Callable[..., + VtkModelLinesView.model_lines_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(14, 35)), "color_mode": "constant", @@ -81,7 +81,7 @@ def test_lines_clipping_plane(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [model_id], "planes": [ { @@ -103,7 +103,7 @@ def test_lines_shrink(server: ServerMonitor, dataset_factory: Callable[..., str] VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [model_id], "shrink_factor": 0.8, } diff --git a/tests/model/points/test_model_points_protocols.py b/tests/model/points/test_model_points_protocols.py index e44342fe..97c9bf6b 100644 --- a/tests/model/points/test_model_points_protocols.py +++ b/tests/model/points/test_model_points_protocols.py @@ -45,7 +45,7 @@ def test_points_visibility(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelPointsView.model_points_prefix + VtkModelPointsView.model_points_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "visibility": True}], + [{"viewer_id": "viewer_1", "id": model_id, "visibility": True}], ) assert server.compare_image("model/points/visibility.jpeg") @@ -57,7 +57,7 @@ def test_points_size(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkModelPointsView.model_points_prefix + VtkModelPointsView.model_points_schemas_dict["size"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "size": 20}], + [{"viewer_id": "viewer_1", "id": model_id, "size": 20}], ) assert server.compare_image("model/points/size.jpeg") @@ -69,19 +69,19 @@ def test_surfaces_points_color(server: ServerMonitor, dataset_factory: Callable[ server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "visibility": True}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "visibility": True}], ) server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["size"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "size": 8}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "size": 8}], ) server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 1.0}, @@ -98,19 +98,19 @@ def test_lines_points_size(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelLinesPointsView.model_lines_points_prefix + VtkModelLinesPointsView.model_lines_points_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": lines_ids, "visibility": True}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": lines_ids, "visibility": True}], ) server.call( VtkModelLinesPointsView.model_lines_points_prefix + VtkModelLinesPointsView.model_lines_points_schemas_dict["size"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": lines_ids, "size": 14}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": lines_ids, "size": 14}], ) server.call( VtkModelLinesPointsView.model_lines_points_prefix + VtkModelLinesPointsView.model_lines_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": lines_ids, "color": {"red": 0, "green": 0, "blue": 255, "alpha": 1.0}, @@ -129,7 +129,7 @@ def test_surfaces_points_hidden_blocks( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": surfaces_ids, "visibility": False}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "visibility": False}], ) assert server.compare_image("model/points/surfaces_points_hidden_blocks.jpeg") @@ -142,7 +142,7 @@ def test_surfaces_points_explode( server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 1.0}], + [{"viewer_id": "viewer_1", "ids": [model_id], "explode_factor": 1.0}], ) assert server.compare_image("model/points/surfaces_points_explode.jpeg") @@ -154,14 +154,14 @@ def test_surface_points_size(server: ServerMonitor, dataset_factory: Callable[.. server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["size"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": [45], "size": 20}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": [45], "size": 20}], ) server.call( VtkModelSurfacesPointsView.model_surfaces_points_prefix + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": [45], "color": {"red": 0, "green": 255, "blue": 0, "alpha": 1.0}, @@ -183,7 +183,7 @@ def test_surfaces_points_attribute( + attribute_view.model_surfaces_points_attribute_vertex_schemas_dict["attribute"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "name": "unique vertices", @@ -208,7 +208,7 @@ def test_surfaces_points_opacity( + VtkModelSurfacesPointsView.model_surfaces_points_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": surfaces_ids, "color": {"red": 255, "green": 0, "blue": 0, "alpha": 0.2}, diff --git a/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py b/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py index 37897146..b8dfcd58 100644 --- a/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py +++ b/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py @@ -65,7 +65,7 @@ def register_model_cube_with_polygon_attribute( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], ) - server.add_to_scene(model_id) + server.add_to_viewer(model_id) assert server.compare_image("model/cube_register.jpeg") @@ -81,7 +81,7 @@ def test_surfaces_polygon_attribute( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -94,7 +94,7 @@ def test_surfaces_polygon_attribute( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -109,7 +109,7 @@ def test_surfaces_polygon_attribute( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -145,7 +145,7 @@ def test_surfaces_polygon_color_map( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -158,7 +158,7 @@ def test_surfaces_polygon_color_map( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -174,7 +174,7 @@ def test_surfaces_polygon_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -211,7 +211,7 @@ def test_surfaces_polygon_color_map_range_update( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -224,7 +224,7 @@ def test_surfaces_polygon_color_map_range_update( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -240,7 +240,7 @@ def test_surfaces_polygon_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -272,7 +272,7 @@ def test_surfaces_polygon_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -309,7 +309,7 @@ def test_surfaces_polygon_color_map_red_shift( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -322,7 +322,7 @@ def test_surfaces_polygon_color_map_red_shift( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -338,7 +338,7 @@ def test_surfaces_polygon_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -370,7 +370,7 @@ def test_surfaces_polygon_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -407,7 +407,7 @@ def test_surfaces_polygon_color_map_rainbow( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -420,7 +420,7 @@ def test_surfaces_polygon_color_map_rainbow( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -436,7 +436,7 @@ def test_surfaces_polygon_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", @@ -492,7 +492,7 @@ def test_surfaces_polygon_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "triangle_vertices", diff --git a/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py b/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py index a66839b7..821df375 100644 --- a/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py +++ b/tests/model/surfaces/attribute/vertex/test_model_surfaces_attribute_vertex_protocols.py @@ -42,7 +42,7 @@ def test_surfaces_vertex_attribute( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -55,7 +55,7 @@ def test_surfaces_vertex_attribute( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -70,7 +70,7 @@ def test_surfaces_vertex_attribute( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -106,7 +106,7 @@ def test_surfaces_vertex_color_map( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -119,7 +119,7 @@ def test_surfaces_vertex_color_map( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -135,7 +135,7 @@ def test_surfaces_vertex_color_map( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -172,7 +172,7 @@ def test_surfaces_vertex_color_map_range_update( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -185,7 +185,7 @@ def test_surfaces_vertex_color_map_range_update( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -201,7 +201,7 @@ def test_surfaces_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -233,7 +233,7 @@ def test_surfaces_vertex_color_map_range_update( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -270,7 +270,7 @@ def test_surfaces_vertex_color_map_red_shift( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -283,7 +283,7 @@ def test_surfaces_vertex_color_map_red_shift( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -299,7 +299,7 @@ def test_surfaces_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -331,7 +331,7 @@ def test_surfaces_vertex_color_map_red_shift( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -368,7 +368,7 @@ def test_surfaces_vertex_color_map_rainbow( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -381,7 +381,7 @@ def test_surfaces_vertex_color_map_rainbow( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -397,7 +397,7 @@ def test_surfaces_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -453,7 +453,7 @@ def test_surfaces_vertex_color_map_rainbow( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -513,7 +513,7 @@ def test_surfaces_vertex_attribute_item( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -526,7 +526,7 @@ def test_surfaces_vertex_attribute_item( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -542,7 +542,7 @@ def test_surfaces_vertex_attribute_item( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "name": "unique vertices", @@ -578,7 +578,7 @@ def test_surfaces_vertex_attribute_interpolates_through_colormap( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 21)), "visibility": False, @@ -588,7 +588,7 @@ def test_surfaces_vertex_attribute_interpolates_through_colormap( server.call( VtkModelSurfacesView.model_surfaces_prefix + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": surface_ids, "visibility": True}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": surface_ids, "visibility": True}], ) server.call( @@ -598,7 +598,7 @@ def test_surfaces_vertex_attribute_interpolates_through_colormap( ]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": surface_ids, "name": "geode_implicit_attribute", diff --git a/tests/model/surfaces/test_model_surfaces_protocols.py b/tests/model/surfaces/test_model_surfaces_protocols.py index 433d7f4c..bcf378de 100644 --- a/tests/model/surfaces/test_model_surfaces_protocols.py +++ b/tests/model/surfaces/test_model_surfaces_protocols.py @@ -31,7 +31,7 @@ def test_surfaces_polygons_visibility( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 50)), "visibility": False, @@ -45,7 +45,7 @@ def test_surfaces_polygons_visibility( + VtkModelSurfacesView.model_surfaces_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "visibility": True, @@ -67,7 +67,7 @@ def test_surfaces_polygons_color( + VtkModelSurfacesView.model_surfaces_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "color_mode": "constant", @@ -89,7 +89,7 @@ def test_surfaces_polygons_random_color( + VtkModelSurfacesView.model_surfaces_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "color_mode": "random", @@ -110,7 +110,7 @@ def test_surfaces_polygons_random_collection_id( + VtkModelSurfacesView.model_surfaces_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(36, 47)), "color_mode": "random", @@ -137,7 +137,7 @@ def test_surfaces_clipping_plane( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [model_id], "planes": [ { @@ -159,7 +159,7 @@ def test_surfaces_shrink(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [model_id], "shrink_factor": 0.8, } diff --git a/tests/model/test_model_protocols.py b/tests/model/test_model_protocols.py index d7a55145..682e4e2a 100644 --- a/tests/model/test_model_protocols.py +++ b/tests/model/test_model_protocols.py @@ -31,7 +31,7 @@ def test_register_model(server: ServerMonitor, dataset_factory: Callable[..., st VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], ) - server.add_to_scene(model_id) + server.add_to_viewer(model_id) assert server.compare_image("model/register.jpeg") @@ -43,7 +43,7 @@ def test_register_model_cube(server: ServerMonitor, dataset_factory: Callable[.. VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], ) - server.add_to_scene(model_id) + server.add_to_viewer(model_id) assert server.compare_image("model/cube_register.jpeg") @@ -57,7 +57,7 @@ def test_register_model_implicit_attribute( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "implicit_attribute.vtm"}], ) - server.add_to_scene(model_id) + server.add_to_viewer(model_id) assert server.compare_image("model/implicit_attribute_register.jpeg") @@ -67,7 +67,7 @@ def test_visibility_model(server: ServerMonitor, dataset_factory: Callable[..., server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "visibility": False}], + [{"viewer_id": "viewer_1", "id": model_id, "visibility": False}], ) assert server.compare_image("model/visibility.jpeg") @@ -99,7 +99,7 @@ def test_model_cube_side_view(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "camera_options": { "focal_point": [5.0, 5.0, 7.5], "view_up": [0.0, 0.0, 1.0], @@ -117,7 +117,7 @@ def test_model_explode(server: ServerMonitor, dataset_factory: Callable[..., str test_model_cube_side_view(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 1.0}], + [{"viewer_id": "viewer_1", "ids": [model_id], "explode_factor": 1.0}], ) assert server.compare_image("model/explode.jpeg") @@ -126,7 +126,7 @@ def test_model_explode_removed(server: ServerMonitor, dataset_factory: Callable[ test_model_explode(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"scene_id": "scene_1", "ids": [model_id], "explode_factor": 0.0}], + [{"viewer_id": "viewer_1", "ids": [model_id], "explode_factor": 0.0}], ) assert server.compare_image("model/cube_side_view.jpeg") @@ -140,7 +140,7 @@ def test_model_explode_blocks_color( + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": list(range(1, 48)), "visibility": False, @@ -152,7 +152,7 @@ def test_model_explode_blocks_color( + VtkModelBlocksView.model_blocks_schemas_dict["color"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": model_id, "block_ids": [48], "color_mode": "constant", @@ -169,7 +169,7 @@ def test_model_explode_then_shrink( test_model_explode(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], - [{"scene_id": "scene_1", "ids": [model_id], "shrink_factor": 0.8}], + [{"viewer_id": "viewer_1", "ids": [model_id], "shrink_factor": 0.8}], ) assert server.compare_image("model/explode_then_shrink.jpeg") @@ -181,7 +181,7 @@ def test_model_explode_blocks_hidden( server.call( VtkModelBlocksView.model_blocks_prefix + VtkModelBlocksView.model_blocks_schemas_dict["visibility"]["rpc"], - [{"scene_id": "scene_1", "id": model_id, "block_ids": [48, 49], "visibility": False}], + [{"viewer_id": "viewer_1", "id": model_id, "block_ids": [48, 49], "visibility": False}], ) assert server.compare_image("model/explode_blocks_hidden.jpeg") @@ -201,7 +201,7 @@ def test_explode_stays_in_its_scene(monkeypatch: pytest.MonkeyPatch) -> None: view.get_data_base()[model_id] = pipeline scenes = [Scene.create(name, vtkWebApplication().GetObjectIdMap()) for name in ("a", "b")] for scene in scenes: - view.get_scenes()[scene.scene_id] = scene + view.get_scenes()[scene.viewer_id] = scene view.add_object(scene, model_id) view.set_explode(scenes[0], [model_id], 1.0) diff --git a/tests/test_generic_protocols.py b/tests/test_generic_protocols.py index c17106c0..4f37f86a 100644 --- a/tests/test_generic_protocols.py +++ b/tests/test_generic_protocols.py @@ -23,7 +23,7 @@ def test_register_image(server: ServerMonitor, dataset_factory: Callable[..., st VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "hat_lambert2SG.vti"}], ) - server.add_to_scene(data_id) + server.add_to_viewer(data_id) assert server.compare_image("image/register.jpeg") is True @@ -36,7 +36,7 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "hat.vtp"}], ) - server.add_to_scene(data_id) + server.add_to_viewer(data_id) assert server.compare_image("mesh/register.jpeg") is True @@ -49,7 +49,7 @@ def test_register_model(server: ServerMonitor, dataset_factory: Callable[..., st VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "CrossSection.vtm"}], ) - server.add_to_scene(data_id) + server.add_to_viewer(data_id) assert server.compare_image("model/register.jpeg") is True diff --git a/tests/test_scene.py b/tests/test_scene.py index 6d746037..bfef25f4 100644 --- a/tests/test_scene.py +++ b/tests/test_scene.py @@ -19,8 +19,8 @@ def test_scenes_have_distinct_render_windows() -> None: object_id_map = vtkWebApplication().GetObjectIdMap() - a = Scene.create("scene_1", object_id_map) - b = Scene.create("scene_2", object_id_map) + a = Scene.create("viewer_1", object_id_map) + b = Scene.create("viewer_2", object_id_map) assert a.render_window is not b.render_window assert a.view_id != b.view_id assert a.renderer.GetActiveCamera() is not b.renderer.GetActiveCamera() @@ -30,7 +30,7 @@ def test_scenes_have_distinct_render_windows() -> None: def test_dispose_removes_props() -> None: object_id_map = vtkWebApplication().GetObjectIdMap() - scene = Scene.create("scene_1", object_id_map) + scene = Scene.create("viewer_1", object_id_map) scene.renderer.AddActor(vtkActor()) scene.dispose() assert scene.renderer.GetViewProps().GetNumberOfItems() == 0 diff --git a/tests/test_typed_rpcs.py b/tests/test_typed_rpcs.py index 91240373..b9fde6b2 100644 --- a/tests/test_typed_rpcs.py +++ b/tests/test_typed_rpcs.py @@ -70,12 +70,12 @@ def highlight(self, _params: schemas.Highlight) -> schemas.HighlightResponse: def test_typed_rpc_returns_dict_without_none() -> None: - assert _Protocol().pick({"scene_id": "scene_1", "x": 1, "y": 2}) == {} + assert _Protocol().pick({"viewer_id": "viewer_1", "x": 1, "y": 2}) == {} def test_typed_rpc_returns_json_serializable_enum() -> None: payload = _Protocol().highlight( - {"scene_id": "scene_1", "field_type": "POINT", "ids": ["0" * 32], "x": 1, "y": 2} + {"viewer_id": "viewer_1", "field_type": "POINT", "ids": ["0" * 32], "x": 1, "y": 2} ) assert payload["field_type"] == "POINT" json.dumps(payload) @@ -83,23 +83,23 @@ def test_typed_rpc_returns_json_serializable_enum() -> None: def test_typed_rpc_stream_publishes() -> None: protocol = _Protocol() - protocol.pick({"scene_id": "scene_1", "x": 1, "y": 2}, stream=True) + protocol.pick({"viewer_id": "viewer_1", "x": 1, "y": 2}, stream=True) assert protocol.published == [ - (PREFIX + "pick_colormap", {"scene_id": "scene_1", "x": 1, "y": 2}) + (PREFIX + "pick_colormap", {"viewer_id": "viewer_1", "x": 1, "y": 2}) ] def test_typed_rpc_bad_params() -> None: with pytest.raises(Exception, match="Bad request"): - _Protocol().pick({"scene_id": "scene_1", "x": "not a number", "y": 2}) + _Protocol().pick({"viewer_id": "viewer_1", "x": "not a number", "y": 2}) def test_typed_rpc_wrong_response_type() -> None: with pytest.raises(TypeError): - _Protocol().wrong_type({"scene_id": "scene_1", "x": 1, "y": 2}) + _Protocol().wrong_type({"viewer_id": "viewer_1", "x": 1, "y": 2}) def test_typed_rpc_invalid_response(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.setenv("PYTHON_ENV", "test") with pytest.raises(fastjsonschema.JsonSchemaException): - _Protocol().invalid_payload({"scene_id": "scene_1", "x": 1, "y": 2}) + _Protocol().invalid_payload({"viewer_id": "viewer_1", "x": 1, "y": 2}) diff --git a/tests/test_utils_protocols.py b/tests/test_utils_protocols.py index 68807558..eb7f06a7 100644 --- a/tests/test_utils_protocols.py +++ b/tests/test_utils_protocols.py @@ -24,7 +24,7 @@ def test_reset_project_after_import( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": pre_id, "name": "hat.vtp"}], ) - server.add_to_scene(pre_id) + server.add_to_viewer(pre_id) assert server.compare_image("mesh/register.jpeg") is True # Import @@ -43,31 +43,31 @@ def test_reset_project_after_import( ) # The import disposed of the scenes: the client creates them again - server.create_scene() + server.create_viewer() assert server.compare_image("viewer/reset_visualization.jpeg") is True server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": post_id, "name": "hat.vtp"}], ) - server.add_to_scene(post_id) + server.add_to_viewer(post_id) assert server.compare_image("viewer/import_project.jpeg") is True def test_scene_style_after_import(server: ServerMonitor) -> None: - server.create_scene() + server.create_viewer() server.call( VtkUtilsView.utils_prefix + VtkUtilsView.utils_schemas_dict["import_project"]["rpc"] ) server.get_result( VtkUtilsView.utils_prefix + VtkUtilsView.utils_schemas_dict["import_project"]["rpc"] ) - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0, @@ -77,7 +77,7 @@ def test_scene_style_after_import(server: ServerMonitor) -> None: server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"scene_id": "scene_1", "marker": "compass"}], + [{"viewer_id": "viewer_1", "marker": "compass"}], ) assert server.compare_image("viewer/orientation_widget_compass.jpeg") is True diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index c3ad5305..6265203c 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -34,36 +34,36 @@ def show_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - server.create_scene() + server.create_viewer() register_hat(server, dataset_factory, mesh_id) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": mesh_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": mesh_id}) def test_reset_visualization(server: ServerMonitor) -> None: - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], - [{"scene_id": "scene_1"}], + [{"viewer_id": "viewer_1"}], ) assert server.compare_image("viewer/reset_visualization.jpeg") def test_reset_camera(server: ServerMonitor) -> None: - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_camera"]["rpc"], - [{"scene_id": "scene_1"}], + [{"viewer_id": "viewer_1"}], ) assert server.compare_image("viewer/reset_camera.jpeg") def test_set_viewer_background_color(server: ServerMonitor) -> None: - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_background_color"]["rpc"], - [{"scene_id": "scene_1", "color": {"red": 0, "green": 0, "blue": 255}}], + [{"viewer_id": "viewer_1", "color": {"red": 0, "green": 0, "blue": 255}}], ) assert server.compare_image("viewer/set_background_color.jpeg") @@ -74,7 +74,7 @@ def test_set_text_style(server: ServerMonitor, dataset_factory: Callable[..., st VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "color": {"red": 255, "green": 0, "blue": 0}, "font_family": "courier", "opacity": 0.5, @@ -92,7 +92,7 @@ def test_set_text_style_then_attribute( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "color": {"red": 255, "green": 0, "blue": 0}, "font_family": "times", "opacity": 1.0, @@ -107,7 +107,7 @@ def test_set_text_style_then_attribute( ], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "id": points_mesh_id, "name": "lambert2SG", "item": 0, @@ -127,7 +127,7 @@ def test_get_point_position(server: ServerMonitor, dataset_factory: Callable[... server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["get_point_position"]["rpc"], - [{"scene_id": "scene_1", "x": 0, "y": 0}], + [{"viewer_id": "viewer_1", "x": 0, "y": 0}], ) result = server.get_result( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["get_point_position"]["rpc"] @@ -155,7 +155,7 @@ def test_take_screenshot(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "filename": "take_screenshot_with_background", "output_extension": "jpg", "include_background": True, @@ -179,7 +179,7 @@ def test_take_screenshot(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "filename": "take_screenshot_without_background", "output_extension": "png", "include_background": False, @@ -203,7 +203,7 @@ def test_take_screenshot(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["take_screenshot"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "filename": "take_screenshot_with_background", "output_extension": "png", "include_background": True, @@ -238,7 +238,7 @@ def screenshot(**size: int) -> bytes: rpc, [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "filename": "take_screenshot_size", "output_extension": "png", "include_background": True, @@ -267,7 +267,7 @@ def test_picked_ids(server: ServerMonitor, dataset_factory: Callable[..., str]) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["picked_ids"]["rpc"], - [{"scene_id": "scene_1", "x": 0, "y": 0, "ids": ["00000000000000000000000123456789"]}], + [{"viewer_id": "viewer_1", "x": 0, "y": 0, "ids": ["00000000000000000000000123456789"]}], ) response = server.get_rpc_response( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["picked_ids"]["rpc"] @@ -290,20 +290,20 @@ def test_picked_ids(server: ServerMonitor, dataset_factory: Callable[..., str]) def test_grid_scale(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: data_id = "00000000000000000000000123456789" - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], - [{"scene_id": "scene_1"}], + [{"viewer_id": "viewer_1"}], ) assert server.compare_image("viewer/reset_visualization.jpeg") register_hat(server, dataset_factory, data_id) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) assert server.compare_image("viewer/register_hat.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["grid_scale"]["rpc"], - [{"scene_id": "scene_1", "visibility": True}], + [{"viewer_id": "viewer_1", "visibility": True}], ) assert server.compare_image("viewer/grid_scale_on.jpeg") @@ -312,14 +312,14 @@ def test_grid_scale_after_clipping_removal( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: data_id = "00000000000000000000000123456789" - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], - [{"scene_id": "scene_1"}], + [{"viewer_id": "viewer_1"}], ) register_hat(server, dataset_factory, data_id) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) assert server.compare_image("viewer/register_hat.jpeg") clipping_planes_rpc = ( @@ -329,7 +329,7 @@ def test_grid_scale_after_clipping_removal( clipping_planes_rpc, [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [data_id], "planes": [{"origin": [0.0, 0.0, 0.0], "normal": [1.0, 0.0, 0.0]}], } @@ -338,11 +338,11 @@ def test_grid_scale_after_clipping_removal( assert not server.compare_image("viewer/register_hat.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["grid_scale"]["rpc"], - [{"scene_id": "scene_1", "visibility": True}], + [{"viewer_id": "viewer_1", "visibility": True}], ) assert not server.compare_image("viewer/grid_scale_on.jpeg") - server.call(clipping_planes_rpc, [{"scene_id": "scene_1", "ids": [data_id], "planes": []}]) + server.call(clipping_planes_rpc, [{"viewer_id": "viewer_1", "ids": [data_id], "planes": []}]) assert server.compare_image("viewer/grid_scale_on.jpeg") @@ -352,7 +352,7 @@ def test_axes(server: ServerMonitor) -> None: server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["axes"]["rpc"], - [{"scene_id": "scene_1", "visibility": False}], + [{"viewer_id": "viewer_1", "visibility": False}], ) assert server.compare_image("viewer/axes_off.jpeg") @@ -364,7 +364,7 @@ def test_set_orientation_widget_compass(server: ServerMonitor) -> None: VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0, @@ -374,7 +374,7 @@ def test_set_orientation_widget_compass(server: ServerMonitor) -> None: server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"scene_id": "scene_1", "marker": "compass"}], + [{"viewer_id": "viewer_1", "marker": "compass"}], ) assert server.compare_image("viewer/orientation_widget_compass.jpeg") @@ -384,13 +384,13 @@ def test_set_text_style_after_compass(server: ServerMonitor) -> None: server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"scene_id": "scene_1", "marker": "compass"}], + [{"viewer_id": "viewer_1", "marker": "compass"}], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_text_style"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "color": {"red": 255, "green": 0, "blue": 0}, "font_family": "arial", "opacity": 1.0, @@ -404,12 +404,12 @@ def test_orientation_widget_keeps_visibility(server: ServerMonitor) -> None: test_reset_visualization(server) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["axes"]["rpc"], - [{"scene_id": "scene_1", "visibility": False}], + [{"viewer_id": "viewer_1", "visibility": False}], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"], - [{"scene_id": "scene_1", "marker": "compass"}], + [{"viewer_id": "viewer_1", "marker": "compass"}], ) assert server.compare_image("viewer/axes_off.jpeg") @@ -420,10 +420,10 @@ def test_set_orientation_widget_none(server: ServerMonitor) -> None: VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"] ) - server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "none"}]) + server.call(orientation_widget_rpc, [{"viewer_id": "viewer_1", "marker": "none"}]) assert server.compare_image("viewer/axes_off.jpeg") - server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "axes"}]) + server.call(orientation_widget_rpc, [{"viewer_id": "viewer_1", "marker": "axes"}]) assert server.compare_image("viewer/reset_visualization.jpeg") @@ -433,14 +433,14 @@ def test_orientation_widget_none_keeps_visibility(server: ServerMonitor) -> None VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_orientation_widget"]["rpc"] ) - server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "none"}]) + server.call(orientation_widget_rpc, [{"viewer_id": "viewer_1", "marker": "none"}]) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["axes"]["rpc"], - [{"scene_id": "scene_1", "visibility": False}], + [{"viewer_id": "viewer_1", "visibility": False}], ) assert server.compare_image("viewer/axes_off.jpeg") - server.call(orientation_widget_rpc, [{"scene_id": "scene_1", "marker": "axes"}]) + server.call(orientation_widget_rpc, [{"viewer_id": "viewer_1", "marker": "axes"}]) assert server.compare_image("viewer/axes_off.jpeg") @@ -459,7 +459,7 @@ def test_update_camera(server: ServerMonitor, dataset_factory: Callable[..., str VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "camera_options": camera_options, } ], @@ -482,7 +482,7 @@ def test_render(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "camera_options": camera_options, } ], @@ -490,14 +490,14 @@ def test_render(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["render"]["rpc"], - [{"scene_id": "scene_1"}], + [{"viewer_id": "viewer_1"}], ) assert server.compare_image("viewer/render.jpeg") def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - server.create_scene() + server.create_viewer() dataset_factory( data_id="00000000000000000000000123456789", viewable_file="polygon_attribute.vtp", @@ -509,7 +509,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) scene_rpc( - server, "add_to_scene", {"scene_id": "scene_1", "id": "00000000000000000000000123456789"} + server, "add_to_viewer", {"viewer_id": "viewer_1", "id": "00000000000000000000000123456789"} ) assert server.compare_image("viewer/polygon_attribute.jpeg") @@ -524,7 +524,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) scene_rpc( - server, "add_to_scene", {"scene_id": "scene_1", "id": "00000000000000000000000987654321"} + server, "add_to_viewer", {"viewer_id": "viewer_1", "id": "00000000000000000000000987654321"} ) assert server.compare_image("viewer/vertex_and_polygon_attribute.jpeg") @@ -540,7 +540,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "camera_options": camera_options, } ], @@ -548,7 +548,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_z_scaling"]["rpc"], - [{"scene_id": "scene_1", "z_scale": 2.5}], + [{"viewer_id": "viewer_1", "z_scale": 2.5}], ) assert server.compare_image("viewer/set_z_scaling.jpeg") @@ -556,24 +556,24 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str def test_combined_scaling_and_grid( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], - [{"scene_id": "scene_1"}], + [{"viewer_id": "viewer_1"}], ) assert server.compare_image("viewer/reset_visualization.jpeg") register_hat(server, dataset_factory, mesh_id) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": mesh_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": mesh_id}) assert server.compare_image("viewer/register_hat.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["grid_scale"]["rpc"], - [{"scene_id": "scene_1", "visibility": True}], + [{"viewer_id": "viewer_1", "visibility": True}], ) assert server.compare_image("viewer/grid_scale_on.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["set_z_scaling"]["rpc"], - [{"scene_id": "scene_1", "z_scale": 2.5}], + [{"viewer_id": "viewer_1", "z_scale": 2.5}], ) assert server.compare_image("viewer/combined_scaling_and_grid.jpeg") @@ -584,7 +584,7 @@ def test_clipping_planes(server: ServerMonitor, dataset_factory: Callable[..., s VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "planes": [ { @@ -605,7 +605,7 @@ def test_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -618,24 +618,24 @@ def test_shrink_stays_in_its_scene( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: show_mesh(server, dataset_factory) - server.create_scene("scene_2") - scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": mesh_id}) + server.create_viewer("viewer_2") + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": mesh_id}) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], - [{"scene_id": "scene_1", "ids": [mesh_id], "shrink_factor": 0.8}], + [{"viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8}], ) # The filter is on the data of its scene only: the other scene is not shrunk - assert server.compare_image("viewer/shrink.jpeg", "scene_1") - assert not server.compare_image("viewer/shrink.jpeg", "scene_2") + assert server.compare_image("viewer/shrink.jpeg", "viewer_1") + assert not server.compare_image("viewer/shrink.jpeg", "viewer_2") def test_explode_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: show_mesh(server, dataset_factory) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["explode"]["rpc"], - [{"scene_id": "scene_1", "ids": [mesh_id], "explode_factor": 0.5}], + [{"viewer_id": "viewer_1", "ids": [mesh_id], "explode_factor": 0.5}], ) - assert server.compare_image("viewer/add_to_scene.jpeg") + assert server.compare_image("viewer/add_to_viewer.jpeg") def test_clipping_then_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: @@ -644,7 +644,7 @@ def test_clipping_then_shrink(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "planes": [ { @@ -659,7 +659,7 @@ def test_clipping_then_shrink(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -674,7 +674,7 @@ def test_shrink_then_clipping(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8, } @@ -684,7 +684,7 @@ def test_shrink_then_clipping(server: ServerMonitor, dataset_factory: Callable[. VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["clipping_planes"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "ids": [mesh_id], "planes": [ { @@ -699,17 +699,17 @@ def test_shrink_then_clipping(server: ServerMonitor, dataset_factory: Callable[. def test_ruler(server: ServerMonitor) -> None: - server.create_scene() + server.create_viewer() server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["reset_visualization"]["rpc"], - [{"scene_id": "scene_1"}], + [{"viewer_id": "viewer_1"}], ) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["ruler"]["rpc"], [ { - "scene_id": "scene_1", + "viewer_id": "viewer_1", "points": [[-0.2, -0.2, 0.0], [0.2, 0.2, 0.0]], } ], @@ -737,73 +737,73 @@ def scene_rpc(server: ServerMonitor, name: str, params: dict[str, str]) -> dict[ return server.get_rpc_response(rpc) -def test_create_scene(server: ServerMonitor) -> None: - first_view_id = server.create_scene() - second_view_id = server.create_scene("scene_2") +def test_create_viewer(server: ServerMonitor) -> None: + first_view_id = server.create_viewer() + second_view_id = server.create_viewer("viewer_2") assert first_view_id != second_view_id -def test_add_to_scene_shares_pipeline( +def test_add_to_viewer_shares_pipeline( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: - server.create_scene() - server.create_scene("scene_2") + server.create_viewer() + server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) - assert server.compare_image("viewer/add_to_scene.jpeg", "scene_1") - assert server.compare_image("viewer/add_to_scene.jpeg", "scene_2") + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) + assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_1") + assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_2") def test_empty_scene_stays_empty( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: - server.create_scene() - server.create_scene("scene_2") + server.create_viewer() + server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) - assert server.compare_image("viewer/add_to_scene.jpeg", "scene_1") - assert server.compare_image("viewer/reset_visualization.jpeg", "scene_2") + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_1") + assert server.compare_image("viewer/reset_visualization.jpeg", "viewer_2") -def test_remove_from_scene_keeps_data( +def test_remove_from_viewer_keeps_data( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: - server.create_scene() - server.create_scene("scene_2") + server.create_viewer() + server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) - scene_rpc(server, "remove_from_scene", {"scene_id": "scene_1", "id": data_id}) - assert server.compare_image("viewer/reset_visualization.jpeg", "scene_1") - assert server.compare_image("viewer/add_to_scene.jpeg", "scene_2") + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) + scene_rpc(server, "remove_from_viewer", {"viewer_id": "viewer_1", "id": data_id}) + assert server.compare_image("viewer/reset_visualization.jpeg", "viewer_1") + assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_2") -def test_delete_scene(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: - server.create_scene() - server.create_scene("scene_2") +def test_delete_viewer(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: + server.create_viewer() + server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "delete_scene", {"scene_id": "scene_2"}) - response = scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) + scene_rpc(server, "delete_viewer", {"viewer_id": "viewer_2"}) + response = scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) assert "error" in response -def test_reset_scenes(server: ServerMonitor) -> None: - server.create_scene() - server.create_scene("scene_2") - scene_rpc(server, "reset_scenes", {}) - response = scene_rpc(server, "create_scene", {"scene_id": "scene_1"}) +def test_reset_viewers(server: ServerMonitor) -> None: + server.create_viewer() + server.create_viewer("viewer_2") + scene_rpc(server, "reset_viewers", {}) + response = scene_rpc(server, "create_viewer", {"viewer_id": "viewer_1"}) assert "error" not in response def test_update_camera_only_moves_its_scene( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: - server.create_scene() - server.create_scene("scene_2") + server.create_viewer() + server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_1", "id": data_id}) - scene_rpc(server, "add_to_scene", {"scene_id": "scene_2", "id": data_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) camera_options = { "focal_point": [-0.034399999999999986, 2.4513515, -0.10266900000000012], "view_up": [0.48981180389508683, 0.8647097694977263, -0.11118188386706776], @@ -813,22 +813,24 @@ def test_update_camera_only_moves_its_scene( } server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["update_camera"]["rpc"], - [{"scene_id": "scene_2", "camera_options": camera_options}], + [{"viewer_id": "viewer_2", "camera_options": camera_options}], ) - assert server.compare_image("viewer/add_to_scene.jpeg", "scene_1") - assert server.compare_image("viewer/update_camera.jpeg", "scene_2") + assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_1") + assert server.compare_image("viewer/update_camera.jpeg", "viewer_2") -def test_remove_from_scene_unknown_data_is_not_found(server: ServerMonitor) -> None: - server.create_scene() +def test_remove_from_viewer_unknown_data_is_not_found(server: ServerMonitor) -> None: + server.create_viewer() response = scene_rpc( server, - "remove_from_scene", - {"scene_id": "scene_1", "id": "00000000000000000000000123456789"}, + "remove_from_viewer", + {"viewer_id": "viewer_1", "id": "00000000000000000000000123456789"}, + ) + assert "Data 00000000000000000000000123456789 is not in scene viewer_1" in str( + response["error"] ) - assert "Data 00000000000000000000000123456789 is not in scene scene_1" in str(response["error"]) def test_render_unknown_scene_is_not_found(server: ServerMonitor) -> None: - response = scene_rpc(server, "render", {"scene_id": "scene_1"}) - assert "Scene scene_1 not found" in str(response["error"]) + response = scene_rpc(server, "render", {"viewer_id": "viewer_1"}) + assert "Scene viewer_1 not found" in str(response["error"]) From 623038419a0f37ac5bc83548e72757cd2419647a Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 10:14:00 +0100 Subject: [PATCH 15/22] feat(viewer): rename Scene classes and module to Viewer Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/app.py | 6 +- src/opengeodeweb_viewer/basemap_pipeline.py | 130 +++--- src/opengeodeweb_viewer/image_delivery.py | 4 +- .../object/object_methods.py | 374 +++++++++--------- .../rpc/mesh/mesh_protocols.py | 76 ++-- .../rpc/model/model_protocols.py | 178 ++++----- .../rpc/utils_protocols.py | 6 +- .../rpc/viewer/viewer_protocols.py | 176 ++++----- src/opengeodeweb_viewer/scene/__init__.py | 5 - src/opengeodeweb_viewer/viewer/__init__.py | 5 + .../{scene/scene.py => viewer/viewer.py} | 12 +- .../viewer_filters.py} | 8 +- .../viewer_object.py} | 27 +- src/opengeodeweb_viewer/vtk_pipeline.py | 4 +- src/opengeodeweb_viewer/vtk_protocol.py | 284 ++++++------- tests/conftest.py | 4 +- tests/image/test_image_protocols.py | 38 +- .../test_cells_attribute_cell_protocols.py | 2 +- .../test_cells_attribute_vertex_protocols.py | 2 +- tests/mesh/cells/test_mesh_cells_protocols.py | 8 +- .../test_edges_attribute_edge_protocols.py | 2 +- .../test_edges_attribute_vertex_protocols.py | 4 +- tests/mesh/edges/test_mesh_edges_protocols.py | 2 +- .../test_points_attribute_vertex_protocols.py | 4 +- .../mesh/points/test_mesh_points_protocols.py | 6 +- ...st_polygons_attribute_polygon_protocols.py | 2 +- ...est_polygons_attribute_vertex_protocols.py | 4 +- ...olyhedra_attribute_polyhedron_protocols.py | 2 +- ...st_polyhedra_attribute_vertex_protocols.py | 2 +- .../test_mesh_polyhedra_protocols.py | 2 +- tests/mesh/test_mesh_protocols.py | 102 ++--- ...el_surfaces_attribute_polygon_protocols.py | 2 +- tests/model/test_model_protocols.py | 24 +- tests/test_basemap_drape.py | 14 +- tests/test_generic_protocols.py | 6 +- tests/test_image_delivery.py | 4 +- tests/test_utils_protocols.py | 4 +- tests/{test_scene.py => test_viewer.py} | 54 +-- tests/test_viewer_protocols.py | 58 +-- tests/test_vtk_pipeline.py | 6 +- 40 files changed, 830 insertions(+), 823 deletions(-) delete mode 100644 src/opengeodeweb_viewer/scene/__init__.py create mode 100644 src/opengeodeweb_viewer/viewer/__init__.py rename src/opengeodeweb_viewer/{scene/scene.py => viewer/viewer.py} (92%) rename src/opengeodeweb_viewer/{scene/scene_filters.py => viewer/viewer_filters.py} (85%) rename src/opengeodeweb_viewer/{scene/scene_object.py => viewer/viewer_object.py} (94%) rename tests/{test_scene.py => test_viewer.py} (56%) diff --git a/src/opengeodeweb_viewer/app.py b/src/opengeodeweb_viewer/app.py index 9a69ff70..56cb72d2 100644 --- a/src/opengeodeweb_viewer/app.py +++ b/src/opengeodeweb_viewer/app.py @@ -17,7 +17,7 @@ # Local application imports from opengeodeweb_viewer.config import Config, DevConfig, ProdConfig, TestConfig from opengeodeweb_viewer.egl_device import select_egl_device -from opengeodeweb_viewer.image_delivery import SceneImageDelivery +from opengeodeweb_viewer.image_delivery import ViewerImageDelivery from opengeodeweb_viewer.rpc.generic.generic_protocols import VtkGenericView from opengeodeweb_viewer.rpc.image.image_protocols import VtkImageView from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView @@ -59,7 +59,7 @@ def initialize(self) -> None: # Bring used components self.registerVtkWebProtocol(vtk_protocols.vtkWebMouseHandler()) self.registerVtkWebProtocol(vtk_protocols.vtkWebViewPort()) - publisher = SceneImageDelivery(decode=False) + publisher = ViewerImageDelivery(decode=False) publisher.deltaStaleTimeBeforeRender = 0.1 self.registerVtkWebProtocol(publisher) self.setSharedObject("db", {}) @@ -96,7 +96,7 @@ def initialize(self) -> None: vtk_std_err_out = vtkOutputWindow() vtk_std_err_out.SetInstance(err_out) - self.setSharedObject("scenes", {}) + self.setSharedObject("viewers", {}) # ============================================================================= diff --git a/src/opengeodeweb_viewer/basemap_pipeline.py b/src/opengeodeweb_viewer/basemap_pipeline.py index 5a8ee2ee..696773a8 100644 --- a/src/opengeodeweb_viewer/basemap_pipeline.py +++ b/src/opengeodeweb_viewer/basemap_pipeline.py @@ -26,7 +26,7 @@ from vtkmodules.vtkRenderingCore import vtkProp from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane - from opengeodeweb_viewer.scene import Scene, SceneObject + from opengeodeweb_viewer.viewer import Viewer, ViewerObject from opengeodeweb_viewer.vtk_pipeline import BasemapState, VtkPipeline @@ -41,11 +41,11 @@ def compose(basemap: BasemapState, shape: tuple[int, ...]) -> None: ) -def style_basemap_object(basemap: BasemapState, scene_object: SceneObject) -> None: - """A basemap is drawn the same in every scene: its actor gets the basemap style.""" +def style_basemap_object(basemap: BasemapState, viewer_object: ViewerObject) -> None: + """A basemap is drawn the same in every viewer: its actor gets the basemap style.""" style_basemap( - scene_object.actor, - scene_object.mapper, + viewer_object.actor, + viewer_object.mapper, BASEMAP_POLYGON_OFFSET_UNITS if basemap.detail_of is None else DETAIL_POLYGON_OFFSET_UNITS, ) @@ -60,19 +60,19 @@ def basemaps( ] -def pipeline_surfaces(pipeline: VtkPipeline, scene_object: SceneObject) -> list[vtkPolyData]: - """Visible surfaces of a data in a scene, after clipping, threshold, shrink and explosion.""" - return [shown for shown, _ in pipeline_surface_pairs(pipeline, scene_object)] +def pipeline_surfaces(pipeline: VtkPipeline, viewer_object: ViewerObject) -> list[vtkPolyData]: + """Visible surfaces of a data in a viewer, after clipping, threshold, shrink and explosion.""" + return [shown for shown, _ in pipeline_surface_pairs(pipeline, viewer_object)] def pipeline_surface_pairs( - pipeline: VtkPipeline, scene_object: SceneObject + pipeline: VtkPipeline, viewer_object: ViewerObject ) -> list[tuple[vtkPolyData, vtkPolyData]]: """Visible surfaces of a data as shown, each with its geometry before explosion.""" - if not scene_object.actor.GetVisibility(): + if not viewer_object.actor.GetVisibility(): return [] - mapper = scene_object.mapper - filters = scene_object.filters + mapper = viewer_object.mapper + filters = viewer_object.filters if isinstance(mapper, vtkCompositePolyDataMapper): attributes = mapper.GetCompositeDataDisplayAttributes() types = pipeline.block_component_types() @@ -99,97 +99,97 @@ def pipeline_surface_pairs( return [(output, output)] if output.GetNumberOfPolys() > 0 else [] -def drape_planes(scene: Scene, basemap: BasemapState) -> list[Plane]: - """The clipping planes, in the scene, of the georeferenced data the basemap lies under.""" +def drape_planes(viewer: Viewer, basemap: BasemapState) -> list[Plane]: + """The clipping planes, in the viewer, of the georeferenced data the basemap lies under.""" return next( ( - scene.objects[data_id].filters.clipping_planes + viewer.objects[data_id].filters.clipping_planes for data_id in basemap.drape_ids - if data_id in scene.objects and scene.objects[data_id].filters.clipping_planes + if data_id in viewer.objects and viewer.objects[data_id].filters.clipping_planes ), [], ) def basemaps_follow( - database: Mapping[str, VtkPipeline], scenes: Iterable[Scene], data_ids: Iterable[str] + database: Mapping[str, VtkPipeline], viewers: Iterable[Viewer], data_ids: Iterable[str] ) -> bool: draped = {data_id for _, basemap in basemaps(database) for data_id in basemap.drape_ids} - scenes = list(scenes) + viewers = list(viewers) # Exploded data lift the flat map, and an unknown id may be anything return any( data_id in draped or (pipeline := database.get(data_id)) is None or pipeline.basemap is not None or any( - data_id in scene.objects and scene.objects[data_id].filters.explode_factor > 0 - for scene in scenes + data_id in viewer.objects and viewer.objects[data_id].filters.explode_factor > 0 + for viewer in viewers ) for data_id in data_ids ) -def basemap_actors(database: Mapping[str, VtkPipeline], scene: Scene) -> set[vtkProp]: +def basemap_actors(database: Mapping[str, VtkPipeline], viewer: Viewer) -> set[vtkProp]: """The basemap spans a margin around the data: the grid measures the data.""" return { actor - for data_id, _ in scene_basemaps(database, scene) - for actor in (scene.objects[data_id].actor, scene.objects[data_id].drape_actor) + for data_id, _ in viewer_basemaps(database, viewer) + for actor in (viewer.objects[data_id].actor, viewer.objects[data_id].drape_actor) if actor is not None } -def scene_basemaps( - database: Mapping[str, VtkPipeline], scene: Scene +def viewer_basemaps( + database: Mapping[str, VtkPipeline], viewer: Viewer ) -> list[tuple[str, BasemapState]]: - """The basemaps shown by a scene.""" + """The basemaps shown by a viewer.""" return [ (data_id, pipeline.basemap) for data_id, pipeline in database.items() - if pipeline.basemap is not None and data_id in scene.objects + if pipeline.basemap is not None and data_id in viewer.objects ] -def update_basemaps(database: Mapping[str, VtkPipeline], scene: Scene) -> None: +def update_basemaps(database: Mapping[str, VtkPipeline], viewer: Viewer) -> None: exploded_tops = [ - scene_object.actor.GetBounds()[5] - for data_id, scene_object in scene.objects.items() + viewer_object.actor.GetBounds()[5] + for data_id, viewer_object in viewer.objects.items() if database[data_id].basemap is None - and scene_object.filters.explode_factor > 0 - and scene_object.actor.GetVisibility() + and viewer_object.filters.explode_factor > 0 + and viewer_object.actor.GetVisibility() ] # A detail reads what its base just drew for data_id, basemap in sorted( - scene_basemaps(database, scene), key=lambda item: item[1].detail_of is not None + viewer_basemaps(database, viewer), key=lambda item: item[1].detail_of is not None ): - scene_object = scene.objects[data_id] - if scene_object.drape_actor is not None: - scene.renderer.RemoveActor(scene_object.drape_actor) - scene_object.drape_actor = None + viewer_object = viewer.objects[data_id] + if viewer_object.drape_actor is not None: + viewer.renderer.RemoveActor(viewer_object.drape_actor) + viewer_object.drape_actor = None if basemap.detail_of is None: - _update_base(database, scene, data_id, exploded_tops) + _update_base(database, viewer, data_id, exploded_tops) else: - _update_detail(database, scene, data_id) + _update_detail(database, viewer, data_id) def _update_base( database: Mapping[str, VtkPipeline], - scene: Scene, + viewer: Viewer, data_id: str, exploded_tops: list[float], ) -> None: pipeline = database[data_id] - scene_object = scene.objects[data_id] + viewer_object = viewer.objects[data_id] basemap = cast("BasemapState", pipeline.basemap) if basemap.full_texture is None: return # Only georeferenced data: the front sends their ids data = [ - (database[drape_id], scene.objects[drape_id]) + (database[drape_id], viewer.objects[drape_id]) for drape_id in basemap.drape_ids if drape_id in database - and drape_id in scene.objects - and scene.objects[drape_id].actor.GetVisibility() + and drape_id in viewer.objects + and viewer.objects[drape_id].actor.GetVisibility() ] draped: list[vtkPolyData] = [] if data: @@ -203,55 +203,57 @@ def _update_base( dataset = cast("vtkPolyData", pipeline.reader.GetOutputAsDataSet()) basemap_top = dataset.GetBounds()[5] if draped: - scene_object.drape_actor = drape_actor( + viewer_object.drape_actor = drape_actor( drape_polydata(draped, dataset), basemap.full_texture ) - scene.renderer.AddActor(scene_object.drape_actor) + viewer.renderer.AddActor(viewer_object.drape_actor) # The flat map goes under the draped relief lift = min(surface.GetBounds()[4] for surface in draped) - basemap_top else: # Exploded blocks only move up: the flat map rises above the highest one lift = max([0.0, *(top - basemap_top for top in exploded_tops)]) - scene_object.actor.SetPosition(0.0, 0.0, lift) - scene_object.draped_surfaces = draped - retexture(pipeline, scene_object, scene) + viewer_object.actor.SetPosition(0.0, 0.0, lift) + viewer_object.draped_surfaces = draped + retexture(pipeline, viewer_object, viewer) -def _update_detail(database: Mapping[str, VtkPipeline], scene: Scene, data_id: str) -> None: +def _update_detail(database: Mapping[str, VtkPipeline], viewer: Viewer, data_id: str) -> None: pipeline = database[data_id] - scene_object = scene.objects[data_id] + viewer_object = viewer.objects[data_id] detail = cast("BasemapState", pipeline.basemap) base = database.get(detail.detail_of or "") - base_object = scene.objects.get(detail.detail_of or "") + base_object = viewer.objects.get(detail.detail_of or "") if base is None or base.basemap is None or base_object is None or detail.full_texture is None: - scene_object.actor.SetVisibility(False) # noqa: FBT003 VTK API + viewer_object.actor.SetVisibility(False) # noqa: FBT003 VTK API return dataset = cast("vtkPolyData", pipeline.reader.GetOutputAsDataSet()) draped = clipped_to_bounds(base_object.draped_surfaces, dataset.GetBounds()) if draped: - scene_object.drape_actor = drape_actor( + viewer_object.drape_actor = drape_actor( drape_polydata(draped, dataset), detail.full_texture, DETAIL_DRAPE_POLYGON_OFFSET_UNITS, ) - scene.renderer.AddActor(scene_object.drape_actor) + viewer.renderer.AddActor(viewer_object.drape_actor) # Coplanar with its base: the same height, the same crop rule - scene_object.actor.SetPosition(0.0, 0.0, base_object.actor.GetPosition()[2]) - retexture(pipeline, scene_object, scene) + viewer_object.actor.SetPosition(0.0, 0.0, base_object.actor.GetPosition()[2]) + retexture(pipeline, viewer_object, viewer) -def retexture(pipeline: VtkPipeline, scene_object: SceneObject, scene: Scene) -> None: +def retexture(pipeline: VtkPipeline, viewer_object: ViewerObject, viewer: Viewer) -> None: basemap = pipeline.basemap if basemap is None or basemap.full_texture is None: return - base_object = scene.objects.get(basemap.detail_of or "", scene_object) + base_object = viewer.objects.get(basemap.detail_of or "", viewer_object) # Without draped surface, cropping would hide the whole map: the flat map shows every map around = basemap.around_texture draped = bool(base_object.draped_surfaces) - scene_object.actor.SetTexture(around if draped and around is not None else basemap.full_texture) + viewer_object.actor.SetTexture( + around if draped and around is not None else basemap.full_texture + ) # Hiding the flat map with nothing draped would hide the whole map flat_visible = around is not None or not draped - scene_object.actor.SetVisibility(scene_object.visibility and flat_visible) - if scene_object.drape_actor is not None: - scene_object.drape_actor.SetTexture(basemap.full_texture) - scene_object.drape_actor.SetVisibility(scene_object.visibility) + viewer_object.actor.SetVisibility(viewer_object.visibility and flat_visible) + if viewer_object.drape_actor is not None: + viewer_object.drape_actor.SetTexture(basemap.full_texture) + viewer_object.drape_actor.SetVisibility(viewer_object.visibility) diff --git a/src/opengeodeweb_viewer/image_delivery.py b/src/opengeodeweb_viewer/image_delivery.py index 92252433..ab273fc0 100644 --- a/src/opengeodeweb_viewer/image_delivery.py +++ b/src/opengeodeweb_viewer/image_delivery.py @@ -8,11 +8,11 @@ from wslink import schedule_callback # type: ignore[import-untyped] -class SceneImageDelivery(vtk_protocols.vtkWebPublishImageDelivery): +class ViewerImageDelivery(vtk_protocols.vtkWebPublishImageDelivery): """Image publisher tracking the stale state of each view independently. The base class keeps a single stale timestamp and a single re-push slot for - all views: when two scenes render back to back, only the first one gets its + all views: when two viewers render back to back, only the first one gets its final image. """ diff --git a/src/opengeodeweb_viewer/object/object_methods.py b/src/opengeodeweb_viewer/object/object_methods.py index 1b65d48b..ef2e6b56 100644 --- a/src/opengeodeweb_viewer/object/object_methods.py +++ b/src/opengeodeweb_viewer/object/object_methods.py @@ -18,15 +18,15 @@ # Local application imports from opengeodeweb_viewer.basemap_pipeline import drape_planes, style_basemap_object -from opengeodeweb_viewer.scene import SceneObject +from opengeodeweb_viewer.viewer import ViewerObject from opengeodeweb_viewer.vtk_pipeline import VtkPipeline -from opengeodeweb_viewer.vtk_protocol import VtkView, scene_object_of +from opengeodeweb_viewer.vtk_protocol import VtkView, viewer_object_of if TYPE_CHECKING: from vtkmodules.vtkIOXML import vtkXMLReader - from opengeodeweb_viewer.scene import Scene from opengeodeweb_viewer.utils_functions import ColorClassProtocol + from opengeodeweb_viewer.viewer import Viewer from opengeodeweb_viewer.vtk_pipeline import ColorMapKey logger = logging.getLogger(__name__) @@ -53,18 +53,18 @@ def register_dataset(self, data_id: str, name: str, reader: vtkXMLReader) -> Non logger.exception("Error registering %s (%s)", data_id, type(self).__name__) raise - def configure_actor(self, scene_object: SceneObject, data_id: str) -> None: + def configure_actor(self, viewer_object: ViewerObject, data_id: str) -> None: if self.get_viewer_data(data_id).viewer_object_type == "image": # The scalars are the colors of the image, shown as they are - scene_object.mapper.ScalarVisibilityOn() - scene_object.mapper.SetColorModeToDirectScalars() - scene_object.actor.GetProperty().LightingOff() - scene_object.actor.PickableOff() + viewer_object.mapper.ScalarVisibilityOn() + viewer_object.mapper.SetColorModeToDirectScalars() + viewer_object.actor.GetProperty().LightingOff() + viewer_object.actor.PickableOff() else: - scene_object.mapper.SetColorModeToMapScalars() + viewer_object.mapper.SetColorModeToMapScalars() - def add_object(self, scene: Scene, data_id: str) -> None: - if data_id in scene.objects: + def add_object(self, viewer: Viewer, data_id: str) -> None: + if data_id in viewer.objects: return pipeline = self.get_vtk_pipeline(data_id) source_output = pipeline.filter.GetOutputDataObject(0) @@ -74,9 +74,9 @@ def add_object(self, scene: Scene, data_id: str) -> None: mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) else: mapper = vtkDataSetMapper() - scene_object = SceneObject(mapper) - # No filter yet: the output of the scene is the source - filters = scene_object.filters + viewer_object = ViewerObject(mapper) + # No filter yet: the output of the viewer is the source + filters = viewer_object.filters filters.filter.SetInputConnection(pipeline.reader.GetOutputPort()) filters.filter.Update() if isinstance(source_output, vtkMultiBlockDataSet): @@ -85,214 +85,214 @@ def add_object(self, scene: Scene, data_id: str) -> None: filters.block_data_sets = pipeline.extract_blocks(geometry_output) mapper.SetInputDataObject(geometry_output) else: - scene_object.connect_mappers() - self.highlight(scene_object) - scene.objects[data_id] = scene_object - scene_object.actor.SetMapper(mapper) - self.configure_actor(scene_object, data_id) + viewer_object.connect_mappers() + self.highlight(viewer_object) + viewer.objects[data_id] = viewer_object + viewer_object.actor.SetMapper(mapper) + self.configure_actor(viewer_object, data_id) if pipeline.basemap is not None: - style_basemap_object(pipeline.basemap, scene_object) + style_basemap_object(pipeline.basemap, viewer_object) mapper.SetResolveCoincidentTopologyLineOffsetParameters(1, -0.1) mapper.SetResolveCoincidentTopologyPolygonOffsetParameters(2, 0) mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) - scene_object.scalar_bar.VisibilityOff() + viewer_object.scalar_bar.VisibilityOff() - renderer = scene.renderer + renderer = viewer.renderer should_reset_camera = True actors = renderer.GetActors() actors.InitTraversal() while (actor := actors.GetNextItem()) is not None: if actor.visibility: should_reset_camera = False - renderer.AddActor(scene_object.actor) - renderer.AddActor(scene_object.highlight.actor) - renderer.AddViewProp(scene_object.scalar_bar) + renderer.AddActor(viewer_object.actor) + renderer.AddActor(viewer_object.highlight.actor) + renderer.AddViewProp(viewer_object.scalar_bar) if should_reset_camera: renderer.ResetCamera() - if pipeline.basemap is not None and drape_planes(scene, pipeline.basemap): - # Added under data already clipped in this scene: cut like it at once - self.clip_basemap(scene, data_id) + if pipeline.basemap is not None and drape_planes(viewer, pipeline.basemap): + # Added under data already clipped in this viewer: cut like it at once + self.clip_basemap(viewer, data_id) self.mark_basemaps_dirty([data_id]) - def remove_object(self, scene: Scene, data_id: str) -> None: - scene_object = scene_object_of(scene, data_id) - del scene.objects[data_id] - renderer = scene.renderer - renderer.RemoveActor(scene_object.actor) - renderer.RemoveActor(scene_object.highlight.actor) - if scene_object.points_actor is not None: - renderer.RemoveActor(scene_object.points_actor) - if scene_object.points_scalar_bar is not None: - renderer.RemoveViewProp(scene_object.points_scalar_bar) - for size_actor in scene_object.points_size_actors.values(): + def remove_object(self, viewer: Viewer, data_id: str) -> None: + viewer_object = viewer_object_of(viewer, data_id) + del viewer.objects[data_id] + renderer = viewer.renderer + renderer.RemoveActor(viewer_object.actor) + renderer.RemoveActor(viewer_object.highlight.actor) + if viewer_object.points_actor is not None: + renderer.RemoveActor(viewer_object.points_actor) + if viewer_object.points_scalar_bar is not None: + renderer.RemoveViewProp(viewer_object.points_scalar_bar) + for size_actor in viewer_object.points_size_actors.values(): renderer.RemoveActor(size_actor.actor) - if scene_object.edges_actor is not None: - renderer.RemoveActor(scene_object.edges_actor) - for width_actor in scene_object.edges_width_actors.values(): + if viewer_object.edges_actor is not None: + renderer.RemoveActor(viewer_object.edges_actor) + for width_actor in viewer_object.edges_width_actors.values(): renderer.RemoveActor(width_actor.actor) - if scene_object.edges_scalar_bar is not None: - renderer.RemoveViewProp(scene_object.edges_scalar_bar) - renderer.RemoveViewProp(scene_object.scalar_bar) - for scalar_bar in scene_object.scalar_bars.values(): + if viewer_object.edges_scalar_bar is not None: + renderer.RemoveViewProp(viewer_object.edges_scalar_bar) + renderer.RemoveViewProp(viewer_object.scalar_bar) + for scalar_bar in viewer_object.scalar_bars.values(): renderer.RemoveViewProp(scalar_bar.actor) - if scene_object.drape_actor is not None: - renderer.RemoveActor(scene_object.drape_actor) + if viewer_object.drape_actor is not None: + renderer.RemoveActor(viewer_object.drape_actor) # Before the deregistration: an unknown id always marks them dirty self.mark_basemaps_dirty([data_id]) - self.update_scalar_bars_layout(scene) + self.update_scalar_bars_layout(viewer) def deregister_dataset(self, data_id: str) -> None: - # remove_object already lays out the scalar bars of each scene it removes the data from - for scene in self.get_scenes().values(): - if data_id in scene.objects: - self.remove_object(scene, data_id) + # remove_object already lays out the scalar bars of each viewer it removes the data from + for viewer in self.get_viewers().values(): + if data_id in viewer.objects: + self.remove_object(viewer, data_id) self.mark_basemaps_dirty([data_id]) self.deregister_object(data_id) - def scene_and_object(self, viewer_id: str, data_id: str) -> tuple[Scene, SceneObject]: - scene = self.get_scene(viewer_id) - return scene, scene_object_of(scene, data_id) + def viewer_and_object(self, viewer_id: str, data_id: str) -> tuple[Viewer, ViewerObject]: + viewer = self.get_viewer(viewer_id) + return viewer, viewer_object_of(viewer, data_id) def set_visibility(self, viewer_id: str, data_id: str, *, visibility: bool) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - scene_object.visibility = visibility - scene_object.actor.SetVisibility(visibility) - self.set_style_actors_visibility(scene_object, visibility=visibility) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + viewer_object.visibility = visibility + viewer_object.actor.SetVisibility(visibility) + self.set_style_actors_visibility(viewer_object, visibility=visibility) self.mark_basemaps_dirty([data_id]) if not visibility: - scene_object.scalar_bar.VisibilityOff() - for scalar_bar in scene_object.scalar_bars.values(): + viewer_object.scalar_bar.VisibilityOff() + for scalar_bar in viewer_object.scalar_bars.values(): scalar_bar.actor.VisibilityOff() - if scene_object.points_scalar_bar is not None: - scene_object.points_scalar_bar.VisibilityOff() - if scene_object.edges_scalar_bar is not None: - scene_object.edges_scalar_bar.VisibilityOff() + if viewer_object.points_scalar_bar is not None: + viewer_object.points_scalar_bar.VisibilityOff() + if viewer_object.edges_scalar_bar is not None: + viewer_object.edges_scalar_bar.VisibilityOff() else: - if self.maps_scalars(scene_object.mapper): - scene_object.scalar_bar.VisibilityOn() - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + if self.maps_scalars(viewer_object.mapper): + viewer_object.scalar_bar.VisibilityOn() + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) @staticmethod - def set_style_actors_visibility(scene_object: SceneObject, *, visibility: bool) -> None: - if scene_object.points_actor is not None: - scene_object.points_actor.SetVisibility(visibility and scene_object.points_visibility) - for size_actor in scene_object.points_size_actors.values(): + def set_style_actors_visibility(viewer_object: ViewerObject, *, visibility: bool) -> None: + if viewer_object.points_actor is not None: + viewer_object.points_actor.SetVisibility(visibility and viewer_object.points_visibility) + for size_actor in viewer_object.points_size_actors.values(): size_actor.actor.SetVisibility(visibility) - if scene_object.edges_actor is not None: - scene_object.edges_actor.SetVisibility(visibility and scene_object.edges_visibility) - for width_actor in scene_object.edges_width_actors.values(): + if viewer_object.edges_actor is not None: + viewer_object.edges_actor.SetVisibility(visibility and viewer_object.edges_visibility) + for width_actor in viewer_object.edges_width_actors.values(): width_actor.actor.SetVisibility(visibility) def set_opacity(self, viewer_id: str, data_id: str, opacity: float) -> None: - actor = self.get_scene_object(viewer_id, data_id).actor + actor = self.get_viewer_object(viewer_id, data_id).actor actor.GetProperty().SetOpacity(opacity) def set_color(self, viewer_id: str, data_id: str, color: ColorClassProtocol) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - scene_object.mapper.ScalarVisibilityOff() - actor = scene_object.actor + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + viewer_object.mapper.ScalarVisibilityOff() + actor = viewer_object.actor actor.GetProperty().SetColor([color.red / 255, color.green / 255, color.blue / 255]) actor.GetProperty().SetOpacity(color.alpha) # Points and edges bars that reused the polygons one now show their own - scene_object.scalar_bar.VisibilityOff() - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + viewer_object.scalar_bar.VisibilityOff() + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) def set_edges_visibility(self, viewer_id: str, data_id: str, *, visibility: bool) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": self.set_visibility(viewer_id, data_id, visibility=visibility) return - scene, scene_object = self.scene_and_object(viewer_id, data_id) - if scene_object.edges_actor is None: - scene_object.actor.GetProperty().SetEdgeVisibility(visibility) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + if viewer_object.edges_actor is None: + viewer_object.actor.GetProperty().SetEdgeVisibility(visibility) return - scene_object.edges_visibility = visibility - scene_object.edges_actor.SetVisibility(scene_object.actor.GetVisibility() and visibility) - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + viewer_object.edges_visibility = visibility + viewer_object.edges_actor.SetVisibility(viewer_object.actor.GetVisibility() and visibility) + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) def set_edges_width(self, viewer_id: str, data_id: str, width: float) -> None: - scene_object = self.get_scene_object(viewer_id, data_id) + viewer_object = self.get_viewer_object(viewer_id, data_id) if self.get_viewer_data(data_id).viewer_elements_type == "edges": - scene_object.actor.GetProperty().SetLineWidth(width) + viewer_object.actor.GetProperty().SetLineWidth(width) return # VTK draws polygon edges with the line width, the edge width property is not rendered - scene_object.actor.GetProperty().SetLineWidth(width) - if scene_object.edges_actor is not None: - scene_object.edges_actor.GetProperty().SetLineWidth(width) + viewer_object.actor.GetProperty().SetLineWidth(width) + if viewer_object.edges_actor is not None: + viewer_object.edges_actor.GetProperty().SetLineWidth(width) def set_edges_color(self, viewer_id: str, data_id: str, color: ColorClassProtocol) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": self.set_color(viewer_id, data_id, color) return - scene, scene_object = self.scene_and_object(viewer_id, data_id) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) rgb = [color.red / 255, color.green / 255, color.blue / 255] - scene_object.actor.GetProperty().SetEdgeColor(rgb) - if scene_object.edges_actor is None or scene_object.edges_mapper is None: + viewer_object.actor.GetProperty().SetEdgeColor(rgb) + if viewer_object.edges_actor is None or viewer_object.edges_mapper is None: return # A constant color replaces the edges attribute and its scalar bar - scene_object.edges_mapper.ScalarVisibilityOff() - scene_object.edges_actor.GetProperty().SetColor(rgb) - scene_object.edges_actor.GetProperty().SetOpacity(color.alpha) - if scene_object.edges_scalar_bar is not None: - scene_object.edges_scalar_bar.SetLookupTable(None) - scene_object.edges_color_map_key = None - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + viewer_object.edges_mapper.ScalarVisibilityOff() + viewer_object.edges_actor.GetProperty().SetColor(rgb) + viewer_object.edges_actor.GetProperty().SetOpacity(color.alpha) + if viewer_object.edges_scalar_bar is not None: + viewer_object.edges_scalar_bar.SetLookupTable(None) + viewer_object.edges_color_map_key = None + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) def set_edges_opacity(self, viewer_id: str, data_id: str, opacity: float) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "edges": self.set_opacity(viewer_id, data_id, opacity) return - scene_object = self.get_scene_object(viewer_id, data_id) - if scene_object.edges_actor is not None: - scene_object.edges_actor.GetProperty().SetOpacity(opacity) + viewer_object = self.get_viewer_object(viewer_id, data_id) + if viewer_object.edges_actor is not None: + viewer_object.edges_actor.GetProperty().SetOpacity(opacity) def set_points_visibility(self, viewer_id: str, data_id: str, *, visibility: bool) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": self.set_visibility(viewer_id, data_id, visibility=visibility) return - scene, scene_object = self.scene_and_object(viewer_id, data_id) - if scene_object.points_actor is not None: - scene_object.points_visibility = visibility - scene_object.points_actor.SetVisibility(visibility) - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + if viewer_object.points_actor is not None: + viewer_object.points_visibility = visibility + viewer_object.points_actor.SetVisibility(visibility) + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) else: - scene_object.actor.GetProperty().SetVertexVisibility(visibility) + viewer_object.actor.GetProperty().SetVertexVisibility(visibility) def set_points_size(self, viewer_id: str, data_id: str, size: float) -> None: - scene_object = self.get_scene_object(viewer_id, data_id) - scene_object.actor.GetProperty().SetPointSize(size) - if scene_object.points_actor is not None: - scene_object.points_actor.GetProperty().SetPointSize(size) + viewer_object = self.get_viewer_object(viewer_id, data_id) + viewer_object.actor.GetProperty().SetPointSize(size) + if viewer_object.points_actor is not None: + viewer_object.points_actor.GetProperty().SetPointSize(size) @staticmethod - def ensure_points_actor(scene: Scene, scene_object: SceneObject) -> vtkActor: + def ensure_points_actor(viewer: Viewer, viewer_object: ViewerObject) -> vtkActor: # Points get their own actor so their scalars stay independent from the polygons - if scene_object.points_actor is not None: - return scene_object.points_actor + if viewer_object.points_actor is not None: + return viewer_object.points_actor mapper = vtkDataSetMapper() - mapper.SetInputConnection(scene_object.filters.filter.GetOutputPort()) + mapper.SetInputConnection(viewer_object.filters.filter.GetOutputPort()) mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - main_property = scene_object.actor.GetProperty() + main_property = viewer_object.actor.GetProperty() points_property = actor.GetProperty() points_property.SetRepresentationToPoints() points_property.SetPointSize(main_property.GetPointSize()) - scene_object.points_visibility = bool(main_property.GetVertexVisibility()) - actor.SetVisibility(scene_object.points_visibility) + viewer_object.points_visibility = bool(main_property.GetVertexVisibility()) + actor.SetVisibility(viewer_object.points_visibility) main_property.VertexVisibilityOff() scalar_bar = vtkScalarBarActor() scalar_bar.VisibilityOff() - scene.renderer.AddActor(actor) - scene.renderer.AddViewProp(scalar_bar) - scene_object.points_mapper = mapper - scene_object.points_actor = actor - scene_object.points_scalar_bar = scalar_bar + viewer.renderer.AddActor(actor) + viewer.renderer.AddViewProp(scalar_bar) + viewer_object.points_mapper = mapper + viewer_object.points_actor = actor + viewer_object.points_scalar_bar = scalar_bar return actor @staticmethod @@ -305,8 +305,8 @@ def maps_scalars(mapper: vtkMapper) -> bool: ) @staticmethod - def polygons_color_map_key(scene_object: SceneObject) -> ColorMapKey | None: - mapper = scene_object.mapper + def polygons_color_map_key(viewer_object: ViewerObject) -> ColorMapKey | None: + mapper = viewer_object.mapper if not VtkObjectView.maps_scalars(mapper): return None minimum, maximum = mapper.GetScalarRange() @@ -315,30 +315,30 @@ def polygons_color_map_key(scene_object: SceneObject) -> ColorMapKey | None: mapper.GetArrayComponent(), minimum, maximum, - tuple(scene_object.color_map_points), + tuple(viewer_object.color_map_points), ) - def update_style_scalar_bars_visibility(self, scene_object: SceneObject) -> None: + def update_style_scalar_bars_visibility(self, viewer_object: ViewerObject) -> None: # Points and edges bars show only when no visible bar already holds the same attribute - visible = bool(scene_object.actor.GetVisibility()) - polygons_key = self.polygons_color_map_key(scene_object) + visible = bool(viewer_object.actor.GetVisibility()) + polygons_key = self.polygons_color_map_key(viewer_object) points_bar_visible = ( visible - and scene_object.points_visibility - and scene_object.points_color_map_key is not None - and scene_object.points_color_map_key != polygons_key + and viewer_object.points_visibility + and viewer_object.points_color_map_key is not None + and viewer_object.points_color_map_key != polygons_key ) - if scene_object.points_scalar_bar is not None: - scene_object.points_scalar_bar.SetVisibility(points_bar_visible) - if scene_object.edges_scalar_bar is not None: - scene_object.edges_scalar_bar.SetVisibility( + if viewer_object.points_scalar_bar is not None: + viewer_object.points_scalar_bar.SetVisibility(points_bar_visible) + if viewer_object.edges_scalar_bar is not None: + viewer_object.edges_scalar_bar.SetVisibility( visible - and scene_object.edges_visibility - and scene_object.edges_color_map_key is not None - and scene_object.edges_color_map_key != polygons_key + and viewer_object.edges_visibility + and viewer_object.edges_color_map_key is not None + and viewer_object.edges_color_map_key != polygons_key and not ( points_bar_visible - and scene_object.edges_color_map_key == scene_object.points_color_map_key + and viewer_object.edges_color_map_key == viewer_object.points_color_map_key ) ) @@ -358,85 +358,85 @@ def match_edges_depth_to_polygons(mapper: vtkMapper) -> None: EDGES_DEPTH_FACTOR_SHARE * (float(polygon_factor) - float(line_factor)), 0.0 ) - def ensure_edges_actor(self, scene: Scene, scene_object: SceneObject) -> vtkActor: + def ensure_edges_actor(self, viewer: Viewer, viewer_object: ViewerObject) -> vtkActor: # Edges get their own actor so their scalars stay independent from the polygons - if scene_object.edges_actor is not None: - return scene_object.edges_actor + if viewer_object.edges_actor is not None: + return viewer_object.edges_actor mapper = vtkDataSetMapper() - mapper.SetInputConnection(scene_object.filters.filter.GetOutputPort()) + mapper.SetInputConnection(viewer_object.filters.filter.GetOutputPort()) mapper.ScalarVisibilityOff() self.match_edges_depth_to_polygons(mapper) actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - main_property = scene_object.actor.GetProperty() + main_property = viewer_object.actor.GetProperty() edges_property = actor.GetProperty() edges_property.SetRepresentationToWireframe() edges_property.SetLineWidth(main_property.GetLineWidth()) edges_property.SetColor(*main_property.GetEdgeColor()) - scene_object.edges_visibility = bool(main_property.GetEdgeVisibility()) - actor.SetVisibility(scene_object.actor.GetVisibility() and scene_object.edges_visibility) + viewer_object.edges_visibility = bool(main_property.GetEdgeVisibility()) + actor.SetVisibility(viewer_object.actor.GetVisibility() and viewer_object.edges_visibility) main_property.EdgeVisibilityOff() scalar_bar = vtkScalarBarActor() scalar_bar.VisibilityOff() - scene.renderer.AddActor(actor) - scene.renderer.AddViewProp(scalar_bar) - scene_object.edges_mapper = mapper - scene_object.edges_actor = actor - scene_object.edges_scalar_bar = scalar_bar + viewer.renderer.AddActor(actor) + viewer.renderer.AddViewProp(scalar_bar) + viewer_object.edges_mapper = mapper + viewer_object.edges_actor = actor + viewer_object.edges_scalar_bar = scalar_bar return actor def set_points_color(self, viewer_id: str, data_id: str, color: ColorClassProtocol) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": self.set_color(viewer_id, data_id, color) return - scene, scene_object = self.scene_and_object(viewer_id, data_id) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) rgb = [color.red / 255, color.green / 255, color.blue / 255] - scene_object.actor.GetProperty().SetVertexColor(rgb) - if scene_object.points_actor is None or scene_object.points_mapper is None: + viewer_object.actor.GetProperty().SetVertexColor(rgb) + if viewer_object.points_actor is None or viewer_object.points_mapper is None: return # A constant color replaces the points attribute and its scalar bar - scene_object.points_mapper.ScalarVisibilityOff() - scene_object.points_actor.GetProperty().SetColor(rgb) - scene_object.points_actor.GetProperty().SetOpacity(color.alpha) - if scene_object.points_scalar_bar is not None: - scene_object.points_scalar_bar.SetLookupTable(None) - scene_object.points_color_map_key = None - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + viewer_object.points_mapper.ScalarVisibilityOff() + viewer_object.points_actor.GetProperty().SetColor(rgb) + viewer_object.points_actor.GetProperty().SetOpacity(color.alpha) + if viewer_object.points_scalar_bar is not None: + viewer_object.points_scalar_bar.SetLookupTable(None) + viewer_object.points_color_map_key = None + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) def set_points_opacity(self, viewer_id: str, data_id: str, opacity: float) -> None: if self.get_viewer_data(data_id).viewer_elements_type == "points": self.set_opacity(viewer_id, data_id, opacity) return - scene_object = self.get_scene_object(viewer_id, data_id) - if scene_object.points_actor is not None: - scene_object.points_actor.GetProperty().SetOpacity(opacity) + viewer_object = self.get_viewer_object(viewer_id, data_id) + if viewer_object.points_actor is not None: + viewer_object.points_actor.GetProperty().SetOpacity(opacity) def set_blocks_visibility( self, viewer_id: str, data_id: str, block_ids: list[int], *, visibility: bool ) -> None: pipeline = self.get_vtk_pipeline(data_id) - scene_object = self.get_scene_object(viewer_id, data_id) - mapper = scene_object.mapper + viewer_object = self.get_viewer_object(viewer_id, data_id) + mapper = viewer_object.mapper if not isinstance(mapper, vtkCompositePolyDataMapper): msg = "Mapper is not a vtkCompositePolyDataMapper" raise TypeError(msg) - blocks = scene_object.filters.block_data_sets + blocks = viewer_object.filters.block_data_sets visibility_attributes = mapper.GetCompositeDataDisplayAttributes() logger.debug("visibility_attributes=%s", visibility_attributes) for block_id in block_ids: visibility_attributes.SetBlockVisibility(blocks[block_id], visibility) - scene_object.update_points_size_actors() - scene_object.update_edges_width_actors() + viewer_object.update_points_size_actors() + viewer_object.update_edges_width_actors() self.mark_basemaps_dirty([data_id]) dataset = mapper.GetInputDataObject(0, 0) if not isinstance(dataset, vtkMultiBlockDataSet): return # Re-build a pruned dataset for the dedicated pick mapper - if scene_object.pick_mapper is None: - scene_object.pick_mapper = vtkCompositePolyDataMapper() - scene_object.pick_mapper.SetInputDataObject( + if viewer_object.pick_mapper is None: + viewer_object.pick_mapper = vtkCompositePolyDataMapper() + viewer_object.pick_mapper.SetInputDataObject( pipeline.prune_hidden_blocks(dataset, visibility_attributes) ) @@ -456,10 +456,10 @@ def _apply_highlight_style(self, actor: vtkActor, mapper: vtkDataSetMapper) -> N actor.VisibilityOff() actor.UseBoundsOff() - def highlight(self, scene_object: SceneObject) -> None: - highlight = scene_object.highlight + def highlight(self, viewer_object: ViewerObject) -> None: + highlight = viewer_object.highlight self._apply_highlight_style(highlight.actor, highlight.mapper) - input_port = scene_object.filters.filter.GetOutputPort() + input_port = viewer_object.filters.filter.GetOutputPort() highlight.selection.AddNode(highlight.selection_node) highlight.extract_selection.SetInputConnection(0, input_port) highlight.extract_selection.SetInputData(1, highlight.selection) diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py index de2d0fcb..1bce2942 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py @@ -33,7 +33,7 @@ from vtkmodules.vtkRenderingAnnotation import vtkScalarBarActor from opengeodeweb_viewer.basemap_compose import LayerState - from opengeodeweb_viewer.scene import Scene, SceneObject + from opengeodeweb_viewer.viewer import Viewer, ViewerObject logger = logging.getLogger(__name__) @@ -87,7 +87,7 @@ def set_mesh_color(self, params: schemas.Color) -> schemas.ColorResponse: @typed_rpc(mesh_prefix, schemas.apply_textures_route) def mesh_apply_textures(self, params: schemas.ApplyTextures) -> schemas.ApplyTexturesResponse: mesh_id = params.id - scene_object = self.get_scene_object(params.viewer_id, mesh_id) + viewer_object = self.get_viewer_object(params.viewer_id, mesh_id) for tex_info in params.textures: texture_id = tex_info.id texture_data = Data.get(texture_id) @@ -109,7 +109,7 @@ def mesh_apply_textures(self, params: schemas.ApplyTextures) -> schemas.ApplyTex if array: output.GetPointData().SetTCoords(array) self.refresh_filters(pipeline) - scene_object.actor.SetTexture(texture) + viewer_object.actor.SetTexture(texture) return schemas.ApplyTexturesResponse() @typed_rpc(mesh_prefix, schemas.apply_basemap_route) @@ -143,9 +143,9 @@ def mesh_apply_basemap(self, params: schemas.ApplyBasemap) -> schemas.ApplyBasem output = pipeline.reader.GetOutputAsDataSet() output.GetPointData().SetTCoords(output.GetPointData().GetArray("basemap_uv")) self.refresh_filters(pipeline) - # A basemap is a global setting: every scene showing the data draws it - for scene_object in self.scene_objects_of(pipeline): - style_basemap_object(basemap, scene_object) + # A basemap is a global setting: every viewer showing the data draws it + for viewer_object in self.viewer_objects_of(pipeline): + style_basemap_object(basemap, viewer_object) if pipeline.basemap is not None: basemap.drape_ids = pipeline.basemap.drape_ids pipeline.basemap = basemap @@ -168,10 +168,10 @@ def mesh_basemap_layers(self, params: schemas.BasemapLayers) -> schemas.BasemapL basemap.layers = layers if basemap.images: compose(basemap, next(iter(basemap.images.values())).shape[:2]) - # Same geometry: the existing actors of every scene only get the new textures - for scene in self.get_scenes().values(): - if (scene_object := scene.objects.get(params.id)) is not None: - retexture(pipeline, scene_object, scene) + # Same geometry: the existing actors of every viewer only get the new textures + for viewer in self.get_viewers().values(): + if (viewer_object := viewer.objects.get(params.id)) is not None: + retexture(pipeline, viewer_object, viewer) return schemas.BasemapLayersResponse() @typed_rpc(mesh_prefix, schemas.basemap_drape_route) @@ -189,35 +189,35 @@ def mesh_basemap_drape(self, params: schemas.BasemapDrape) -> schemas.BasemapDra def display_attribute_on_vertices( self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - scene_object.color_by_array(attribute.name, attribute.item, is_point=True) - self.setup_color_map(scene, scene_object, attribute) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + viewer_object.color_by_array(attribute.name, attribute.item, is_point=True) + self.setup_color_map(viewer, viewer_object, attribute) def display_attribute_on_points( self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - self.ensure_points_actor(scene, scene_object) - if scene_object.points_mapper is None: + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + self.ensure_points_actor(viewer, viewer_object) + if viewer_object.points_mapper is None: return - scene_object.points_color_map_key = self.display_attribute_on_style_mapper( - scene_object.points_mapper, scene_object.points_scalar_bar, attribute + viewer_object.points_color_map_key = self.display_attribute_on_style_mapper( + viewer_object.points_mapper, viewer_object.points_scalar_bar, attribute ) - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) def display_attribute_on_edges( self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - self.ensure_edges_actor(scene, scene_object) - if scene_object.edges_mapper is None: + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + self.ensure_edges_actor(viewer, viewer_object) + if viewer_object.edges_mapper is None: return - scene_object.edges_color_map_key = self.display_attribute_on_style_mapper( - scene_object.edges_mapper, scene_object.edges_scalar_bar, attribute + viewer_object.edges_color_map_key = self.display_attribute_on_style_mapper( + viewer_object.edges_mapper, viewer_object.edges_scalar_bar, attribute ) - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) def display_attribute_on_style_mapper( self, @@ -255,36 +255,36 @@ def display_attribute_on_style_mapper( def display_attribute_on_cells( self, viewer_id: str, data_id: str, attribute: AttributeProtocol ) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - scene_object.color_by_array(attribute.name, attribute.item, is_point=False) - self.setup_color_map(scene, scene_object, attribute) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + viewer_object.color_by_array(attribute.name, attribute.item, is_point=False) + self.setup_color_map(viewer, viewer_object, attribute) def setup_color_map( - self, scene: Scene, scene_object: SceneObject, attribute: AttributeProtocol + self, viewer: Viewer, viewer_object: ViewerObject, attribute: AttributeProtocol ) -> None: - mapper = scene_object.mapper + mapper = viewer_object.mapper minimum = attribute.minimum maximum = attribute.maximum lut = create_color_transfer_function( attribute.points, minimum, maximum, attribute.item, attribute.no_data_color ) mapper.SetLookupTable(lut) - scene_object.color_map_points = list(attribute.points) + viewer_object.color_map_points = list(attribute.points) mapper.SetScalarRange(minimum, maximum) lut.SetRange(minimum, maximum) mapper.UseLookupTableScalarRangeOff() mapper.InterpolateScalarsBeforeMappingOn() - scene_object.scalar_bar.SetLookupTable(lut) - scene_object.scalar_bar.VisibilityOn() - self.update_style_scalar_bars_visibility(scene_object) - self.update_scalar_bars_layout(scene) + viewer_object.scalar_bar.SetLookupTable(lut) + viewer_object.scalar_bar.VisibilityOn() + self.update_style_scalar_bars_visibility(viewer_object) + self.update_scalar_bars_layout(viewer) @typed_rpc(mesh_prefix, schemas.highlight_route) def set_mesh_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: pipeline = self.get_vtk_pipeline(params.id) - highlight = self.get_scene_object(params.viewer_id, params.id).highlight + highlight = self.get_viewer_object(params.viewer_id, params.id).highlight if params.visibility: dataset = pipeline.reader.GetOutputDataObject(0) highlight.mapper.SetInputDataObject(dataset) diff --git a/src/opengeodeweb_viewer/rpc/model/model_protocols.py b/src/opengeodeweb_viewer/rpc/model/model_protocols.py index 63cab767..16c0ac2c 100644 --- a/src/opengeodeweb_viewer/rpc/model/model_protocols.py +++ b/src/opengeodeweb_viewer/rpc/model/model_protocols.py @@ -44,7 +44,7 @@ from collections.abc import Callable from enum import Enum - from opengeodeweb_viewer.scene import Scene, SceneObject + from opengeodeweb_viewer.viewer import Viewer, ViewerObject logger = logging.getLogger(__name__) @@ -112,20 +112,20 @@ def __init__(self) -> None: def apply_color(self, params: ModelColorParams) -> list[ColorResult]: pipeline = self.get_vtk_pipeline(params.id) - scene, scene_object = self.scene_and_object(params.viewer_id, params.id) + viewer, viewer_object = self.viewer_and_object(params.viewer_id, params.id) color_mode = params.color_mode.value color = params.color collection_id = params.collection_id - mapper = scene_object.mapper + mapper = viewer_object.mapper if not isinstance(mapper, vtkCompositePolyDataMapper): return [] attr = mapper.GetCompositeDataDisplayAttributes() logger.debug("attr=%s", attr) colors: list[ColorResult] = [] for block_id in params.block_ids: - scene_object.get_block_style(block_id) - scene_object.clear_block_scalars(block_id) - block_dataset = scene_object.filters.block_data_sets[block_id] + viewer_object.get_block_style(block_id) + viewer_object.clear_block_scalars(block_id) + block_dataset = viewer_object.filters.block_data_sets[block_id] if isinstance(block_dataset, vtkDataSet): if color_mode == "random": geode_id = pipeline.block_geode_ids[block_id] @@ -156,7 +156,7 @@ def apply_color(self, params: ModelColorParams) -> list[ColorResult]: attr.SetBlockColor(block_dataset, [red, green, blue]) attr.SetBlockOpacity(block_dataset, alpha) mapper.Modified() - self.setup_model_color_map(scene, scene_object) + self.setup_model_color_map(viewer, viewer_object) return colors @staticmethod @@ -186,21 +186,21 @@ def scalar_bar_key(active_attrs: dict[str, BlockStyle], style: BlockStyle, label attr_key = f"{attr_key} (Block {label})" return attr_key - def setup_model_color_map(self, scene: Scene, scene_object: SceneObject) -> None: + def setup_model_color_map(self, viewer: Viewer, viewer_object: ViewerObject) -> None: # Points attributes join the polygons ones, so identical color maps share one scalar bar displayed_styles = ( [ (block_id, str(block_id), style) - for block_id, style in scene_object.block_styles.items() + for block_id, style in viewer_object.block_styles.items() ] + [ (block_id, f"{block_id} points", points_style.attribute) - for block_id, points_style in scene_object.points_block_styles.items() + for block_id, points_style in viewer_object.points_block_styles.items() if points_style.attribute is not None and points_style.visibility ] + [ (block_id, f"{block_id} edges", edges_style.attribute) - for block_id, edges_style in scene_object.edges_block_styles.items() + for block_id, edges_style in viewer_object.edges_block_styles.items() if edges_style.attribute is not None and edges_style.visibility ] ) @@ -214,11 +214,11 @@ def setup_model_color_map(self, scene: Scene, scene_object: SceneObject) -> None if block_id not in bar_block_ids: bar_block_ids.append(block_id) for name, style in active_attrs.items(): - if name not in scene_object.scalar_bars: - scene_object.scalar_bars[name] = ModelScalarBar() - scene.renderer.AddViewProp(scene_object.scalar_bars[name].actor) - scene_object.scalar_bars[name].block_ids = active_block_ids[name] - bar = scene_object.scalar_bars[name].actor + if name not in viewer_object.scalar_bars: + viewer_object.scalar_bars[name] = ModelScalarBar() + viewer.renderer.AddViewProp(viewer_object.scalar_bars[name].actor) + viewer_object.scalar_bars[name].block_ids = active_block_ids[name] + bar = viewer_object.scalar_bars[name].actor item = style["item"] minimum = style["minimum"] maximum = style["maximum"] @@ -226,12 +226,12 @@ def setup_model_color_map(self, scene: Scene, scene_object: SceneObject) -> None no_data_color = style["no_data_color"] lut = create_color_transfer_function(points, minimum, maximum, item, no_data_color) bar.SetLookupTable(lut) - bar.SetVisibility(scene_object.actor.GetVisibility()) - for name, scalar_bar in scene_object.scalar_bars.items(): + bar.SetVisibility(viewer_object.actor.GetVisibility()) + for name, scalar_bar in viewer_object.scalar_bars.items(): if name not in active_attrs: scalar_bar.actor.VisibilityOff() - self.update_scalar_bars_layout(scene) + self.update_scalar_bars_layout(viewer) def display_attribute_on_vertices( self, viewer_id: str, data_id: str, block_ids: list[int], attribute: AttributeProtocol @@ -251,9 +251,9 @@ def display_attribute_on_blocks( attribute: AttributeProtocol, location: Literal["point", "cell"], ) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) for block_id in block_ids: - style = scene_object.get_block_style(block_id) + style = viewer_object.get_block_style(block_id) style["name"] = attribute.name style["item"] = attribute.item style["attribute_location"] = location @@ -261,54 +261,54 @@ def display_attribute_on_blocks( style["minimum"] = attribute.minimum style["maximum"] = attribute.maximum style["no_data_color"] = attribute.no_data_color - scene_object.update_block_colors(block_id) - self.setup_model_color_map(scene, scene_object) + viewer_object.update_block_colors(block_id) + self.setup_model_color_map(viewer, viewer_object) @staticmethod def ensure_model_points_styles( - pipeline: VtkPipeline, scene_object: SceneObject + pipeline: VtkPipeline, viewer_object: ViewerObject ) -> dict[int, ModelPointsStyle]: # Components points leave the main actor once styled individually - if scene_object.points_block_styles: - return scene_object.points_block_styles - main_property = scene_object.actor.GetProperty() + if viewer_object.points_block_styles: + return viewer_object.points_block_styles + main_property = viewer_object.actor.GetProperty() for block_id, component_type in pipeline.block_component_types().items(): if component_type in POINTS_COMPONENT_TYPES: - scene_object.points_block_styles[block_id] = ModelPointsStyle( + viewer_object.points_block_styles[block_id] = ModelPointsStyle( size=main_property.GetPointSize(), visibility=bool(main_property.GetVertexVisibility()), ) main_property.VertexVisibilityOff() - return scene_object.points_block_styles + return viewer_object.points_block_styles @staticmethod - def sync_points_size_actors(scene: Scene, scene_object: SceneObject) -> None: - renderer = scene.renderer - sizes = {style.size for style in scene_object.points_block_styles.values()} - for size in list(scene_object.points_size_actors): + def sync_points_size_actors(viewer: Viewer, viewer_object: ViewerObject) -> None: + renderer = viewer.renderer + sizes = {style.size for style in viewer_object.points_block_styles.values()} + for size in list(viewer_object.points_size_actors): if size not in sizes: - renderer.RemoveActor(scene_object.points_size_actors.pop(size).actor) - main_property = scene_object.actor.GetProperty() - for size in sizes - scene_object.points_size_actors.keys(): + renderer.RemoveActor(viewer_object.points_size_actors.pop(size).actor) + main_property = viewer_object.actor.GetProperty() + for size in sizes - viewer_object.points_size_actors.keys(): mapper = vtkCompositePolyDataMapper() - mapper.SetInputDataObject(scene_object.mapper.GetInputDataObject(0, 0)) + mapper.SetInputDataObject(viewer_object.mapper.GetInputDataObject(0, 0)) mapper.ScalarVisibilityOn() mapper.SetColorModeToMapScalars() mapper.SetResolveCoincidentTopologyPointOffsetParameter(-2) actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - actor.SetVisibility(scene_object.actor.GetVisibility()) + actor.SetVisibility(viewer_object.actor.GetVisibility()) points_property = actor.GetProperty() points_property.SetRepresentationToPoints() points_property.SetPointSize(size) points_property.SetColor(*main_property.GetVertexColor()) - scene_object.points_size_actors[size] = PointsSizeActor(mapper=mapper, actor=actor) + viewer_object.points_size_actors[size] = PointsSizeActor(mapper=mapper, actor=actor) # Bigger points are drawn first so smaller coincident ones stay visible on top - for size in sorted(scene_object.points_size_actors, reverse=True): - renderer.RemoveActor(scene_object.points_size_actors[size].actor) - renderer.AddActor(scene_object.points_size_actors[size].actor) - scene_object.update_points_size_actors() + for size in sorted(viewer_object.points_size_actors, reverse=True): + renderer.RemoveActor(viewer_object.points_size_actors[size].actor) + renderer.AddActor(viewer_object.points_size_actors[size].actor) + viewer_object.update_points_size_actors() def update_component_points( self, @@ -320,14 +320,14 @@ def update_component_points( ) -> None: """Apply update to the points style of each component, then redraw the points actors.""" pipeline = self.get_vtk_pipeline(data_id) - scene, scene_object = self.scene_and_object(viewer_id, data_id) - styles = self.ensure_model_points_styles(pipeline, scene_object) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + styles = self.ensure_model_points_styles(pipeline, viewer_object) component_types = pipeline.block_component_types() for block_id in block_ids: if block_id in styles and component_types.get(block_id) == component_type: update(styles[block_id]) - self.sync_points_size_actors(scene, scene_object) - self.setup_model_color_map(scene, scene_object) + self.sync_points_size_actors(viewer, viewer_object) + self.setup_model_color_map(viewer, viewer_object) def set_component_points_visibility( self, @@ -382,63 +382,63 @@ def update(style: ModelPointsStyle) -> None: def set_model_points_visibility_on_all( self, viewer_id: str, data_id: str, *, visibility: bool ) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - if not scene_object.points_block_styles: + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + if not viewer_object.points_block_styles: self.set_points_visibility(viewer_id, data_id, visibility=visibility) return - for style in scene_object.points_block_styles.values(): + for style in viewer_object.points_block_styles.values(): style.visibility = visibility - self.sync_points_size_actors(scene, scene_object) - self.setup_model_color_map(scene, scene_object) + self.sync_points_size_actors(viewer, viewer_object) + self.setup_model_color_map(viewer, viewer_object) def set_model_points_size_on_all(self, viewer_id: str, data_id: str, size: float) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) self.set_points_size(viewer_id, data_id, size) - for style in scene_object.points_block_styles.values(): + for style in viewer_object.points_block_styles.values(): style.size = size - self.sync_points_size_actors(scene, scene_object) + self.sync_points_size_actors(viewer, viewer_object) @staticmethod def ensure_model_edges_styles( - pipeline: VtkPipeline, scene_object: SceneObject + pipeline: VtkPipeline, viewer_object: ViewerObject ) -> dict[int, ModelEdgesStyle]: # Components edges leave the main actor once styled individually - if scene_object.edges_block_styles: - return scene_object.edges_block_styles - main_property = scene_object.actor.GetProperty() + if viewer_object.edges_block_styles: + return viewer_object.edges_block_styles + main_property = viewer_object.actor.GetProperty() red, green, blue = main_property.GetEdgeColor() for block_id, component_type in pipeline.block_component_types().items(): if component_type in EDGES_COMPONENT_TYPES: - scene_object.edges_block_styles[block_id] = ModelEdgesStyle( + viewer_object.edges_block_styles[block_id] = ModelEdgesStyle( width=main_property.GetEdgeWidth(), visibility=bool(main_property.GetEdgeVisibility()), color=(red, green, blue), ) main_property.EdgeVisibilityOff() - return scene_object.edges_block_styles + return viewer_object.edges_block_styles - def sync_edges_width_actors(self, scene: Scene, scene_object: SceneObject) -> None: - renderer = scene.renderer - widths = {style.width for style in scene_object.edges_block_styles.values()} - for width in list(scene_object.edges_width_actors): + def sync_edges_width_actors(self, viewer: Viewer, viewer_object: ViewerObject) -> None: + renderer = viewer.renderer + widths = {style.width for style in viewer_object.edges_block_styles.values()} + for width in list(viewer_object.edges_width_actors): if width not in widths: - renderer.RemoveActor(scene_object.edges_width_actors.pop(width).actor) - for width in widths - scene_object.edges_width_actors.keys(): + renderer.RemoveActor(viewer_object.edges_width_actors.pop(width).actor) + for width in widths - viewer_object.edges_width_actors.keys(): mapper = vtkCompositePolyDataMapper() - mapper.SetInputDataObject(scene_object.mapper.GetInputDataObject(0, 0)) + mapper.SetInputDataObject(viewer_object.mapper.GetInputDataObject(0, 0)) mapper.ScalarVisibilityOn() mapper.SetColorModeToMapScalars() self.match_edges_depth_to_polygons(mapper) actor = vtkActor() actor.SetMapper(mapper) actor.PickableOff() - actor.SetVisibility(scene_object.actor.GetVisibility()) + actor.SetVisibility(viewer_object.actor.GetVisibility()) edges_property = actor.GetProperty() edges_property.SetRepresentationToWireframe() edges_property.SetLineWidth(width) - scene_object.edges_width_actors[width] = EdgesWidthActor(mapper=mapper, actor=actor) + viewer_object.edges_width_actors[width] = EdgesWidthActor(mapper=mapper, actor=actor) renderer.AddActor(actor) - scene_object.update_edges_width_actors() + viewer_object.update_edges_width_actors() def update_component_edges( self, @@ -450,14 +450,14 @@ def update_component_edges( ) -> None: """Apply update to the edges style of each component, then redraw the edges actors.""" pipeline = self.get_vtk_pipeline(data_id) - scene, scene_object = self.scene_and_object(viewer_id, data_id) - styles = self.ensure_model_edges_styles(pipeline, scene_object) + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + styles = self.ensure_model_edges_styles(pipeline, viewer_object) component_types = pipeline.block_component_types() for block_id in block_ids: if block_id in styles and component_types.get(block_id) == component_type: update(styles[block_id]) - self.sync_edges_width_actors(scene, scene_object) - self.setup_model_color_map(scene, scene_object) + self.sync_edges_width_actors(viewer, viewer_object) + self.setup_model_color_map(viewer, viewer_object) def set_component_edges_visibility( self, @@ -512,23 +512,23 @@ def update(style: ModelEdgesStyle) -> None: def set_model_edges_visibility_on_all( self, viewer_id: str, data_id: str, *, visibility: bool ) -> None: - scene, scene_object = self.scene_and_object(viewer_id, data_id) - if not scene_object.edges_block_styles: + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + if not viewer_object.edges_block_styles: self.set_edges_visibility(viewer_id, data_id, visibility=visibility) return - for style in scene_object.edges_block_styles.values(): + for style in viewer_object.edges_block_styles.values(): style.visibility = visibility - self.sync_edges_width_actors(scene, scene_object) - self.setup_model_color_map(scene, scene_object) + self.sync_edges_width_actors(viewer, viewer_object) + self.setup_model_color_map(viewer, viewer_object) def set_model_edges_width_on_all(self, viewer_id: str, data_id: str, width: float) -> None: # The main actor line width would also resize the lines, so edges always use their styles pipeline = self.get_vtk_pipeline(data_id) - scene, scene_object = self.scene_and_object(viewer_id, data_id) - scene_object.actor.GetProperty().SetEdgeWidth(width) - for style in self.ensure_model_edges_styles(pipeline, scene_object).values(): + viewer, viewer_object = self.viewer_and_object(viewer_id, data_id) + viewer_object.actor.GetProperty().SetEdgeWidth(width) + for style in self.ensure_model_edges_styles(pipeline, viewer_object).values(): style.width = width - self.sync_edges_width_actors(scene, scene_object) + self.sync_edges_width_actors(viewer, viewer_object) @typed_rpc(model_prefix, schemas.register_route) def register_model(self, params: schemas.Register) -> schemas.RegisterResponse: @@ -572,16 +572,16 @@ def set_model_visibility(self, params: schemas.Visibility) -> schemas.Visibility self.set_visibility(params.viewer_id, params.id, visibility=params.visibility) if params.visibility: # Bars come back from the displayed attributes, hidden components' ones stay hidden - self.setup_model_color_map(*self.scene_and_object(params.viewer_id, params.id)) + self.setup_model_color_map(*self.viewer_and_object(params.viewer_id, params.id)) return schemas.VisibilityResponse() @typed_rpc(model_prefix, schemas.highlight_route) def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: - scene_object = self.get_scene_object(params.viewer_id, params.id) - highlight = scene_object.highlight + viewer_object = self.get_viewer_object(params.viewer_id, params.id) + highlight = viewer_object.highlight if params.visibility and params.block_ids: append = vtkAppendDataSets() - block_data_sets = scene_object.filters.block_data_sets + block_data_sets = viewer_object.filters.block_data_sets for i in params.block_ids: block = block_data_sets[i] if i < len(block_data_sets) else None if isinstance(block, vtkDataSet): @@ -597,7 +597,7 @@ def set_model_highlight(self, params: schemas.Highlight) -> schemas.HighlightRes @typed_rpc(model_prefix, schemas.get_blocks_bounds_route) def get_blocks_bounds(self, params: schemas.GetBlocksBounds) -> schemas.GetBlocksBoundsResponse: pipeline = self.get_vtk_pipeline(params.id) - # Data only: the bounds of the source, whatever the filters of the scenes + # Data only: the bounds of the source, whatever the filters of the viewers blocks = pipeline.extract_blocks(pipeline.filter.GetOutputDataObject(0)) bbox = vtkBoundingBox() for block_id in params.block_ids: diff --git a/src/opengeodeweb_viewer/rpc/utils_protocols.py b/src/opengeodeweb_viewer/rpc/utils_protocols.py index 42d076a8..5a1a68a3 100644 --- a/src/opengeodeweb_viewer/rpc/utils_protocols.py +++ b/src/opengeodeweb_viewer/rpc/utils_protocols.py @@ -41,9 +41,9 @@ def rendering_warnings( @typed_rpc(utils_prefix, schemas.import_project_route) def import_project(self, _params: schemas.ImportProject) -> schemas.ImportProjectResponse: - for scene in self.get_scenes().values(): - scene.dispose() - self.get_scenes().clear() + for viewer in self.get_viewers().values(): + viewer.dispose() + self.get_viewers().clear() self.get_data_base().clear() self._release_database() diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index 793399bc..f6a44ccf 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -32,9 +32,9 @@ from opengeodeweb_viewer.orientation_marker import NO_MARKER, build_marker, style_marker from opengeodeweb_viewer.rpc.viewer import schemas from opengeodeweb_viewer.rpc.viewer.schemas.explode import ExplodedBound -from opengeodeweb_viewer.scene import Scene from opengeodeweb_viewer.text_style import TextStyle from opengeodeweb_viewer.typed_rpc import typed_rpc +from opengeodeweb_viewer.viewer import Viewer # Local application imports from opengeodeweb_viewer.vtk_pipeline import ClippingPlanePreview @@ -55,52 +55,52 @@ def __init__(self) -> None: @typed_rpc(viewer_prefix, schemas.create_viewer_route) def create_viewer(self, params: schemas.CreateViewer) -> schemas.CreateViewerResponse: - scenes = self.get_scenes() - if params.viewer_id in scenes: + viewers = self.get_viewers() + if params.viewer_id in viewers: raise ValueError( { "code": 409, "name": "Conflict", - "description": f"Scene {params.viewer_id} already exists", + "description": f"Viewer {params.viewer_id} already exists", } ) - scene = Scene.create(params.viewer_id, self.getApplication().GetObjectIdMap()) - scenes[params.viewer_id] = scene - return schemas.CreateViewerResponse(view_id=scene.view_id) + viewer = Viewer.create(params.viewer_id, self.getApplication().GetObjectIdMap()) + viewers[params.viewer_id] = viewer + return schemas.CreateViewerResponse(view_id=viewer.view_id) @typed_rpc(viewer_prefix, schemas.delete_viewer_route) def delete_viewer(self, params: schemas.DeleteViewer) -> schemas.DeleteViewerResponse: - # The data pipelines stay in the db: only the scene and its objects go - self.get_scene(params.viewer_id).dispose() - del self.get_scenes()[params.viewer_id] + # The data pipelines stay in the db: only the viewer and its objects go + self.get_viewer(params.viewer_id).dispose() + del self.get_viewers()[params.viewer_id] return schemas.DeleteViewerResponse() @typed_rpc(viewer_prefix, schemas.reset_viewers_route) def reset_viewers(self, _params: schemas.ResetViewers) -> schemas.ResetViewersResponse: - # A front that connects again starts from no scene: the data pipelines stay in the db - scenes = self.get_scenes() - for scene in scenes.values(): - scene.dispose() - scenes.clear() + # A front that connects again starts from no viewer: the data pipelines stay in the db + viewers = self.get_viewers() + for viewer in viewers.values(): + viewer.dispose() + viewers.clear() return schemas.ResetViewersResponse() @typed_rpc(viewer_prefix, schemas.add_to_viewer_route) def add_to_viewer(self, params: schemas.AddToViewer) -> schemas.AddToViewerResponse: - self.add_object(self.get_scene(params.viewer_id), params.id) + self.add_object(self.get_viewer(params.viewer_id), params.id) return schemas.AddToViewerResponse() @typed_rpc(viewer_prefix, schemas.remove_from_viewer_route) def remove_from_viewer( self, params: schemas.RemoveFromViewer ) -> schemas.RemoveFromViewerResponse: - self.remove_object(self.get_scene(params.viewer_id), params.id) + self.remove_object(self.get_viewer(params.viewer_id), params.id) return schemas.RemoveFromViewerResponse() @typed_rpc(viewer_prefix, schemas.reset_visualization_route) def reset_visualization( self, params: schemas.ResetVisualization ) -> schemas.ResetVisualizationResponse: - self.get_scene(params.viewer_id).reset() + self.get_viewer(params.viewer_id).reset() return schemas.ResetVisualizationResponse() @typed_rpc(viewer_prefix, schemas.set_background_color_route) @@ -108,15 +108,15 @@ def set_background_color( self, params: schemas.SetBackgroundColor ) -> schemas.SetBackgroundColorResponse: color = params.color - renderer = self.get_scene(params.viewer_id).renderer + renderer = self.get_viewer(params.viewer_id).renderer renderer.SetBackground([color.red / 255, color.green / 255, color.blue / 255]) return schemas.SetBackgroundColorResponse() @typed_rpc(viewer_prefix, schemas.set_text_style_route) def update_text_style(self, params: schemas.SetTextStyle) -> schemas.SetTextStyleResponse: color = params.color - scene = self.get_scene(params.viewer_id) - scene.text_style = TextStyle( + viewer = self.get_viewer(params.viewer_id) + viewer.text_style = TextStyle( color=(color.red, color.green, color.blue), font_family=params.font_family.value, opacity=params.opacity, @@ -128,8 +128,8 @@ def update_text_style(self, params: schemas.SetTextStyle) -> schemas.SetTextStyl def update_orientation_widget( self, params: schemas.SetOrientationWidget ) -> schemas.SetOrientationWidgetResponse: - scene = self.get_scene(params.viewer_id) - widget = scene.widget + viewer = self.get_viewer(params.viewer_id) + widget = viewer.widget visibility = widget.GetOrientationMarker().GetVisibility() widget.EnabledOff() if params.marker.value == NO_MARKER: @@ -139,7 +139,7 @@ def update_orientation_widget( widget.GetOrientationMarker().SetVisibility(visibility) return schemas.SetOrientationWidgetResponse() marker = build_marker(params.marker.value) - style_marker(marker, scene.text_style) + style_marker(marker, viewer.text_style) widget.SetOrientationMarker(marker) widget.EnabledOn() widget.InteractiveOff() @@ -148,12 +148,12 @@ def update_orientation_widget( @typed_rpc(viewer_prefix, schemas.reset_camera_route) def reset_camera(self, params: schemas.ResetCamera) -> schemas.ResetCameraResponse: - self.get_scene(params.viewer_id).renderer.ResetCamera() + self.get_viewer(params.viewer_id).renderer.ResetCamera() return schemas.ResetCameraResponse() @typed_rpc(viewer_prefix, schemas.take_screenshot_route) def take_screenshot(self, params: schemas.TakeScreenshot) -> schemas.TakeScreenshotResponse: - render_window = self.get_scene(params.viewer_id).render_window + render_window = self.get_viewer(params.viewer_id).render_window w2if = vtkWindowToImageFilter() include_background = params.include_background @@ -207,16 +207,16 @@ def take_screenshot(self, params: schemas.TakeScreenshot) -> schemas.TakeScreens @typed_rpc(viewer_prefix, schemas.update_data_route) def update_data(self, params: schemas.UpdateData) -> schemas.UpdateDataResponse: data = self.get_vtk_pipeline(params.id) - # Validates the scene: the new data reaches every scene showing it - self.get_scene_object(params.viewer_id, params.id) + # Validates the viewer: the new data reaches every viewer showing it + self.get_viewer_object(params.viewer_id, params.id) reader = data.reader reader.Update() output = reader.GetOutputDataObject(0) if not isinstance(output, vtkDataSet): msg = "Output is not a vtkDataSet" raise TypeError(msg) - for scene_object in self.scene_objects_of(data): - mapper = scene_object.mapper + for viewer_object in self.viewer_objects_of(data): + mapper = viewer_object.mapper tag: Any = reference(0) scalars = vtkAbstractMapper.GetAbstractScalars( output, @@ -234,7 +234,7 @@ def update_data(self, params: schemas.UpdateData) -> schemas.UpdateDataResponse: def get_point_position( self, params: schemas.GetPointPosition ) -> schemas.GetPointPositionResponse: - renderer = self.get_scene(params.viewer_id).renderer + renderer = self.get_viewer(params.viewer_id).renderer # If clicking on an object prop_picker = vtkPropPicker() if prop_picker.Pick(params.x, params.y, 0.0, renderer): @@ -248,20 +248,20 @@ def get_point_position( @typed_rpc(viewer_prefix, schemas.pick_colormap_route) def pick_colormap(self, params: schemas.PickColormap) -> schemas.PickColormapResponse: - scene = self.get_scene(params.viewer_id) - size = scene.render_window.GetSize() + viewer = self.get_viewer(params.viewer_id) + size = viewer.render_window.GetSize() nx = params.x / size[0] ny = 1.0 - (params.y / size[1]) - for data_id, scene_object in scene.objects.items(): + for data_id, viewer_object in viewer.objects.items(): # A model has one scalar bar per attribute, each coloring some of its blocks - if isinstance(scene_object.mapper, vtkCompositePolyDataMapper): - for scalar_bar in scene_object.scalar_bars.values(): + if isinstance(viewer_object.mapper, vtkCompositePolyDataMapper): + for scalar_bar in viewer_object.scalar_bars.values(): if self.is_scalar_bar_clicked(scalar_bar.actor, nx, ny): return schemas.PickColormapResponse( data_id=data_id, block_ids=scalar_bar.block_ids ) - elif self.is_scalar_bar_clicked(scene_object.scalar_bar, nx, ny): + elif self.is_scalar_bar_clicked(viewer_object.scalar_bar, nx, ny): return schemas.PickColormapResponse(data_id=data_id) return schemas.PickColormapResponse() @@ -291,16 +291,16 @@ def compute_epsilon(self, renderer: vtkRenderer, z: float) -> float: @typed_rpc(viewer_prefix, schemas.picked_ids_route) def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: picker = vtkCellPicker(tolerance=0.005) - scene = self.get_scene(params.viewer_id) + viewer = self.get_viewer(params.viewer_id) # Retrieve all actors under the clicked coordinates actors, flat_index = self.pick_actors_under_coordinate( - scene, params.ids, params.x, params.y, picker + viewer, params.ids, params.x, params.y, picker ) # Filter pipeline IDs whose actors are in the picked list array_ids = [ data_id for data_id in params.ids - if self.get_scene_object(params.viewer_id, data_id).actor in actors + if self.get_viewer_object(params.viewer_id, data_id).actor in actors ] if not array_ids: return schemas.PickedIDSResponse(array_ids=[]) @@ -309,12 +309,12 @@ def picked_ids(self, params: schemas.PickedIDS) -> schemas.PickedIDSResponse: @typed_rpc(viewer_prefix, schemas.grid_scale_route) def toggle_grid_scale(self, params: schemas.GridScale) -> schemas.GridScaleResponse: - self.get_scene(params.viewer_id).grid_scale.SetVisibility(params.visibility) + self.get_viewer(params.viewer_id).grid_scale.SetVisibility(params.visibility) return schemas.GridScaleResponse() @typed_rpc(viewer_prefix, schemas.axes_route) def toggle_axes(self, params: schemas.Axes) -> schemas.AxesResponse: - self.get_scene(params.viewer_id).widget.GetOrientationMarker().SetVisibility( + self.get_viewer(params.viewer_id).widget.GetOrientationMarker().SetVisibility( params.visibility ) return schemas.AxesResponse() @@ -322,15 +322,15 @@ def toggle_axes(self, params: schemas.Axes) -> schemas.AxesResponse: @typed_rpc(viewer_prefix, schemas.update_camera_route) def update_camera(self, params: schemas.UpdateCamera) -> schemas.UpdateCameraResponse: camera_options = params.camera_options - scene = self.get_scene(params.viewer_id) - camera = scene.renderer.GetActiveCamera() + viewer = self.get_viewer(params.viewer_id) + camera = viewer.renderer.GetActiveCamera() camera.SetFocalPoint(camera_options.focal_point) camera.SetViewUp(camera_options.view_up) camera.SetPosition(camera_options.position) camera.SetViewAngle(camera_options.view_angle) camera.SetClippingRange(camera_options.clipping_range) - scene.ruler.update_scale(scene.renderer) + viewer.ruler.update_scale(viewer.renderer) return schemas.UpdateCameraResponse() @typed_rpc(viewer_prefix, schemas.render_route) @@ -340,26 +340,26 @@ def render_now(self, params: schemas.Render) -> schemas.RenderResponse: @typed_rpc(viewer_prefix, schemas.highlight_route) def set_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: - scene = self.get_scene(params.viewer_id) + viewer = self.get_viewer(params.viewer_id) # Clear previous highlights - self.clear_highlights(scene, params.ids) + self.clear_highlights(viewer, params.ids) picker = vtkCellPicker(tolerance=0.005) # Perform pick operation to identify clicked pipeline and primitive ID data_id, id_to_select = self.pick_cell_or_point( - scene, params.ids, (params.x, params.y), params.field_type.value, picker + viewer, params.ids, (params.x, params.y), params.field_type.value, picker ) if not data_id or id_to_select == -1: self.render(params.viewer_id) return schemas.HighlightResponse() # Retrieve picked composite block information pipeline = self.get_vtk_pipeline(data_id) - scene_object = self.get_scene_object(params.viewer_id, data_id) - dataset, geode_id = self.get_composite_block_info(pipeline, scene_object, picker) + viewer_object = self.get_viewer_object(params.viewer_id, data_id) + dataset, geode_id = self.get_composite_block_info(pipeline, viewer_object, picker) # Update highlight visibility and extract attributes from the picked element - self.update_highlight(scene_object, id_to_select, params.field_type.value, dataset) + self.update_highlight(viewer_object, id_to_select, params.field_type.value, dataset) self.render(params.viewer_id) data_attributes = self.extract_picked_attributes( - scene_object, id_to_select, params.field_type.value, dataset + viewer_object, id_to_select, params.field_type.value, dataset ) return schemas.HighlightResponse( id=data_id, @@ -373,21 +373,21 @@ def set_highlight(self, params: schemas.Highlight) -> schemas.HighlightResponse: def set_clipping_planes_rpc( self, params: schemas.ClippingPlanes ) -> schemas.ClippingPlanesResponse: - scene = self.get_scene(params.viewer_id) - self.set_clipping_planes(scene, params.ids, params.planes) - self._update_clipping_plane_previews(scene, params.ids, params.planes) + viewer = self.get_viewer(params.viewer_id) + self.set_clipping_planes(viewer, params.ids, params.planes) + self._update_clipping_plane_previews(viewer, params.ids, params.planes) return schemas.ClippingPlanesResponse() @typed_rpc(viewer_prefix, schemas.shrink_route) def set_shrink_rpc(self, params: schemas.Shrink) -> schemas.ShrinkResponse: - scene = self.get_scene(params.viewer_id) - self.set_shrink(scene, params.ids, params.shrink_factor) + viewer = self.get_viewer(params.viewer_id) + self.set_shrink(viewer, params.ids, params.shrink_factor) return schemas.ShrinkResponse() @typed_rpc(viewer_prefix, schemas.explode_route) def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: - scene = self.get_scene(params.viewer_id) - exploded_bounds = self.set_explode(scene, params.ids, params.explode_factor) + viewer = self.get_viewer(params.viewer_id) + exploded_bounds = self.set_explode(viewer, params.ids, params.explode_factor) return schemas.ExplodeResponse( exploded_bounds=[ ExplodedBound(id=data_id, bounds=bounds) @@ -397,38 +397,38 @@ def set_explode_rpc(self, params: schemas.Explode) -> schemas.ExplodeResponse: @typed_rpc(viewer_prefix, schemas.slice_route) def set_slice_rpc(self, params: schemas.Slice) -> schemas.SliceResponse: - scene = self.get_scene(params.viewer_id) - return schemas.SliceResponse(max_indices=self.set_slice(scene, params.ids, params.slices)) + viewer = self.get_viewer(params.viewer_id) + return schemas.SliceResponse(max_indices=self.set_slice(viewer, params.ids, params.slices)) @typed_rpc(viewer_prefix, schemas.threshold_route) def set_threshold_rpc(self, params: schemas.Threshold) -> schemas.ThresholdResponse: - scene = self.get_scene(params.viewer_id) - self.set_threshold(scene, params.ids, params.attributes) + viewer = self.get_viewer(params.viewer_id) + self.set_threshold(viewer, params.ids, params.attributes) return schemas.ThresholdResponse() @typed_rpc(viewer_prefix, schemas.set_z_scaling_route) def set_z_scaling(self, params: schemas.SetZScaling) -> schemas.SetZScalingResponse: - scene = self.get_scene(params.viewer_id) - cam = scene.renderer.GetActiveCamera() + viewer = self.get_viewer(params.viewer_id) + cam = viewer.renderer.GetActiveCamera() transform = vtkTransform() transform.Scale(1, 1, params.z_scale) cam.SetModelTransformMatrix(transform.GetMatrix()) - scene.grid_scale.SetUse2DMode(True) # noqa: FBT003 VTK API + viewer.grid_scale.SetUse2DMode(True) # noqa: FBT003 VTK API return schemas.SetZScalingResponse() @typed_rpc(viewer_prefix, schemas.preview_points_route) def preview_points(self, params: schemas.PreviewPoints) -> schemas.PreviewPointsResponse: - scene = self.get_scene(params.viewer_id) + viewer = self.get_viewer(params.viewer_id) points_data = params.points style_name = params.style.value if hasattr(params.style, "value") else params.style if not points_data: - if scene.preview_actor is not None: - scene.renderer.RemoveActor(scene.preview_actor) - scene.preview_actor = None + if viewer.preview_actor is not None: + viewer.renderer.RemoveActor(viewer.preview_actor) + viewer.preview_actor = None self.render(params.viewer_id) return schemas.PreviewPointsResponse() - polydata = self._ensure_preview_polydata(scene) + polydata = self._ensure_preview_polydata(viewer) points = polydata.GetPoints() verts = polydata.GetVerts() points.Reset() @@ -457,18 +457,18 @@ def preview_points(self, params: schemas.PreviewPoints) -> schemas.PreviewPoints return schemas.PreviewPointsResponse() def _update_clipping_plane_previews( - self, scene: Scene, data_ids: list[str], planes_data: list[schemas.Plane] + self, viewer: Viewer, data_ids: list[str], planes_data: list[schemas.Plane] ) -> None: # Unclipping some data must keep the previews of the data still clipped if not planes_data and any( - scene_object.filters.clipping_filter is not None - for scene_object in scene.objects.values() + viewer_object.filters.clipping_filter is not None + for viewer_object in viewer.objects.values() ): return - renderer = scene.renderer - for preview in scene.clipping_plane_previews: + renderer = viewer.renderer + for preview in viewer.clipping_plane_previews: renderer.RemoveActor(preview.actor) - scene.clipping_plane_previews = [] + viewer.clipping_plane_previews = [] # Unclipped bounds of the targets, so successive calls do not shrink the previews bounding_box = vtkBoundingBox() bounds = [0.0] * 6 @@ -488,11 +488,11 @@ def _update_clipping_plane_previews( color=plane_info.color, ) renderer.AddActor(preview.actor) - scene.clipping_plane_previews.append(preview) + viewer.clipping_plane_previews.append(preview) @staticmethod - def _ensure_preview_polydata(scene: Scene) -> vtkPolyData: - if scene.preview_actor is None: + def _ensure_preview_polydata(viewer: Viewer) -> vtkPolyData: + if viewer.preview_actor is None: polydata = vtkPolyData() polydata.SetPoints(vtkPoints()) polydata.SetVerts(vtkCellArray()) @@ -500,13 +500,13 @@ def _ensure_preview_polydata(scene: Scene) -> vtkPolyData: mapper.SetInputData(polydata) mapper.ScalarVisibilityOn() mapper.SetColorModeToDirectScalars() - scene.preview_actor = vtkActor() - scene.preview_actor.SetMapper(mapper) - prop = scene.preview_actor.GetProperty() + viewer.preview_actor = vtkActor() + viewer.preview_actor.SetMapper(mapper) + prop = viewer.preview_actor.GetProperty() prop.SetPointSize(10) prop.SetLineWidth(2) - scene.renderer.AddActor(scene.preview_actor) - return cast("vtkPolyData", scene.preview_actor.GetMapper().GetInput()) + viewer.renderer.AddActor(viewer.preview_actor) + return cast("vtkPolyData", viewer.preview_actor.GetMapper().GetInput()) @staticmethod def _preview_cells( @@ -527,13 +527,13 @@ def _preview_cells( @typed_rpc(viewer_prefix, schemas.ruler_route) def set_ruler_rpc(self, params: schemas.Ruler) -> schemas.RulerResponse: - scene = self.get_scene(params.viewer_id) + viewer = self.get_viewer(params.viewer_id) point1 = params.points[0] point2 = params.points[1] if len(params.points) > 1 else None - distance = scene.ruler.set_endpoints(point1, point2, renderer=scene.renderer) + distance = viewer.ruler.set_endpoints(point1, point2, renderer=viewer.renderer) return schemas.RulerResponse(distance=distance, point1=point1, point2=point2) @typed_rpc(viewer_prefix, schemas.reset_ruler_route) def reset_ruler(self, params: schemas.ResetRuler) -> schemas.ResetRulerResponse: - self.get_scene(params.viewer_id).ruler.reset() + self.get_viewer(params.viewer_id).ruler.reset() return schemas.ResetRulerResponse() diff --git a/src/opengeodeweb_viewer/scene/__init__.py b/src/opengeodeweb_viewer/scene/__init__.py deleted file mode 100644 index 4ea18504..00000000 --- a/src/opengeodeweb_viewer/scene/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from opengeodeweb_viewer.scene.scene import Scene -from opengeodeweb_viewer.scene.scene_filters import SceneFilters -from opengeodeweb_viewer.scene.scene_object import SceneObject, sync_composite_pipeline - -__all__ = ["Scene", "SceneFilters", "SceneObject", "sync_composite_pipeline"] diff --git a/src/opengeodeweb_viewer/viewer/__init__.py b/src/opengeodeweb_viewer/viewer/__init__.py new file mode 100644 index 00000000..955f481e --- /dev/null +++ b/src/opengeodeweb_viewer/viewer/__init__.py @@ -0,0 +1,5 @@ +from opengeodeweb_viewer.viewer.viewer import Viewer +from opengeodeweb_viewer.viewer.viewer_filters import ViewerFilters +from opengeodeweb_viewer.viewer.viewer_object import ViewerObject, sync_composite_pipeline + +__all__ = ["Viewer", "ViewerFilters", "ViewerObject", "sync_composite_pipeline"] diff --git a/src/opengeodeweb_viewer/scene/scene.py b/src/opengeodeweb_viewer/viewer/viewer.py similarity index 92% rename from src/opengeodeweb_viewer/scene/scene.py rename to src/opengeodeweb_viewer/viewer/viewer.py index 8ab87747..48756548 100644 --- a/src/opengeodeweb_viewer/scene/scene.py +++ b/src/opengeodeweb_viewer/viewer/viewer.py @@ -21,14 +21,14 @@ if TYPE_CHECKING: from vtkmodules.vtkWebCore import vtkObjectIdMap - from opengeodeweb_viewer.scene.scene_object import SceneObject + from opengeodeweb_viewer.viewer.viewer_object import ViewerObject DEFAULT_BACKGROUND = (180 / 255, 180 / 255, 180 / 255) @dataclass -class Scene: - """Everything one view shows: its own render window, scene widgets and data render side.""" +class Viewer: + """Everything one view shows: its own render window, viewer widgets and data render side.""" viewer_id: str view_id: str @@ -44,13 +44,13 @@ class Scene: basemaps_dirty: bool = False preview_actor: vtkActor | None = None clipping_plane_previews: list[ClippingPlanePreview] = field(default_factory=list) - objects: dict[str, SceneObject] = field(default_factory=dict) + objects: dict[str, ViewerObject] = field(default_factory=dict) def __post_init__(self) -> None: self.reset() @classmethod - def create(cls, viewer_id: str, object_id_map: vtkObjectIdMap) -> Scene: + def create(cls, viewer_id: str, object_id_map: vtkObjectIdMap) -> Viewer: renderer = vtkRenderer() render_window = vtkRenderWindow() render_window.AddRenderer(renderer) @@ -115,7 +115,7 @@ def reset(self) -> None: renderer.ResetCamera() def apply_text_style(self) -> None: - """Style the scene widgets: the scalar bars layout is the caller's, it needs the data.""" + """Style the viewer widgets: the scalar bars layout is the caller's, it needs the data.""" style = self.text_style style_grid_scale(self.grid_scale, style) style_marker(self.widget.GetOrientationMarker(), style) diff --git a/src/opengeodeweb_viewer/scene/scene_filters.py b/src/opengeodeweb_viewer/viewer/viewer_filters.py similarity index 85% rename from src/opengeodeweb_viewer/scene/scene_filters.py rename to src/opengeodeweb_viewer/viewer/viewer_filters.py index e6aa70cc..ad2cf558 100644 --- a/src/opengeodeweb_viewer/scene/scene_filters.py +++ b/src/opengeodeweb_viewer/viewer/viewer_filters.py @@ -17,10 +17,10 @@ @dataclass -class SceneFilters: - """The filter chain of a data in one scene: a filter acts on its scene only.""" +class ViewerFilters: + """The filter chain of a data in one viewer: a filter acts on its viewer only.""" - # The filtered output of the scene, the input of its mappers + # The filtered output of the viewer, the input of its mappers filter: vtkGeometryFilter = field(default_factory=vtkGeometryFilter) slice_filter: vtkAppendFilter | None = None clipping_filter: vtkExtractGeometry | vtkTableBasedClipDataSet | None = None @@ -29,5 +29,5 @@ class SceneFilters: threshold_filters: list[vtkThreshold] = field(default_factory=list) shrink_filter: vtkShrinkFilter | None = None explode_factor: float = 0.0 - # The blocks of the filtered output, which the display attributes of the scene key on + # The blocks of the filtered output, which the display attributes of the viewer key on block_data_sets: list[vtkDataObject | None] = field(default_factory=list) diff --git a/src/opengeodeweb_viewer/scene/scene_object.py b/src/opengeodeweb_viewer/viewer/viewer_object.py similarity index 94% rename from src/opengeodeweb_viewer/scene/scene_object.py rename to src/opengeodeweb_viewer/viewer/viewer_object.py index 718fd9ff..07a747dd 100644 --- a/src/opengeodeweb_viewer/scene/scene_object.py +++ b/src/opengeodeweb_viewer/viewer/viewer_object.py @@ -23,9 +23,10 @@ vtkMapper, ) -# Local application imports -from opengeodeweb_viewer.scene.scene_filters import SceneFilters from opengeodeweb_viewer.utils_functions import create_color_transfer_function + +# Local application imports +from opengeodeweb_viewer.viewer.viewer_filters import ViewerFilters from opengeodeweb_viewer.vtk_pipeline import ( BlockStyle, ColorMapKey, @@ -44,15 +45,15 @@ @dataclass -class SceneObject: - """The render side of a data in one scene: its data side is the shared VtkPipeline.""" +class ViewerObject: + """The render side of a data in one viewer: its data side is the shared VtkPipeline.""" mapper: vtkMapper actor: vtkActor = field(default_factory=vtkActor) # Set by set_visibility: the basemap actors also hide on their own, without forgetting it visibility: bool = True - # The filters of the data in this scene only: the shared data is never filtered - filters: SceneFilters = field(default_factory=SceneFilters) + # The filters of the data in this viewer only: the shared data is never filtered + filters: ViewerFilters = field(default_factory=ViewerFilters) highlight: HighlightPipeline = field(default_factory=HighlightPipeline) scalar_bar: vtkScalarBarActor = field(default_factory=vtkScalarBarActor) scalar_bars: dict[str, ModelScalarBar] = field(default_factory=dict) @@ -81,7 +82,7 @@ class SceneObject: edges_block_styles: dict[int, ModelEdgesStyle] = field(default_factory=dict) # Set by apply_basemap on a basemap: its drape over the georeferenced data drape_actor: vtkActor | None = None - # Base only: the top surfaces it drapes in this scene, for its detail + # Base only: the top surfaces it drapes in this viewer, for its detail draped_surfaces: list[vtkPolyData] = field(default_factory=list) def connect_mappers(self) -> None: @@ -310,11 +311,11 @@ def set_composite_input(self, pipeline: VtkPipeline, dataset: vtkDataObject) -> def sync_composite_pipeline( - pipeline: VtkPipeline, scene_object: SceneObject, dataset: vtkDataObject + pipeline: VtkPipeline, viewer_object: ViewerObject, dataset: vtkDataObject ) -> None: - """Swap the blocks of the data in a scene, keeping the block styles of this scene.""" + """Swap the blocks of the data in a viewer, keeping the block styles of this viewer.""" new_blocks = pipeline.extract_blocks(dataset) - scene_object.sync_block_display_attributes(scene_object.filters.block_data_sets, new_blocks) - scene_object.filters.block_data_sets = new_blocks - scene_object.update_block_actors() - scene_object.set_composite_input(pipeline, dataset) + viewer_object.sync_block_display_attributes(viewer_object.filters.block_data_sets, new_blocks) + viewer_object.filters.block_data_sets = new_blocks + viewer_object.update_block_actors() + viewer_object.set_composite_input(pipeline, dataset) diff --git a/src/opengeodeweb_viewer/vtk_pipeline.py b/src/opengeodeweb_viewer/vtk_pipeline.py index 1a307a31..b119faa5 100644 --- a/src/opengeodeweb_viewer/vtk_pipeline.py +++ b/src/opengeodeweb_viewer/vtk_pipeline.py @@ -330,7 +330,7 @@ class BasemapState: layers: Mapping[str, LayerState] # Detail only: the base basemap it lies on detail_of: str | None = None - # The georeferenced data it drapes, its drape actor is per scene + # The georeferenced data it drapes, its drape actor is per viewer drape_ids: list[str] = field(default_factory=list) # Every visible map (drape), and the visible maps not cropped (flat map around) full_texture: vtkTexture | None = None @@ -339,7 +339,7 @@ class BasemapState: @dataclass class VtkPipeline: - """The data side of a data, shared by every scene showing it.""" + """The data side of a data, shared by every viewer showing it.""" reader: vtkXMLReader filter: vtkGeometryFilter = field(default_factory=vtkGeometryFilter) diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index 01809f9d..8be73b50 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -42,14 +42,14 @@ basemap_actors, basemaps_follow, drape_planes, - scene_basemaps, update_basemaps, + viewer_basemaps, ) from opengeodeweb_viewer.rpc.viewer.schemas.threshold import Attribute, Location -from opengeodeweb_viewer.scene import sync_composite_pipeline from opengeodeweb_viewer.text_style import ( apply_text_property, ) +from opengeodeweb_viewer.viewer import sync_composite_pipeline from opengeodeweb_viewer.vtk_pipeline import ( ViewerData, VtkPipeline, @@ -67,7 +67,7 @@ from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane from opengeodeweb_viewer.rpc.viewer.schemas.slice import SliceElement - from opengeodeweb_viewer.scene import Scene, SceneObject + from opengeodeweb_viewer.viewer import Viewer, ViewerObject logger = logging.getLogger(__name__) @@ -78,12 +78,12 @@ def not_found(description: str) -> ValueError: return ValueError({"code": 404, "name": "Not found", "description": description}) -def scene_object_of(scene: Scene, data_id: str) -> SceneObject: - scene_object = scene.objects.get(data_id) - if scene_object is None: - msg = f"Data {data_id} is not in scene {scene.viewer_id}" +def viewer_object_of(viewer: Viewer, data_id: str) -> ViewerObject: + viewer_object = viewer.objects.get(data_id) + if viewer_object is None: + msg = f"Data {data_id} is not in viewer {viewer.viewer_id}" raise not_found(msg) - return scene_object + return viewer_object def _clipping_function(planes_data: list[Plane]) -> vtkImplicitBoolean: @@ -124,9 +124,9 @@ def __init__(self) -> None: @override def getView(self, view_id: str) -> vtkRenderWindow: - for scene in self.get_scenes().values(): - if scene.view_id == str(view_id): - return scene.render_window + for viewer in self.get_viewers().values(): + if viewer.view_id == str(view_id): + return viewer.render_window return super().getView(view_id) def get_data_base(self) -> dict[str, VtkPipeline]: @@ -135,23 +135,23 @@ def get_data_base(self) -> dict[str, VtkPipeline]: def get_vtk_pipeline(self, data_id: str) -> VtkPipeline: return self.get_data_base()[data_id] - def get_scenes(self) -> dict[str, Scene]: - return cast("dict[str, Scene]", self.getSharedObject("scenes")) + def get_viewers(self) -> dict[str, Viewer]: + return cast("dict[str, Viewer]", self.getSharedObject("viewers")) - def get_scene(self, viewer_id: str) -> Scene: - scene = self.get_scenes().get(viewer_id) - if scene is None: - msg = f"Scene {viewer_id} not found" + def get_viewer(self, viewer_id: str) -> Viewer: + viewer = self.get_viewers().get(viewer_id) + if viewer is None: + msg = f"Viewer {viewer_id} not found" raise not_found(msg) - return scene + return viewer - def get_scene_object(self, viewer_id: str, data_id: str) -> SceneObject: - return scene_object_of(self.get_scene(viewer_id), data_id) + def get_viewer_object(self, viewer_id: str, data_id: str) -> ViewerObject: + return viewer_object_of(self.get_viewer(viewer_id), data_id) def apply_scene_text_style(self, viewer_id: str) -> None: - scene = self.get_scene(viewer_id) - scene.apply_text_style() - self.update_scalar_bars_layout(scene) + viewer = self.get_viewer(viewer_id) + viewer.apply_text_style() + self.update_scalar_bars_layout(viewer) def get_viewer_data(self, data_id: str) -> ViewerData: if Data is None: @@ -191,10 +191,10 @@ def get_data_file_path(self, data_id: str, filename: str | None = None) -> str: return str(Path(data_folder_path) / data_id / filename) - def reset_camera_clipping_range(self, scene: Scene) -> None: - if scene.grid_scale.GetVisibility(): - scene.grid_scale.UseBoundsOn() - scene.renderer.ResetCameraClippingRange() + def reset_camera_clipping_range(self, viewer: Viewer) -> None: + if viewer.grid_scale.GetVisibility(): + viewer.grid_scale.UseBoundsOn() + viewer.renderer.ResetCameraClippingRange() def setup_pipeline(self, pipeline: VtkPipeline, name: str) -> vtkDataObject | None: pipeline.filter.SetInputConnection(pipeline.reader.GetOutputPort()) @@ -206,12 +206,12 @@ def setup_pipeline(self, pipeline: VtkPipeline, name: str) -> vtkDataObject | No def update_highlight( self, - scene_object: SceneObject, + viewer_object: ViewerObject, id_to_select: int, field_type: str, dataset: vtkDataObject | None = None, ) -> None: - highlight = scene_object.highlight + highlight = viewer_object.highlight node = highlight.selection_node node.SetContentType(vtkSelectionNode.INDICES) node.SetFieldType(vtkSelectionNode.CELL if field_type == "CELL" else vtkSelectionNode.POINT) @@ -219,37 +219,37 @@ def update_highlight( selection_list.SetNumberOfComponents(1) selection_list.InsertNextValue(id_to_select) node.SetSelectionList(selection_list) - target_dataset = dataset or scene_object.mapper.GetInputDataObject(0, 0) + target_dataset = dataset or viewer_object.mapper.GetInputDataObject(0, 0) highlight.extract_selection.SetInputData(0, target_dataset) highlight.extract_selection.Modified() highlight.extract_selection.Update() highlight.actor.VisibilityOn() - def clear_highlights(self, scene: Scene, data_ids: list[str]) -> None: + def clear_highlights(self, viewer: Viewer, data_ids: list[str]) -> None: for data_id in data_ids: - scene_object_of(scene, data_id).highlight.actor.VisibilityOff() + viewer_object_of(viewer, data_id).highlight.actor.VisibilityOff() - def scene_objects_of(self, pipeline: VtkPipeline) -> list[SceneObject]: - """The render side of a data, in every scene showing it.""" + def viewer_objects_of(self, pipeline: VtkPipeline) -> list[ViewerObject]: + """The render side of a data, in every viewer showing it.""" data_ids = [data_id for data_id, other in self.get_data_base().items() if other is pipeline] return [ - scene.objects[data_id] - for scene in self.get_scenes().values() + viewer.objects[data_id] + for viewer in self.get_viewers().values() for data_id in data_ids - if data_id in scene.objects + if data_id in viewer.objects ] def refresh_filters(self, pipeline: VtkPipeline) -> None: - """Recompute the data side and the filtered output of every scene after a source change.""" + """Recompute the data side and the filtered output of every viewer after a source change.""" pipeline.filter.Modified() pipeline.filter.Update() - for scene_object in self.scene_objects_of(pipeline): - scene_object.filters.filter.Modified() - scene_object.filters.filter.Update() + for viewer_object in self.viewer_objects_of(pipeline): + viewer_object.filters.filter.Modified() + viewer_object.filters.filter.Update() - def update_scene_filter(self, scene_object: SceneObject, pipeline: VtkPipeline) -> None: - """Run the filter chain of a data in one scene: other scenes keep their own.""" - filters = scene_object.filters + def update_viewer_filter(self, viewer_object: ViewerObject, pipeline: VtkPipeline) -> None: + """Run the filter chain of a data in one viewer: other viewers keep their own.""" + filters = viewer_object.filters current_input_port = ( filters.slice_filter.GetOutputPort() if filters.slice_filter is not None @@ -276,9 +276,9 @@ def update_scene_filter(self, scene_object: SceneObject, pipeline: VtkPipeline) if isinstance(filtered_dataset, vtkMultiBlockDataSet): if filters.explode_factor > 0: filtered_dataset = pipeline.explode_blocks(filtered_dataset, filters.explode_factor) - sync_composite_pipeline(pipeline, scene_object, filtered_dataset) + sync_composite_pipeline(pipeline, viewer_object, filtered_dataset) else: - scene_object.connect_mappers() + viewer_object.connect_mappers() target_dataset = ( cast("vtkDataSet", filtered_dataset) if active_filters or filters.slice_filter is not None @@ -289,7 +289,7 @@ def update_scene_filter(self, scene_object: SceneObject, pipeline: VtkPipeline) self.fit_grid_scale() def set_clipping_planes( - self, scene: Scene, data_ids: list[str], planes_data: list[Plane] + self, viewer: Viewer, data_ids: list[str], planes_data: list[Plane] ) -> None: database = self.get_data_base() for data_id in data_ids: @@ -297,8 +297,8 @@ def set_clipping_planes( # A basemap is cut like the data it lies under, below if pipeline.basemap is not None: continue - scene_object = scene_object_of(scene, data_id) - filters = scene_object.filters + viewer_object = viewer_object_of(viewer, data_id) + filters = viewer_object.filters filters.clipping_planes = planes_data if planes_data: clipping_filter = vtkExtractGeometry() @@ -306,43 +306,45 @@ def set_clipping_planes( filters.clipping_filter = clipping_filter else: filters.clipping_filter = None - self.update_scene_filter(scene_object, pipeline) - for data_id, basemap in scene_basemaps(database, scene): + self.update_viewer_filter(viewer_object, pipeline) + for data_id, basemap in viewer_basemaps(database, viewer): if not set(basemap.drape_ids).isdisjoint(data_ids): - self.clip_basemap(scene, data_id) - self.mark_basemaps_dirty(data_ids, scene) + self.clip_basemap(viewer, data_id) + self.mark_basemaps_dirty(data_ids, viewer) - def clip_basemap(self, scene: Scene, data_id: str) -> None: - """The basemap is cut like the georeferenced data it lies under in the scene.""" + def clip_basemap(self, viewer: Viewer, data_id: str) -> None: + """The basemap is cut like the georeferenced data it lies under in the viewer.""" pipeline = self.get_vtk_pipeline(data_id) - scene_object = scene_object_of(scene, data_id) - planes_data = [] if pipeline.basemap is None else drape_planes(scene, pipeline.basemap) - scene_object.filters.clipping_filter = ( + viewer_object = viewer_object_of(viewer, data_id) + planes_data = [] if pipeline.basemap is None else drape_planes(viewer, pipeline.basemap) + viewer_object.filters.clipping_filter = ( basemap_clipping_filter(planes_data) if planes_data else None ) - self.update_scene_filter(scene_object, pipeline) + self.update_viewer_filter(viewer_object, pipeline) def clip_basemaps(self, data_id: str) -> None: - """Cut a basemap in every scene showing it, like the data it lies under there.""" - for scene in self.get_scenes().values(): - if data_id in scene.objects: - self.clip_basemap(scene, data_id) + """Cut a basemap in every viewer showing it, like the data it lies under there.""" + for viewer in self.get_viewers().values(): + if data_id in viewer.objects: + self.clip_basemap(viewer, data_id) def mark_basemaps_dirty( - self, data_ids: Iterable[str] | None = None, scene: Scene | None = None + self, data_ids: Iterable[str] | None = None, viewer: Viewer | None = None ) -> None: - """The drapes of the scene, or of every scene, are rebuilt once, at its next render, + """The drapes of the viewer, or of every viewer, are rebuilt once, at its next render, when a change on data_ids moves them.""" - scenes = list(self.get_scenes().values()) if scene is None else [scene] - if data_ids is None or basemaps_follow(self.get_data_base(), scenes, data_ids): - for dirty_scene in scenes: - dirty_scene.basemaps_dirty = True + viewers = list(self.get_viewers().values()) if viewer is None else [viewer] + if data_ids is None or basemaps_follow(self.get_data_base(), viewers, data_ids): + for dirty_viewer in viewers: + dirty_viewer.basemaps_dirty = True - def set_threshold(self, scene: Scene, data_ids: list[str], attributes: list[Attribute]) -> None: + def set_threshold( + self, viewer: Viewer, data_ids: list[str], attributes: list[Attribute] + ) -> None: for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) - scene_object = scene_object_of(scene, data_id) - scene_object.filters.threshold_filters = [] + viewer_object = viewer_object_of(viewer, data_id) + viewer_object.filters.threshold_filters = [] for attribute in attributes: threshold_filter = vtkThreshold() threshold_filter.SetInputArrayToProcess( @@ -359,25 +361,25 @@ def set_threshold(self, scene: Scene, data_ids: list[str], attributes: list[Attr threshold_filter.SetSelectedComponent(attribute.item) threshold_filter.SetLowerThreshold(attribute.minimum) threshold_filter.SetUpperThreshold(attribute.maximum) - scene_object.filters.threshold_filters.append(threshold_filter) - self.update_scene_filter(scene_object, pipeline) - self.mark_basemaps_dirty(data_ids, scene) + viewer_object.filters.threshold_filters.append(threshold_filter) + self.update_viewer_filter(viewer_object, pipeline) + self.mark_basemaps_dirty(data_ids, viewer) - def set_shrink(self, scene: Scene, data_ids: list[str], shrink_factor: float) -> None: + def set_shrink(self, viewer: Viewer, data_ids: list[str], shrink_factor: float) -> None: for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) - scene_object = scene_object_of(scene, data_id) + viewer_object = viewer_object_of(viewer, data_id) if shrink_factor < 1.0: shrink_filter = vtkShrinkFilter() shrink_filter.SetShrinkFactor(shrink_factor) - scene_object.filters.shrink_filter = shrink_filter + viewer_object.filters.shrink_filter = shrink_filter else: - scene_object.filters.shrink_filter = None - self.update_scene_filter(scene_object, pipeline) - self.mark_basemaps_dirty(data_ids, scene) + viewer_object.filters.shrink_filter = None + self.update_viewer_filter(viewer_object, pipeline) + self.mark_basemaps_dirty(data_ids, viewer) def set_explode( - self, scene: Scene, data_ids: list[str], explode_factor: float + self, viewer: Viewer, data_ids: list[str], explode_factor: float ) -> dict[str, list[float]]: """Returns the bounds of each exploded data, for the simplified view of the client.""" exploded_bounds: dict[str, list[float]] = {} @@ -385,33 +387,35 @@ def set_explode( pipeline = self.get_vtk_pipeline(data_id) if not isinstance(pipeline.filter.GetOutputDataObject(0), vtkMultiBlockDataSet): continue - scene_object = scene_object_of(scene, data_id) - scene_object.filters.explode_factor = explode_factor - self.update_scene_filter(scene_object, pipeline) + viewer_object = viewer_object_of(viewer, data_id) + viewer_object.filters.explode_factor = explode_factor + self.update_viewer_filter(viewer_object, pipeline) bounds = pipeline.exploded_bounds(explode_factor) if bounds is not None: exploded_bounds[data_id] = bounds # Even back to 0: the flat map was lifted over the exploded blocks - self.mark_basemaps_dirty(scene=scene) + self.mark_basemaps_dirty(viewer=viewer) return exploded_bounds - def set_slice(self, scene: Scene, data_ids: list[str], slices: list[SliceElement]) -> list[int]: + def set_slice( + self, viewer: Viewer, data_ids: list[str], slices: list[SliceElement] + ) -> list[int]: max_indices = [0, 0, 0] for data_id in data_ids: pipeline = self.get_vtk_pipeline(data_id) image = pipeline.reader.GetOutputAsDataSet() if not isinstance(image, vtkImageData): continue - scene_object = scene_object_of(scene, data_id) + viewer_object = viewer_object_of(viewer, data_id) extent = image.GetExtent() last_indices = [extent[2 * axis + 1] - extent[2 * axis] for axis in range(3)] max_indices = [ max(current, last) for current, last in zip(max_indices, last_indices, strict=True) ] if not slices: - if scene_object.filters.slice_filter is None: + if viewer_object.filters.slice_filter is None: continue - scene_object.filters.slice_filter = None + viewer_object.filters.slice_filter = None else: slice_filter = vtkAppendFilter() for slice_item in slices: @@ -422,41 +426,41 @@ def set_slice(self, scene: Scene, data_ids: list[str], slices: list[SliceElement extract_voi.SetInputConnection(pipeline.reader.GetOutputPort()) extract_voi.SetVOI(voi) slice_filter.AddInputConnection(extract_voi.GetOutputPort()) - scene_object.filters.slice_filter = slice_filter - self.update_scene_filter(scene_object, pipeline) + viewer_object.filters.slice_filter = slice_filter + self.update_viewer_filter(viewer_object, pipeline) return max_indices def swap_pick_mappers( - self, scene: Scene, data_ids: list[str], *, use_pick_mapper: bool + self, viewer: Viewer, data_ids: list[str], *, use_pick_mapper: bool ) -> None: # Swap actor mappers between the default and the pick_mapper # (where hidden blocks are pruned). for data_id in data_ids: - scene_object = scene_object_of(scene, data_id) - if scene_object.pick_mapper: - mapper = scene_object.pick_mapper if use_pick_mapper else scene_object.mapper - scene_object.actor.SetMapper(mapper) + viewer_object = viewer_object_of(viewer, data_id) + if viewer_object.pick_mapper: + mapper = viewer_object.pick_mapper if use_pick_mapper else viewer_object.mapper + viewer_object.actor.SetMapper(mapper) def pick_cell_or_point( self, - scene: Scene, + viewer: Viewer, data_ids: list[str], position: tuple[float, float], field_type: str, picker: vtkCellPicker, ) -> tuple[str | None, int]: - self.swap_pick_mappers(scene, data_ids, use_pick_mapper=True) + self.swap_pick_mappers(viewer, data_ids, use_pick_mapper=True) try: - picker.Pick(position[0], position[1], 0, scene.renderer) + picker.Pick(position[0], position[1], 0, viewer.renderer) finally: - self.swap_pick_mappers(scene, data_ids, use_pick_mapper=False) + self.swap_pick_mappers(viewer, data_ids, use_pick_mapper=False) actor = picker.GetActor() # Find which pipeline owns the picked actor data_id = next( ( current_data_id for current_data_id in data_ids - if scene_object_of(scene, current_data_id).actor == actor + if viewer_object_of(viewer, current_data_id).actor == actor ), None, ) @@ -464,10 +468,10 @@ def pick_cell_or_point( return data_id, id_to_select def pick_actors_under_coordinate( - self, scene: Scene, data_ids: list[str], x: float, y: float, picker: vtkCellPicker + self, viewer: Viewer, data_ids: list[str], x: float, y: float, picker: vtkCellPicker ) -> tuple[list[vtkActor], int]: - renderer = scene.renderer - self.swap_pick_mappers(scene, data_ids, use_pick_mapper=True) + renderer = viewer.renderer + self.swap_pick_mappers(viewer, data_ids, use_pick_mapper=True) actors = [] block_id = -1 try: @@ -480,17 +484,17 @@ def pick_actors_under_coordinate( finally: for actor in actors: actor.PickableOn() - self.swap_pick_mappers(scene, data_ids, use_pick_mapper=False) + self.swap_pick_mappers(viewer, data_ids, use_pick_mapper=False) return actors, block_id def get_composite_block_info( - self, pipeline: VtkPipeline, scene_object: SceneObject, picker: vtkCellPicker + self, pipeline: VtkPipeline, viewer_object: ViewerObject, picker: vtkCellPicker ) -> tuple[vtkDataObject | None, str | None]: # Extract the specific block dataset and metadata from a picked composite flat index - if not isinstance(scene_object.mapper, vtkCompositePolyDataMapper): + if not isinstance(viewer_object.mapper, vtkCompositePolyDataMapper): return None, None flat_index = picker.GetFlatBlockIndex() - block_data_sets = scene_object.filters.block_data_sets + block_data_sets = viewer_object.filters.block_data_sets if not (0 <= flat_index < len(block_data_sets)): return None, None dataset = block_data_sets[flat_index] @@ -509,12 +513,12 @@ def get_array_values(self, array: vtkDataArray, id_to_select: int) -> list[float def extract_picked_attributes( self, - scene_object: SceneObject, + viewer_object: ViewerObject, id_to_select: int, field_type: str, dataset: vtkDataObject | None, ) -> dict[str, list[float] | float]: - data_object = dataset or scene_object.mapper.GetInputDataObject(0, 0) + data_object = dataset or viewer_object.mapper.GetInputDataObject(0, 0) if not isinstance(data_object, vtkDataSet): return {} field_data = ( @@ -529,24 +533,24 @@ def extract_picked_attributes( attributes["coordinates"] = list(coords) return attributes - def update_grid_scale_and_clipping_range(self, scene: Scene) -> None: - grid_scale = scene.grid_scale - renderer = scene.renderer + def update_grid_scale_and_clipping_range(self, viewer: Viewer) -> None: + grid_scale = viewer.grid_scale + renderer = viewer.renderer if not grid_scale.GetVisibility(): self.fit_grid_scale_to_visible_props( - grid_scale, renderer, basemap_actors(self.get_data_base(), scene) + grid_scale, renderer, basemap_actors(self.get_data_base(), viewer) ) final_bounds = list(grid_scale.GetBounds()) if final_bounds[0] <= final_bounds[1]: for axis in range(3): dist = self._axis_display_length(renderer, final_bounds, axis) self._update_grid_scale_axis_labels(grid_scale, final_bounds, axis, dist) - self.reset_camera_clipping_range(scene) + self.reset_camera_clipping_range(viewer) def fit_grid_scale(self) -> None: - for scene in self.get_scenes().values(): + for viewer in self.get_viewers().values(): self.fit_grid_scale_to_visible_props( - scene.grid_scale, scene.renderer, basemap_actors(self.get_data_base(), scene) + viewer.grid_scale, viewer.renderer, basemap_actors(self.get_data_base(), viewer) ) @staticmethod @@ -630,46 +634,46 @@ def _update_grid_scale_axis_labels( grid_scale.SetAxisLabels(axis, None) def visible_scalar_bars( - self, data_id: str, pipeline: VtkPipeline, scene_object: SceneObject + self, data_id: str, pipeline: VtkPipeline, viewer_object: ViewerObject ) -> list[tuple[vtkScalarBarActor, str, str, VtkPipeline]]: visible_bars: list[tuple[vtkScalarBarActor, str, str, VtkPipeline]] = [] - scalar_bar = scene_object.scalar_bar + scalar_bar = viewer_object.scalar_bar if scalar_bar.GetVisibility() and scalar_bar.GetLookupTable() is not None: - # The mapper of the scene colours by name: the shared data has no active scalars - attr_name = scene_object.mapper.GetArrayName() or "Attribute" + # The mapper of the viewer colours by name: the shared data has no active scalars + attr_name = viewer_object.mapper.GetArrayName() or "Attribute" visible_bars.append((scalar_bar, attr_name, data_id, pipeline)) - points_bar = scene_object.points_scalar_bar + points_bar = viewer_object.points_scalar_bar if ( points_bar is not None - and scene_object.points_mapper is not None + and viewer_object.points_mapper is not None and points_bar.GetVisibility() and points_bar.GetLookupTable() is not None ): - points_attr_name = scene_object.points_mapper.GetArrayName() + points_attr_name = viewer_object.points_mapper.GetArrayName() visible_bars.append((points_bar, points_attr_name, data_id, pipeline)) - edges_bar = scene_object.edges_scalar_bar + edges_bar = viewer_object.edges_scalar_bar if ( edges_bar is not None - and scene_object.edges_mapper is not None + and viewer_object.edges_mapper is not None and edges_bar.GetVisibility() and edges_bar.GetLookupTable() is not None ): - edges_attr_name = scene_object.edges_mapper.GetArrayName() + edges_attr_name = viewer_object.edges_mapper.GetArrayName() visible_bars.append((edges_bar, edges_attr_name, data_id, pipeline)) - for attr_name, model_bar in scene_object.scalar_bars.items(): + for attr_name, model_bar in viewer_object.scalar_bars.items(): if model_bar.actor.GetVisibility() and model_bar.actor.GetLookupTable() is not None: visible_bars.append((model_bar.actor, attr_name, data_id, pipeline)) return visible_bars - def update_scalar_bars_layout(self, scene: Scene) -> None: + def update_scalar_bars_layout(self, viewer: Viewer) -> None: database = self.get_data_base() visible_bars = [ bar - for data_id, scene_object in scene.objects.items() - for bar in self.visible_scalar_bars(data_id, database[data_id], scene_object) + for data_id, viewer_object in viewer.objects.items() + for bar in self.visible_scalar_bars(data_id, database[data_id], viewer_object) ] if not visible_bars: @@ -683,7 +687,7 @@ def update_scalar_bars_layout(self, scene: Scene) -> None: cols = 5 actual_width = 0.10 row_height = 0.12 - text_style = scene.text_style + text_style = viewer.text_style for i, (bar, attr_name, data_id, pipeline) in enumerate(visible_bars): dataset = pipeline.filter.GetOutputDataObject(0) @@ -728,13 +732,13 @@ def update_scalar_bars_layout(self, scene: Scene) -> None: bar.SetHeight(bar_height) def render(self, viewer_id: str) -> None: - """Push the image of a scene.""" - scene = self.get_scene(viewer_id) - if scene.basemaps_dirty: - scene.basemaps_dirty = False - update_basemaps(self.get_data_base(), scene) - self.update_grid_scale_and_clipping_range(scene) - self.getSharedObject("publisher").imagePush({"view": scene.view_id}) + """Push the image of a viewer.""" + viewer = self.get_viewer(viewer_id) + if viewer.basemaps_dirty: + viewer.basemaps_dirty = False + update_basemaps(self.get_data_base(), viewer) + self.update_grid_scale_and_clipping_range(viewer) + self.getSharedObject("publisher").imagePush({"view": viewer.view_id}) def register_object(self, data_id: str, data: VtkPipeline) -> None: self.get_data_base()[data_id] = data diff --git a/tests/conftest.py b/tests/conftest.py index 65c110ce..89ece8a9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -122,8 +122,8 @@ def create_viewer(self, viewer_id: str = "viewer_1") -> str: self._drain_initial_messages(view_id) return view_id - def create_data_scene(self, viewer_id: str = "viewer_1") -> str: - """A scene drawn like the data references: black background, no orientation widget. + def create_data_viewer(self, viewer_id: str = "viewer_1") -> str: + """A viewer drawn like the data references: black background, no orientation widget. Kept as it is when the test already created it.""" if viewer_id in self.view_ids: return self.view_ids[viewer_id] diff --git a/tests/image/test_image_protocols.py b/tests/image/test_image_protocols.py index 9c6c5743..0027e8c2 100644 --- a/tests/image/test_image_protocols.py +++ b/tests/image/test_image_protocols.py @@ -12,7 +12,7 @@ from opengeodeweb_viewer.rpc.image.image_protocols import VtkImageView from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView from opengeodeweb_viewer.rpc.viewer.viewer_protocols import VtkViewerView -from opengeodeweb_viewer.scene import Scene +from opengeodeweb_viewer.viewer import Viewer from opengeodeweb_viewer.vtk_pipeline import ViewerData, VtkPipeline from tests.mesh.test_mesh_protocols import _SharedObjects @@ -21,7 +21,7 @@ from vtkmodules.vtkCommonDataModel import vtkImageData - from opengeodeweb_viewer.scene import SceneObject + from opengeodeweb_viewer.viewer import ViewerObject from tests.conftest import ServerMonitor image_id = "123456789012345678901234567image" @@ -50,7 +50,7 @@ def _register_image( geode_object_type=geode_object_type, viewer_elements_type="polygons" if geode_object_type == "RasterImage2D" else "polyhedra", ) - server.create_data_scene() + server.create_data_viewer() server.call(_image_rpc("register"), [{"id": image_id, "name": viewable_file}]) server.add_to_viewer(image_id) @@ -197,12 +197,12 @@ def test_image_is_not_pickable(server: ServerMonitor, dataset_factory: Callable[ assert server.get_result(rpc)["array_ids"] == [] -def _image_scene( +def _image_viewer( view: VtkImageView | VtkMeshView, monkeypatch: pytest.MonkeyPatch, viewer_object_type: str, -) -> SceneObject: - """The image, read as a data of viewer_object_type, shown in a scene of the view.""" +) -> ViewerObject: + """The image, read as a data of viewer_object_type, shown in a viewer of the view.""" view.coreServer = _SharedObjects() monkeypatch.setattr( view, @@ -215,35 +215,35 @@ def _image_scene( pipeline = VtkPipeline(reader) view.setup_pipeline(pipeline, image_id) view.get_data_base()[image_id] = pipeline - scene = Scene.create("viewer_1", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["viewer_1"] = scene - view.add_object(scene, image_id) - return scene.objects[image_id] + viewer = Viewer.create("viewer_1", vtkWebApplication().GetObjectIdMap()) + view.get_viewers()["viewer_1"] = viewer + view.add_object(viewer, image_id) + return viewer.objects[image_id] def test_image_visibility_keeps_scalar_bar_hidden(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkImageView() - scene_object = _image_scene(view, monkeypatch, "image") + viewer_object = _image_viewer(view, monkeypatch, "image") view.set_visibility("viewer_1", image_id, visibility=False) view.set_visibility("viewer_1", image_id, visibility=True) - assert not scene_object.scalar_bar.GetVisibility() + assert not viewer_object.scalar_bar.GetVisibility() def test_mesh_visibility_shows_its_scalar_bar(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkMeshView() - scene_object = _image_scene(view, monkeypatch, "mesh") + viewer_object = _image_viewer(view, monkeypatch, "mesh") view.set_visibility("viewer_1", image_id, visibility=False) view.set_visibility("viewer_1", image_id, visibility=True) - assert scene_object.scalar_bar.GetVisibility() + assert viewer_object.scalar_bar.GetVisibility() def test_image_actor_shows_unlit_unpickable_colors(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkImageView() - scene_object = _image_scene(view, monkeypatch, "image") - assert scene_object.mapper.GetScalarVisibility() - assert scene_object.mapper.GetColorMode() == VTK_COLOR_MODE_DIRECT_SCALARS - assert not scene_object.actor.GetProperty().GetLighting() - assert not scene_object.actor.GetPickable() + viewer_object = _image_viewer(view, monkeypatch, "image") + assert viewer_object.mapper.GetScalarVisibility() + assert viewer_object.mapper.GetColorMode() == VTK_COLOR_MODE_DIRECT_SCALARS + assert not viewer_object.actor.GetProperty().GetLighting() + assert not viewer_object.actor.GetPickable() @pytest.mark.parametrize("view_class", [VtkImageView, VtkMeshView]) diff --git a/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py b/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py index 1e2f708f..74b56808 100644 --- a/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py +++ b/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py @@ -28,7 +28,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="cells", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], diff --git a/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py b/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py index cdf99437..bad28669 100644 --- a/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py +++ b/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py @@ -28,7 +28,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="cells", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], diff --git a/tests/mesh/cells/test_mesh_cells_protocols.py b/tests/mesh/cells/test_mesh_cells_protocols.py index 0480af65..0bc33f9d 100644 --- a/tests/mesh/cells/test_mesh_cells_protocols.py +++ b/tests/mesh/cells/test_mesh_cells_protocols.py @@ -27,7 +27,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="cells", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "regular_grid_2d.vti"}], @@ -128,7 +128,7 @@ def register_grid_3d(server: ServerMonitor, dataset_factory: Callable[..., str]) viewable_file="regular_grid_3d.vti", viewer_elements_type="cells", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": grid_3d_id, "name": "regular_grid_3d.vti"}], @@ -199,7 +199,7 @@ def test_slice_on_non_grid_removed( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: dataset_factory(data_id=other_mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": other_mesh_id, "name": "hat.vtp"}], @@ -216,7 +216,7 @@ def test_slice_on_non_grid_ignored( ) -> None: register_grid_3d(server, dataset_factory) dataset_factory(data_id=other_mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": other_mesh_id, "name": "hat.vtp"}], diff --git a/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py b/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py index 306e5185..f18c2455 100644 --- a/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py +++ b/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py @@ -28,7 +28,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="edges", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "edged_curve3D.vtp"}], diff --git a/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py b/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py index 06208599..1d87ca22 100644 --- a/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py +++ b/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py @@ -41,7 +41,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="edges", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "attributed_edged_curve.vtp"}], @@ -388,7 +388,7 @@ def test_edges_vertex_attribute_item( def register_hat_with_edges(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], diff --git a/tests/mesh/edges/test_mesh_edges_protocols.py b/tests/mesh/edges/test_mesh_edges_protocols.py index 2608728d..dbb52f4c 100644 --- a/tests/mesh/edges/test_mesh_edges_protocols.py +++ b/tests/mesh/edges/test_mesh_edges_protocols.py @@ -51,7 +51,7 @@ def test_edges_color(server: ServerMonitor, dataset_factory: Callable[..., str]) def test_edges_with_edged_curve(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=mesh_id, viewable_file="edged_curve.vtp", viewer_elements_type="edges") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "edged_curve.vtp"}], diff --git a/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py b/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py index 86aed88a..c55e4b79 100644 --- a/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py +++ b/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py @@ -35,7 +35,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="points", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], @@ -373,7 +373,7 @@ def display_points_attribute( viewable_file=viewable_file, viewer_elements_type=viewer_elements_type, ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": viewable_file}], diff --git a/tests/mesh/points/test_mesh_points_protocols.py b/tests/mesh/points/test_mesh_points_protocols.py index 43d5095b..eafbddc3 100644 --- a/tests/mesh/points/test_mesh_points_protocols.py +++ b/tests/mesh/points/test_mesh_points_protocols.py @@ -63,7 +63,7 @@ def test_points_with_point_set(server: ServerMonitor, dataset_factory: Callable[ mesh_id = "00000000000000000000000044556677" dataset_factory(data_id=mesh_id, viewable_file="points.vtp", viewer_elements_type="points") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "points.vtp"}], @@ -99,12 +99,12 @@ def test_points_with_point_set(server: ServerMonitor, dataset_factory: Callable[ assert server.compare_image("mesh/points/point_set_visibility.jpeg") -def test_points_color_is_per_scene( +def test_points_color_is_per_viewer( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: mesh_id = "12345678901234567890123456789012" test_points_size(server, dataset_factory) - server.create_data_scene("viewer_2") + server.create_data_viewer("viewer_2") server.add_to_viewer(mesh_id, "viewer_2") for name, value in (("visibility", True), ("size", 15)): server.call( diff --git a/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py b/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py index 48123302..3e1c986c 100644 --- a/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py +++ b/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py @@ -31,7 +31,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="polygons", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "triangulated_surface2d.vtp"}], diff --git a/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py b/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py index 99e833a6..4e884fcc 100644 --- a/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py +++ b/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py @@ -28,7 +28,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> dataset_factory(data_id=mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], @@ -374,7 +374,7 @@ def test_polygons_vertex_no_data( viewer_elements_type="polygons", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polygon_attribute.vtp"}], diff --git a/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py b/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py index 4e397453..b1fef779 100644 --- a/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py +++ b/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py @@ -31,7 +31,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="polyhedra", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], diff --git a/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py b/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py index b4c99358..e2282541 100644 --- a/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py +++ b/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py @@ -31,7 +31,7 @@ def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> viewer_elements_type="polyhedra", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], diff --git a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py index a148bf2b..642dacaf 100644 --- a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py +++ b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py @@ -27,7 +27,7 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str viewer_elements_type="polyhedra", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "polyhedron_attribute.vtu"}], diff --git a/tests/mesh/test_mesh_protocols.py b/tests/mesh/test_mesh_protocols.py index 64f08118..5470523f 100644 --- a/tests/mesh/test_mesh_protocols.py +++ b/tests/mesh/test_mesh_protocols.py @@ -22,7 +22,7 @@ check_source_folder, ) from opengeodeweb_viewer.rpc.viewer.schemas.clipping_planes import Plane -from opengeodeweb_viewer.scene import Scene, SceneObject +from opengeodeweb_viewer.viewer import Viewer, ViewerObject from opengeodeweb_viewer.vtk_pipeline import BasemapState, VtkPipeline from opengeodeweb_viewer.vtk_protocol import VtkView, basemap_clipping_filter @@ -38,7 +38,7 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=mesh_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": mesh_id, "name": "hat.vtp"}], @@ -120,7 +120,7 @@ def _apply_basemap(server: ServerMonitor, dataset_factory: Callable[..., str]) - Path(os.environ["DATA_FOLDER_PATH"]) / basemap_id / TILES_FOLDER, dirs_exist_ok=True, ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": basemap_id, "name": "basemap"}], @@ -217,7 +217,7 @@ def test_basemap_clipping_keeps_texture_coordinates() -> None: class _SharedObjects: def __init__(self) -> None: - self.objects: dict[str, object] = {"db": {}, "scenes": {}} + self.objects: dict[str, object] = {"db": {}, "viewers": {}} def getSharedObject(self, key: str) -> object: # noqa: N802 wslink API return self.objects.get(key) @@ -226,18 +226,18 @@ def setSharedObject(self, key: str, value: object) -> None: # noqa: N802 wslink self.objects[key] = value -def _show(view: VtkView, scene: Scene, data_id: str) -> SceneObject: - """The data in a scene, without filter.""" - scene_object = SceneObject(vtkDataSetMapper()) +def _show(view: VtkView, viewer: Viewer, data_id: str) -> ViewerObject: + """The data in a viewer, without filter.""" + viewer_object = ViewerObject(vtkDataSetMapper()) pipeline = view.get_vtk_pipeline(data_id) - scene_object.filters.filter.SetInputConnection(pipeline.reader.GetOutputPort()) - scene_object.filters.filter.Update() - scene_object.connect_mappers() - scene.objects[data_id] = scene_object - return scene_object + viewer_object.filters.filter.SetInputConnection(pipeline.reader.GetOutputPort()) + viewer_object.filters.filter.Update() + viewer_object.connect_mappers() + viewer.objects[data_id] = viewer_object + return viewer_object -def _view_with_basemap() -> tuple[VtkView, Scene]: +def _view_with_basemap() -> tuple[VtkView, Viewer]: """A view holding a basemap draped on "data", and an "other" data, all in "viewer_1".""" view = VtkView() view.coreServer = _SharedObjects() @@ -248,61 +248,61 @@ def _view_with_basemap() -> tuple[VtkView, Scene]: reader.Update() database[data_id] = VtkPipeline(reader) database["basemap"].basemap = BasemapState(maps=[], images={}, layers={}, drape_ids=["data"]) - scene = Scene.create("viewer_1", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["viewer_1"] = scene + viewer = Viewer.create("viewer_1", vtkWebApplication().GetObjectIdMap()) + view.get_viewers()["viewer_1"] = viewer for data_id in database: - _show(view, scene, data_id) - return view, scene + _show(view, viewer, data_id) + return view, viewer def test_basemap_follows_the_clipping_of_its_draped_data() -> None: - view, scene = _view_with_basemap() - basemap_filters = scene.objects["basemap"].filters - view.set_clipping_planes(scene, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) + view, viewer = _view_with_basemap() + basemap_filters = viewer.objects["basemap"].filters + view.set_clipping_planes(viewer, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) assert basemap_filters.clipping_filter is not None # Unclipping data the basemap does not lie over leaves it cut - view.set_clipping_planes(scene, ["other"], []) + view.set_clipping_planes(viewer, ["other"], []) assert basemap_filters.clipping_filter is not None - view.set_clipping_planes(scene, ["data"], []) + view.set_clipping_planes(viewer, ["data"], []) assert basemap_filters.clipping_filter is None -def test_basemap_follows_the_clipping_of_its_scene_only() -> None: - view, scene = _view_with_basemap() - other_scene = Scene.create("viewer_2", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["viewer_2"] = other_scene - _show(view, other_scene, "data") - _show(view, other_scene, "basemap") - view.set_clipping_planes(scene, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) - assert scene.objects["basemap"].filters.clipping_filter is not None - assert other_scene.objects["data"].filters.clipping_filter is None - assert other_scene.objects["basemap"].filters.clipping_filter is None +def test_basemap_follows_the_clipping_of_its_viewer_only() -> None: + view, viewer = _view_with_basemap() + other_viewer = Viewer.create("viewer_2", vtkWebApplication().GetObjectIdMap()) + view.get_viewers()["viewer_2"] = other_viewer + _show(view, other_viewer, "data") + _show(view, other_viewer, "basemap") + view.set_clipping_planes(viewer, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) + assert viewer.objects["basemap"].filters.clipping_filter is not None + assert other_viewer.objects["data"].filters.clipping_filter is None + assert other_viewer.objects["basemap"].filters.clipping_filter is None def test_basemap_drape_dirty_only_for_its_draped_data() -> None: - view, scene = _view_with_basemap() - view.set_shrink(scene, ["other"], 0.5) - assert not scene.basemaps_dirty - view.set_shrink(scene, ["data"], 0.5) - assert scene.basemaps_dirty + view, viewer = _view_with_basemap() + view.set_shrink(viewer, ["other"], 0.5) + assert not viewer.basemaps_dirty + view.set_shrink(viewer, ["data"], 0.5) + assert viewer.basemaps_dirty -def test_filters_stay_in_their_scene() -> None: - view, scene = _view_with_basemap() - other_scene = Scene.create("viewer_2", vtkWebApplication().GetObjectIdMap()) - view.get_scenes()["viewer_2"] = other_scene - _show(view, other_scene, "data") - unfiltered_bounds = other_scene.objects["data"].filters.filter.GetOutput().GetBounds() - cells = other_scene.objects["data"].filters.filter.GetOutput().GetNumberOfCells() +def test_filters_stay_in_their_viewer() -> None: + view, viewer = _view_with_basemap() + other_viewer = Viewer.create("viewer_2", vtkWebApplication().GetObjectIdMap()) + view.get_viewers()["viewer_2"] = other_viewer + _show(view, other_viewer, "data") + unfiltered_bounds = other_viewer.objects["data"].filters.filter.GetOutput().GetBounds() + cells = other_viewer.objects["data"].filters.filter.GetOutput().GetNumberOfCells() - view.set_clipping_planes(scene, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) - view.set_shrink(scene, ["data"], 0.5) + view.set_clipping_planes(viewer, ["data"], [Plane(normal=[1, 0, 0], origin=[4, 0, 0])]) + view.set_shrink(viewer, ["data"], 0.5) - clipped = scene.objects["data"].filters.filter.GetOutput() + clipped = viewer.objects["data"].filters.filter.GetOutput() assert clipped.GetBounds()[1] < unfiltered_bounds[1] - other = other_scene.objects["data"].filters.filter.GetOutput() + other = other_viewer.objects["data"].filters.filter.GetOutput() assert other.GetBounds() == unfiltered_bounds assert other.GetNumberOfCells() == cells - assert not other_scene.basemaps_dirty - assert other_scene.objects["data"].filters.shrink_filter is None - assert other_scene.objects["data"].filters.clipping_planes == [] + assert not other_viewer.basemaps_dirty + assert other_viewer.objects["data"].filters.shrink_filter is None + assert other_viewer.objects["data"].filters.clipping_planes == [] diff --git a/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py b/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py index b8dfcd58..68c299e0 100644 --- a/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py +++ b/tests/model/surfaces/attribute/polygon/test_model_surfaces_attribute_polygon_protocols.py @@ -60,7 +60,7 @@ def register_model_cube_with_polygon_attribute( ) -> None: dataset_factory(data_id=model_id, viewable_file="cube.vtm") add_polygon_attribute_to_cube(model_id) - server.create_data_scene() + server.create_data_viewer() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], diff --git a/tests/model/test_model_protocols.py b/tests/model/test_model_protocols.py index 682e4e2a..0c853ac7 100644 --- a/tests/model/test_model_protocols.py +++ b/tests/model/test_model_protocols.py @@ -9,7 +9,7 @@ ) from opengeodeweb_viewer.rpc.model.model_protocols import VtkModelView from opengeodeweb_viewer.rpc.viewer.viewer_protocols import VtkViewerView -from opengeodeweb_viewer.scene import Scene +from opengeodeweb_viewer.viewer import Viewer from opengeodeweb_viewer.vtk_pipeline import ViewerData, VtkPipeline from tests.mesh.test_mesh_protocols import _SharedObjects from tests.test_vtk_pipeline import stacked_model @@ -26,7 +26,7 @@ def test_register_model(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=model_id, viewable_file="CrossSection.vtm") - server.create_data_scene() + server.create_data_viewer() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], @@ -38,7 +38,7 @@ def test_register_model(server: ServerMonitor, dataset_factory: Callable[..., st def test_register_model_cube(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: dataset_factory(data_id=model_id, viewable_file="cube.vtm") - server.create_data_scene() + server.create_data_viewer() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "cube.vtm"}], @@ -52,7 +52,7 @@ def test_register_model_implicit_attribute( ) -> None: dataset_factory(data_id=model_id, viewable_file="implicit_attribute.vtm") - server.create_data_scene() + server.create_data_viewer() server.call( VtkModelView.model_prefix + VtkModelView.model_schemas_dict["register"]["rpc"], [{"id": model_id, "name": "implicit_attribute.vtm"}], @@ -186,7 +186,7 @@ def test_model_explode_blocks_hidden( assert server.compare_image("model/explode_blocks_hidden.jpeg") -def test_explode_stays_in_its_scene(monkeypatch: pytest.MonkeyPatch) -> None: +def test_explode_stays_in_its_viewer(monkeypatch: pytest.MonkeyPatch) -> None: view = VtkModelView() view.coreServer = _SharedObjects() monkeypatch.setattr( @@ -199,17 +199,17 @@ def test_explode_stays_in_its_scene(monkeypatch: pytest.MonkeyPatch) -> None: pipeline = VtkPipeline(source) # type: ignore[arg-type] view.setup_pipeline(pipeline, "stacked") view.get_data_base()[model_id] = pipeline - scenes = [Scene.create(name, vtkWebApplication().GetObjectIdMap()) for name in ("a", "b")] - for scene in scenes: - view.get_scenes()[scene.viewer_id] = scene - view.add_object(scene, model_id) + viewers = [Viewer.create(name, vtkWebApplication().GetObjectIdMap()) for name in ("a", "b")] + for viewer in viewers: + view.get_viewers()[viewer.viewer_id] = viewer + view.add_object(viewer, model_id) - view.set_explode(scenes[0], [model_id], 1.0) + view.set_explode(viewers[0], [model_id], 1.0) - exploded, unexploded = (scene.objects[model_id] for scene in scenes) + exploded, unexploded = (viewer.objects[model_id] for viewer in viewers) assert exploded.filters.explode_factor == 1.0 assert exploded.actor.GetBounds()[5] > 10 assert unexploded.filters.explode_factor == 0.0 assert unexploded.actor.GetBounds() == pytest.approx((0, 30, 0, 10, 0, 10)) - # The blocks of each scene are its own (flat index 2: the first leaf) + # The blocks of each viewer are its own (flat index 2: the first leaf) assert exploded.filters.block_data_sets[2] is not unexploded.filters.block_data_sets[2] diff --git a/tests/test_basemap_drape.py b/tests/test_basemap_drape.py index 14409df7..b75f8d42 100644 --- a/tests/test_basemap_drape.py +++ b/tests/test_basemap_drape.py @@ -16,7 +16,7 @@ upward_ratio, ) from opengeodeweb_viewer.basemap_pipeline import pipeline_surfaces -from opengeodeweb_viewer.scene import SceneObject +from opengeodeweb_viewer.viewer import ViewerObject from opengeodeweb_viewer.vtk_pipeline import VtkPipeline if TYPE_CHECKING: @@ -120,14 +120,14 @@ def test_pipeline_surfaces_of_a_surface_mesh(tmp_path: Path) -> None: reader.SetFileName(str(path)) reader.Update() pipeline = VtkPipeline(reader) - scene_object = SceneObject(vtkDataSetMapper()) - scene_object.filters.filter.SetInputConnection(reader.GetOutputPort()) - scene_object.filters.filter.Update() - [surface] = pipeline_surfaces(pipeline, scene_object) + viewer_object = ViewerObject(vtkDataSetMapper()) + viewer_object.filters.filter.SetInputConnection(reader.GetOutputPort()) + viewer_object.filters.filter.Update() + [surface] = pipeline_surfaces(pipeline, viewer_object) assert surface.GetNumberOfPolys() == 1 # Hidden data is never draped - scene_object.actor.VisibilityOff() - assert pipeline_surfaces(pipeline, scene_object) == [] + viewer_object.actor.VisibilityOff() + assert pipeline_surfaces(pipeline, viewer_object) == [] def test_surfaces_clipped_to_the_detail_bounds() -> None: diff --git a/tests/test_generic_protocols.py b/tests/test_generic_protocols.py index 4f37f86a..7eccfdc3 100644 --- a/tests/test_generic_protocols.py +++ b/tests/test_generic_protocols.py @@ -18,7 +18,7 @@ def test_register_image(server: ServerMonitor, dataset_factory: Callable[..., st viewer_elements_type="polygons", ) - server.create_data_scene() + server.create_data_viewer() server.call( VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "hat_lambert2SG.vti"}], @@ -31,7 +31,7 @@ def test_register_mesh(server: ServerMonitor, dataset_factory: Callable[..., str data_id = "00000000000000000000000123456789" dataset_factory(data_id=data_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.create_data_scene() + server.create_data_viewer() server.call( VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "hat.vtp"}], @@ -44,7 +44,7 @@ def test_register_model(server: ServerMonitor, dataset_factory: Callable[..., st data_id = "00000000000000000000000123456789" dataset_factory(data_id=data_id, viewable_file="CrossSection.vtm") - server.create_data_scene() + server.create_data_viewer() server.call( VtkGenericView.generic_prefix + VtkGenericView.generic_schemas_dict["register"]["rpc"], [{"id": data_id, "name": "CrossSection.vtm"}], diff --git a/tests/test_image_delivery.py b/tests/test_image_delivery.py index 50a9e516..481aea77 100644 --- a/tests/test_image_delivery.py +++ b/tests/test_image_delivery.py @@ -3,7 +3,7 @@ from vtkmodules.web import protocols as vtk_protocols from opengeodeweb_viewer import image_delivery -from opengeodeweb_viewer.image_delivery import SceneImageDelivery +from opengeodeweb_viewer.image_delivery import ViewerImageDelivery if TYPE_CHECKING: from collections.abc import Callable @@ -51,7 +51,7 @@ def still_render(options: dict[str, Any]) -> dict[str, Any]: def test_every_stale_view_is_pushed_again(monkeypatch: pytest.MonkeyPatch) -> None: - pushed = push_two_stale_views(monkeypatch, SceneImageDelivery) + pushed = push_two_stale_views(monkeypatch, ViewerImageDelivery) assert sorted(pushed) == ["1", "1", "3", "3"] diff --git a/tests/test_utils_protocols.py b/tests/test_utils_protocols.py index eb7f06a7..03e0a550 100644 --- a/tests/test_utils_protocols.py +++ b/tests/test_utils_protocols.py @@ -19,7 +19,7 @@ def test_reset_project_after_import( # Mock pre_id = "00000000000000000000000123456789" dataset_factory(data_id=pre_id, viewable_file="hat.vtp", viewer_elements_type="polygons") - server.create_data_scene() + server.create_data_viewer() server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": pre_id, "name": "hat.vtp"}], @@ -42,7 +42,7 @@ def test_reset_project_after_import( VtkUtilsView.utils_prefix + VtkUtilsView.utils_schemas_dict["import_project"]["rpc"] ) - # The import disposed of the scenes: the client creates them again + # The import disposed of the viewers: the client creates them again server.create_viewer() assert server.compare_image("viewer/reset_visualization.jpeg") is True diff --git a/tests/test_scene.py b/tests/test_viewer.py similarity index 56% rename from tests/test_scene.py rename to tests/test_viewer.py index bfef25f4..22da6cd1 100644 --- a/tests/test_scene.py +++ b/tests/test_viewer.py @@ -13,14 +13,14 @@ from vtkmodules.vtkWebCore import vtkWebApplication # Local application imports -from opengeodeweb_viewer.scene import Scene, SceneObject +from opengeodeweb_viewer.viewer import Viewer, ViewerObject from opengeodeweb_viewer.vtk_pipeline import BlockStyle -def test_scenes_have_distinct_render_windows() -> None: +def test_viewers_have_distinct_render_windows() -> None: object_id_map = vtkWebApplication().GetObjectIdMap() - a = Scene.create("viewer_1", object_id_map) - b = Scene.create("viewer_2", object_id_map) + a = Viewer.create("viewer_1", object_id_map) + b = Viewer.create("viewer_2", object_id_map) assert a.render_window is not b.render_window assert a.view_id != b.view_id assert a.renderer.GetActiveCamera() is not b.renderer.GetActiveCamera() @@ -30,10 +30,10 @@ def test_scenes_have_distinct_render_windows() -> None: def test_dispose_removes_props() -> None: object_id_map = vtkWebApplication().GetObjectIdMap() - scene = Scene.create("viewer_1", object_id_map) - scene.renderer.AddActor(vtkActor()) - scene.dispose() - assert scene.renderer.GetViewProps().GetNumberOfItems() == 0 + viewer = Viewer.create("viewer_1", object_id_map) + viewer.renderer.AddActor(vtkActor()) + viewer.dispose() + assert viewer.renderer.GetViewProps().GetNumberOfItems() == 0 def block_with_arrays(names: list[str]) -> vtkPolyData: @@ -45,18 +45,18 @@ def block_with_arrays(names: list[str]) -> vtkPolyData: return block -def composite_scene_object() -> SceneObject: +def composite_viewer_object() -> ViewerObject: mapper = vtkCompositePolyDataMapper() mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) - return SceneObject(mapper) + return ViewerObject(mapper) -def test_scenes_colour_shared_block_by_their_own_array() -> None: +def test_viewers_colour_shared_block_by_their_own_array() -> None: block = block_with_arrays(["first", "second"]) - scene_objects = {name: composite_scene_object() for name in ("first", "second")} - for name, scene_object in scene_objects.items(): - scene_object.filters.block_data_sets = [block] - scene_object.block_styles[0] = BlockStyle( + viewer_objects = {name: composite_viewer_object() for name in ("first", "second")} + for name, viewer_object in viewer_objects.items(): + viewer_object.filters.block_data_sets = [block] + viewer_object.block_styles[0] = BlockStyle( name=name, attribute_location="point", points=[], @@ -65,10 +65,10 @@ def test_scenes_colour_shared_block_by_their_own_array() -> None: item=0, no_data_color=None, ) - scene_object.update_block_colors(0) + viewer_object.update_block_colors(0) - for name, scene_object in scene_objects.items(): - mapper = scene_object.mapper + for name, viewer_object in viewer_objects.items(): + mapper = viewer_object.mapper assert isinstance(mapper, vtkCompositePolyDataMapper) attributes = mapper.GetCompositeDataDisplayAttributes() assert attributes.GetBlockArrayName(block) == name @@ -76,14 +76,14 @@ def test_scenes_colour_shared_block_by_their_own_array() -> None: assert block.GetPointData().GetScalars() is None -def test_scenes_colour_shared_mesh_by_their_own_array() -> None: +def test_viewers_colour_shared_mesh_by_their_own_array() -> None: mesh = block_with_arrays(["first", "second"]) - scene_objects = {name: SceneObject(vtkDataSetMapper()) for name in ("first", "second")} - for name, scene_object in scene_objects.items(): - scene_object.mapper.SetInputDataObject(mesh) - scene_object.color_by_array(name, 0, is_point=True) - - for name, scene_object in scene_objects.items(): - assert scene_object.mapper.GetArrayName() == name - assert scene_object.mapper.GetScalarMode() == VTK_SCALAR_MODE_USE_POINT_FIELD_DATA + viewer_objects = {name: ViewerObject(vtkDataSetMapper()) for name in ("first", "second")} + for name, viewer_object in viewer_objects.items(): + viewer_object.mapper.SetInputDataObject(mesh) + viewer_object.color_by_array(name, 0, is_point=True) + + for name, viewer_object in viewer_objects.items(): + assert viewer_object.mapper.GetArrayName() == name + assert viewer_object.mapper.GetScalarMode() == VTK_SCALAR_MODE_USE_POINT_FIELD_DATA assert mesh.GetPointData().GetScalars() is None diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index 6265203c..d8b085e3 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -36,7 +36,7 @@ def show_mesh(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: server.create_viewer() register_hat(server, dataset_factory, mesh_id) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": mesh_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": mesh_id}) def test_reset_visualization(server: ServerMonitor) -> None: @@ -298,7 +298,7 @@ def test_grid_scale(server: ServerMonitor, dataset_factory: Callable[..., str]) ) assert server.compare_image("viewer/reset_visualization.jpeg") register_hat(server, dataset_factory, data_id) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) assert server.compare_image("viewer/register_hat.jpeg") server.call( @@ -319,7 +319,7 @@ def test_grid_scale_after_clipping_removal( [{"viewer_id": "viewer_1"}], ) register_hat(server, dataset_factory, data_id) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) assert server.compare_image("viewer/register_hat.jpeg") clipping_planes_rpc = ( @@ -508,7 +508,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str [{"id": "00000000000000000000000123456789", "name": "hat.vtp"}], ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) - scene_rpc( + viewer_rpc( server, "add_to_viewer", {"viewer_id": "viewer_1", "id": "00000000000000000000000123456789"} ) assert server.compare_image("viewer/polygon_attribute.jpeg") @@ -523,7 +523,7 @@ def test_set_z_scaling(server: ServerMonitor, dataset_factory: Callable[..., str [{"id": "00000000000000000000000987654321", "name": "vertex_attribute.vtp"}], ) server.get_result(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"]) - scene_rpc( + viewer_rpc( server, "add_to_viewer", {"viewer_id": "viewer_1", "id": "00000000000000000000000987654321"} ) assert server.compare_image("viewer/vertex_and_polygon_attribute.jpeg") @@ -564,7 +564,7 @@ def test_combined_scaling_and_grid( ) assert server.compare_image("viewer/reset_visualization.jpeg") register_hat(server, dataset_factory, mesh_id) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": mesh_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": mesh_id}) assert server.compare_image("viewer/register_hat.jpeg") server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["grid_scale"]["rpc"], @@ -614,17 +614,17 @@ def test_shrink(server: ServerMonitor, dataset_factory: Callable[..., str]) -> N assert server.compare_image("viewer/shrink.jpeg") -def test_shrink_stays_in_its_scene( +def test_shrink_stays_in_its_viewer( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: show_mesh(server, dataset_factory) server.create_viewer("viewer_2") - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": mesh_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": mesh_id}) server.call( VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict["shrink"]["rpc"], [{"viewer_id": "viewer_1", "ids": [mesh_id], "shrink_factor": 0.8}], ) - # The filter is on the data of its scene only: the other scene is not shrunk + # The filter is on the data of its viewer only: the other viewer is not shrunk assert server.compare_image("viewer/shrink.jpeg", "viewer_1") assert not server.compare_image("viewer/shrink.jpeg", "viewer_2") @@ -731,7 +731,7 @@ def register_hat( return data_id -def scene_rpc(server: ServerMonitor, name: str, params: dict[str, str]) -> dict[str, object]: +def viewer_rpc(server: ServerMonitor, name: str, params: dict[str, str]) -> dict[str, object]: rpc = VtkViewerView.viewer_prefix + VtkViewerView.viewer_schemas_dict[name]["rpc"] server.call(rpc, [params]) return server.get_rpc_response(rpc) @@ -749,19 +749,19 @@ def test_add_to_viewer_shares_pipeline( server.create_viewer() server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_1") assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_2") -def test_empty_scene_stays_empty( +def test_empty_viewer_stays_empty( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: server.create_viewer() server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_1") assert server.compare_image("viewer/reset_visualization.jpeg", "viewer_2") @@ -772,9 +772,9 @@ def test_remove_from_viewer_keeps_data( server.create_viewer() server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) - scene_rpc(server, "remove_from_viewer", {"viewer_id": "viewer_1", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) + viewer_rpc(server, "remove_from_viewer", {"viewer_id": "viewer_1", "id": data_id}) assert server.compare_image("viewer/reset_visualization.jpeg", "viewer_1") assert server.compare_image("viewer/add_to_viewer.jpeg", "viewer_2") @@ -783,27 +783,27 @@ def test_delete_viewer(server: ServerMonitor, dataset_factory: Callable[..., str server.create_viewer() server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "delete_viewer", {"viewer_id": "viewer_2"}) - response = scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) + viewer_rpc(server, "delete_viewer", {"viewer_id": "viewer_2"}) + response = viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) assert "error" in response def test_reset_viewers(server: ServerMonitor) -> None: server.create_viewer() server.create_viewer("viewer_2") - scene_rpc(server, "reset_viewers", {}) - response = scene_rpc(server, "create_viewer", {"viewer_id": "viewer_1"}) + viewer_rpc(server, "reset_viewers", {}) + response = viewer_rpc(server, "create_viewer", {"viewer_id": "viewer_1"}) assert "error" not in response -def test_update_camera_only_moves_its_scene( +def test_update_camera_only_moves_its_viewer( server: ServerMonitor, dataset_factory: Callable[..., str] ) -> None: server.create_viewer() server.create_viewer("viewer_2") data_id = register_hat(server, dataset_factory) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) - scene_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_1", "id": data_id}) + viewer_rpc(server, "add_to_viewer", {"viewer_id": "viewer_2", "id": data_id}) camera_options = { "focal_point": [-0.034399999999999986, 2.4513515, -0.10266900000000012], "view_up": [0.48981180389508683, 0.8647097694977263, -0.11118188386706776], @@ -821,16 +821,16 @@ def test_update_camera_only_moves_its_scene( def test_remove_from_viewer_unknown_data_is_not_found(server: ServerMonitor) -> None: server.create_viewer() - response = scene_rpc( + response = viewer_rpc( server, "remove_from_viewer", {"viewer_id": "viewer_1", "id": "00000000000000000000000123456789"}, ) - assert "Data 00000000000000000000000123456789 is not in scene viewer_1" in str( + assert "Data 00000000000000000000000123456789 is not in viewer viewer_1" in str( response["error"] ) -def test_render_unknown_scene_is_not_found(server: ServerMonitor) -> None: - response = scene_rpc(server, "render", {"viewer_id": "viewer_1"}) - assert "Scene viewer_1 not found" in str(response["error"]) +def test_render_unknown_viewer_is_not_found(server: ServerMonitor) -> None: + response = viewer_rpc(server, "render", {"viewer_id": "viewer_1"}) + assert "Viewer viewer_1 not found" in str(response["error"]) diff --git a/tests/test_vtk_pipeline.py b/tests/test_vtk_pipeline.py index 7000089c..6a78e4f2 100644 --- a/tests/test_vtk_pipeline.py +++ b/tests/test_vtk_pipeline.py @@ -18,14 +18,14 @@ ) # Local application imports -from opengeodeweb_viewer.scene import SceneObject +from opengeodeweb_viewer.viewer import ViewerObject from opengeodeweb_viewer.vtk_pipeline import STACKING_GAP_RATIO, VtkPipeline def test_sync_block_display_attributes_drops_replaced_blocks() -> None: mapper = vtkCompositePolyDataMapper() mapper.SetCompositeDataDisplayAttributes(vtkCompositeDataDisplayAttributes()) - scene_object = SceneObject(mapper) + viewer_object = ViewerObject(mapper) source_block = vtkPolyData() destination_block = vtkPolyData() attributes = mapper.GetCompositeDataDisplayAttributes() @@ -33,7 +33,7 @@ def test_sync_block_display_attributes_drops_replaced_blocks() -> None: attributes.SetBlockOpacity(source_block, 0.5) attributes.SetBlockColor(source_block, [1.0, 0.0, 0.0]) - scene_object.sync_block_display_attributes([source_block], [destination_block]) + viewer_object.sync_block_display_attributes([source_block], [destination_block]) attributes = mapper.GetCompositeDataDisplayAttributes() assert not attributes.GetBlockVisibility(destination_block) From 08f353b58cd03b181f17908ab0f729641f547f39 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 10:18:51 +0100 Subject: [PATCH 16/22] fix(viewer): name the viewer once in the data not found message Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/vtk_protocol.py | 2 +- tests/test_viewer_protocols.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py index 8be73b50..371f043a 100644 --- a/src/opengeodeweb_viewer/vtk_protocol.py +++ b/src/opengeodeweb_viewer/vtk_protocol.py @@ -81,7 +81,7 @@ def not_found(description: str) -> ValueError: def viewer_object_of(viewer: Viewer, data_id: str) -> ViewerObject: viewer_object = viewer.objects.get(data_id) if viewer_object is None: - msg = f"Data {data_id} is not in viewer {viewer.viewer_id}" + msg = f"Data {data_id} is not in {viewer.viewer_id}" raise not_found(msg) return viewer_object diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index d8b085e3..259e0cd8 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -826,7 +826,7 @@ def test_remove_from_viewer_unknown_data_is_not_found(server: ServerMonitor) -> "remove_from_viewer", {"viewer_id": "viewer_1", "id": "00000000000000000000000123456789"}, ) - assert "Data 00000000000000000000000123456789 is not in viewer viewer_1" in str( + assert "Data 00000000000000000000000123456789 is not in viewer_1" in str( response["error"] ) From b078db27281854f546a791afd171a6dc025f96bd Mon Sep 17 00:00:00 2001 From: MaxNumerique <144453705+MaxNumerique@users.noreply.github.com> Date: Wed, 2 Dec 2026 09:19:46 +0000 Subject: [PATCH 17/22] Apply prepare changes --- tests/test_viewer_protocols.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_viewer_protocols.py b/tests/test_viewer_protocols.py index 259e0cd8..25bf46c6 100644 --- a/tests/test_viewer_protocols.py +++ b/tests/test_viewer_protocols.py @@ -826,9 +826,7 @@ def test_remove_from_viewer_unknown_data_is_not_found(server: ServerMonitor) -> "remove_from_viewer", {"viewer_id": "viewer_1", "id": "00000000000000000000000123456789"}, ) - assert "Data 00000000000000000000000123456789 is not in viewer_1" in str( - response["error"] - ) + assert "Data 00000000000000000000000123456789 is not in viewer_1" in str(response["error"]) def test_render_unknown_viewer_is_not_found(server: ServerMonitor) -> None: From 23e85a58fb44e40a874ef14584fbd02984f4d956 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 11:38:08 +0100 Subject: [PATCH 18/22] fix(viewer): release a deleted viewer's OpenGL resources in its own context Deleting a viewer dropped its mappers while another viewer's EGL context was current, so their OpenGL names were freed in that other context: on a GPU, the remaining viewer then rendered an empty image once resized. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/viewer/viewer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opengeodeweb_viewer/viewer/viewer.py b/src/opengeodeweb_viewer/viewer/viewer.py index 48756548..abd185df 100644 --- a/src/opengeodeweb_viewer/viewer/viewer.py +++ b/src/opengeodeweb_viewer/viewer/viewer.py @@ -60,6 +60,10 @@ def create(cls, viewer_id: str, object_id_map: vtkObjectIdMap) -> Viewer: def dispose(self) -> None: self.widget.EnabledOff() + # OpenGL names belong to one context: the props of this viewer release theirs in + # its own context, before their mappers go while another viewer's context is current + self.render_window.MakeCurrent() + self.render_window.ReleaseGraphicsResources(self.render_window) self.renderer.RemoveAllViewProps() self.objects.clear() self.clipping_plane_previews = [] From ef48303471517bc6eb8b4b9af27f804fef89c507 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 12:07:40 +0100 Subject: [PATCH 19/22] fix(basemap): give each viewer its own texture of the maps OpenGL keeps a texture in the context of one render window: a texture shared by the viewers showed in the first one only. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/basemap_compose.py | 9 +++++++++ src/opengeodeweb_viewer/basemap_pipeline.py | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/opengeodeweb_viewer/basemap_compose.py b/src/opengeodeweb_viewer/basemap_compose.py index c8b560c9..056aaa9e 100644 --- a/src/opengeodeweb_viewer/basemap_compose.py +++ b/src/opengeodeweb_viewer/basemap_compose.py @@ -151,3 +151,12 @@ def basemap_texture(image: np.ndarray) -> vtkTexture: texture.SetInputData(data) texture.InterpolateOn() return texture + + +def viewer_texture(texture: vtkTexture) -> vtkTexture: + """The texture of a map in one viewer, on the same image: OpenGL keeps a texture in the + context of one render window, so the viewers cannot share it.""" + own = vtkTexture() + own.SetInputData(texture.GetInput()) + own.SetInterpolate(texture.GetInterpolate()) + return own diff --git a/src/opengeodeweb_viewer/basemap_pipeline.py b/src/opengeodeweb_viewer/basemap_pipeline.py index 696773a8..89f39d20 100644 --- a/src/opengeodeweb_viewer/basemap_pipeline.py +++ b/src/opengeodeweb_viewer/basemap_pipeline.py @@ -8,7 +8,7 @@ from vtkmodules.vtkRenderingCore import vtkCompositePolyDataMapper # Local application imports -from opengeodeweb_viewer.basemap_compose import basemap_texture, textures +from opengeodeweb_viewer.basemap_compose import basemap_texture, textures, viewer_texture from opengeodeweb_viewer.basemap_drape import ( BASEMAP_POLYGON_OFFSET_UNITS, DETAIL_DRAPE_POLYGON_OFFSET_UNITS, @@ -204,7 +204,7 @@ def _update_base( basemap_top = dataset.GetBounds()[5] if draped: viewer_object.drape_actor = drape_actor( - drape_polydata(draped, dataset), basemap.full_texture + drape_polydata(draped, dataset), viewer_texture(basemap.full_texture) ) viewer.renderer.AddActor(viewer_object.drape_actor) # The flat map goes under the draped relief @@ -231,7 +231,7 @@ def _update_detail(database: Mapping[str, VtkPipeline], viewer: Viewer, data_id: if draped: viewer_object.drape_actor = drape_actor( drape_polydata(draped, dataset), - detail.full_texture, + viewer_texture(detail.full_texture), DETAIL_DRAPE_POLYGON_OFFSET_UNITS, ) viewer.renderer.AddActor(viewer_object.drape_actor) @@ -249,11 +249,11 @@ def retexture(pipeline: VtkPipeline, viewer_object: ViewerObject, viewer: Viewer around = basemap.around_texture draped = bool(base_object.draped_surfaces) viewer_object.actor.SetTexture( - around if draped and around is not None else basemap.full_texture + viewer_texture(around if draped and around is not None else basemap.full_texture) ) # Hiding the flat map with nothing draped would hide the whole map flat_visible = around is not None or not draped viewer_object.actor.SetVisibility(viewer_object.visibility and flat_visible) if viewer_object.drape_actor is not None: - viewer_object.drape_actor.SetTexture(basemap.full_texture) + viewer_object.drape_actor.SetTexture(viewer_texture(basemap.full_texture)) viewer_object.drape_actor.SetVisibility(viewer_object.visibility) From d212d504aad493340c9fb521b3a742bc0e771594 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 2 Dec 2026 12:07:40 +0100 Subject: [PATCH 20/22] fix(basemap): show the base map in every viewer Registering a data no longer shows it: the base map is added to every viewer, those created later included; a detail stays in its own viewer. Co-Authored-By: Claude Opus 5.5 --- .../rpc/mesh/mesh_protocols.py | 5 +++++ .../rpc/viewer/viewer_protocols.py | 4 ++++ tests/mesh/test_mesh_protocols.py | 18 ++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py index 1bce2942..79a74e5a 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py @@ -149,6 +149,11 @@ def mesh_apply_basemap(self, params: schemas.ApplyBasemap) -> schemas.ApplyBasem if pipeline.basemap is not None: basemap.drape_ids = pipeline.basemap.drape_ids pipeline.basemap = basemap + # The base map lies under the data of every viewer; a detail follows the camera of the + # viewer that asked for it, which adds it + if basemap.detail_of is None: + for viewer in self.get_viewers().values(): + self.add_object(viewer, params.id) # A basemap rebuilt while the data is clipped or exploded follows it at once self.clip_basemaps(params.id) self.mark_basemaps_dirty() diff --git a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py index f6a44ccf..0dc17728 100644 --- a/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py +++ b/src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py @@ -66,6 +66,10 @@ def create_viewer(self, params: schemas.CreateViewer) -> schemas.CreateViewerRes ) viewer = Viewer.create(params.viewer_id, self.getApplication().GetObjectIdMap()) viewers[params.viewer_id] = viewer + # The base maps already built lie under this viewer too + for data_id, pipeline in self.get_data_base().items(): + if pipeline.basemap is not None and pipeline.basemap.detail_of is None: + self.add_object(viewer, data_id) return schemas.CreateViewerResponse(view_id=viewer.view_id) @typed_rpc(viewer_prefix, schemas.delete_viewer_route) diff --git a/tests/mesh/test_mesh_protocols.py b/tests/mesh/test_mesh_protocols.py index 5470523f..fec658ba 100644 --- a/tests/mesh/test_mesh_protocols.py +++ b/tests/mesh/test_mesh_protocols.py @@ -110,7 +110,9 @@ def test_apply_textures(server: ServerMonitor, dataset_factory: Callable[..., st assert server.compare_image("mesh/apply_textures.jpeg") -def _apply_basemap(server: ServerMonitor, dataset_factory: Callable[..., str]) -> str: +def _apply_basemap( + server: ServerMonitor, dataset_factory: Callable[..., str], *, add_to_viewer: bool = True +) -> str: basemap_id = "0000000000000000000000000basemap" dataset_factory( data_id=basemap_id, viewable_file="basemap.vtp", viewer_elements_type="polygons" @@ -125,7 +127,8 @@ def _apply_basemap(server: ServerMonitor, dataset_factory: Callable[..., str]) - VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": basemap_id, "name": "basemap"}], ) - server.add_to_viewer(basemap_id) + if add_to_viewer: + server.add_to_viewer(basemap_id) server.call( VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["apply_basemap"]["rpc"], [ @@ -146,6 +149,17 @@ def test_apply_basemap(server: ServerMonitor, dataset_factory: Callable[..., str assert server.compare_image("mesh/apply_basemap.jpeg") +def test_a_base_map_shows_in_every_viewer( + server: ServerMonitor, dataset_factory: Callable[..., str] +) -> None: + server.create_data_viewer("viewer_2") + _apply_basemap(server, dataset_factory, add_to_viewer=False) + # A viewer created afterwards shows it too + server.create_data_viewer("viewer_3") + for viewer_id in ("viewer_1", "viewer_2", "viewer_3"): + assert server.compare_image("mesh/apply_basemap.jpeg", viewer_id) + + def test_basemap_layers(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None: basemap_id = _apply_basemap(server, dataset_factory) server.call( From 4e16f02df8f458ad9b8f43c1802ec639f8362952 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Thu, 3 Dec 2026 15:09:39 +0100 Subject: [PATCH 21/22] fix(viewer): create the next render windows without probing the backend again On Windows without a GPU driver, vtkRenderWindow probes a Win32 window that fails, then falls back on OSMesa. The failed probe resets the OpenGL functions the windows already created use: the first viewer crashed on its next render once a second viewer was created. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/viewer/viewer.py | 17 ++++++++++++++++- tests/test_viewer.py | 20 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/opengeodeweb_viewer/viewer/viewer.py b/src/opengeodeweb_viewer/viewer/viewer.py index abd185df..5e7de477 100644 --- a/src/opengeodeweb_viewer/viewer/viewer.py +++ b/src/opengeodeweb_viewer/viewer/viewer.py @@ -25,6 +25,21 @@ DEFAULT_BACKGROUND = (180 / 255, 180 / 255, 180 / 255) +# The render window class picked for the first viewer, by vtkRenderWindow's backend detection +_render_window_class: list[type[vtkRenderWindow]] = [] + + +def _new_render_window() -> vtkRenderWindow: + """Only the first window detects the backend: on Windows, the detection tries a GPU window, + which resets the OpenGL functions the windows already created use, before it falls back on + OSMesa. The next windows are created from the same class, without detecting it again. + """ + if _render_window_class: + return _render_window_class[0]() + render_window = vtkRenderWindow() + _render_window_class.append(type(render_window)) + return render_window + @dataclass class Viewer: @@ -52,7 +67,7 @@ def __post_init__(self) -> None: @classmethod def create(cls, viewer_id: str, object_id_map: vtkObjectIdMap) -> Viewer: renderer = vtkRenderer() - render_window = vtkRenderWindow() + render_window = _new_render_window() render_window.AddRenderer(renderer) render_window.SetOffScreenRendering(True) # noqa: FBT003 VTK API view_id = str(object_id_map.GetGlobalId(render_window)) diff --git a/tests/test_viewer.py b/tests/test_viewer.py index 22da6cd1..85335d35 100644 --- a/tests/test_viewer.py +++ b/tests/test_viewer.py @@ -1,4 +1,6 @@ # Standard library imports +from typing import TYPE_CHECKING +from unittest.mock import Mock # Third party imports from vtkmodules.vtkCommonCore import vtkFloatArray @@ -14,8 +16,12 @@ # Local application imports from opengeodeweb_viewer.viewer import Viewer, ViewerObject +from opengeodeweb_viewer.viewer import viewer as viewer_module from opengeodeweb_viewer.vtk_pipeline import BlockStyle +if TYPE_CHECKING: + import pytest + def test_viewers_have_distinct_render_windows() -> None: object_id_map = vtkWebApplication().GetObjectIdMap() @@ -28,6 +34,20 @@ def test_viewers_have_distinct_render_windows() -> None: b.dispose() +def test_a_new_viewer_does_not_probe_the_render_window_backend_again( + monkeypatch: pytest.MonkeyPatch, +) -> None: + object_id_map = vtkWebApplication().GetObjectIdMap() + first = Viewer.create("viewer_1", object_id_map) + # On Windows, the probe of the GPU window resets the OpenGL functions the viewers already use + probe = Mock(side_effect=AssertionError("the render window backend is probed again")) + monkeypatch.setattr(viewer_module, "vtkRenderWindow", probe) + second = Viewer.create("viewer_2", object_id_map) + assert type(second.render_window) is type(first.render_window) + first.dispose() + second.dispose() + + def test_dispose_removes_props() -> None: object_id_map = vtkWebApplication().GetObjectIdMap() viewer = Viewer.create("viewer_1", object_id_map) From 1bdec1d69a533948ee8d1b203563282947eae323 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Thu, 3 Dec 2026 16:25:04 +0100 Subject: [PATCH 22/22] fix(viewer): detect the render window backend as the server starts The first create_viewer detected it: on Windows the GPU probe, before the OSMesa fallback, takes seconds, and three viewers starting at once went past the request timeout. The server detected it as it started before. Co-Authored-By: Claude Opus 5.5 --- src/opengeodeweb_viewer/app.py | 3 +++ src/opengeodeweb_viewer/viewer/__init__.py | 10 ++++++++-- src/opengeodeweb_viewer/viewer/viewer.py | 20 +++++++++----------- tests/test_viewer.py | 11 +++++++---- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/opengeodeweb_viewer/app.py b/src/opengeodeweb_viewer/app.py index 56cb72d2..0733187b 100644 --- a/src/opengeodeweb_viewer/app.py +++ b/src/opengeodeweb_viewer/app.py @@ -25,6 +25,7 @@ from opengeodeweb_viewer.rpc.protocols import MESH_PROTOCOLS, MODEL_PROTOCOLS from opengeodeweb_viewer.rpc.utils_protocols import VtkUtilsView from opengeodeweb_viewer.rpc.viewer.viewer_protocols import VtkViewerView +from opengeodeweb_viewer.viewer import detect_render_window_class from opengeodeweb_viewer.vtk_protocol import VtkTypingMixin, VtkView # ============================================================================= @@ -96,6 +97,8 @@ def initialize(self) -> None: vtk_std_err_out = vtkOutputWindow() vtk_std_err_out.SetInstance(err_out) + # The first viewer is created within a request, which the detection would delay + detect_render_window_class() self.setSharedObject("viewers", {}) diff --git a/src/opengeodeweb_viewer/viewer/__init__.py b/src/opengeodeweb_viewer/viewer/__init__.py index 955f481e..e2ee87f2 100644 --- a/src/opengeodeweb_viewer/viewer/__init__.py +++ b/src/opengeodeweb_viewer/viewer/__init__.py @@ -1,5 +1,11 @@ -from opengeodeweb_viewer.viewer.viewer import Viewer +from opengeodeweb_viewer.viewer.viewer import Viewer, detect_render_window_class from opengeodeweb_viewer.viewer.viewer_filters import ViewerFilters from opengeodeweb_viewer.viewer.viewer_object import ViewerObject, sync_composite_pipeline -__all__ = ["Viewer", "ViewerFilters", "ViewerObject", "sync_composite_pipeline"] +__all__ = [ + "Viewer", + "ViewerFilters", + "ViewerObject", + "detect_render_window_class", + "sync_composite_pipeline", +] diff --git a/src/opengeodeweb_viewer/viewer/viewer.py b/src/opengeodeweb_viewer/viewer/viewer.py index 5e7de477..2b011a72 100644 --- a/src/opengeodeweb_viewer/viewer/viewer.py +++ b/src/opengeodeweb_viewer/viewer/viewer.py @@ -25,20 +25,18 @@ DEFAULT_BACKGROUND = (180 / 255, 180 / 255, 180 / 255) -# The render window class picked for the first viewer, by vtkRenderWindow's backend detection +# The render window class picked by vtkRenderWindow's backend detection _render_window_class: list[type[vtkRenderWindow]] = [] -def _new_render_window() -> vtkRenderWindow: - """Only the first window detects the backend: on Windows, the detection tries a GPU window, - which resets the OpenGL functions the windows already created use, before it falls back on - OSMesa. The next windows are created from the same class, without detecting it again. +def detect_render_window_class() -> type[vtkRenderWindow]: + """The backend is detected once: on Windows, the detection tries a GPU window, which resets + the OpenGL functions the windows already created use, before it falls back on OSMesa. It + takes seconds there, so the server detects it as it starts, not within a request. """ - if _render_window_class: - return _render_window_class[0]() - render_window = vtkRenderWindow() - _render_window_class.append(type(render_window)) - return render_window + if not _render_window_class: + _render_window_class.append(type(vtkRenderWindow())) + return _render_window_class[0] @dataclass @@ -67,7 +65,7 @@ def __post_init__(self) -> None: @classmethod def create(cls, viewer_id: str, object_id_map: vtkObjectIdMap) -> Viewer: renderer = vtkRenderer() - render_window = _new_render_window() + render_window = detect_render_window_class()() render_window.AddRenderer(renderer) render_window.SetOffScreenRendering(True) # noqa: FBT003 VTK API view_id = str(object_id_map.GetGlobalId(render_window)) diff --git a/tests/test_viewer.py b/tests/test_viewer.py index 85335d35..a64437f1 100644 --- a/tests/test_viewer.py +++ b/tests/test_viewer.py @@ -15,7 +15,7 @@ from vtkmodules.vtkWebCore import vtkWebApplication # Local application imports -from opengeodeweb_viewer.viewer import Viewer, ViewerObject +from opengeodeweb_viewer.viewer import Viewer, ViewerObject, detect_render_window_class from opengeodeweb_viewer.viewer import viewer as viewer_module from opengeodeweb_viewer.vtk_pipeline import BlockStyle @@ -37,13 +37,16 @@ def test_viewers_have_distinct_render_windows() -> None: def test_a_new_viewer_does_not_probe_the_render_window_backend_again( monkeypatch: pytest.MonkeyPatch, ) -> None: - object_id_map = vtkWebApplication().GetObjectIdMap() - first = Viewer.create("viewer_1", object_id_map) + monkeypatch.setattr(viewer_module, "_render_window_class", []) + render_window_class = detect_render_window_class() # On Windows, the probe of the GPU window resets the OpenGL functions the viewers already use probe = Mock(side_effect=AssertionError("the render window backend is probed again")) monkeypatch.setattr(viewer_module, "vtkRenderWindow", probe) + object_id_map = vtkWebApplication().GetObjectIdMap() + first = Viewer.create("viewer_1", object_id_map) second = Viewer.create("viewer_2", object_id_map) - assert type(second.render_window) is type(first.render_window) + assert type(first.render_window) is render_window_class + assert type(second.render_window) is render_window_class first.dispose() second.dispose()