Skip to content
Closed
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
184 changes: 184 additions & 0 deletions opengeodeweb_viewer_schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,29 @@
],
"additionalProperties": false
},
"vertex_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.cells.vertex_scalar_range",
"rpc": "vertex_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"vertex_attribute": {
"$id": "opengeodeweb_viewer.mesh.cells.vertex_attribute",
"rpc": "vertex_attribute",
Expand Down Expand Up @@ -121,6 +144,29 @@
],
"additionalProperties": false
},
"cell_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.cells.cell_scalar_range",
"rpc": "cell_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"cell_attribute": {
"$id": "opengeodeweb_viewer.mesh.cells.cell_attribute",
"rpc": "cell_attribute",
Expand Down Expand Up @@ -181,6 +227,29 @@
],
"additionalProperties": false
},
"vertex_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.edges.vertex_scalar_range",
"rpc": "vertex_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"vertex_attribute": {
"$id": "opengeodeweb_viewer.mesh.edges.vertex_attribute",
"rpc": "vertex_attribute",
Expand Down Expand Up @@ -289,6 +358,29 @@
],
"additionalProperties": false
},
"vertex_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.points.vertex_scalar_range",
"rpc": "vertex_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"vertex_attribute": {
"$id": "opengeodeweb_viewer.mesh.points.vertex_attribute",
"rpc": "vertex_attribute",
Expand Down Expand Up @@ -397,6 +489,29 @@
],
"additionalProperties": false
},
"vertex_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.polygons.vertex_scalar_range",
"rpc": "vertex_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"vertex_attribute": {
"$id": "opengeodeweb_viewer.mesh.polygons.vertex_attribute",
"rpc": "vertex_attribute",
Expand All @@ -417,6 +532,29 @@
],
"additionalProperties": false
},
"polygon_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.polygons.polygon_scalar_range",
"rpc": "polygon_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"polygon_attribute": {
"$id": "opengeodeweb_viewer.mesh.polygons.polygon_attribute",
"rpc": "polygon_attribute",
Expand Down Expand Up @@ -506,6 +644,29 @@
],
"additionalProperties": false
},
"vertex_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.polyhedra.vertex_scalar_range",
"rpc": "vertex_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"vertex_attribute": {
"$id": "opengeodeweb_viewer.mesh.polyhedra.vertex_attribute",
"rpc": "vertex_attribute",
Expand All @@ -526,6 +687,29 @@
],
"additionalProperties": false
},
"polyhedron_scalar_range": {
"$id": "opengeodeweb_viewer.mesh.polyhedra.polyhedron_scalar_range",
"rpc": "polyhedron_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
},
"polyhedron_attribute": {
"$id": "opengeodeweb_viewer.mesh.polyhedra.polyhedron_attribute",
"rpc": "polyhedron_attribute",
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ wslink==1.12.4
yarl>=1
# via aiohttp

opengeodeweb-microservice==1.*,>=1.0.12rc1
22 changes: 22 additions & 0 deletions src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,25 @@ def setMeshCellsCellAttribute(self, rpc_params: RpcParams) -> None:
)
params = schemas.CellAttribute.from_dict(rpc_params)
self.displayAttributeOnCells(params.id, params.name)

@exportRpc(
mesh_cells_prefix + mesh_cells_schemas_dict["vertex_scalar_range"]["rpc"]
)
def setMeshCellsVertexScalarRange(self, rpc_params: RpcParams) -> None:
validate_schema(
rpc_params,
self.mesh_cells_schemas_dict["vertex_scalar_range"],
self.mesh_cells_prefix,
)
params = schemas.VertexScalarRange.from_dict(rpc_params)
self.displayScalarRangeOnVertices(params.id, params.minimum, params.maximum)

@exportRpc(mesh_cells_prefix + mesh_cells_schemas_dict["cell_scalar_range"]["rpc"])
def setMeshCellsCellScalarRange(self, rpc_params: RpcParams) -> None:
validate_schema(
rpc_params,
self.mesh_cells_schemas_dict["cell_scalar_range"],
self.mesh_cells_prefix,
)
params = schemas.CellScalarRange.from_dict(rpc_params)
self.displayScalarRangeOnCells(params.id, params.minimum, params.maximum)
2 changes: 2 additions & 0 deletions src/opengeodeweb_viewer/rpc/mesh/cells/schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from .visibility import *
from .vertex_scalar_range import *
from .vertex_attribute import *
from .color import *
from .cell_scalar_range import *
from .cell_attribute import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"rpc": "cell_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from dataclasses_json import DataClassJsonMixin
from dataclasses import dataclass


@dataclass
class CellScalarRange(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)

id: str
maximum: float
minimum: float
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"rpc": "vertex_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from dataclasses_json import DataClassJsonMixin
from dataclasses import dataclass


@dataclass
class VertexScalarRange(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)

id: str
maximum: float
minimum: float
12 changes: 12 additions & 0 deletions src/opengeodeweb_viewer/rpc/mesh/edges/mesh_edges_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,15 @@ def setMeshEdgesWidth(self, rpc_params: RpcParams) -> None:
)
params = schemas.Width.from_dict(rpc_params)
self.SetEdgesWidth(params.id, params.width)

@exportRpc(
mesh_edges_prefix + mesh_edges_schemas_dict["vertex_scalar_range"]["rpc"]
)
def setMeshEdgesVertexScalarRange(self, rpc_params: RpcParams) -> None:
validate_schema(
rpc_params,
self.mesh_edges_schemas_dict["vertex_scalar_range"],
self.mesh_edges_prefix,
)
params = schemas.VertexScalarRange.from_dict(rpc_params)
self.displayScalarRangeOnVertices(params.id, params.minimum, params.maximum)
1 change: 1 addition & 0 deletions src/opengeodeweb_viewer/rpc/mesh/edges/schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .width import *
from .visibility import *
from .vertex_scalar_range import *
from .vertex_attribute import *
from .size import *
from .color import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"rpc": "vertex_scalar_range",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"minimum": {
"type": "number"
},
"maximum": {
"type": "number"
}
},
"required": [
"id",
"minimum",
"maximum"
],
"additionalProperties": false
}
Loading
Loading