diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index d70308d..9851137 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -40,7 +40,7 @@ jobs: - name: Upload PYPI if: steps.semantic-release.outputs.released == 'true' run: | - python3 -m pip install twine + python3 -m pip install twine==6.0.1 python3 -m twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }} - name: Setup NODE uses: actions/setup-node@v3 diff --git a/.gitignore b/.gitignore index 8a512a7..c50471c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,5 @@ __pycache__/ latest_logs schemas.json build -src/tests/tests_output/ +/src/tests/tests_output/ *.egg-info diff --git a/CHANGELOG.md b/CHANGELOG.md index 24a6dc7..fa64c69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # CHANGELOG +## v1.3.0-rc.2 (2025-02-13) + +### Bug Fixes + +- **CICD**: Twine 6.0.1 + ([`430f5c8`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/430f5c818a7b2af89f79ab47b81885f2a4f9924d)) + + +## v1.3.0-rc.1 (2025-02-13) + +### Features + +- **polyhedrons**: Color protocol + ([`15b35fc`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/15b35fcfdda1afc66f4eb4942d9f54006bbc9a0f)) + + ## v1.2.1 (2025-01-16) @@ -128,7 +144,7 @@ BREAKING CHANGE: change some rpc names in schemas -### BREAKING CHANGES +### Breaking Changes - **new rpcs**: Change some rpc names in schemas diff --git a/pyproject.toml b/pyproject.toml index 005e426..9407cf1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "OpenGeodeWeb-Viewer" -version = "1.2.1" +version = "1.3.0-rc.2" dynamic = ["dependencies"] authors = [ { name="Geode-solutions", email="team-web@geode-solutions.com" }, @@ -41,6 +41,7 @@ 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.model.schemas" = ["*.json"] "opengeodeweb_viewer.rpc.viewer.schemas" = ["*.json"] diff --git a/src/opengeodeweb_viewer/object/object_methods.py b/src/opengeodeweb_viewer/object/object_methods.py index 1554c5c..ae80b57 100644 --- a/src/opengeodeweb_viewer/object/object_methods.py +++ b/src/opengeodeweb_viewer/object/object_methods.py @@ -88,7 +88,6 @@ def applyTextures(self, id, textures): self.render() - def SetVisibility(self, id, visibility): actor = self.get_object(id)["actor"] actor.SetVisibility(visibility) @@ -103,7 +102,7 @@ def SetColor(self, id, red, green, blue): mapper = self.get_object(id)["mapper"] mapper.ScalarVisibilityOff() actor = self.get_object(id)["actor"] - actor.GetProperty().SetColor([red, green, blue]) + actor.GetProperty().SetColor([red/255, green/255, blue/255]) self.render() def SetEdgesVisibility(self, id, visibility): @@ -116,10 +115,11 @@ def SetEdgesSize(self, id, size): actor.GetProperty().SetEdgeWidth(size) self.render() - def SetEdgesColor(self, id, color): + def SetEdgesColor(self, id, red, green, blue): actor = self.get_object(id)["actor"] - actor.GetProperty().SetEdgeColor(color) + actor.GetProperty().SetEdgeColor([red/255, green/255, blue/255]) self.render() + def SetPointsVisibility(self, id, visibility): actor = self.get_object(id)["actor"] actor.GetProperty().SetVertexVisibility(visibility) @@ -131,19 +131,9 @@ def SetPointsSize(self, id, size): actor.GetProperty().SetPointSize(size) self.render() - def SetPointsColor(self, id, color): - actor = self.get_object(id)["actor"] - actor.GetProperty().SetVertexColor(color) - self.render() - - def SetPolygonsVisibility(self, id, visibility): - actor = self.get_object(id)["actor"] - actor.SetVisibility(visibility) - self.render() - - def SetPolygonsColor(self, id, color): + def SetPointsColor(self, id, red, green, blue): actor = self.get_object(id)["actor"] - actor.GetProperty().SetColor(color) + actor.GetProperty().SetVertexColor([red/255, green/255, blue/255]) self.render() def clearColors(self, id): diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py index 7c9c772..73683ed 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py @@ -28,8 +28,8 @@ def setMeshEdgesColor(self, params): print(self.mesh_edges_prefix + self.mesh_edges_schemas_dict["color"]["rpc"], f"{params=}", flush=True) validate_schema(params, self.mesh_edges_schemas_dict["color"]) id = params["id"] - red, green, blue = params["color"]["r"]/255, params["color"]["g"]/255, params["color"]["b"]/255 - self.SetEdgesColor(id, [red, green, blue]) + red, green, blue = params["color"]["r"], params["color"]["g"], params["color"]["b"] + self.SetEdgesColor(id, red, green, blue) @exportRpc(mesh_edges_prefix + mesh_edges_schemas_dict["size"]["rpc"]) def setMeshEdgesSize(self, params): diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py index 3614143..696dc99 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py @@ -59,10 +59,10 @@ def setMeshColor(self, params): print(self.mesh_prefix + self.mesh_schemas_dict["color"]["rpc"], f"{params=}", flush=True) validate_schema(params, self.mesh_schemas_dict["color"]) id = params["id"] - red, green, blue = params["color"]["r"]/255, params["color"]["g"]/255, params["color"]["b"]/255 + red, green, blue = params["color"]["r"], params["color"]["g"], params["color"]["b"] self.SetColor(id, red, green, blue) - def setMeshVertexAttribute(self, id, name): + def displayAttributeOnVertices(self, id, name): reader = self.get_object(id)["reader"] points = reader.GetOutput().GetPointData() points.SetActiveScalars(name) @@ -72,7 +72,8 @@ def setMeshVertexAttribute(self, id, name): mapper.SetScalarRange(points.GetScalars().GetRange()) self.render() - def setMeshPolygonAttribute(self, id, name): + + def displayAttributeOnCells(self, id, name): reader = self.get_object(id)["reader"] cells = reader.GetOutput().GetCellData() cells.SetActiveScalars(name) diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py index 5039c33..cd3fc2f 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py @@ -28,8 +28,8 @@ def setMeshPointsColor(self, params): print(self.mesh_points_prefix + self.mesh_points_schemas_dict["color"]["rpc"], f"{params=}", flush=True) validate_schema(params, self.mesh_points_schemas_dict["color"]) id = str(params["id"]) - red, green, blue = params["color"]["r"]/255, params["color"]["g"]/255, params["color"]["b"]/255 - self.SetPointsColor(id, [red, green, blue]) + red, green, blue = params["color"]["r"], params["color"]["g"], params["color"]["b"] + self.SetPointsColor(id, red, green, blue) @exportRpc(mesh_points_prefix + mesh_points_schemas_dict["size"]["rpc"]) def setMeshPointsSize(self, params): @@ -45,5 +45,5 @@ def setMeshPointsVertexAttribute(self, params): validate_schema(params, self.mesh_points_schemas_dict["vertex_attribute"]) id = str(params["id"]) name = str(params["name"]) - self.setMeshVertexAttribute(id, name) + self.displayAttributeOnVertices(id, name) \ No newline at end of file diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py index d6ffc1e..cd64c32 100644 --- a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py +++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py @@ -21,15 +21,15 @@ def setMeshPolygonsVisibility(self, params): validate_schema(params, self.mesh_polygons_schemas_dict["visibility"]) id = params["id"] visibility = bool(params["visibility"]) - self.SetPolygonsVisibility(id, visibility) - + self.SetVisibility(id, visibility) + @exportRpc(mesh_polygons_prefix + mesh_polygons_schemas_dict["color"]["rpc"]) def setMeshPolygonsColor(self, params): print(self.mesh_polygons_prefix + self.mesh_polygons_schemas_dict["color"]["rpc"], f"{params=}", flush=True) validate_schema(params, self.mesh_polygons_schemas_dict["color"]) id = params["id"] - red, green, blue = params["color"]["r"]/255, params["color"]["g"]/255, params["color"]["b"]/255 - self.SetPolygonsColor(id, [red, green, blue]) + red, green, blue = params["color"]["r"], params["color"]["g"], params["color"]["b"] + self.SetColor(id, red, green, blue) @exportRpc(mesh_polygons_prefix + mesh_polygons_schemas_dict["vertex_attribute"]["rpc"]) def setMeshPolygonsVertexAttribute(self, params): @@ -37,7 +37,7 @@ def setMeshPolygonsVertexAttribute(self, params): validate_schema(params, self.mesh_polygons_schemas_dict["vertex_attribute"]) id = params["id"] name = str(params["name"]) - self.setMeshVertexAttribute(id, name) + self.displayAttributeOnVertices(id, name) @exportRpc(mesh_polygons_prefix + mesh_polygons_schemas_dict["polygon_attribute"]["rpc"]) def setMeshPolygonsPolygonAttribute(self, params): @@ -45,4 +45,4 @@ def setMeshPolygonsPolygonAttribute(self, params): validate_schema(params, self.mesh_polygons_schemas_dict["polygon_attribute"]) id = params["id"] name = str(params["name"]) - self.setMeshPolygonAttribute(id, name) + self.displayAttributeOnCells(id, name) diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/polyhedrons_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/polyhedrons_protocols.py new file mode 100644 index 0000000..5cbcbfd --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/polyhedrons_protocols.py @@ -0,0 +1,49 @@ +# 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 VtkMeshPolyhedronsView(VtkMeshView): + mesh_polyhedrons_prefix = "opengeodeweb_viewer.mesh.polyhedrons." + mesh_polyhedrons_schemas_dict = get_schemas_dict(os.path.join(os.path.dirname(__file__), "schemas")) + + def __init__(self): + super().__init__() + + @exportRpc(mesh_polyhedrons_prefix + mesh_polyhedrons_schemas_dict["visibility"]["rpc"]) + def setMeshPolyhedronsVisibility(self, params): + print(self.mesh_polyhedrons_prefix + self.mesh_polyhedrons_schemas_dict["visibility"]["rpc"], f"{params=}", flush=True) + validate_schema(params, self.mesh_polyhedrons_schemas_dict["visibility"]) + id = params["id"] + visibility = bool(params["visibility"]) + self.SetVisibility(id, visibility) + + @exportRpc(mesh_polyhedrons_prefix + mesh_polyhedrons_schemas_dict["color"]["rpc"]) + def setMeshPolyhedronsColor(self, params): + print(self.mesh_polyhedrons_prefix + self.mesh_polyhedrons_schemas_dict["color"]["rpc"], f"{params=}", flush=True) + validate_schema(params, self.mesh_polyhedrons_schemas_dict["color"]) + id = params["id"] + red, green, blue = params["color"]["r"], params["color"]["g"], params["color"]["b"] + self.SetColor(id, red, green, blue) + + @exportRpc(mesh_polyhedrons_prefix + mesh_polyhedrons_schemas_dict["vertex_attribute"]["rpc"]) + def setMeshPolyhedronsVertexAttribute(self, params): + print(self.mesh_polyhedrons_prefix + self.mesh_polyhedrons_schemas_dict["vertex_attribute"]["rpc"], f"{params=}", flush=True) + validate_schema(params, self.mesh_polyhedrons_schemas_dict["vertex_attribute"]) + id = params["id"] + name = str(params["name"]) + self.displayAttributeOnVertices(id, name) + + @exportRpc(mesh_polyhedrons_prefix + mesh_polyhedrons_schemas_dict["polyhedron_attribute"]["rpc"]) + def setMeshPolyhedronsPolyhedronAttribute(self, params): + print(self.mesh_polyhedrons_prefix + self.mesh_polyhedrons_schemas_dict["vertex_attribute"]["rpc"], f"{params=}", flush=True) + validate_schema(params, self.mesh_polyhedrons_schemas_dict["vertex_attribute"]) + id = params["id"] + name = str(params["name"]) + self.displayAttributeOnCells(id, name) + diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/color.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/color.json new file mode 100644 index 0000000..720d50b --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/color.json @@ -0,0 +1,46 @@ +{ + "rpc": "color", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "color": { + "type": "object", + "properties": { + "r": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "g": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "b": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "a": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1 + } + }, + "required": [ + "r", + "g", + "b" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "color" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/polyhedron_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/polyhedron_attribute.json new file mode 100644 index 0000000..6d3a1dd --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/polyhedron_attribute.json @@ -0,0 +1,17 @@ +{ + "rpc": "polyhedron_attribute", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/vertex_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/vertex_attribute.json new file mode 100644 index 0000000..05368b8 --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/vertex_attribute.json @@ -0,0 +1,17 @@ +{ + "rpc": "vertex_attribute", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/visibility.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/visibility.json new file mode 100644 index 0000000..4b2368d --- /dev/null +++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedrons/schemas/visibility.json @@ -0,0 +1,17 @@ +{ + "rpc": "visibility", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "visibility": { + "type": "boolean" + } + }, + "required": [ + "id", + "visibility" + ], + "additionalProperties": false +} \ No newline at end of file diff --git a/src/opengeodeweb_viewer/vtkw_server.py b/src/opengeodeweb_viewer/vtkw_server.py index a9d10c4..134a0d9 100644 --- a/src/opengeodeweb_viewer/vtkw_server.py +++ b/src/opengeodeweb_viewer/vtkw_server.py @@ -16,6 +16,7 @@ from .rpc.mesh.points.points_protocols import VtkMeshPointsView from .rpc.mesh.edges.edges_protocols import VtkMeshEdgesView from .rpc.mesh.polygons.polygons_protocols import VtkMeshPolygonsView +from .rpc.mesh.polyhedrons.polyhedrons_protocols import VtkMeshPolyhedronsView from .rpc.model.model_protocols import VtkModelView from .rpc.generic.generic_protocols import VtkGenericView @@ -60,6 +61,7 @@ def initialize(self): self.registerVtkWebProtocol(VtkMeshPointsView()) self.registerVtkWebProtocol(VtkMeshEdgesView()) self.registerVtkWebProtocol(VtkMeshPolygonsView()) + self.registerVtkWebProtocol(VtkMeshPolyhedronsView()) self.registerVtkWebProtocol(model_protocols) self.registerVtkWebProtocol(VtkGenericView(mesh_protocols, model_protocols)) diff --git a/src/tests/data/hybrid_solid.vtu b/src/tests/data/hybrid_solid.vtu new file mode 100644 index 0000000..7c86fa9 --- /dev/null +++ b/src/tests/data/hybrid_solid.vtu @@ -0,0 +1,22 @@ + + + + + + 1 2 3 4 5 6 7 8 9 10 11 + 0 0 0 1 0 0 2 1 0 1 2 0 0 2 0 0 0 1 1 0 1 2 1 1 1 2 1 0 2 1 1 1 2 + + + 0 0 0 1 0 0 2 1 0 1 2 0 0 2 0 0 0 1 1 0 1 2 1 1 1 2 1 0 2 1 1 1 2 + + + 3 4 5 6 + + + 0 1 3 4 5 6 8 9 1 2 3 6 7 8 5 6 8 9 10 6 7 8 10 + 8 14 19 23 + 12 13 14 10 + + + + diff --git a/src/tests/data/images/mesh/polygons/visibility.jpeg b/src/tests/data/images/mesh/polygons/visibility.jpeg new file mode 100644 index 0000000..7eb6779 Binary files /dev/null and b/src/tests/data/images/mesh/polygons/visibility.jpeg differ diff --git a/src/tests/data/images/mesh/polyhedrons/color.jpeg b/src/tests/data/images/mesh/polyhedrons/color.jpeg new file mode 100644 index 0000000..634bc28 Binary files /dev/null and b/src/tests/data/images/mesh/polyhedrons/color.jpeg differ diff --git a/src/tests/data/images/mesh/polyhedrons/polyhedron_attribute.jpeg b/src/tests/data/images/mesh/polyhedrons/polyhedron_attribute.jpeg new file mode 100644 index 0000000..050d857 Binary files /dev/null and b/src/tests/data/images/mesh/polyhedrons/polyhedron_attribute.jpeg differ diff --git a/src/tests/data/images/mesh/polyhedrons/register.jpeg b/src/tests/data/images/mesh/polyhedrons/register.jpeg new file mode 100644 index 0000000..0fa3f72 Binary files /dev/null and b/src/tests/data/images/mesh/polyhedrons/register.jpeg differ diff --git a/src/tests/data/images/mesh/polyhedrons/vertex_attribute.jpeg b/src/tests/data/images/mesh/polyhedrons/vertex_attribute.jpeg new file mode 100644 index 0000000..127ee1c Binary files /dev/null and b/src/tests/data/images/mesh/polyhedrons/vertex_attribute.jpeg differ diff --git a/src/tests/data/images/mesh/polyhedrons/visibility.jpeg b/src/tests/data/images/mesh/polyhedrons/visibility.jpeg new file mode 100644 index 0000000..7eb6779 Binary files /dev/null and b/src/tests/data/images/mesh/polyhedrons/visibility.jpeg differ diff --git a/src/tests/mesh/polygons/test_polygons_protocols.py b/src/tests/mesh/polygons/test_polygons_protocols.py index 78655aa..a519bcf 100644 --- a/src/tests/mesh/polygons/test_polygons_protocols.py +++ b/src/tests/mesh/polygons/test_polygons_protocols.py @@ -12,4 +12,12 @@ def test_polygons_color(server): test_register_mesh(server) server.call(VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["color"]["rpc"], [{"id": "123456789", "color": {"r": 255, "g": 0, "b": 0}}]) - assert server.compare_image(3, "mesh/polygons/color.jpeg") == True \ No newline at end of file + assert server.compare_image(3, "mesh/polygons/color.jpeg") == True + + +def test_polygons_visibility(server): + + test_register_mesh(server) + + server.call(VtkMeshPolygonsView.mesh_polygons_prefix + VtkMeshPolygonsView.mesh_polygons_schemas_dict["visibility"]["rpc"], [{"id": "123456789", "visibility": False}]) + assert server.compare_image(3, "mesh/polygons/visibility.jpeg") == True diff --git a/src/tests/mesh/polyhedrons/test_polyhedrons_protocols.py b/src/tests/mesh/polyhedrons/test_polyhedrons_protocols.py new file mode 100644 index 0000000..65a9111 --- /dev/null +++ b/src/tests/mesh/polyhedrons/test_polyhedrons_protocols.py @@ -0,0 +1,42 @@ +# Standard library imports + +# Third party imports +from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView +from opengeodeweb_viewer.rpc.mesh.polyhedrons.polyhedrons_protocols import VtkMeshPolyhedronsView + +# Local application imports + + +def test_register_mesh(server): + + server.call(VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"], [{"id": "123456789", "file_name": "hybrid_solid.vtu"}]) + assert server.compare_image(3, "mesh/polyhedrons/register.jpeg") == True + +def test_polyhedrons_color(server): + + test_register_mesh(server) + + server.call(VtkMeshPolyhedronsView.mesh_polyhedrons_prefix + VtkMeshPolyhedronsView.mesh_polyhedrons_schemas_dict["color"]["rpc"], [{"id": "123456789", "color": {"r": 255, "g": 0, "b": 0}}]) + assert server.compare_image(3, "mesh/polyhedrons/color.jpeg") == True + +def test_polyhedrons_visibility(server): + + test_register_mesh(server) + + server.call(VtkMeshPolyhedronsView.mesh_polyhedrons_prefix + VtkMeshPolyhedronsView.mesh_polyhedrons_schemas_dict["visibility"]["rpc"], [{"id": "123456789", "visibility": False}]) + assert server.compare_image(3, "mesh/polyhedrons/visibility.jpeg") == True + +def test_vertex_attribute(server): + + test_register_mesh(server) + + server.call(VtkMeshPolyhedronsView.mesh_polyhedrons_prefix + VtkMeshPolyhedronsView.mesh_polyhedrons_schemas_dict["vertex_attribute"]["rpc"], [{"id": "123456789", "name": "toto_on_vertices"}]) + assert server.compare_image(3, "mesh/polyhedrons/vertex_attribute.jpeg") == True + + +def test_polyhedron_attribute(server): + + test_register_mesh(server) + + server.call(VtkMeshPolyhedronsView.mesh_polyhedrons_prefix + VtkMeshPolyhedronsView.mesh_polyhedrons_schemas_dict["polyhedron_attribute"]["rpc"], [{"id": "123456789", "name": "toto_on_polyhedra"}]) + assert server.compare_image(3, "mesh/polyhedrons/polyhedron_attribute.jpeg") == True \ No newline at end of file