Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# CHANGELOG


## v1.6.0-rc.1 (2025-03-24)

### Features

- **viewer**: Add grid_scale protocol
([`d610fea`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/d610feacc4fe58f85aaca115c5671b272503ad22))

- **viewer**: Dynamic grid scale
([`2c42968`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/2c42968136942dce63aeb8bee10ab610706f50be))


## v1.5.0 (2025-03-19)


Expand Down
18 changes: 6 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "OpenGeodeWeb-Viewer"
version = "1.5.0"
version = "1.6.0-rc.1"
dynamic = ["dependencies"]
authors = [
{ name="Geode-solutions", email="[email protected]" },
Expand Down Expand Up @@ -41,18 +41,12 @@ where = ["src"]
"opengeodeweb_viewer.rpc.mesh.points.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.edges.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.polygons.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.polyhedrons.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.polyhedra.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.corners.points.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.lines.points.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.lines.edges.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.surfaces.points.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.surfaces.edges.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.surfaces.polygons.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.blocks.points.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.blocks.edges.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.blocks.polygons.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.blocks.polyhedrons.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.corners.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.lines.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.surfaces.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.blocks.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.viewer.schemas" = ["*.json"]

[tool.semantic_release]
Expand Down
69 changes: 69 additions & 0 deletions src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Standard library imports
import os

# Third party imports
from wslink import register as exportRpc

# Local application imports
from opengeodeweb_viewer.utils_functions import get_schemas_dict, validate_schema
from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView


class VtkMeshPolyhedraView(VtkMeshView):
mesh_polyhedra_prefix = "opengeodeweb_viewer.mesh.polyhedra."
mesh_polyhedra_schemas_dict = get_schemas_dict(
os.path.join(os.path.dirname(__file__), "schemas")
)

def __init__(self):
super().__init__()

@exportRpc(mesh_polyhedra_prefix + mesh_polyhedra_schemas_dict["visibility"]["rpc"])
def setMeshPolyhedraVisibility(self, params):
validate_schema(
params,
self.mesh_polyhedra_schemas_dict["visibility"],
self.mesh_polyhedra_prefix,
)
id, visibility = params["id"], params["visibility"]
self.SetVisibility(id, visibility)

@exportRpc(mesh_polyhedra_prefix + mesh_polyhedra_schemas_dict["color"]["rpc"])
def setMeshPolyhedraColor(self, params):
validate_schema(
params,
self.mesh_polyhedra_schemas_dict["color"],
self.mesh_polyhedra_prefix,
)
id, red, green, blue = (
params["id"],
params["color"]["r"],
params["color"]["g"],
params["color"]["b"],
)
self.SetColor(id, red, green, blue)

@exportRpc(
mesh_polyhedra_prefix + mesh_polyhedra_schemas_dict["vertex_attribute"]["rpc"]
)
def setMeshPolyhedraVertexAttribute(self, params):
validate_schema(
params,
self.mesh_polyhedra_schemas_dict["vertex_attribute"],
self.mesh_polyhedra_prefix,
)
id, name = params["id"], params["name"]
self.displayAttributeOnVertices(id, name)

@exportRpc(
mesh_polyhedra_prefix
+ mesh_polyhedra_schemas_dict["polyhedron_attribute"]["rpc"]
)
def setMeshPolyhedraPolyhedronAttribute(self, params):
validate_schema(
params,
self.mesh_polyhedra_schemas_dict["polyhedron_attribute"],
self.mesh_polyhedra_prefix,
)
id, name = params["id"], params["name"]
self.displayAttributeOnCells(id, name)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,21 @@
from opengeodeweb_viewer.rpc.model.model_protocols import VtkModelView


class VtkModelBlocksPolyhedronsView(VtkModelView):
model_blocks_polyhedrons_prefix = "opengeodeweb_viewer.model.blocks.polyhedrons."
model_blocks_polyhedrons_schemas_dict = get_schemas_dict(
class VtkModelBlocksView(VtkModelView):
model_blocks_prefix = "opengeodeweb_viewer.model.blocks."
model_blocks_schemas_dict = get_schemas_dict(
os.path.join(os.path.dirname(__file__), "schemas")
)

def __init__(self):
super().__init__()

@exportRpc(
model_blocks_polyhedrons_prefix
+ model_blocks_polyhedrons_schemas_dict["visibility"]["rpc"]
)
def setModelBlocksPolyhedronsVisibility(self, params):
@exportRpc(model_blocks_prefix + model_blocks_schemas_dict["visibility"]["rpc"])
def setModelBlocksPolyhedraVisibility(self, params):
validate_schema(
params,
self.model_blocks_polyhedrons_schemas_dict["visibility"],
self.model_blocks_polyhedrons_prefix,
self.model_blocks_schemas_dict["visibility"],
self.model_blocks_prefix,
)
id, block_ids, visibility = (
params["id"],
Expand All @@ -35,15 +32,12 @@ def setModelBlocksPolyhedronsVisibility(self, params):
)
self.SetBlocksVisibility(id, block_ids, visibility)

@exportRpc(
model_blocks_polyhedrons_prefix
+ model_blocks_polyhedrons_schemas_dict["color"]["rpc"]
)
def setModelBlocksPolyhedronsColor(self, params):
@exportRpc(model_blocks_prefix + model_blocks_schemas_dict["color"]["rpc"])
def setModelBlocksPolyhedraColor(self, params):
validate_schema(
params,
self.model_blocks_polyhedrons_schemas_dict["color"],
self.model_blocks_polyhedrons_prefix,
self.model_blocks_schemas_dict["color"],
self.model_blocks_prefix,
)
id, block_ids, red, green, blue = (
params["id"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,21 @@
from opengeodeweb_viewer.rpc.model.model_protocols import VtkModelView


class VtkModelCornersPointsView(VtkModelView):
model_corners_points_prefix = "opengeodeweb_viewer.model.corners.points."
model_corners_points_schemas_dict = get_schemas_dict(
class VtkModelCornersView(VtkModelView):
model_corners_prefix = "opengeodeweb_viewer.model.corners."
model_corners_schemas_dict = get_schemas_dict(
os.path.join(os.path.dirname(__file__), "schemas")
)

def __init__(self):
super().__init__()

@exportRpc(
model_corners_points_prefix
+ model_corners_points_schemas_dict["visibility"]["rpc"]
)
@exportRpc(model_corners_prefix + model_corners_schemas_dict["visibility"]["rpc"])
def setModelCornersPointsVisibility(self, params):
validate_schema(
params,
self.model_corners_points_schemas_dict["visibility"],
self.model_corners_points_prefix,
self.model_corners_schemas_dict["visibility"],
self.model_corners_prefix,
)
id, block_ids, visibility = (
params["id"],
Expand All @@ -35,14 +32,12 @@ def setModelCornersPointsVisibility(self, params):
)
self.SetBlocksVisibility(id, block_ids, visibility)

@exportRpc(
model_corners_points_prefix + model_corners_points_schemas_dict["color"]["rpc"]
)
@exportRpc(model_corners_prefix + model_corners_schemas_dict["color"]["rpc"])
def setModelCornersPointsColor(self, params):
validate_schema(
params,
self.model_corners_points_schemas_dict["color"],
self.model_corners_points_prefix,
self.model_corners_schemas_dict["color"],
self.model_corners_prefix,
)
id, block_ids, red, green, blue = (
params["id"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@
from opengeodeweb_viewer.rpc.model.model_protocols import VtkModelView


class VtkModelLinesEdgesView(VtkModelView):
model_lines_edges_prefix = "opengeodeweb_viewer.model.lines.edges."
model_lines_edges_schemas_dict = get_schemas_dict(
class VtkModelLinesView(VtkModelView):
model_lines_prefix = "opengeodeweb_viewer.model.lines."
model_lines_schemas_dict = get_schemas_dict(
os.path.join(os.path.dirname(__file__), "schemas")
)

def __init__(self):
super().__init__()

@exportRpc(
model_lines_edges_prefix + model_lines_edges_schemas_dict["visibility"]["rpc"]
)
@exportRpc(model_lines_prefix + model_lines_schemas_dict["visibility"]["rpc"])
def setModelLinesEdgesVisibility(self, params):
validate_schema(
params,
self.model_lines_edges_schemas_dict["visibility"],
self.model_lines_edges_prefix,
self.model_lines_schemas_dict["visibility"],
self.model_lines_prefix,
)
id, block_ids, visibility = (
params["id"],
Expand All @@ -34,14 +32,12 @@ def setModelLinesEdgesVisibility(self, params):
)
self.SetBlocksVisibility(id, block_ids, visibility)

@exportRpc(
model_lines_edges_prefix + model_lines_edges_schemas_dict["color"]["rpc"]
)
@exportRpc(model_lines_prefix + model_lines_schemas_dict["color"]["rpc"])
def setModelLinesEdgesColor(self, params):
validate_schema(
params,
self.model_lines_edges_schemas_dict["color"],
self.model_lines_edges_prefix,
self.model_lines_schemas_dict["color"],
self.model_lines_prefix,
)
id, block_ids, red, green, blue = (
params["id"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,21 @@
from opengeodeweb_viewer.rpc.model.model_protocols import VtkModelView


class VtkModelSurfacesPolygonsView(VtkModelView):
model_surfaces_polygons_prefix = "opengeodeweb_viewer.model.surfaces.polygons."
model_surfaces_polygons_schemas_dict = get_schemas_dict(
class VtkModelSurfacesView(VtkModelView):
model_surfaces_prefix = "opengeodeweb_viewer.model.surfaces."
model_surfaces_schemas_dict = get_schemas_dict(
os.path.join(os.path.dirname(__file__), "schemas")
)

def __init__(self):
super().__init__()

@exportRpc(
model_surfaces_polygons_prefix
+ model_surfaces_polygons_schemas_dict["visibility"]["rpc"]
)
@exportRpc(model_surfaces_prefix + model_surfaces_schemas_dict["visibility"]["rpc"])
def setModelSurfacesPolygonsVisibility(self, params):
validate_schema(
params,
self.model_surfaces_polygons_schemas_dict["visibility"],
self.model_surfaces_polygons_prefix,
self.model_surfaces_schemas_dict["visibility"],
self.model_surfaces_prefix,
)
id, block_ids, visibility = (
params["id"],
Expand All @@ -35,15 +32,12 @@ def setModelSurfacesPolygonsVisibility(self, params):
)
self.SetBlocksVisibility(id, block_ids, visibility)

@exportRpc(
model_surfaces_polygons_prefix
+ model_surfaces_polygons_schemas_dict["color"]["rpc"]
)
@exportRpc(model_surfaces_prefix + model_surfaces_schemas_dict["color"]["rpc"])
def setModelSurfacesPolygonsCOlor(self, params):
validate_schema(
params,
self.model_surfaces_polygons_schemas_dict["color"],
self.model_surfaces_polygons_prefix,
self.model_surfaces_schemas_dict["color"],
self.model_surfaces_prefix,
)
id, block_ids, red, green, blue = (
params["id"],
Expand Down
Loading