diff --git a/opengeodeweb_viewer_schemas.json b/opengeodeweb_viewer_schemas.json
index 411b5178..df7e78d4 100644
--- a/opengeodeweb_viewer_schemas.json
+++ b/opengeodeweb_viewer_schemas.json
@@ -34,94 +34,178 @@
},
"mesh": {
"cells": {
- "visibility": {
- "$id": "opengeodeweb_viewer.mesh.cells.visibility",
- "rpc": "visibility",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "visibility": {
- "type": "boolean"
- }
- },
- "required": [
- "id",
- "visibility"
- ],
- "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
+ "attribute": {
+ "cell": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.cells.attribute.cell.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
},
- "minimum": {
- "type": "number"
+ "name": {
+ "$id": "opengeodeweb_viewer.mesh.cells.attribute.cell.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
},
- "maximum": {
- "type": "number"
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.cells.attribute.cell.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
}
},
- "required": [
- "id",
- "minimum",
- "maximum"
- ],
- "additionalProperties": false
- },
- "vertex_color_map": {
- "$id": "opengeodeweb_viewer.mesh.cells.color_map",
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
+ "vertex": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.cells.attribute.vertex.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
},
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
+ "name": {
+ "$id": "opengeodeweb_viewer.mesh.cells.attribute.vertex.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.cells.attribute.vertex.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
"type": "number"
},
- "minItems": 4,
- "maxItems": 4
+ "maximum": {
+ "type": "number"
+ }
},
- "minLength": 2
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
}
- },
- "required": [
- "id",
- "points"
- ],
- "additionalProperties": false
+ }
},
- "vertex_attribute": {
- "$id": "opengeodeweb_viewer.mesh.cells.vertex_attribute",
- "rpc": "vertex_attribute",
+ "visibility": {
+ "$id": "opengeodeweb_viewer.mesh.cells.visibility",
+ "rpc": "visibility",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
- "name": {
- "type": "string",
- "minLength": 1
+ "visibility": {
+ "type": "boolean"
}
},
"required": [
"id",
- "name"
+ "visibility"
],
"additionalProperties": false
},
@@ -172,214 +256,151 @@
"color"
],
"additionalProperties": false
+ }
+ },
+ "edges": {
+ "attribute": {
+ "edge": {
+ "name": {
+ "$id": "opengeodeweb_viewer.mesh.edges.attribute.edge.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "vertex": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.edges.attribute.vertex.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+ },
+ "name": {
+ "$id": "opengeodeweb_viewer.mesh.edges.attribute.vertex.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.edges.attribute.vertex.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+ }
+ }
},
- "cell_scalar_range": {
- "$id": "opengeodeweb_viewer.mesh.cells.cell_scalar_range",
- "rpc": "cell_scalar_range",
+ "width": {
+ "$id": "opengeodeweb_viewer.mesh.edges.width",
+ "rpc": "width",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
- "minimum": {
- "type": "number"
- },
- "maximum": {
+ "width": {
"type": "number"
}
},
"required": [
"id",
- "minimum",
- "maximum"
+ "width"
],
"additionalProperties": false
},
- "cell_color_map": {
- "$id": "opengeodeweb_viewer.mesh.cells.color_map",
- "rpc": "color_map",
+ "visibility": {
+ "$id": "opengeodeweb_viewer.mesh.edges.visibility",
+ "rpc": "visibility",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
+ "visibility": {
+ "type": "boolean"
}
},
"required": [
"id",
- "points"
+ "visibility"
],
"additionalProperties": false
},
- "cell_attribute": {
- "$id": "opengeodeweb_viewer.mesh.cells.cell_attribute",
- "rpc": "cell_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false
- }
- },
- "edges": {
- "width": {
- "$id": "opengeodeweb_viewer.mesh.edges.width",
- "rpc": "width",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "width": {
- "type": "number"
- }
- },
- "required": [
- "id",
- "width"
- ],
- "additionalProperties": false
- },
- "visibility": {
- "$id": "opengeodeweb_viewer.mesh.edges.visibility",
- "rpc": "visibility",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "visibility": {
- "type": "boolean"
- }
- },
- "required": [
- "id",
- "visibility"
- ],
- "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_color_map": {
- "$id": "opengeodeweb_viewer.mesh.edges.color_map",
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": [
- "id",
- "points"
- ],
- "additionalProperties": false
- },
- "vertex_attribute": {
- "$id": "opengeodeweb_viewer.mesh.edges.vertex_attribute",
- "rpc": "vertex_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false
- },
- "edge_attribute": {
- "$id": "opengeodeweb_viewer.mesh.edges.edge_attribute",
- "rpc": "edge_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false
- },
- "color": {
- "$id": "opengeodeweb_viewer.mesh.edges.color",
- "rpc": "color",
+ "color": {
+ "$id": "opengeodeweb_viewer.mesh.edges.color",
+ "rpc": "color",
"type": "object",
"properties": {
"id": {
@@ -427,6 +448,85 @@
}
},
"points": {
+ "attribute": {
+ "vertex": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.points.attribute.vertex.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+ },
+ "name": {
+ "$id": "opengeodeweb_viewer.mesh.points.attribute.vertex.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.points.attribute.vertex.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+ }
+ }
+ },
"visibility": {
"$id": "opengeodeweb_viewer.mesh.points.visibility",
"rpc": "visibility",
@@ -480,21 +580,24 @@
},
"points": {
"type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
"items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
+ "type": "number"
},
- "minLength": 2
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
}
},
"required": [
"id",
- "points"
+ "points",
+ "minimum",
+ "maximum"
],
"additionalProperties": false
},
@@ -587,166 +690,178 @@
}
},
"polygons": {
- "visibility": {
- "$id": "opengeodeweb_viewer.mesh.polygons.visibility",
- "rpc": "visibility",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
+ "attribute": {
+ "polygon": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.polygons.attribute.polygon.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
},
- "visibility": {
- "type": "boolean"
+ "name": {
+ "$id": "opengeodeweb_viewer.mesh.polygons.attribute.polygon.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.polygons.attribute.polygon.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
}
},
- "required": [
- "id",
- "visibility"
- ],
- "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_color_map": {
- "$id": "opengeodeweb_viewer.mesh.polygons.color_map",
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
+ "vertex": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.polygons.attribute.vertex.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
"type": "number"
},
- "minItems": 4,
- "maxItems": 4
+ "maximum": {
+ "type": "number"
+ }
},
- "minLength": 2
- }
- },
- "required": [
- "id",
- "points"
- ],
- "additionalProperties": false
- },
- "vertex_attribute": {
- "$id": "opengeodeweb_viewer.mesh.polygons.vertex_attribute",
- "rpc": "vertex_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
},
"name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "id",
- "name"
- ],
- "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_color_map": {
- "$id": "opengeodeweb_viewer.mesh.polygons.color_map",
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
+ "$id": "opengeodeweb_viewer.mesh.polygons.attribute.vertex.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
},
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.polygons.attribute.vertex.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
"type": "number"
},
- "minItems": 4,
- "maxItems": 4
+ "maximum": {
+ "type": "number"
+ }
},
- "minLength": 2
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
}
- },
- "required": [
- "id",
- "points"
- ],
- "additionalProperties": false
+ }
},
- "polygon_attribute": {
- "$id": "opengeodeweb_viewer.mesh.polygons.polygon_attribute",
- "rpc": "polygon_attribute",
+ "visibility": {
+ "$id": "opengeodeweb_viewer.mesh.polygons.visibility",
+ "rpc": "visibility",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
- "name": {
- "type": "string",
- "minLength": 1
+ "visibility": {
+ "type": "boolean"
}
},
"required": [
"id",
- "name"
+ "visibility"
],
"additionalProperties": false
},
@@ -800,166 +915,178 @@
}
},
"polyhedra": {
- "visibility": {
- "$id": "opengeodeweb_viewer.mesh.polyhedra.visibility",
- "rpc": "visibility",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "visibility": {
- "type": "boolean"
- }
- },
- "required": [
- "id",
- "visibility"
- ],
- "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_color_map": {
- "$id": "opengeodeweb_viewer.mesh.polyhedra.color_map",
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
+ "attribute": {
+ "polyhedron": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.polyhedra.attribute.polyhedron.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
"type": "number"
},
- "minItems": 4,
- "maxItems": 4
+ "maximum": {
+ "type": "number"
+ }
},
- "minLength": 2
- }
- },
- "required": [
- "id",
- "points"
- ],
- "additionalProperties": false
- },
- "vertex_attribute": {
- "$id": "opengeodeweb_viewer.mesh.polyhedra.vertex_attribute",
- "rpc": "vertex_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
},
"name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "id",
- "name"
- ],
- "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"
+ "$id": "opengeodeweb_viewer.mesh.polyhedra.attribute.polyhedron.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
},
- "maximum": {
- "type": "number"
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.polyhedra.attribute.polyhedron.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
}
},
- "required": [
- "id",
- "minimum",
- "maximum"
- ],
- "additionalProperties": false
- },
- "polyhedron_attribute": {
- "$id": "opengeodeweb_viewer.mesh.polyhedra.polyhedron_attribute",
- "rpc": "polyhedron_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
+ "vertex": {
+ "scalar_range": {
+ "$id": "opengeodeweb_viewer.mesh.polyhedra.attribute.vertex.scalar_range",
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
},
"name": {
- "type": "string",
- "minLength": 1
+ "$id": "opengeodeweb_viewer.mesh.polyhedra.attribute.vertex.name",
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+ },
+ "color_map": {
+ "$id": "opengeodeweb_viewer.mesh.polyhedra.attribute.vertex.color_map",
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "points",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
}
- },
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false
+ }
},
- "polyhedra_color_map": {
- "$id": "opengeodeweb_viewer.mesh.polyhedra.color_map",
- "rpc": "color_map",
+ "visibility": {
+ "$id": "opengeodeweb_viewer.mesh.polyhedra.visibility",
+ "rpc": "visibility",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
+ "visibility": {
+ "type": "boolean"
}
},
"required": [
"id",
- "points"
+ "visibility"
],
"additionalProperties": false
},
diff --git a/pyproject.toml b/pyproject.toml
index e1edfd02..100bfa96 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -35,10 +35,19 @@ where = ["src"]
"opengeodeweb_viewer.rpc.generic.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.points.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.points.attribute.vertex.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.edges.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.edges.attribute.edge.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.edges.attribute.vertex.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.cells.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.cells.attribute.cell.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.cells.attribute.vertex.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.polygons.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.polygons.attribute.polygon.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.polygons.attribute.vertex.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.mesh.polyhedra.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.polyhedra.attribute.polyhedron.schemas" = ["*.json"]
+"opengeodeweb_viewer.rpc.mesh.polyhedra.attribute.vertex.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.edges.schemas" = ["*.json"]
"opengeodeweb_viewer.rpc.model.points.schemas" = ["*.json"]
diff --git a/requirements.txt b/requirements.txt
index 1b40dc8f..e7f9f284 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -61,4 +61,3 @@ wslink==1.12.4
yarl>=1
# via aiohttp
-opengeodeweb-microservice==1.*,>=1.0.13
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
new file mode 100644
index 00000000..6be9bc8c
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/cells_attribute_cell_protocols.py
@@ -0,0 +1,63 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshCellsAttributeCellView(VtkMeshView):
+ mesh_cells_attribute_cell_prefix = "opengeodeweb_viewer.mesh.cells.attribute.cell."
+ mesh_cells_attribute_cell_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_cells_attribute_cell_prefix
+ + mesh_cells_attribute_cell_schemas_dict["name"]["rpc"]
+ )
+ def setMeshCellsCellAttribute(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_cells_attribute_cell_schemas_dict["name"],
+ self.mesh_cells_attribute_cell_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnCells(params.id, params.name)
+
+ @exportRpc(
+ mesh_cells_attribute_cell_prefix
+ + mesh_cells_attribute_cell_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshCellsCellScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_cells_attribute_cell_schemas_dict["scalar_range"],
+ self.mesh_cells_attribute_cell_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_cells_attribute_cell_prefix
+ + mesh_cells_attribute_cell_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshCellsCellColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_cells_attribute_cell_schemas_dict["color_map"],
+ self.mesh_cells_attribute_cell_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/color_map.py
similarity index 62%
rename from src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_scalar_range.py
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/color_map.py
index c90a1489..7fbb9d2a 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_scalar_range.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/color_map.py
@@ -1,12 +1,15 @@
from dataclasses_json import DataClassJsonMixin
from dataclasses import dataclass
+from typing import List
@dataclass
-class PolygonScalarRange(DataClassJsonMixin):
+class ColorMap(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
id: str
maximum: float
minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/name.json
similarity index 89%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_attribute.json
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/name.json
index f5b140ba..e3b91168 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_attribute.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/name.json
@@ -1,5 +1,5 @@
{
- "rpc": "cell_attribute",
+ "rpc": "name",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/name.py
similarity index 82%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_attribute.py
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/name.py
index 16abbb60..fccf36dc 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_attribute.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/name.py
@@ -3,7 +3,7 @@
@dataclass
-class CellAttribute(DataClassJsonMixin):
+class Name(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/scalar_range.json
similarity index 90%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_scalar_range.json
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/scalar_range.json
index 9efd4c4c..cbc408ae 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_scalar_range.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/scalar_range.json
@@ -1,5 +1,5 @@
{
- "rpc": "cell_scalar_range",
+ "rpc": "scalar_range",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/scalar_range.py
similarity index 83%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_scalar_range.py
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/scalar_range.py
index 50137623..69d2fae4 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_scalar_range.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/cell/schemas/scalar_range.py
@@ -3,7 +3,7 @@
@dataclass
-class CellScalarRange(DataClassJsonMixin):
+class ScalarRange(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
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
new file mode 100644
index 00000000..9388bcb1
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/cells_attribute_vertex_protocols.py
@@ -0,0 +1,65 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshCellsAttributeVertexView(VtkMeshView):
+ mesh_cells_attribute_vertex_prefix = (
+ "opengeodeweb_viewer.mesh.cells.attribute.vertex."
+ )
+ mesh_cells_attribute_vertex_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_cells_attribute_vertex_prefix
+ + mesh_cells_attribute_vertex_schemas_dict["name"]["rpc"]
+ )
+ def setMeshCellsVertexName(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_cells_attribute_vertex_schemas_dict["name"],
+ self.mesh_cells_attribute_vertex_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnVertices(params.id, params.name)
+
+ @exportRpc(
+ mesh_cells_attribute_vertex_prefix
+ + mesh_cells_attribute_vertex_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshCellsVertexScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_cells_attribute_vertex_schemas_dict["scalar_range"],
+ self.mesh_cells_attribute_vertex_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_cells_attribute_vertex_prefix
+ + mesh_cells_attribute_vertex_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshCellsVertexColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_cells_attribute_vertex_schemas_dict["color_map"],
+ self.mesh_cells_attribute_vertex_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/color_map.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/color_map.py
new file mode 100644
index 00000000..7fbb9d2a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/color_map.py
@@ -0,0 +1,15 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+from typing import List
+
+
+@dataclass
+class ColorMap(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/name.json
similarity index 89%
rename from src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_attribute.json
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/name.json
index 9eb5de68..ceedfa5a 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_attribute.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/name.json
@@ -1,5 +1,5 @@
{
- "rpc": "vertex_attribute",
+ "rpc": "name",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/name.py
similarity index 82%
rename from src/opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.py
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/name.py
index 083f05d1..fccf36dc 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/name.py
@@ -3,7 +3,7 @@
@dataclass
-class EdgeAttribute(DataClassJsonMixin):
+class Name(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/scalar_range.json
similarity index 90%
rename from src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_scalar_range.json
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/scalar_range.json
index 68a8cabe..cbc408ae 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_scalar_range.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/scalar_range.json
@@ -1,5 +1,5 @@
{
- "rpc": "vertex_scalar_range",
+ "rpc": "scalar_range",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/scalar_range.py
similarity index 82%
rename from src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.py
rename to src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/scalar_range.py
index 735ba2a4..69d2fae4 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/attribute/vertex/schemas/scalar_range.py
@@ -3,7 +3,7 @@
@dataclass
-class VertexScalarRange(DataClassJsonMixin):
+class ScalarRange(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py
index cd15a79e..59d847d4 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/cells_protocols.py
@@ -43,65 +43,3 @@ def setMeshCellsColor(self, rpc_params: RpcParams) -> None:
params = schemas.Color.from_dict(rpc_params)
color = params.color
self.SetColor(params.id, color.r, color.g, color.b)
-
- @exportRpc(mesh_cells_prefix + mesh_cells_schemas_dict["vertex_attribute"]["rpc"])
- def setMeshCellsVertexAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_cells_schemas_dict["vertex_attribute"],
- self.mesh_cells_prefix,
- )
- params = schemas.VertexAttribute.from_dict(rpc_params)
- self.displayAttributeOnVertices(params.id, params.name)
-
- @exportRpc(mesh_cells_prefix + mesh_cells_schemas_dict["cell_attribute"]["rpc"])
- def setMeshCellsCellAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_cells_schemas_dict["cell_attribute"],
- self.mesh_cells_prefix,
- )
- 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.displayScalarRange(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.displayScalarRange(params.id, params.minimum, params.maximum)
-
- @exportRpc(mesh_cells_prefix + mesh_cells_schemas_dict["vertex_color_map"]["rpc"])
- def setMeshCellsVertexColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_cells_schemas_dict["vertex_color_map"],
- self.mesh_cells_prefix,
- )
- params = schemas.VertexColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
-
- @exportRpc(mesh_cells_prefix + mesh_cells_schemas_dict["cell_color_map"]["rpc"])
- def setMeshCellsCellColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_cells_schemas_dict["cell_color_map"],
- self.mesh_cells_prefix,
- )
- params = schemas.CellColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/__init__.py
index 1efaec4a..e983533c 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/__init__.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/__init__.py
@@ -1,8 +1,2 @@
from .visibility import *
-from .vertex_scalar_range import *
-from .vertex_color_map import *
-from .vertex_attribute import *
from .color import *
-from .cell_scalar_range import *
-from .cell_color_map import *
-from .cell_attribute import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_color_map.json
deleted file mode 100644
index 9f543d6d..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_color_map.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": ["id", "points"],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_color_map.py
deleted file mode 100644
index 11f868a9..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/cell_color_map.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-from typing import List
-
-
-@dataclass
-class CellColorMap(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- points: List[List[float]]
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_color_map.json
deleted file mode 100644
index 9f543d6d..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_color_map.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": ["id", "points"],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_color_map.py
deleted file mode 100644
index 81fb473e..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_color_map.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-from typing import List
-
-
-@dataclass
-class VertexColorMap(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- points: List[List[float]]
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
new file mode 100644
index 00000000..30c3ccfc
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/edges_attribute_edge_protocols.py
@@ -0,0 +1,37 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshEdgesAttributeEdgeView(VtkMeshView):
+ mesh_edges_attribute_edge_prefix = "opengeodeweb_viewer.mesh.edges.attribute.edge."
+ mesh_edges_attribute_edge_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_edges_attribute_edge_prefix
+ + mesh_edges_attribute_edge_schemas_dict["name"]["rpc"]
+ )
+ def setMeshEdgesEdgeName(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_edges_attribute_edge_schemas_dict["name"],
+ self.mesh_edges_attribute_edge_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnCells(params.id, params.name)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/__init__.py
new file mode 100644
index 00000000..1faac9b8
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/__init__.py
@@ -0,0 +1 @@
+from .name import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/name.json
similarity index 90%
rename from src/opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.json
rename to src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/name.json
index db84d17f..ff982081 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/name.json
@@ -1,5 +1,5 @@
{
- "rpc": "edge_attribute",
+ "rpc": "name",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/name.py
similarity index 81%
rename from src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.py
rename to src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/name.py
index 64f7c2d0..fccf36dc 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/edge/schemas/name.py
@@ -3,7 +3,7 @@
@dataclass
-class VertexAttribute(DataClassJsonMixin):
+class Name(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
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
new file mode 100644
index 00000000..f633eb46
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/edges_attribute_vertex_protocols.py
@@ -0,0 +1,65 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshEdgesAttributeVertexView(VtkMeshView):
+ mesh_edges_attribute_vertex_prefix = (
+ "opengeodeweb_viewer.mesh.edges.attribute.vertex."
+ )
+ mesh_edges_attribute_vertex_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_edges_attribute_vertex_prefix
+ + mesh_edges_attribute_vertex_schemas_dict["name"]["rpc"]
+ )
+ def setMeshEdgesVertexName(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_edges_attribute_vertex_schemas_dict["name"],
+ self.mesh_edges_attribute_vertex_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnVertices(params.id, params.name)
+
+ @exportRpc(
+ mesh_edges_attribute_vertex_prefix
+ + mesh_edges_attribute_vertex_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshEdgesVertexScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_edges_attribute_vertex_schemas_dict["scalar_range"],
+ self.mesh_edges_attribute_vertex_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_edges_attribute_vertex_prefix
+ + mesh_edges_attribute_vertex_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshEdgesVertexColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_edges_attribute_vertex_schemas_dict["color_map"],
+ self.mesh_edges_attribute_vertex_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/color_map.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/color_map.py
new file mode 100644
index 00000000..7fbb9d2a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/color_map.py
@@ -0,0 +1,15 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+from typing import List
+
+
+@dataclass
+class ColorMap(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/name.json
similarity index 89%
rename from src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.json
rename to src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/name.json
index 9eb5de68..ceedfa5a 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/name.json
@@ -1,5 +1,5 @@
{
- "rpc": "vertex_attribute",
+ "rpc": "name",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/name.py
similarity index 81%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_attribute.py
rename to src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/name.py
index 64f7c2d0..fccf36dc 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_attribute.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/name.py
@@ -3,7 +3,7 @@
@dataclass
-class VertexAttribute(DataClassJsonMixin):
+class Name(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/scalar_range.json
similarity index 90%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.json
rename to src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/scalar_range.json
index 68a8cabe..cbc408ae 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/scalar_range.json
@@ -1,5 +1,5 @@
{
- "rpc": "vertex_scalar_range",
+ "rpc": "scalar_range",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/scalar_range.py
similarity index 82%
rename from src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_scalar_range.py
rename to src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/scalar_range.py
index 735ba2a4..69d2fae4 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_scalar_range.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/attribute/vertex/schemas/scalar_range.py
@@ -3,7 +3,7 @@
@dataclass
-class VertexScalarRange(DataClassJsonMixin):
+class ScalarRange(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/mesh_edges_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py
similarity index 50%
rename from src/opengeodeweb_viewer/rpc/mesh/edges/mesh_edges_protocols.py
rename to src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py
index 076d2fae..1f0f62cf 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/mesh_edges_protocols.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/edges_protocols.py
@@ -49,45 +49,3 @@ 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_attribute"]["rpc"])
- def setMeshEdgesVertexAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_edges_schemas_dict["vertex_attribute"],
- self.mesh_edges_prefix,
- )
- params = schemas.VertexAttribute.from_dict(rpc_params)
- self.displayAttributeOnVertices(params.id, params.name)
-
- @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.displayScalarRange(params.id, params.minimum, params.maximum)
-
- @exportRpc(mesh_edges_prefix + mesh_edges_schemas_dict["vertex_color_map"]["rpc"])
- def setMeshEdgesVertexColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_edges_schemas_dict["vertex_color_map"],
- self.mesh_edges_prefix,
- )
- params = schemas.VertexColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
-
- @exportRpc(mesh_edges_prefix + mesh_edges_schemas_dict["edge_attribute"]["rpc"])
- def setMeshEdgesEdgeAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_edges_schemas_dict["edge_attribute"],
- self.mesh_edges_prefix,
- )
- params = schemas.EdgeAttribute.from_dict(rpc_params)
- self.displayAttributeOnCells(params.id, params.name)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/__init__.py
index f6433c75..cfe6b7ea 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/__init__.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/__init__.py
@@ -1,7 +1,3 @@
from .width import *
from .visibility import *
-from .vertex_scalar_range import *
-from .vertex_color_map import *
-from .vertex_attribute import *
-from .edge_attribute import *
from .color import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_color_map.json
deleted file mode 100644
index 9f543d6d..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_color_map.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": ["id", "points"],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_color_map.py
deleted file mode 100644
index 81fb473e..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_color_map.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-from typing import List
-
-
-@dataclass
-class VertexColorMap(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- points: List[List[float]]
diff --git a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py
index 73991261..5304a113 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/mesh_protocols.py
@@ -123,7 +123,6 @@ def displayAttributeOnVertices(self, data_id: str, name: str) -> None:
mapper = self.get_vtk_pipeline(data_id).mapper
mapper.ScalarVisibilityOn()
mapper.SetScalarModeToUsePointData()
- mapper.SetScalarRange(points.GetScalars().GetRange())
def displayAttributeOnCells(self, data_id: str, name: str) -> None:
reader = self.get_vtk_pipeline(data_id).reader
@@ -132,31 +131,35 @@ def displayAttributeOnCells(self, data_id: str, name: str) -> None:
mapper = self.get_vtk_pipeline(data_id).mapper
mapper.ScalarVisibilityOn()
mapper.SetScalarModeToUseCellData()
- mapper.SetScalarRange(cells.GetScalars().GetRange())
def displayScalarRange(self, data_id: str, minimum: float, maximum: float) -> None:
data = self.get_vtk_pipeline(data_id)
data.mapper.SetScalarRange(minimum, maximum)
- if hasattr(data, "color_map_points") and data.color_map_points:
- lut = vtkColorTransferFunction()
- for ratio, red, green, blue in data.color_map_points:
- scalar_value = minimum + ratio * (maximum - minimum)
- lut.AddRGBPoint(scalar_value, red / 255, green / 255, blue / 255)
- data.mapper.SetLookupTable(lut)
-
- def setupColorMap(self, data_id: str, points: list[list[float]]) -> None:
- data = self.get_vtk_pipeline(data_id)
- sorted_points = sorted(points, key=lambda x: x[0])
- points_min = sorted_points[0][0]
- points_max = sorted_points[-1][0]
- points_range = points_max - points_min if points_max != points_min else 1.0
+ data.mapper.GetLookupTable().SetRange(minimum, maximum)
+ data.mapper.SetUseLookupTableScalarRange(False)
- data.color_map_points = []
- for point in sorted_points:
- ratio = (point[0] - points_min) / points_range
- data.color_map_points.append([ratio, *point[1:]])
+ def setupColorMap(
+ self, data_id: str, points: list[float], minimum: float, maximum: float
+ ) -> None:
+ data = self.get_vtk_pipeline(data_id)
+ lut = vtkColorTransferFunction()
+ data.mapper.SetLookupTable(lut)
+
+ x_values = points[::4]
+ x_min = min(x_values)
+ x_max = max(x_values)
+ x_range = x_max - x_min
+ target_range = maximum - minimum
+
+ for x, r, g, b in zip(*[iter(points)] * 4):
+ new_x = (
+ minimum + (x - x_min) / x_range * target_range
+ if x_range != 0
+ else minimum
+ )
+ lut.AddRGBPoint(new_x, r, g, b)
+ data.mapper.SetScalarRange(minimum, maximum)
+ lut.SetRange(minimum, maximum)
+ data.mapper.SetUseLookupTableScalarRange(False)
data.mapper.InterpolateScalarsBeforeMappingOn()
-
- minimum, maximum = data.mapper.GetScalarRange()
- self.displayScalarRange(data_id, minimum, maximum)
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
new file mode 100644
index 00000000..1db3ce7a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/points_attribute_vertex_protocols.py
@@ -0,0 +1,65 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshPointsAttributeVertexView(VtkMeshView):
+ mesh_points_attribute_vertex_prefix = (
+ "opengeodeweb_viewer.mesh.points.attribute.vertex."
+ )
+ mesh_points_attribute_vertex_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_points_attribute_vertex_prefix
+ + mesh_points_attribute_vertex_schemas_dict["name"]["rpc"]
+ )
+ def setMeshPointsVertexName(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_points_attribute_vertex_schemas_dict["name"],
+ self.mesh_points_attribute_vertex_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnVertices(params.id, params.name)
+
+ @exportRpc(
+ mesh_points_attribute_vertex_prefix
+ + mesh_points_attribute_vertex_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshPointsVertexScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_points_attribute_vertex_schemas_dict["scalar_range"],
+ self.mesh_points_attribute_vertex_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_points_attribute_vertex_prefix
+ + mesh_points_attribute_vertex_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshPointsVertexColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_points_attribute_vertex_schemas_dict["color_map"],
+ self.mesh_points_attribute_vertex_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/color_map.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/color_map.py
new file mode 100644
index 00000000..7fbb9d2a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/color_map.py
@@ -0,0 +1,15 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+from typing import List
+
+
+@dataclass
+class ColorMap(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/name.json
similarity index 89%
rename from src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_attribute.json
rename to src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/name.json
index 9eb5de68..ceedfa5a 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_attribute.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/name.json
@@ -1,5 +1,5 @@
{
- "rpc": "vertex_attribute",
+ "rpc": "name",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/name.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/name.py
new file mode 100644
index 00000000..fccf36dc
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/name.py
@@ -0,0 +1,11 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class Name(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/scalar_range.json
similarity index 90%
rename from src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.json
rename to src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/scalar_range.json
index 68a8cabe..cbc408ae 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/scalar_range.json
@@ -1,5 +1,5 @@
{
- "rpc": "vertex_scalar_range",
+ "rpc": "scalar_range",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/scalar_range.py
similarity index 82%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.py
rename to src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/scalar_range.py
index 735ba2a4..69d2fae4 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/attribute/vertex/schemas/scalar_range.py
@@ -3,7 +3,7 @@
@dataclass
-class VertexScalarRange(DataClassJsonMixin):
+class ScalarRange(DataClassJsonMixin):
def __post_init__(self) -> None:
print(self, flush=True)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/mesh_points_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py
similarity index 57%
rename from src/opengeodeweb_viewer/rpc/mesh/points/mesh_points_protocols.py
rename to src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py
index 26e8fe13..96b268f2 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/points/mesh_points_protocols.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/points_protocols.py
@@ -49,35 +49,3 @@ def setMeshPointsSize(self, rpc_params: RpcParams) -> None:
)
params = schemas.Size.from_dict(rpc_params)
self.SetPointsSize(params.id, params.size)
-
- @exportRpc(mesh_points_prefix + mesh_points_schemas_dict["vertex_attribute"]["rpc"])
- def setMeshPointsVertexAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_points_schemas_dict["vertex_attribute"],
- self.mesh_points_prefix,
- )
- params = schemas.VertexAttribute.from_dict(rpc_params)
- self.displayAttributeOnVertices(params.id, params.name)
-
- @exportRpc(
- mesh_points_prefix + mesh_points_schemas_dict["vertex_scalar_range"]["rpc"]
- )
- def setMeshPointsVertexScalarRange(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_points_schemas_dict["vertex_scalar_range"],
- self.mesh_points_prefix,
- )
- params = schemas.VertexScalarRange.from_dict(rpc_params)
- self.displayScalarRange(params.id, params.minimum, params.maximum)
-
- @exportRpc(mesh_points_prefix + mesh_points_schemas_dict["vertex_color_map"]["rpc"])
- def setMeshPointsVertexColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_points_schemas_dict["vertex_color_map"],
- self.mesh_points_prefix,
- )
- params = schemas.VertexColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.json
index 9f543d6d..95737cc6 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.json
@@ -8,18 +8,19 @@
},
"points": {
"type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
"items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
+ "type": "number"
},
- "minLength": 2
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
}
},
- "required": ["id", "points"],
+ "required": ["id", "points", "minimum", "maximum"],
"additionalProperties": false
}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.py
index 81fb473e..14239388 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/points/schemas/vertex_color_map.py
@@ -9,4 +9,7 @@ def __post_init__(self) -> None:
print(self, flush=True)
id: str
- points: List[List[float]]
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
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
new file mode 100644
index 00000000..df33dfae
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/polygons_attribute_polygon_protocols.py
@@ -0,0 +1,65 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshPolygonsAttributePolygonView(VtkMeshView):
+ mesh_polygons_attribute_polygon_prefix = (
+ "opengeodeweb_viewer.mesh.polygons.attribute.polygon."
+ )
+ mesh_polygons_attribute_polygon_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_polygons_attribute_polygon_prefix
+ + mesh_polygons_attribute_polygon_schemas_dict["name"]["rpc"]
+ )
+ def setMeshPolygonsPolygonAttribute(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polygons_attribute_polygon_schemas_dict["name"],
+ self.mesh_polygons_attribute_polygon_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnCells(params.id, params.name)
+
+ @exportRpc(
+ mesh_polygons_attribute_polygon_prefix
+ + mesh_polygons_attribute_polygon_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshPolygonsPolygonScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polygons_attribute_polygon_schemas_dict["scalar_range"],
+ self.mesh_polygons_attribute_polygon_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_polygons_attribute_polygon_prefix
+ + mesh_polygons_attribute_polygon_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshPolygonsPolygonColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polygons_attribute_polygon_schemas_dict["color_map"],
+ self.mesh_polygons_attribute_polygon_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/color_map.py
new file mode 100644
index 00000000..7fbb9d2a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/color_map.py
@@ -0,0 +1,15 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+from typing import List
+
+
+@dataclass
+class ColorMap(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/name.json
similarity index 89%
rename from src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_attribute.json
rename to src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/name.json
index 9eb5de68..ceedfa5a 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_attribute.json
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/name.json
@@ -1,5 +1,5 @@
{
- "rpc": "vertex_attribute",
+ "rpc": "name",
"type": "object",
"properties": {
"id": {
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/name.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/name.py
new file mode 100644
index 00000000..fccf36dc
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/name.py
@@ -0,0 +1,11 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class Name(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/scalar_range.json
new file mode 100644
index 00000000..cbc408ae
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/scalar_range.json
@@ -0,0 +1,22 @@
+{
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/scalar_range.py
new file mode 100644
index 00000000..69d2fae4
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/polygon/schemas/scalar_range.py
@@ -0,0 +1,12 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class ScalarRange(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
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
new file mode 100644
index 00000000..6892a3da
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/polygons_attribute_vertex_protocols.py
@@ -0,0 +1,65 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshPolygonsAttributeVertexView(VtkMeshView):
+ mesh_polygons_attribute_vertex_prefix = (
+ "opengeodeweb_viewer.mesh.polygons.attribute.vertex."
+ )
+ mesh_polygons_attribute_vertex_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_polygons_attribute_vertex_prefix
+ + mesh_polygons_attribute_vertex_schemas_dict["name"]["rpc"]
+ )
+ def setMeshPolygonsVertexName(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polygons_attribute_vertex_schemas_dict["name"],
+ self.mesh_polygons_attribute_vertex_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnVertices(params.id, params.name)
+
+ @exportRpc(
+ mesh_polygons_attribute_vertex_prefix
+ + mesh_polygons_attribute_vertex_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshPolygonsVertexScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polygons_attribute_vertex_schemas_dict["scalar_range"],
+ self.mesh_polygons_attribute_vertex_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_polygons_attribute_vertex_prefix
+ + mesh_polygons_attribute_vertex_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshPolygonsVertexColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polygons_attribute_vertex_schemas_dict["color_map"],
+ self.mesh_polygons_attribute_vertex_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/color_map.py
new file mode 100644
index 00000000..7fbb9d2a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/color_map.py
@@ -0,0 +1,15 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+from typing import List
+
+
+@dataclass
+class ColorMap(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/name.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/name.json
new file mode 100644
index 00000000..ceedfa5a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/name.json
@@ -0,0 +1,19 @@
+{
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+}
\ No newline at end of file
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/name.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/name.py
new file mode 100644
index 00000000..fccf36dc
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/name.py
@@ -0,0 +1,11 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class Name(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/scalar_range.json
new file mode 100644
index 00000000..cbc408ae
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/scalar_range.json
@@ -0,0 +1,22 @@
+{
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/scalar_range.py
new file mode 100644
index 00000000..69d2fae4
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/attribute/vertex/schemas/scalar_range.py
@@ -0,0 +1,12 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class ScalarRange(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py
index 5e7a8b52..f157f01d 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/polygons_protocols.py
@@ -43,75 +43,3 @@ def setMeshPolygonsColor(self, rpc_params: RpcParams) -> None:
params = schemas.Color.from_dict(rpc_params)
color = params.color
self.SetColor(params.id, color.r, color.g, color.b)
-
- @exportRpc(
- mesh_polygons_prefix + mesh_polygons_schemas_dict["vertex_attribute"]["rpc"]
- )
- def setMeshPolygonsVertexAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polygons_schemas_dict["vertex_attribute"],
- self.mesh_polygons_prefix,
- )
- params = schemas.VertexAttribute.from_dict(rpc_params)
- self.displayAttributeOnVertices(params.id, params.name)
-
- @exportRpc(
- mesh_polygons_prefix + mesh_polygons_schemas_dict["polygon_attribute"]["rpc"]
- )
- def setMeshPolygonsPolygonAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polygons_schemas_dict["polygon_attribute"],
- self.mesh_polygons_prefix,
- )
- params = schemas.PolygonAttribute.from_dict(rpc_params)
- self.displayAttributeOnCells(params.id, params.name)
-
- @exportRpc(
- mesh_polygons_prefix + mesh_polygons_schemas_dict["vertex_scalar_range"]["rpc"]
- )
- def setMeshPolygonsVertexScalarRange(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polygons_schemas_dict["vertex_scalar_range"],
- self.mesh_polygons_prefix,
- )
- params = schemas.VertexScalarRange.from_dict(rpc_params)
- self.displayScalarRange(params.id, params.minimum, params.maximum)
-
- @exportRpc(
- mesh_polygons_prefix + mesh_polygons_schemas_dict["polygon_scalar_range"]["rpc"]
- )
- def setMeshPolygonsPolygonScalarRange(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polygons_schemas_dict["polygon_scalar_range"],
- self.mesh_polygons_prefix,
- )
- params = schemas.PolygonScalarRange.from_dict(rpc_params)
- self.displayScalarRange(params.id, params.minimum, params.maximum)
-
- @exportRpc(
- mesh_polygons_prefix + mesh_polygons_schemas_dict["vertex_color_map"]["rpc"]
- )
- def setMeshPolygonsVertexColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polygons_schemas_dict["vertex_color_map"],
- self.mesh_polygons_prefix,
- )
- params = schemas.VertexColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
-
- @exportRpc(
- mesh_polygons_prefix + mesh_polygons_schemas_dict["polygon_color_map"]["rpc"]
- )
- def setMeshPolygonsPolygonColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polygons_schemas_dict["polygon_color_map"],
- self.mesh_polygons_prefix,
- )
- params = schemas.PolygonColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/__init__.py
index eb42b95d..e983533c 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/__init__.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/__init__.py
@@ -1,8 +1,2 @@
from .visibility import *
-from .vertex_scalar_range import *
-from .vertex_color_map import *
-from .vertex_attribute import *
-from .polygon_scalar_range import *
-from .polygon_color_map import *
-from .polygon_attribute import *
from .color import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_attribute.json
deleted file mode 100644
index e301d6ac..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_attribute.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "rpc": "polygon_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false
-}
\ No newline at end of file
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_attribute.py
deleted file mode 100644
index ebc20a6b..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_attribute.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-
-
-@dataclass
-class PolygonAttribute(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_color_map.json
deleted file mode 100644
index 9f543d6d..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_color_map.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": ["id", "points"],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_color_map.py
deleted file mode 100644
index 73b82115..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_color_map.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-from typing import List
-
-
-@dataclass
-class PolygonColorMap(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- points: List[List[float]]
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_scalar_range.json
deleted file mode 100644
index 75c20f19..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/polygon_scalar_range.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "rpc": "polygon_scalar_range",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "minimum": {
- "type": "number"
- },
- "maximum": {
- "type": "number"
- }
- },
- "required": [
- "id",
- "minimum",
- "maximum"
- ],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_attribute.py
deleted file mode 100644
index 64f7c2d0..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_attribute.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-
-
-@dataclass
-class VertexAttribute(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_color_map.json
deleted file mode 100644
index 9f543d6d..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_color_map.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": ["id", "points"],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_color_map.py
deleted file mode 100644
index 81fb473e..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polygons/schemas/vertex_color_map.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-from typing import List
-
-
-@dataclass
-class VertexColorMap(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- points: List[List[float]]
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
new file mode 100644
index 00000000..92269def
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/polyhedra_attribute_polyhedron_protocols.py
@@ -0,0 +1,65 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshPolyhedraAttributePolyhedronView(VtkMeshView):
+ mesh_polyhedra_attribute_polyhedron_prefix = (
+ "opengeodeweb_viewer.mesh.polyhedra.attribute.polyhedron."
+ )
+ mesh_polyhedra_attribute_polyhedron_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_polyhedra_attribute_polyhedron_prefix
+ + mesh_polyhedra_attribute_polyhedron_schemas_dict["name"]["rpc"]
+ )
+ def setMeshPolyhedraPolyhedronName(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polyhedra_attribute_polyhedron_schemas_dict["name"],
+ self.mesh_polyhedra_attribute_polyhedron_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnCells(params.id, params.name)
+
+ @exportRpc(
+ mesh_polyhedra_attribute_polyhedron_prefix
+ + mesh_polyhedra_attribute_polyhedron_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshPolyhedraPolyhedronScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polyhedra_attribute_polyhedron_schemas_dict["scalar_range"],
+ self.mesh_polyhedra_attribute_polyhedron_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_polyhedra_attribute_polyhedron_prefix
+ + mesh_polyhedra_attribute_polyhedron_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshPolyhedraPolyhedronColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polyhedra_attribute_polyhedron_schemas_dict["color_map"],
+ self.mesh_polyhedra_attribute_polyhedron_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/color_map.py
new file mode 100644
index 00000000..7fbb9d2a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/color_map.py
@@ -0,0 +1,15 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+from typing import List
+
+
+@dataclass
+class ColorMap(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/name.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/name.json
new file mode 100644
index 00000000..ceedfa5a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/name.json
@@ -0,0 +1,19 @@
+{
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+}
\ No newline at end of file
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/name.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/name.py
new file mode 100644
index 00000000..fccf36dc
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/name.py
@@ -0,0 +1,11 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class Name(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/scalar_range.json
new file mode 100644
index 00000000..cbc408ae
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/scalar_range.json
@@ -0,0 +1,22 @@
+{
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/scalar_range.py
new file mode 100644
index 00000000..69d2fae4
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/polyhedron/schemas/scalar_range.py
@@ -0,0 +1,12 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class ScalarRange(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
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
new file mode 100644
index 00000000..57a08485
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/polyhedra_attribute_vertex_protocols.py
@@ -0,0 +1,65 @@
+# Standard library imports
+import os
+
+# Third party imports
+from wslink import register as exportRpc # type: ignore
+from opengeodeweb_microservice.schemas import get_schemas_dict
+
+# Local application imports
+from opengeodeweb_viewer.utils_functions import (
+ validate_schema,
+ RpcParams,
+)
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from . import schemas
+
+
+class VtkMeshPolyhedraAttributeVertexView(VtkMeshView):
+ mesh_polyhedra_attribute_vertex_prefix = (
+ "opengeodeweb_viewer.mesh.polyhedra.attribute.vertex."
+ )
+ mesh_polyhedra_attribute_vertex_schemas_dict = get_schemas_dict(
+ os.path.join(os.path.dirname(__file__), "schemas")
+ )
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ @exportRpc(
+ mesh_polyhedra_attribute_vertex_prefix
+ + mesh_polyhedra_attribute_vertex_schemas_dict["name"]["rpc"]
+ )
+ def setMeshPolyhedraVertexName(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polyhedra_attribute_vertex_schemas_dict["name"],
+ self.mesh_polyhedra_attribute_vertex_prefix,
+ )
+ params = schemas.Name.from_dict(rpc_params)
+ self.displayAttributeOnVertices(params.id, params.name)
+
+ @exportRpc(
+ mesh_polyhedra_attribute_vertex_prefix
+ + mesh_polyhedra_attribute_vertex_schemas_dict["scalar_range"]["rpc"]
+ )
+ def setMeshPolyhedraVertexScalarRange(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polyhedra_attribute_vertex_schemas_dict["scalar_range"],
+ self.mesh_polyhedra_attribute_vertex_prefix,
+ )
+ params = schemas.ScalarRange.from_dict(rpc_params)
+ self.displayScalarRange(params.id, params.minimum, params.maximum)
+
+ @exportRpc(
+ mesh_polyhedra_attribute_vertex_prefix
+ + mesh_polyhedra_attribute_vertex_schemas_dict["color_map"]["rpc"]
+ )
+ def setMeshPolyhedraVertexColorMap(self, rpc_params: RpcParams) -> None:
+ validate_schema(
+ rpc_params,
+ self.mesh_polyhedra_attribute_vertex_schemas_dict["color_map"],
+ self.mesh_polyhedra_attribute_vertex_prefix,
+ )
+ params = schemas.ColorMap.from_dict(rpc_params)
+ self.setupColorMap(params.id, params.points, params.minimum, params.maximum)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/__init__.py
new file mode 100644
index 00000000..132463ad
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/__init__.py
@@ -0,0 +1,3 @@
+from .scalar_range import *
+from .name import *
+from .color_map import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/color_map.json
new file mode 100644
index 00000000..95737cc6
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/color_map.json
@@ -0,0 +1,26 @@
+{
+ "rpc": "color_map",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "points": {
+ "type": "array",
+ "description": "Flat array of [value, r, g, b, ...]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 8
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": ["id", "points", "minimum", "maximum"],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/color_map.py
new file mode 100644
index 00000000..7fbb9d2a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/color_map.py
@@ -0,0 +1,15 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+from typing import List
+
+
+@dataclass
+class ColorMap(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
+ points: List[float]
+ """Flat array of [value, r, g, b, ...]"""
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/name.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/name.json
new file mode 100644
index 00000000..ceedfa5a
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/name.json
@@ -0,0 +1,19 @@
+{
+ "rpc": "name",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "name": {
+ "type": "string",
+ "minLength": 1
+ }
+ },
+ "required": [
+ "id",
+ "name"
+ ],
+ "additionalProperties": false
+}
\ No newline at end of file
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/name.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/name.py
new file mode 100644
index 00000000..fccf36dc
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/name.py
@@ -0,0 +1,11 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class Name(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/scalar_range.json
new file mode 100644
index 00000000..cbc408ae
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/scalar_range.json
@@ -0,0 +1,22 @@
+{
+ "rpc": "scalar_range",
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "minLength": 1
+ },
+ "minimum": {
+ "type": "number"
+ },
+ "maximum": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "id",
+ "minimum",
+ "maximum"
+ ],
+ "additionalProperties": false
+}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/scalar_range.py
new file mode 100644
index 00000000..69d2fae4
--- /dev/null
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/attribute/vertex/schemas/scalar_range.py
@@ -0,0 +1,12 @@
+from dataclasses_json import DataClassJsonMixin
+from dataclasses import dataclass
+
+
+@dataclass
+class ScalarRange(DataClassJsonMixin):
+ def __post_init__(self) -> None:
+ print(self, flush=True)
+
+ id: str
+ maximum: float
+ minimum: float
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py
index da24f02b..dca898e3 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/polyhedra_protocols.py
@@ -43,79 +43,3 @@ def setMeshPolyhedraColor(self, rpc_params: RpcParams) -> None:
params = schemas.Color.from_dict(rpc_params)
color = params.color
self.SetColor(params.id, color.r, color.g, color.b)
-
- @exportRpc(
- mesh_polyhedra_prefix + mesh_polyhedra_schemas_dict["vertex_attribute"]["rpc"]
- )
- def setMeshPolyhedraVertexAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polyhedra_schemas_dict["vertex_attribute"],
- self.mesh_polyhedra_prefix,
- )
- params = schemas.VertexAttribute.from_dict(rpc_params)
- self.displayAttributeOnVertices(params.id, params.name)
-
- @exportRpc(
- mesh_polyhedra_prefix
- + mesh_polyhedra_schemas_dict["polyhedron_attribute"]["rpc"]
- )
- def setMeshPolyhedraPolyhedronAttribute(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polyhedra_schemas_dict["polyhedron_attribute"],
- self.mesh_polyhedra_prefix,
- )
- params = schemas.PolyhedronAttribute.from_dict(rpc_params)
- self.displayAttributeOnCells(params.id, params.name)
-
- @exportRpc(
- mesh_polyhedra_prefix
- + mesh_polyhedra_schemas_dict["vertex_scalar_range"]["rpc"]
- )
- def setMeshPolyhedraVertexScalarRange(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polyhedra_schemas_dict["vertex_scalar_range"],
- self.mesh_polyhedra_prefix,
- )
- params = schemas.VertexScalarRange.from_dict(rpc_params)
- self.displayScalarRange(params.id, params.minimum, params.maximum)
-
- @exportRpc(
- mesh_polyhedra_prefix
- + mesh_polyhedra_schemas_dict["polyhedron_scalar_range"]["rpc"]
- )
- def setMeshPolyhedraPolyhedronScalarRange(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polyhedra_schemas_dict["polyhedron_scalar_range"],
- self.mesh_polyhedra_prefix,
- )
- params = schemas.PolyhedronScalarRange.from_dict(rpc_params)
- self.displayScalarRange(params.id, params.minimum, params.maximum)
-
- @exportRpc(
- mesh_polyhedra_prefix + mesh_polyhedra_schemas_dict["vertex_color_map"]["rpc"]
- )
- def setMeshPolyhedraVertexColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polyhedra_schemas_dict["vertex_color_map"],
- self.mesh_polyhedra_prefix,
- )
- params = schemas.VertexColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
-
- @exportRpc(
- mesh_polyhedra_prefix
- + mesh_polyhedra_schemas_dict["polyhedra_color_map"]["rpc"]
- )
- def setMeshPolyhedraPolyhedraColorMap(self, rpc_params: RpcParams) -> None:
- validate_schema(
- rpc_params,
- self.mesh_polyhedra_schemas_dict["polyhedra_color_map"],
- self.mesh_polyhedra_prefix,
- )
- params = schemas.PolyhedraColorMap.from_dict(rpc_params)
- self.setupColorMap(params.id, params.points)
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/__init__.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/__init__.py
index 7646624d..e983533c 100644
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/__init__.py
+++ b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/__init__.py
@@ -1,8 +1,2 @@
from .visibility import *
-from .vertex_scalar_range import *
-from .vertex_color_map import *
-from .vertex_attribute import *
-from .polyhedron_scalar_range import *
-from .polyhedron_attribute import *
-from .polyhedra_color_map import *
from .color import *
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedra_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedra_color_map.json
deleted file mode 100644
index 9f543d6d..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedra_color_map.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": ["id", "points"],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedra_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedra_color_map.py
deleted file mode 100644
index f2e054f9..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedra_color_map.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-from typing import List
-
-
-@dataclass
-class PolyhedraColorMap(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- points: List[List[float]]
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_attribute.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_attribute.json
deleted file mode 100644
index 6ee61a64..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_attribute.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "rpc": "polyhedron_attribute",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "name": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "id",
- "name"
- ],
- "additionalProperties": false
-}
\ No newline at end of file
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_attribute.py
deleted file mode 100644
index b2cb0ba3..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_attribute.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-
-
-@dataclass
-class PolyhedronAttribute(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_scalar_range.json
deleted file mode 100644
index 31d646dd..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_scalar_range.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "rpc": "polyhedron_scalar_range",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "minimum": {
- "type": "number"
- },
- "maximum": {
- "type": "number"
- }
- },
- "required": [
- "id",
- "minimum",
- "maximum"
- ],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_scalar_range.py
deleted file mode 100644
index 16b8dae6..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/polyhedron_scalar_range.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-
-
-@dataclass
-class PolyhedronScalarRange(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- maximum: float
- minimum: float
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_attribute.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_attribute.py
deleted file mode 100644
index 64f7c2d0..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_attribute.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-
-
-@dataclass
-class VertexAttribute(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- name: str
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_color_map.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_color_map.json
deleted file mode 100644
index 9f543d6d..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_color_map.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "rpc": "color_map",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "points": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[value, r, g, b]",
- "items": {
- "type": "number"
- },
- "minItems": 4,
- "maxItems": 4
- },
- "minLength": 2
- }
- },
- "required": ["id", "points"],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_color_map.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_color_map.py
deleted file mode 100644
index 81fb473e..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_color_map.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from dataclasses_json import DataClassJsonMixin
-from dataclasses import dataclass
-from typing import List
-
-
-@dataclass
-class VertexColorMap(DataClassJsonMixin):
- def __post_init__(self) -> None:
- print(self, flush=True)
-
- id: str
- points: List[List[float]]
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_scalar_range.json b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_scalar_range.json
deleted file mode 100644
index 68a8cabe..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_scalar_range.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "rpc": "vertex_scalar_range",
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "minLength": 1
- },
- "minimum": {
- "type": "number"
- },
- "maximum": {
- "type": "number"
- }
- },
- "required": [
- "id",
- "minimum",
- "maximum"
- ],
- "additionalProperties": false
-}
diff --git a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_scalar_range.py b/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_scalar_range.py
deleted file mode 100644
index 735ba2a4..00000000
--- a/src/opengeodeweb_viewer/rpc/mesh/polyhedra/schemas/vertex_scalar_range.py
+++ /dev/null
@@ -1,12 +0,0 @@
-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
diff --git a/src/opengeodeweb_viewer/vtk_protocol.py b/src/opengeodeweb_viewer/vtk_protocol.py
index cda33155..9124cacc 100644
--- a/src/opengeodeweb_viewer/vtk_protocol.py
+++ b/src/opengeodeweb_viewer/vtk_protocol.py
@@ -40,7 +40,7 @@ class VtkPipeline:
mapper: vtkMapper
filter: vtkAlgorithm | None = None
actor: vtkActor = field(default_factory=vtkActor)
- color_map_points: list[list[float]] = field(default_factory=list)
+ # color_map_points: list[list[float]] = field(default_factory=list)
class VtkTypingMixin:
diff --git a/src/opengeodeweb_viewer/vtkw_server.py b/src/opengeodeweb_viewer/vtkw_server.py
index f05b2ab6..68868476 100644
--- a/src/opengeodeweb_viewer/vtkw_server.py
+++ b/src/opengeodeweb_viewer/vtkw_server.py
@@ -17,11 +17,38 @@
from .vtk_protocol import VtkView, VtkTypingMixin
from .rpc.viewer.viewer_protocols import VtkViewerView
from .rpc.mesh.mesh_protocols import VtkMeshView
-from .rpc.mesh.points.mesh_points_protocols import VtkMeshPointsView
-from .rpc.mesh.edges.mesh_edges_protocols import VtkMeshEdgesView
+from .rpc.mesh.points.points_protocols import VtkMeshPointsView
+from .rpc.mesh.points.attribute.vertex.points_attribute_vertex_protocols import (
+ VtkMeshPointsAttributeVertexView,
+)
+from .rpc.mesh.edges.edges_protocols import VtkMeshEdgesView
+from .rpc.mesh.edges.attribute.vertex.edges_attribute_vertex_protocols import (
+ VtkMeshEdgesAttributeVertexView,
+)
+from .rpc.mesh.edges.attribute.edge.edges_attribute_edge_protocols import (
+ VtkMeshEdgesAttributeEdgeView,
+)
from .rpc.mesh.cells.cells_protocols import VtkMeshCellsView
+from .rpc.mesh.cells.attribute.vertex.cells_attribute_vertex_protocols import (
+ VtkMeshCellsAttributeVertexView,
+)
+from .rpc.mesh.cells.attribute.cell.cells_attribute_cell_protocols import (
+ VtkMeshCellsAttributeCellView,
+)
from .rpc.mesh.polygons.polygons_protocols import VtkMeshPolygonsView
+from .rpc.mesh.polygons.attribute.vertex.polygons_attribute_vertex_protocols import (
+ VtkMeshPolygonsAttributeVertexView,
+)
+from .rpc.mesh.polygons.attribute.polygon.polygons_attribute_polygon_protocols import (
+ VtkMeshPolygonsAttributePolygonView,
+)
from .rpc.mesh.polyhedra.polyhedra_protocols import VtkMeshPolyhedraView
+from .rpc.mesh.polyhedra.attribute.vertex.polyhedra_attribute_vertex_protocols import (
+ VtkMeshPolyhedraAttributeVertexView,
+)
+from .rpc.mesh.polyhedra.attribute.polyhedron.polyhedra_attribute_polyhedron_protocols import (
+ VtkMeshPolyhedraAttributePolyhedronView,
+)
from .rpc.model.model_protocols import VtkModelView
from .rpc.model.edges.model_edges_protocols import (
VtkModelEdgesView,
@@ -87,10 +114,19 @@ def initialize(self) -> None:
self.registerVtkWebProtocol(VtkViewerView())
self.registerVtkWebProtocol(mesh_protocols)
self.registerVtkWebProtocol(VtkMeshPointsView())
+ self.registerVtkWebProtocol(VtkMeshPointsAttributeVertexView())
self.registerVtkWebProtocol(VtkMeshEdgesView())
+ self.registerVtkWebProtocol(VtkMeshEdgesAttributeVertexView())
+ self.registerVtkWebProtocol(VtkMeshEdgesAttributeEdgeView())
self.registerVtkWebProtocol(VtkMeshCellsView())
+ self.registerVtkWebProtocol(VtkMeshCellsAttributeVertexView())
+ self.registerVtkWebProtocol(VtkMeshCellsAttributeCellView())
self.registerVtkWebProtocol(VtkMeshPolygonsView())
+ self.registerVtkWebProtocol(VtkMeshPolygonsAttributeVertexView())
+ self.registerVtkWebProtocol(VtkMeshPolygonsAttributePolygonView())
self.registerVtkWebProtocol(VtkMeshPolyhedraView())
+ self.registerVtkWebProtocol(VtkMeshPolyhedraAttributeVertexView())
+ self.registerVtkWebProtocol(VtkMeshPolyhedraAttributePolyhedronView())
self.registerVtkWebProtocol(model_protocols)
self.registerVtkWebProtocol(VtkModelEdgesView())
self.registerVtkWebProtocol(VtkModelPointsView())
diff --git a/tests/conftest.py b/tests/conftest.py
index 04342e60..66a5ecb9 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -193,8 +193,8 @@ def server(xprocess: XProcess) -> Generator[ServerMonitor, None, None]:
@pytest.fixture(scope="session", autouse=True)
def configure_test_environment() -> Generator[None, None, None]:
- project_root = Path(__file__).parent.parent.parent.absolute()
- os.environ["DATA_FOLDER_PATH"] = str(project_root / "tests" / "data")
+ project_root = Path(__file__).parent.absolute()
+ os.environ["DATA_FOLDER_PATH"] = str(project_root / "data")
config.test_config()
db_path = Path(os.environ["DATA_FOLDER_PATH"]) / "project.db"
diff --git a/tests/data/123456789/attributed_edged_curve.vtp b/tests/data/123456789/attributed_edged_curve.vtp
new file mode 100644
index 00000000..7aa04b93
--- /dev/null
+++ b/tests/data/123456789/attributed_edged_curve.vtp
@@ -0,0 +1,22 @@
+
+
+
+
+
+ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58
+ 0 0 0 3 0 0 3 3 0 0 3 0 0 0 4 3 0 4 3 3 4 0 3 4 1 1 1 2 1 1 2 2 1 1 2 1 1 1 2 2 1 2 2 2 2 1 2 2 1 1 3 2 1 3 2 2 3 1 2 3 4 1 1 5 1 1 5 2 1 4 2 1 4 1 3 5 1 3 5 2 3 4 2 3 1 1 3.5 1 2 3.5
+
+
+ 0 0 0 3 0 0 3 3 0 0 3 0 0 0 4 3 0 4 3 3 4 0 3 4 1 1 1 2 1 1 2 2 1 1 2 1 1 1 2 2 1 2 2 2 2 1 2 2 1 1 3 2 1 3 2 2 3 1 2 3 4 1 1 5 1 1 5 2 1 4 2 1 4 1 3 5 1 3 5 2 3 4 2 3 1 1 3.5 1 2 3.5
+
+
+ 0 1 1 2 2 3 3 0 0 1 1 5 5 4 4 0 1 2 2 6 6 5 5 1 3 2 2 6 6 7 7 3 4 5 5 6 6 7 7 4 0 3 3 7 7 4 4 0 8 9 9 10 10 11 11 8 12 13 13 14 14 15 15 12 16 17 17 18 18 19 19 16 8 9 9 13 13 12 12 8 12 13 13 17 17 16 16 12 9 10 10 14 14 13 13 9 13 14 14 18 18 17 17 13 11 10 10 14 14 15 15 11 15 14 14 18 18 19 19 15 8 11 11 15 15 12 12 8 12 15 15 19 19 16 16 12 20 21 21 22 22 23 23 20 20 21 21 25 25 24 24 20 21 22 22 26 26 25 25 21 23 22 22 26 26 27 27 23 24 25 25 26 26 27 27 24 20 23 23 27 27 24 24 20 16 19 19 29 29 28 28 16
+ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190
+
+
+ 0 1 1 2 2 3 3 0 0 1 1 5 5 4 4 0 1 2 2 6 6 5 5 1 3 2 2 6 6 7 7 3 4 5 5 6 6 7 7 4 0 3 3 7 7 4 4 0 8 9 9 10 10 11 11 8 12 13 13 14 14 15 15 12 16 17 17 18 18 19 19 16 8 9 9 13 13 12 12 8 12 13 13 17 17 16 16 12 9 10 10 14 14 13 13 9 13 14 14 18 18 17 17 13 11 10 10 14 14 15 15 11 15 14 14 18 18 19 19 15 8 11 11 15 15 12 12 8 12 15 15 19 19 16 16 12 20 21 21 22 22 23 23 20 20 21 21 25 25 24 24 20 21 22 22 26 26 25 25 21 23 22 22 26 26 27 27 23 24 25 25 26 26 27 27 24 20 23 23 27 27 24 24 20 16 19 19 29 29 28 28 16
+ 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192
+
+
+
+
diff --git a/tests/data/123456789/edged_curve.vtp b/tests/data/123456789/edged_curve.vtp
new file mode 100644
index 00000000..7c212e64
--- /dev/null
+++ b/tests/data/123456789/edged_curve.vtp
@@ -0,0 +1,20 @@
+
+
+
+
+
+ 0.1 0.2 0.3 2.1 9.4 6.7 7.5 5.2 6.3 8.7 1.4 4.7
+
+
+ 0.1 0.2 0.3 2.1 9.4 6.7 7.5 5.2 6.3 8.7 1.4 4.7
+
+
+ 0 1 0 2 3 2 1 2
+
+
+ 0 1 0 2 3 2 1 2
+ 2 4 6 8
+
+
+
+
\ No newline at end of file
diff --git a/tests/data/123456789/hat.vtp b/tests/data/123456789/hat.vtp
new file mode 100644
index 00000000..16c8d186
--- /dev/null
+++ b/tests/data/123456789/hat.vtp
@@ -0,0 +1,19 @@
+
+
+
+
+
+ -0.0344 3.49326 -2.56294 -0.746606 3.49326 -2.41103 -0.751494 4.69435 -2.59299 -0.0344 4.66004 -2.72529 -1.4469 3.49326 -1.97797 -1.39839 4.74693 -2.20902 -1.79945 3.49326 -1.44466 -1.91178 4.77258 -1.61271 -2.0258 3.49326 -0.795094 -2.24139 4.77258 -0.886411 -2.1038 3.49326 -0.022052 -2.35496 4.77258 -0.022052 -2.0258 3.49326 0.75099 -2.24139 4.77258 0.842307 -1.79945 3.49326 1.40056 -1.91178 4.77258 1.56861 -1.4469 3.49326 1.93387 -1.39839 4.74693 2.16492 -0.769369 3.49326 2.36009 -0.751494 4.69435 2.54888 -0.0344 3.49326 2.51444 -0.0344 4.66004 2.67666 -0.751495 0.130125 -2.59299 -0.0344 0.130125 -2.72529 -0.0344 0.57239 -0.022052 -1.39839 0.228344 -2.20902 -1.91178 0.409344 -1.61271 -2.24139 0.507502 -0.886411 -2.35496 0.577983 -0.022052 -2.24139 0.507502 0.842307 -1.91178 0.409344 1.56861 -1.39839 0.228344 2.16492 -0.751494 0.130125 2.54888 -0.0344 0.130125 2.67666 -0.0344 4.66004 -2.72529 -0.751494 4.69435 -2.59299 -0.0344 4.4761 -0.022052 -1.39839 4.74693 -2.20902 -1.91178 4.77258 -1.61271 -2.24139 4.77258 -0.886411 -2.35496 4.77258 -0.022052 -2.24139 4.77258 0.842307 -1.91178 4.77258 1.56861 -1.39839 4.74693 2.16492 -0.751494 4.69435 2.54888 -0.0344 4.66004 2.67666 -0.0344 1.3315 -2.65285 -0.751495 1.3315 -2.53987 -0.769231 2.52268 -2.42928 -0.0344 2.52268 -2.56294 -1.39839 1.3315 -2.20902 -1.46662 2.52268 -2.03076 -1.91178 1.3315 -1.61271 -1.75379 2.52268 -1.48306 -2.17435 1.3315 -0.886411 -1.93816 2.52268 -0.815959 -2.29561 1.3315 -0.022052 -2.00169 2.52268 -0.022052 -2.19511 1.3315 0.842307 -1.93816 2.52268 0.771855 -1.88773 1.3315 1.53967 -1.75379 2.52268 1.43896 -1.39839 1.3315 2.16492 -1.46662 2.52268 1.98666 -0.751494 1.3315 2.50364 -0.772059 2.52268 2.36009 -0.0344 1.3315 2.59863 -0.0344 2.52268 2.51444 -0.0344 0.282663 -2.8649 -0.823894 0.282663 -2.72047 -0.823894 1.3315 -2.66735 -0.0344 1.3315 -2.79246 -1.52391 0.380882 -2.30754 -1.52391 1.3315 -2.30754 -2.06804 0.561882 -1.67818 -2.06804 1.3315 -1.67818 -2.41302 0.66004 -0.918576 -2.34598 1.3315 -0.918576 -2.53151 0.730521 -0.022052 -2.47216 1.3315 -0.022052 -2.41302 0.66004 0.874472 -2.36674 1.3315 0.874472 -2.06804 0.561882 1.63407 -2.04399 1.3315 1.60513 -1.52391 0.380882 2.26344 -1.52391 1.3315 2.26344 -0.823893 0.282663 2.67636 -0.823893 1.3315 2.63112 -0.0344 0.282663 2.83422 -0.0344 1.3315 2.7562 -0.823894 0.130125 -2.72047 -0.0344 0.130125 -2.8649 -0.751495 1.3315 -2.53987 -0.0344 1.3315 -2.65285 -1.52391 0.228344 -2.30754 -1.39839 1.3315 -2.20902 -2.06804 0.409344 -1.67818 -1.91178 1.3315 -1.61271 -2.41302 0.507502 -0.918576 -2.17435 1.3315 -0.886411 -2.53151 0.577983 -0.022052 -2.29561 1.3315 -0.022052 -2.41302 0.507502 0.874472 -2.19511 1.3315 0.842307 -2.06804 0.409344 1.63407 -1.88773 1.3315 1.53967 -1.52391 0.228344 2.26344 -1.39839 1.3315 2.16492 -0.823893 0.130125 2.67636 -0.751494 1.3315 2.50364 -0.0344 0.130125 2.83422 -0.0344 1.3315 2.59863 -0.781923 0.340472 -3.34805 -0.0344 0.340472 -3.57671 -0.0344 0.537192 -4.00029 -0.865588 0.553411 -3.75283 -0.015451 0.249473 -3.57671 -0.781923 0.249473 -3.34805 -0.865588 0.400873 -3.75283 -0.0344 0.384654 -4.00029 -1.7248 0.399066 -2.74593 -2.05218 0.700237 -3.10557 -1.7248 0.308067 -2.74593 -2.05218 0.547699 -3.10557 -2.34592 0.507044 -2.03123 -2.79495 0.793754 -2.33236 -2.34592 0.466811 -2.03123 -2.79495 0.732266 -2.33236 -2.7394 0.580814 -1.10784 -3.11037 1.07182 -1.23796 -2.7394 0.562605 -1.10784 -3.11037 0.842107 -1.23796 -2.83875 0.669153 -0.022052 -3.23206 1.17795 -0.022052 -2.83875 0.609911 -0.022052 -3.23206 0.948245 -0.022052 -2.7394 0.580814 1.06374 -3.09099 1.10135 1.23241 -2.7394 0.54025 1.06374 -3.09099 0.871645 1.23241 -2.34592 0.507044 1.98712 -2.7773 0.953484 2.28609 -2.34592 0.429825 1.98712 -2.7773 0.800946 2.28609 -1.7248 0.399066 2.70183 -2.05218 0.802252 3.06147 -1.7248 0.308067 2.70183 -2.05218 0.649714 3.06147 -0.78192 0.340472 3.30395 -0.85871 0.57721 3.67978 -0.78192 0.249473 3.30395 -0.85871 0.424672 3.67978 -0.0344 0.340472 3.5326 -0.0344 0.530215 3.84547 -0.0344 0.249473 3.5326 -0.0344 0.402693 3.84547 -0.0344 0.130125 -2.8649 -0.823894 0.130125 -2.72047 -1.52391 0.228344 -2.30754 -2.06804 0.409344 -1.67818 -2.41302 0.507502 -0.918576 -2.53151 0.577983 -0.022052 -2.41302 0.507502 0.874472 -2.06804 0.409344 1.63407 -1.52391 0.228344 2.26344 -0.823893 0.130125 2.67636 -0.0344 0.130125 2.83422 -0.0344 0.282663 2.83422 -0.823893 0.282663 2.67636 -1.52391 0.380882 2.26344 -2.06804 0.561882 1.63407 -2.41302 0.66004 0.874472 -2.53151 0.730521 -0.022052 -2.41302 0.66004 -0.918576 -2.06804 0.561882 -1.67818 -1.52391 0.380882 -2.30754 -0.823894 0.282663 -2.72047 -0.0344 0.282663 -2.8649 -0.0344 0.589297 -4.10777 -0.869538 0.663207 -3.89456 -2.15592 0.846941 -3.20213 -2.88945 0.978742 -2.42408 -3.2188 1.23977 -1.31163 -3.34788 1.34591 -0.022052 -3.20918 1.25444 1.28668 -2.88695 1.08119 2.32146 -2.13806 0.868175 3.12571 -0.887083 0.649851 3.76697 -0.0344 0.586603 3.927 -0.0344 0.459081 3.927 -0.887083 0.497313 3.76697 -2.13806 0.715637 3.12571 -2.88695 0.928653 2.32146 -3.20918 1.02474 1.28668 -3.34788 1.1162 -0.022052 -3.2188 1.01006 -1.31163 -2.88945 0.871431 -2.42408 -2.15592 0.694403 -3.20213 -0.869538 0.510669 -3.89456 -0.0344 0.436759 -4.10777 -0.0344 0.576503 -4.19294 -0.0344 0.545644 -4.21385 -0.823442 0.677094 -4.02919 -0.851438 0.704302 -4.00471 -2.21428 0.898458 -3.28909 -2.20761 0.913142 -3.26968 -0.0344 0.477241 -4.21385 -0.0344 0.446834 -4.1915 -0.879207 0.585849 -3.96306 -0.848911 0.621782 -3.99453 -2.21325 0.781882 -3.28577 -2.21498 0.826447 -3.30575 -2.9287 1.06571 -2.51707 -2.9182 1.07541 -2.49482 -2.94401 0.952947 -2.49611 -2.94938 0.998373 -2.51213 -3.27121 1.30962 -1.38873 -3.25325 1.31278 -1.38906 -3.28384 1.11632 -1.36809 -3.29307 1.16573 -1.37997 -3.40801 1.4161 -0.022052 -3.39036 1.42168 -0.040673 -3.41799 1.22153 -0.039394 -3.42899 1.27153 -0.022052 -3.27125 1.30965 1.34431 -3.25896 1.32204 1.30749 -3.28397 1.11828 1.31821 -3.29304 1.1657 1.33619 -3.25896 1.32204 1.30749 -2.94347 1.11265 2.35161 -2.93753 1.13404 2.32155 -2.94826 0.995344 2.34972 -2.95948 1.04334 2.36112 -2.16903 0.837924 3.18657 -2.18152 0.868241 3.15349 -2.16835 0.765307 3.1478 -2.16456 0.807479 3.17251 -0.846103 0.625209 3.8584 -0.851219 0.652778 3.8302 -0.910606 0.523476 3.82195 -0.896708 0.559322 3.84767 -0.0344 0.562771 4.00852 -0.0344 0.586074 3.98748 -0.0344 0.477578 3.98653 -0.0344 0.505585 4.00852 -0.823442 0.677094 -4.02919 -0.0344 0.545644 -4.21385 -2.21428 0.898458 -3.28909 -2.9287 1.06571 -2.51707 -3.27121 1.30962 -1.38873 -3.40801 1.4161 -0.022052 -3.27125 1.30965 1.34431 -2.94347 1.11265 2.35161 -2.16903 0.837924 3.18657 -0.846103 0.625209 3.8584 -0.0344 0.562771 4.00852 0.682694 4.69435 -2.59299 0.677806 3.49326 -2.41103 1.32959 4.74693 -2.20902 1.3781 3.49326 -1.97797 1.84298 4.77258 -1.61271 1.73065 3.49326 -1.44466 2.17259 4.77258 -0.886411 1.95701 3.49326 -0.795094 2.28616 4.77258 -0.022052 2.035 3.49326 -0.022052 2.17259 4.77258 0.842307 1.95701 3.49326 0.75099 1.95701 3.49326 0.75099 2.17259 4.77258 0.842307 1.84298 4.77258 1.56861 1.73065 3.49326 1.40056 1.32959 4.74693 2.16492 1.3781 3.49326 1.93387 0.682694 4.69435 2.54888 0.700569 3.49326 2.36009 0.682694 0.130125 -2.59299 1.32959 0.228344 -2.20902 1.84298 0.409344 -1.61271 2.17259 0.507502 -0.886411 2.28616 0.577983 -0.022052 2.17259 0.507502 0.842307 1.84298 0.409344 1.56861 1.32959 0.228344 2.16492 0.682694 0.130125 2.54888 0.682694 4.69435 -2.59299 1.32959 4.74693 -2.20902 1.84298 4.77258 -1.61271 2.17259 4.77258 -0.886411 2.28616 4.77258 -0.022052 2.17259 4.77258 0.842307 1.84298 4.77258 1.56861 1.32959 4.74693 2.16492 0.682694 4.69435 2.54888 0.700431 2.52268 -2.42928 0.682694 1.3315 -2.53987 1.39782 2.52268 -2.03076 1.32959 1.3315 -2.20902 1.68499 2.52268 -1.48306 1.84298 1.3315 -1.61271 1.86936 2.52268 -0.815959 2.10555 1.3315 -0.886411 1.93289 2.52268 -0.022052 2.22681 1.3315 -0.022052 1.86936 2.52268 0.771855 2.12631 1.3315 0.842307 2.12631 1.3315 0.842307 1.86936 2.52268 0.771855 1.68499 2.52268 1.43896 1.81893 1.3315 1.53967 1.39782 2.52268 1.98666 1.32959 1.3315 2.16492 0.703259 2.52268 2.36009 0.682694 1.3315 2.50364 0.755094 1.3315 -2.66735 0.755094 0.282663 -2.72047 1.45511 1.3315 -2.30754 1.45511 0.380882 -2.30754 1.99924 1.3315 -1.67818 1.99924 0.561882 -1.67818 2.27718 1.3315 -0.918576 2.34422 0.66004 -0.918576 2.40336 1.3315 -0.022052 2.46271 0.730521 -0.022052 2.29794 1.3315 0.874472 2.34422 0.66004 0.874472 2.34422 0.66004 0.874472 2.29794 1.3315 0.874472 1.9752 1.3315 1.60513 1.99924 0.561882 1.63407 1.45511 1.3315 2.26344 1.45511 0.380882 2.26344 0.755093 1.3315 2.63112 0.755093 0.282663 2.67636 0.755094 0.130125 -2.72047 0.682694 1.3315 -2.53987 1.45511 0.228344 -2.30754 1.32959 1.3315 -2.20902 1.99924 0.409344 -1.67818 1.84298 1.3315 -1.61271 2.34422 0.507502 -0.918576 2.10555 1.3315 -0.886411 2.46271 0.577983 -0.022052 2.22681 1.3315 -0.022052 2.34422 0.507502 0.874472 2.12631 1.3315 0.842307 1.99924 0.409344 1.63407 1.81893 1.3315 1.53967 2.12631 1.3315 0.842307 1.45511 0.228344 2.26344 1.32959 1.3315 2.16492 0.755093 0.130125 2.67636 0.682694 1.3315 2.50364 0.713123 0.340472 -3.34805 0.796788 0.553411 -3.75283 -0.053349 0.249473 -3.57671 0.796788 0.400873 -3.75283 0.713123 0.249473 -3.34805 1.656 0.399066 -2.74593 1.98338 0.700237 -3.10557 1.98338 0.547699 -3.10557 1.656 0.308067 -2.74593 2.27712 0.507044 -2.03123 2.72615 0.793754 -2.33236 2.72615 0.732266 -2.33236 2.27712 0.466811 -2.03123 2.6706 0.580814 -1.10784 3.04157 1.07182 -1.23796 3.04157 0.842107 -1.23796 2.6706 0.562605 -1.10784 2.76995 0.669153 -0.022052 3.16326 1.17795 -0.022052 3.16326 0.948245 -0.022052 2.76995 0.609911 -0.022052 2.6706 0.580814 1.06374 3.02219 1.10135 1.23241 3.02219 0.871645 1.23241 2.6706 0.54025 1.06374 2.27712 0.507044 1.98712 2.7085 0.953484 2.28609 2.7085 0.800946 2.28609 2.27712 0.429825 1.98712 1.656 0.399066 2.70183 1.98338 0.802252 3.06147 1.98338 0.649714 3.06147 1.656 0.308067 2.70183 0.71312 0.340472 3.30395 0.78991 0.57721 3.67978 0.78991 0.424672 3.67978 0.71312 0.249473 3.30395 -0.0344 0.340472 3.5326 -0.0344 0.530215 3.84547 -0.0344 0.402693 3.84547 -0.0344 0.249473 3.5326 0.755094 0.130125 -2.72047 1.45511 0.228344 -2.30754 1.99924 0.409344 -1.67818 2.34422 0.507502 -0.918576 2.46271 0.577983 -0.022052 2.34422 0.507502 0.874472 1.99924 0.409344 1.63407 1.45511 0.228344 2.26344 0.755093 0.130125 2.67636 -0.0344 0.130125 2.83422 -0.0344 0.282663 2.83422 0.755093 0.282663 2.67636 1.45511 0.380882 2.26344 1.99924 0.561882 1.63407 2.34422 0.66004 0.874472 2.46271 0.730521 -0.022052 2.34422 0.66004 -0.918576 1.99924 0.561882 -1.67818 1.45511 0.380882 -2.30754 0.755094 0.282663 -2.72047 0.800738 0.663207 -3.89456 2.08712 0.846941 -3.20213 2.82065 0.978742 -2.42408 3.15 1.23977 -1.31163 3.27908 1.34591 -0.022052 3.14038 1.25444 1.28668 2.81815 1.08119 2.32146 2.06926 0.868175 3.12571 0.818283 0.649851 3.76697 -0.0344 0.586603 3.927 0.818283 0.497313 3.76697 -0.0344 0.459081 3.927 2.06926 0.715637 3.12571 2.81815 0.928653 2.32146 3.14038 1.02474 1.28668 3.27908 1.1162 -0.022052 3.15 1.01006 -1.31163 2.82065 0.871431 -2.42408 2.08712 0.694403 -3.20213 0.800738 0.510669 -3.89456 0.782638 0.704302 -4.00471 0.754642 0.677094 -4.02919 2.13881 0.913142 -3.26968 2.14548 0.898458 -3.28909 0.780111 0.621782 -3.99453 0.810407 0.585849 -3.96306 2.14618 0.826447 -3.30575 2.14445 0.781882 -3.28577 2.8494 1.07541 -2.49482 2.8599 1.06571 -2.51707 2.88058 0.998373 -2.51213 2.87521 0.952947 -2.49611 3.18445 1.31278 -1.38906 3.20241 1.30962 -1.38873 3.22427 1.16573 -1.37997 3.21504 1.11632 -1.36809 3.32156 1.42168 -0.040673 3.33921 1.4161 -0.022052 3.36019 1.27153 -0.022052 3.34919 1.22153 -0.039394 3.19016 1.32204 1.30749 3.20245 1.30965 1.34431 3.22424 1.1657 1.33619 3.21517 1.11828 1.31821 2.86873 1.13404 2.32155 2.87467 1.11265 2.35161 2.89068 1.04334 2.36112 2.87946 0.995344 2.34972 2.11272 0.868241 3.15349 2.10023 0.837924 3.18657 2.09576 0.807479 3.17251 2.09955 0.765307 3.1478 0.782419 0.652778 3.8302 0.777303 0.625209 3.8584 0.827908 0.559322 3.84767 0.841806 0.523476 3.82195 -0.0344 0.586074 3.98748 -0.0344 0.562771 4.00852 -0.0344 0.505585 4.00852 -0.0344 0.477578 3.98653 0.754642 0.677094 -4.02919 2.14548 0.898458 -3.28909 2.8599 1.06571 -2.51707 3.20241 1.30962 -1.38873 3.33921 1.4161 -0.022052 3.20245 1.30965 1.34431 2.87467 1.11265 2.35161 2.10023 0.837924 3.18657 0.777303 0.625209 3.8584 -0.0344 0.562771 4.00852
+ 0.094832 0.332542 0.094898 0.376287 0.02427 0.372826 0.026265 0.332319 0.095031 0.425584 0.021479 0.41466 0.09492 0.463978 0.019723 0.458455 0.094834 0.505035 0.019154 0.503036 0.095175 0.551185 0.019303 0.552076 0.09592 0.597323 0.020303 0.601106 0.096959 0.638355 0.02192 0.645665 0.097993 0.676721 0.02472 0.689413 0.09899 0.7246 0.028507 0.731176 0.100089 0.769556 0.031498 0.771601 0.625671 0.131366 0.667361 0.123777 0.667361 0.283352 0.588028 0.154305 0.557903 0.190301 0.538759 0.232921 0.532169 0.283349 0.538757 0.333777 0.5579 0.3764 0.588023 0.412396 0.625667 0.435336 0.667357 0.442667 0.701803 0.665625 0.743838 0.673233 0.701804 0.823361 0.78192 0.695516 0.812079 0.730322 0.831342 0.772815 0.837985 0.823359 0.831343 0.873903 0.81208 0.916398 0.781923 0.951204 0.743839 0.973488 0.701803 0.980834 0.220878 0.33297 0.220898 0.3736 0.151363 0.376972 0.151322 0.332731 0.221058 0.41421 0.151686 0.424532 0.221832 0.457948 0.151551 0.461361 0.22239 0.500896 0.151569 0.502846 0.223411 0.549658 0.151975 0.550518 0.223816 0.598279 0.152719 0.598199 0.223596 0.640559 0.153598 0.639627 0.224294 0.684796 0.154639 0.676477 0.225308 0.725559 0.155475 0.723222 0.226169 0.76593 0.156648 0.767906 0.366621 0.314135 0.370778 0.360637 0.309866 0.366524 0.305702 0.320589 0.36826 0.408194 0.313021 0.411675 0.360451 0.457158 0.315734 0.459358 0.356888 0.505806 0.317555 0.50596 0.353674 0.55835 0.31849 0.55841 0.357077 0.61096 0.317888 0.61057 0.360723 0.659716 0.315919 0.656589 0.368041 0.708813 0.312883 0.704705 0.369917 0.756557 0.309099 0.74987 0.364996 0.803308 0.304237 0.795555 0.621414 0.123954 0.667361 0.115625 0.301453 0.365519 0.29767 0.321443 0.580655 0.148631 0.304052 0.410059 0.548775 0.18652 0.306087 0.458418 0.528748 0.231058 0.307385 0.505593 0.521874 0.283349 0.308262 0.558344 0.528746 0.33564 0.307831 0.611121 0.54877 0.38018 0.306124 0.657551 0.58065 0.41807 0.303914 0.706019 0.621409 0.442748 0.300662 0.750704 0.667357 0.451863 0.295216 0.794401 0.747816 0.522723 0.704318 0.51024 0.704401 0.482888 0.752961 0.496031 0.70126 0.046407 0.65623 0.058699 0.652001 0.03321 0.700256 0.020278 0.805374 0.553052 0.825597 0.526461 0.597832 0.088207 0.579236 0.062532 0.848363 0.588283 0.874439 0.564328 0.552839 0.121926 0.527357 0.097438 0.882337 0.635905 0.91438 0.618698 0.516624 0.168647 0.4928 0.153579 0.907193 0.694808 0.943298 0.683752 0.490956 0.227274 0.462076 0.217513 0.920151 0.757238 0.957798 0.755851 0.475555 0.289288 0.445688 0.288919 0.919629 0.815368 0.959429 0.820361 0.476041 0.348003 0.438819 0.352346 0.904605 0.868256 0.939502 0.879558 0.490663 0.40128 0.457663 0.41161 0.874194 0.925303 0.892717 0.943795 0.520532 0.458895 0.50334 0.47632 0.844202 0.959233 0.856473 0.97688 0.550157 0.493334 0.538514 0.510275 0.700276 0.088498 0.651938 0.095843 0.606187 0.115449 0.564538 0.145731 0.532161 0.184574 0.508161 0.233054 0.497391 0.285863 0.49928 0.335859 0.513434 0.384338 0.537977 0.425952 0.572212 0.458276 0.82299 0.924182 0.857792 0.892443 0.882629 0.851005 0.896502 0.802679 0.898271 0.752898 0.889512 0.700251 0.866733 0.651886 0.836498 0.611867 0.796929 0.579793 0.752066 0.559312 0.704195 0.551877 0.704423 0.475821 0.75396 0.485643 0.833562 0.517538 0.883709 0.555172 0.924344 0.611108 0.954737 0.68027 0.969521 0.755551 0.969325 0.819496 0.946664 0.880731 0.898038 0.94802 0.859918 0.981532 0.534859 0.515004 0.497978 0.480376 0.450453 0.412658 0.428982 0.351334 0.433983 0.288403 0.45064 0.213761 0.483044 0.145785 0.519836 0.089047 0.571495 0.053465 0.651114 0.022736 0.700256 0.013214 0.704437 0.47095 0.704443 0.46875 0.751349 0.476932 0.753008 0.478929 0.837479 0.511086 0.837205 0.51246 0.700256 0.006714 0.700256 0.008695 0.649803 0.017065 0.651023 0.014056 0.567462 0.046878 0.566332 0.044443 0.887629 0.54768 0.887402 0.549177 0.51589 0.083218 0.514241 0.081149 0.928384 0.604863 0.927419 0.605255 0.477268 0.140294 0.474929 0.138515 0.9606 0.678425 0.95926 0.677728 0.443944 0.210482 0.440831 0.210528 0.975932 0.757202 0.974515 0.7553 0.426838 0.287997 0.423945 0.288396 0.974595 0.755269 0.9744 0.819963 0.973243 0.818164 0.423612 0.351215 0.42089 0.351427 0.950079 0.883706 0.949472 0.88108 0.44694 0.413117 0.444738 0.414779 0.898948 0.954398 0.898056 0.952251 0.494831 0.482277 0.493522 0.484396 0.862672 0.986113 0.861739 0.984539 0.532516 0.51795 0.530823 0.519367 0.651708 0.010158 0.700255 0.003125 0.563435 0.041514 0.511656 0.078216 0.467581 0.134407 0.432818 0.207824 0.415625 0.287284 0.416966 0.351371 0.443148 0.415492 0.492025 0.488817 0.528192 0.521526 0.024511 0.2918 0.095175 0.28881 0.021946 0.249934 0.095615 0.239557 0.020389 0.206043 0.095717 0.201264 0.020016 0.161181 0.095849 0.160429 0.020683 0.111413 0.096541 0.114752 0.023509 0.061055 0.098243 0.069425 0.106547 0.940132 0.031679 0.945194 0.02911 0.899236 0.104524 0.899932 0.029164 0.854539 0.103262 0.862064 0.030683 0.812234 0.10152 0.814438 0.709051 0.131368 0.746695 0.154306 0.776819 0.190302 0.795961 0.232925 0.802551 0.283353 0.795958 0.333783 0.776818 0.376404 0.74669 0.4124 0.709047 0.435337 0.659768 0.673233 0.621687 0.695518 0.591531 0.730322 0.572265 0.772815 0.565624 0.823359 0.572265 0.873901 0.591529 0.916395 0.621685 0.951202 0.659767 0.973488 0.151672 0.288502 0.221195 0.292344 0.152334 0.240987 0.221678 0.251729 0.152489 0.204257 0.222839 0.207924 0.152833 0.162999 0.223805 0.164706 0.153454 0.115847 0.224988 0.115156 0.15375 0.069172 0.224018 0.064949 0.232192 0.936509 0.161798 0.935652 0.161069 0.895255 0.231109 0.892603 0.160071 0.858971 0.229405 0.847494 0.158157 0.812511 0.227845 0.80637 0.300283 0.27483 0.361061 0.267729 0.293902 0.230155 0.348583 0.221618 0.28623 0.183238 0.330277 0.175264 0.277297 0.137773 0.31548 0.128366 0.265121 0.087103 0.298994 0.077861 0.250029 0.037095 0.287758 0.026065 0.307443 0.987593 0.269485 0.977286 0.280398 0.932431 0.324303 0.9415 0.289949 0.885442 0.34427 0.895766 0.297635 0.840959 0.35816 0.849878 0.713309 0.123955 0.292271 0.277597 0.754068 0.148632 0.285488 0.233683 0.785946 0.186522 0.277038 0.186353 0.805972 0.231061 0.267523 0.140613 0.812845 0.283353 0.255353 0.089954 0.805971 0.335645 0.240456 0.040862 0.785943 0.380185 0.271318 0.928762 0.260349 0.972473 0.754062 0.418074 0.281626 0.881834 0.713304 0.442748 0.289683 0.838007 0.660749 0.522466 0.655763 0.495743 0.699265 0.046406 0.748519 0.033178 0.744301 0.058667 0.603012 0.552449 0.582947 0.525738 0.821301 0.062455 0.802715 0.088136 0.559814 0.587423 0.533879 0.563312 0.873194 0.097345 0.847715 0.121833 0.525554 0.634839 0.493615 0.617442 0.907749 0.153486 0.883924 0.168548 0.500349 0.693594 0.46431 0.682327 0.938445 0.217433 0.909563 0.227181 0.487031 0.755945 0.449393 0.754341 0.954785 0.28885 0.92492 0.2892 0.48722 0.814076 0.447394 0.818843 0.961603 0.352281 0.924386 0.347912 0.501948 0.867048 0.466986 0.878153 0.942713 0.411529 0.909722 0.401175 0.53204 0.924262 0.513414 0.942649 0.896988 0.476206 0.87981 0.458768 0.561842 0.958361 0.549472 0.975937 0.861791 0.510134 0.850159 0.493184 0.748615 0.095808 0.794371 0.115381 0.83602 0.145639 0.868387 0.184471 0.892356 0.232952 0.903089 0.28576 0.901159 0.33575 0.886964 0.384217 0.862391 0.425811 0.82813 0.458109 0.58325 0.923426 0.548626 0.891496 0.524018 0.849919 0.510419 0.801519 0.508934 0.751729 0.517998 0.699139 0.541063 0.650913 0.571538 0.611078 0.611297 0.57924 0.656282 0.559029 0.654827 0.48535 0.575034 0.51677 0.524664 0.554101 0.483695 0.609793 0.452894 0.678775 0.43767 0.753973 0.437508 0.817925 0.459816 0.879285 0.508068 0.946845 0.546002 0.980568 0.902348 0.480266 0.865442 0.514867 0.949921 0.412583 0.971437 0.351275 0.966488 0.288339 0.949879 0.213686 0.917505 0.145693 0.880714 0.088954 0.829043 0.053388 0.749404 0.022706 0.655817 0.478642 0.657491 0.476653 0.571421 0.511669 0.571158 0.510294 0.749493 0.014026 0.750714 0.017036 0.834203 0.044366 0.833074 0.0468 0.521006 0.548085 0.52079 0.546588 0.886308 0.081057 0.88466 0.083127 0.480654 0.603921 0.479691 0.603524 0.925617 0.138428 0.923279 0.140206 0.448387 0.676205 0.447039 0.676894 0.959685 0.210457 0.956574 0.21041 0.432639 0.753675 0.43125 0.755583 0.976524 0.288337 0.973632 0.287936 0.433598 0.816568 0.432429 0.818362 0.979526 0.351371 0.976807 0.351159 0.457006 0.879622 0.456385 0.882244 0.955633 0.414705 0.953433 0.413043 0.508028 0.951075 0.507124 0.95322 0.9068 0.48429 0.905493 0.482169 0.544164 0.983565 0.543222 0.985137 0.869474 0.519233 0.867782 0.517815 0.748806 0.01013 0.837099 0.041434 0.888893 0.078125 0.932966 0.13432 0.967699 0.207757 0.984845 0.287231 0.98345 0.351318 0.957222 0.41542 0.908294 0.488712 0.872104 0.521395
+
+
+ -0.0344 3.493262 -2.562941 -0.746606 3.493262 -2.41103 -0.751494 4.694354 -2.592987 -0.0344 4.660035 -2.725293 -1.446901 3.493262 -1.977972 -1.398394 4.746935 -2.20902 -1.799453 3.493262 -1.444664 -1.911777 4.772578 -1.612713 -2.025805 3.493262 -0.795094 -2.241389 4.772578 -0.886411 -2.103801 3.493262 -0.022052 -2.354965 4.772578 -0.022052 -2.025805 3.493262 0.75099 -2.241389 4.772578 0.842307 -1.799453 3.493262 1.40056 -1.911777 4.772578 1.568609 -1.4469 3.493262 1.933868 -1.398394 4.746935 2.164915 -0.769369 3.493262 2.360093 -0.751494 4.694354 2.548882 -0.0344 3.493262 2.514439 -0.0344 4.660035 2.676657 -0.751495 0.130125 -2.592987 -0.0344 0.130125 -2.725293 -0.0344 0.57239 -0.022052 -1.398394 0.228344 -2.20902 -1.911777 0.409344 -1.612713 -2.241389 0.507502 -0.886411 -2.354965 0.577983 -0.022052 -2.241389 0.507502 0.842307 -1.911777 0.409344 1.568609 -1.398394 0.228344 2.164915 -0.751494 0.130125 2.548882 -0.0344 0.130125 2.676657 -0.0344 4.660035 -2.725293 -0.751494 4.694354 -2.592987 -0.0344 4.476099 -0.022052 -1.398394 4.746935 -2.20902 -1.911777 4.772578 -1.612713 -2.241389 4.772578 -0.886411 -2.354965 4.772578 -0.022052 -2.241389 4.772578 0.842307 -1.911777 4.772578 1.568609 -1.398394 4.746935 2.164915 -0.751494 4.694354 2.548882 -0.0344 4.660035 2.676657 -0.0344 1.331498 -2.652847 -0.751495 1.331498 -2.539865 -0.769231 2.522677 -2.429281 -0.0344 2.522677 -2.562941 -1.398394 1.331498 -2.20902 -1.466622 2.522677 -2.030764 -1.911777 1.331498 -1.612713 -1.753786 2.522677 -1.483062 -2.174351 1.331498 -0.886411 -1.938156 2.522677 -0.815959 -2.295615 1.331498 -0.022052 -2.001686 2.522677 -0.022052 -2.195112 1.331498 0.842307 -1.938156 2.522677 0.771855 -1.887729 1.331498 1.539671 -1.753786 2.522677 1.438958 -1.398394 1.331498 2.164916 -1.466621 2.522677 1.98666 -0.751494 1.331498 2.503637 -0.772059 2.522677 2.360093 -0.0344 1.331498 2.598635 -0.0344 2.522677 2.514439 -0.0344 0.282663 -2.864904 -0.823894 0.282663 -2.72047 -0.823894 1.331498 -2.667348 -0.0344 1.331498 -2.792458 -1.523911 0.380882 -2.307545 -1.523911 1.331498 -2.307545 -2.068043 0.561882 -1.678178 -2.068043 1.331498 -1.678178 -2.413019 0.66004 -0.918576 -2.345981 1.331498 -0.918576 -2.531511 0.730521 -0.022052 -2.472161 1.331498 -0.022052 -2.413019 0.66004 0.874472 -2.366743 1.331498 0.874472 -2.068043 0.561882 1.634074 -2.043995 1.331498 1.605135 -1.523911 0.380882 2.26344 -1.523911 1.331498 2.263441 -0.823893 0.282663 2.676365 -0.823893 1.331498 2.63112 -0.0344 0.282663 2.83422 -0.0344 1.331498 2.756198 -0.823894 0.130125 -2.72047 -0.0344 0.130125 -2.864904 -0.751495 1.331498 -2.539865 -0.0344 1.331498 -2.652847 -1.523911 0.228344 -2.307545 -1.398394 1.331498 -2.20902 -2.068043 0.409344 -1.678178 -1.911777 1.331498 -1.612713 -2.413019 0.507502 -0.918576 -2.174351 1.331498 -0.886411 -2.531511 0.577983 -0.022052 -2.295615 1.331498 -0.022052 -2.413019 0.507502 0.874472 -2.195112 1.331498 0.842307 -2.068043 0.409344 1.634074 -1.887729 1.331498 1.539671 -1.523911 0.228344 2.26344 -1.398394 1.331498 2.164916 -0.823893 0.130125 2.676365 -0.751494 1.331498 2.503637 -0.0344 0.130125 2.83422 -0.0344 1.331498 2.598635 -0.781923 0.340472 -3.348053 -0.0344 0.340472 -3.57671 -0.0344 0.537192 -4.000288 -0.865588 0.553411 -3.752826 -0.015451 0.249473 -3.57671 -0.781923 0.249473 -3.348053 -0.865588 0.400873 -3.752826 -0.0344 0.384654 -4.000288 -1.724804 0.399066 -2.745932 -2.052179 0.700237 -3.105572 -1.724804 0.308067 -2.745932 -2.052179 0.547699 -3.105572 -2.345921 0.507044 -2.031226 -2.794952 0.793754 -2.332355 -2.345921 0.466811 -2.031226 -2.794952 0.732266 -2.332355 -2.739404 0.580814 -1.10784 -3.110374 1.071816 -1.237957 -2.739404 0.562605 -1.10784 -3.110374 0.842107 -1.237957 -2.838752 0.669153 -0.022052 -3.232058 1.177954 -0.022052 -2.838752 0.609911 -0.022052 -3.232058 0.948245 -0.022052 -2.739404 0.580814 1.063737 -3.090993 1.101355 1.232407 -2.739404 0.54025 1.063737 -3.090993 0.871645 1.232407 -2.345921 0.507044 1.987123 -2.777296 0.953484 2.286094 -2.345921 0.429825 1.987123 -2.777296 0.800946 2.286094 -1.724803 0.399066 2.70183 -2.052179 0.802252 3.061471 -1.724803 0.308067 2.70183 -2.052179 0.649714 3.061471 -0.78192 0.340472 3.303948 -0.85871 0.57721 3.679776 -0.78192 0.249473 3.303948 -0.85871 0.424672 3.679776 -0.0344 0.340472 3.532603 -0.0344 0.530215 3.845471 -0.0344 0.249473 3.532603 -0.0344 0.402693 3.845471 -0.0344 0.130125 -2.864904 -0.823894 0.130125 -2.72047 -1.523911 0.228344 -2.307545 -2.068043 0.409344 -1.678178 -2.413019 0.507502 -0.918576 -2.531511 0.577983 -0.022052 -2.413019 0.507502 0.874472 -2.068043 0.409344 1.634074 -1.523911 0.228344 2.26344 -0.823893 0.130125 2.676365 -0.0344 0.130125 2.83422 -0.0344 0.282663 2.83422 -0.823893 0.282663 2.676365 -1.523911 0.380882 2.26344 -2.068043 0.561882 1.634074 -2.413019 0.66004 0.874472 -2.531511 0.730521 -0.022052 -2.413019 0.66004 -0.918576 -2.068043 0.561882 -1.678178 -1.523911 0.380882 -2.307545 -0.823894 0.282663 -2.72047 -0.0344 0.282663 -2.864904 -0.0344 0.589297 -4.107771 -0.869538 0.663207 -3.894555 -2.155919 0.846941 -3.202126 -2.889453 0.978742 -2.424076 -3.218804 1.239773 -1.311634 -3.347876 1.345911 -0.022052 -3.209177 1.254445 1.286681 -2.886946 1.081191 2.321457 -2.138058 0.868175 3.125713 -0.887083 0.649851 3.766972 -0.0344 0.586603 3.927003 -0.0344 0.459081 3.927003 -0.887083 0.497313 3.766972 -2.138058 0.715637 3.125713 -2.886946 0.928653 2.321457 -3.209177 1.024736 1.286681 -3.347876 1.116202 -0.022052 -3.218804 1.010064 -1.311634 -2.889453 0.871431 -2.424076 -2.155919 0.694403 -3.202126 -0.869538 0.510669 -3.894555 -0.0344 0.436759 -4.107771 -0.0344 0.576503 -4.192942 -0.0344 0.545644 -4.213854 -0.823442 0.677094 -4.029192 -0.851438 0.704302 -4.004708 -2.214278 0.898458 -3.289094 -2.207614 0.913142 -3.269681 -0.0344 0.477241 -4.213854 -0.0344 0.446834 -4.191503 -0.879207 0.585849 -3.963062 -0.848911 0.621782 -3.994534 -2.213251 0.781882 -3.285772 -2.214977 0.826447 -3.30575 -2.928702 1.065706 -2.517072 -2.918196 1.075407 -2.494825 -2.944005 0.952947 -2.496109 -2.949385 0.998373 -2.512132 -3.271213 1.309622 -1.388729 -3.253246 1.312782 -1.389062 -3.283839 1.116323 -1.368089 -3.29307 1.165728 -1.379971 -3.408014 1.416102 -0.022052 -3.390357 1.421677 -0.040673 -3.417988 1.221526 -0.039394 -3.428995 1.271526 -0.022052 -3.271245 1.309647 1.344309 -3.258964 1.322036 1.307493 -3.283968 1.118276 1.318214 -3.293038 1.165704 1.336188 -3.258964 1.322036 1.307493 -2.94347 1.112653 2.351612 -2.937526 1.13404 2.321547 -2.948258 0.995344 2.349723 -2.959483 1.043345 2.361122 -2.169028 0.837924 3.18657 -2.181522 0.868241 3.153493 -2.16835 0.765307 3.147802 -2.164555 0.807479 3.172506 -0.846103 0.625209 3.858396 -0.851219 0.652778 3.830203 -0.910606 0.523476 3.821952 -0.896708 0.559322 3.847669 -0.0344 0.562771 4.008516 -0.0344 0.586074 3.987476 -0.0344 0.477578 3.986532 -0.0344 0.505585 4.008516 -0.823442 0.677094 -4.029192 -0.0344 0.545644 -4.213854 -2.214278 0.898458 -3.289094 -2.928702 1.065706 -2.517072 -3.271213 1.309622 -1.388729 -3.408014 1.416102 -0.022052 -3.271245 1.309647 1.344309 -2.94347 1.112653 2.351612 -2.169028 0.837924 3.18657 -0.846103 0.625209 3.858396 -0.0344 0.562771 4.008516 0.682694 4.694354 -2.592987 0.677806 3.493262 -2.41103 1.329594 4.746935 -2.20902 1.378101 3.493262 -1.977972 1.842977 4.772578 -1.612713 1.730653 3.493262 -1.444664 2.172589 4.772578 -0.886411 1.957005 3.493262 -0.795094 2.286165 4.772578 -0.022052 2.035001 3.493262 -0.022052 2.172589 4.772578 0.842307 1.957005 3.493262 0.75099 1.957005 3.493262 0.75099 2.172589 4.772578 0.842307 1.842977 4.772578 1.568609 1.730652 3.493262 1.40056 1.329594 4.746935 2.164915 1.3781 3.493262 1.933868 0.682694 4.694354 2.548882 0.700569 3.493262 2.360093 0.682694 0.130125 -2.592987 1.329594 0.228344 -2.20902 1.842977 0.409344 -1.612713 2.172589 0.507502 -0.886411 2.286165 0.577983 -0.022052 2.172589 0.507502 0.842307 1.842977 0.409344 1.568609 1.329594 0.228344 2.164915 0.682694 0.130125 2.548882 0.682694 4.694354 -2.592987 1.329594 4.746935 -2.20902 1.842977 4.772578 -1.612713 2.172589 4.772578 -0.886411 2.286165 4.772578 -0.022052 2.172589 4.772578 0.842307 1.842977 4.772578 1.568609 1.329594 4.746935 2.164915 0.682694 4.694354 2.548882 0.700431 2.522677 -2.429281 0.682694 1.331498 -2.539865 1.397821 2.522677 -2.030764 1.329594 1.331498 -2.20902 1.684986 2.522677 -1.483062 1.842977 1.331498 -1.612713 1.869356 2.522677 -0.815959 2.105551 1.331498 -0.886411 1.932886 2.522677 -0.022052 2.226815 1.331498 -0.022052 1.869356 2.522677 0.771855 2.126312 1.331498 0.842307 2.126312 1.331498 0.842307 1.869356 2.522677 0.771855 1.684985 2.522677 1.438958 1.818929 1.331498 1.539671 1.397821 2.522677 1.98666 1.329594 1.331498 2.164916 0.703259 2.522677 2.360093 0.682694 1.331498 2.503637 0.755094 1.331498 -2.667348 0.755094 0.282663 -2.72047 1.455111 1.331498 -2.307545 1.455111 0.380882 -2.307545 1.999243 1.331498 -1.678178 1.999243 0.561882 -1.678178 2.277181 1.331498 -0.918576 2.344219 0.66004 -0.918576 2.403361 1.331498 -0.022052 2.462711 0.730521 -0.022052 2.297943 1.331498 0.874472 2.344219 0.66004 0.874472 2.344219 0.66004 0.874472 2.297943 1.331498 0.874472 1.975195 1.331498 1.605135 1.999243 0.561882 1.634074 1.45511 1.331498 2.263441 1.45511 0.380882 2.26344 0.755093 1.331498 2.63112 0.755093 0.282663 2.676365 0.755094 0.130125 -2.72047 0.682694 1.331498 -2.539865 1.455111 0.228344 -2.307545 1.329594 1.331498 -2.20902 1.999243 0.409344 -1.678178 1.842977 1.331498 -1.612713 2.344219 0.507502 -0.918576 2.105551 1.331498 -0.886411 2.462711 0.577983 -0.022052 2.226815 1.331498 -0.022052 2.344219 0.507502 0.874472 2.126312 1.331498 0.842307 1.999243 0.409344 1.634074 1.818929 1.331498 1.539671 2.126312 1.331498 0.842307 1.45511 0.228344 2.26344 1.329594 1.331498 2.164916 0.755093 0.130125 2.676365 0.682694 1.331498 2.503637 0.713123 0.340472 -3.348053 0.796788 0.553411 -3.752826 -0.053349 0.249473 -3.57671 0.796788 0.400873 -3.752826 0.713123 0.249473 -3.348053 1.656003 0.399066 -2.745932 1.983379 0.700237 -3.105572 1.983379 0.547699 -3.105572 1.656003 0.308067 -2.745932 2.277121 0.507044 -2.031226 2.726152 0.793754 -2.332355 2.726152 0.732266 -2.332355 2.277121 0.466811 -2.031226 2.670604 0.580814 -1.10784 3.041574 1.071816 -1.237957 3.041574 0.842107 -1.237957 2.670604 0.562605 -1.10784 2.769952 0.669153 -0.022052 3.163258 1.177954 -0.022052 3.163258 0.948245 -0.022052 2.769952 0.609911 -0.022052 2.670604 0.580814 1.063737 3.022193 1.101355 1.232407 3.022193 0.871645 1.232407 2.670604 0.54025 1.063737 2.277121 0.507044 1.987123 2.708496 0.953484 2.286094 2.708496 0.800946 2.286094 2.277121 0.429825 1.987123 1.656003 0.399066 2.70183 1.983379 0.802252 3.061471 1.983379 0.649714 3.061471 1.656003 0.308067 2.70183 0.71312 0.340472 3.303948 0.78991 0.57721 3.679776 0.78991 0.424672 3.679776 0.71312 0.249473 3.303948 -0.0344 0.340472 3.532603 -0.0344 0.530215 3.845471 -0.0344 0.402693 3.845471 -0.0344 0.249473 3.532603 0.755094 0.130125 -2.72047 1.455111 0.228344 -2.307545 1.999243 0.409344 -1.678178 2.344219 0.507502 -0.918576 2.462711 0.577983 -0.022052 2.344219 0.507502 0.874472 1.999243 0.409344 1.634074 1.45511 0.228344 2.26344 0.755093 0.130125 2.676365 -0.0344 0.130125 2.83422 -0.0344 0.282663 2.83422 0.755093 0.282663 2.676365 1.45511 0.380882 2.26344 1.999243 0.561882 1.634074 2.344219 0.66004 0.874472 2.462711 0.730521 -0.022052 2.344219 0.66004 -0.918576 1.999243 0.561882 -1.678178 1.455111 0.380882 -2.307545 0.755094 0.282663 -2.72047 0.800738 0.663207 -3.894555 2.087119 0.846941 -3.202126 2.820653 0.978742 -2.424076 3.150004 1.239773 -1.311634 3.279076 1.345911 -0.022052 3.140377 1.254445 1.286681 2.818146 1.081191 2.321457 2.069258 0.868175 3.125713 0.818283 0.649851 3.766972 -0.0344 0.586603 3.927003 0.818283 0.497313 3.766972 -0.0344 0.459081 3.927003 2.069258 0.715637 3.125713 2.818146 0.928653 2.321457 3.140377 1.024736 1.286681 3.279076 1.116202 -0.022052 3.150004 1.010064 -1.311634 2.820653 0.871431 -2.424076 2.087119 0.694403 -3.202126 0.800738 0.510669 -3.894555 0.782638 0.704302 -4.004708 0.754642 0.677094 -4.029192 2.138814 0.913142 -3.269681 2.145478 0.898458 -3.289094 0.780111 0.621782 -3.994534 0.810407 0.585849 -3.963062 2.146177 0.826447 -3.30575 2.144451 0.781882 -3.285772 2.849396 1.075407 -2.494825 2.859902 1.065706 -2.517072 2.880585 0.998373 -2.512132 2.875205 0.952947 -2.496109 3.184446 1.312782 -1.389062 3.202413 1.309622 -1.388729 3.22427 1.165728 -1.379971 3.215039 1.116323 -1.368089 3.321558 1.421677 -0.040673 3.339214 1.416102 -0.022052 3.360195 1.271526 -0.022052 3.349188 1.221526 -0.039394 3.190164 1.322036 1.307493 3.202445 1.309647 1.344309 3.224238 1.165704 1.336188 3.215168 1.118276 1.318214 2.868726 1.13404 2.321547 2.87467 1.112653 2.351612 2.890683 1.043345 2.361122 2.879458 0.995344 2.349723 2.112722 0.868241 3.153493 2.100228 0.837924 3.18657 2.095755 0.807479 3.172506 2.09955 0.765307 3.147802 0.782419 0.652778 3.830203 0.777303 0.625209 3.858396 0.827908 0.559322 3.847669 0.841806 0.523476 3.821952 -0.0344 0.586074 3.987476 -0.0344 0.562771 4.008516 -0.0344 0.505585 4.008516 -0.0344 0.477578 3.986532 0.754642 0.677094 -4.029192 2.145478 0.898458 -3.289094 2.859902 1.065706 -2.517072 3.202413 1.309622 -1.388729 3.339214 1.416102 -0.022052 3.202445 1.309647 1.344309 2.87467 1.112653 2.351612 2.100228 0.837924 3.18657 0.777303 0.625209 3.858396 -0.0344 0.562771 4.008516
+
+
+
+ 0 1 2 3 1 4 5 2 4 6 7 5 6 8 9 7 8 10 11 9 10 12 13 11 12 14 15 13 14 16 17 15 16 18 19 17 18 20 21 19 22 23 24 25 22 24 26 25 24 27 26 24 28 27 24 29 28 24 30 29 24 31 30 24 32 31 24 33 32 24 34 35 36 35 37 36 37 38 36 38 39 36 39 40 36 40 41 36 41 42 36 42 43 36 43 44 36 44 45 36 46 47 48 49 47 50 51 48 50 52 53 51 52 54 55 53 54 56 57 55 56 58 59 57 58 60 61 59 60 62 63 61 62 64 65 63 64 66 67 65 49 48 1 0 48 51 4 1 51 53 6 4 53 55 8 6 55 57 10 8 57 59 12 10 59 61 14 12 61 63 16 14 63 65 18 16 65 67 20 18 68 69 70 71 69 72 73 70 72 74 75 73 74 76 77 75 76 78 79 77 78 80 81 79 80 82 83 81 82 84 85 83 84 86 87 85 86 88 89 87 23 22 90 91 92 93 71 70 22 25 94 90 95 92 70 73 25 26 96 94 97 95 73 75 26 27 98 96 99 97 75 77 27 28 100 98 101 99 77 79 28 29 102 100 103 101 79 81 29 30 104 102 105 103 81 83 30 31 106 104 107 105 83 85 31 32 108 106 109 107 85 87 32 33 110 108 111 109 87 89 112 113 114 115 116 117 118 119 120 112 115 121 117 122 123 118 124 120 121 125 122 126 127 123 128 124 125 129 126 130 131 127 132 128 129 133 130 134 135 131 136 132 133 137 134 138 139 135 140 136 137 141 138 142 143 139 144 140 141 145 142 146 147 143 148 144 145 149 146 150 151 147 152 148 149 153 150 154 155 151 156 157 117 116 157 158 122 117 158 159 126 122 159 160 130 126 160 161 134 130 161 162 138 134 162 163 142 138 163 164 146 142 164 165 150 146 165 166 154 150 167 168 148 152 168 169 144 148 169 170 140 144 170 171 136 140 171 172 132 136 172 173 128 132 173 174 124 128 174 175 120 124 175 176 112 120 176 177 113 112 115 114 178 179 121 115 179 180 125 121 180 181 129 125 181 182 133 129 182 183 137 133 183 184 141 137 184 185 145 141 185 186 149 145 186 187 153 149 187 188 151 155 189 190 147 151 190 191 143 147 191 192 139 143 192 193 135 139 193 194 131 135 194 195 127 131 195 196 123 127 196 197 118 123 197 198 119 118 198 199 200 201 202 203 203 202 204 205 206 207 208 209 209 208 210 211 205 204 212 213 211 210 214 215 213 212 216 217 215 214 218 219 217 216 220 221 219 218 222 223 221 220 224 225 223 222 226 227 228 224 229 230 227 226 231 232 230 229 233 234 232 231 235 236 234 233 237 238 236 235 239 240 238 237 241 242 240 239 243 244 245 246 206 209 247 245 209 211 248 247 211 215 249 248 215 219 250 249 219 223 251 250 223 227 252 251 227 232 253 252 232 236 254 253 236 240 255 254 240 244 179 178 200 203 180 179 203 205 181 180 205 213 182 181 213 217 183 182 217 221 184 183 221 225 185 184 228 230 186 185 230 234 187 186 234 238 188 187 238 242 190 189 243 239 191 190 239 235 192 191 235 231 193 192 231 226 194 193 226 222 195 194 222 218 196 195 218 214 197 196 214 210 198 197 210 208 199 198 208 207 0 3 256 257 257 256 258 259 259 258 260 261 261 260 262 263 263 262 264 265 265 264 266 267 268 269 270 271 271 270 272 273 273 272 274 275 275 274 21 20 276 24 23 277 24 276 278 24 277 279 24 278 280 24 279 281 24 280 282 24 281 283 24 282 284 24 283 33 24 284 34 36 285 285 36 286 286 36 287 287 36 288 288 36 289 289 36 290 290 36 291 291 36 292 292 36 293 293 36 45 46 49 294 295 295 294 296 297 297 296 298 299 299 298 300 301 301 300 302 303 303 302 304 305 306 307 308 309 309 308 310 311 311 310 312 313 313 312 67 66 49 0 257 294 294 257 259 296 296 259 261 298 298 261 263 300 300 263 265 302 302 265 267 304 307 268 271 308 308 271 273 310 310 273 275 312 312 275 20 67 68 71 314 315 315 314 316 317 317 316 318 319 319 318 320 321 321 320 322 323 323 322 324 325 326 327 328 329 329 328 330 331 331 330 332 333 333 332 89 88 23 91 334 276 335 314 71 93 276 334 336 277 337 316 314 335 277 336 338 278 339 318 316 337 278 338 340 279 341 320 318 339 279 340 342 280 343 322 320 341 280 342 344 281 345 324 322 343 281 344 346 282 347 328 327 348 282 346 349 283 350 330 328 347 283 349 351 284 352 332 330 350 284 351 110 33 111 89 332 352 353 354 114 113 355 119 356 357 358 359 354 353 357 356 360 361 362 363 359 358 361 360 364 365 366 367 363 362 365 364 368 369 370 371 367 366 369 368 372 373 374 375 371 370 373 372 376 377 378 379 375 374 377 376 380 381 382 383 379 378 381 380 384 385 386 387 383 382 385 384 388 389 390 391 387 386 389 388 392 393 156 355 357 394 394 357 361 395 395 361 365 396 396 365 369 397 397 369 373 398 398 373 377 399 399 377 381 400 400 381 385 401 401 385 389 402 402 389 393 403 404 390 386 405 405 386 382 406 406 382 378 407 407 378 374 408 408 374 370 409 409 370 366 410 410 366 362 411 411 362 358 412 412 358 353 413 413 353 113 177 354 414 178 114 359 415 414 354 363 416 415 359 367 417 416 363 371 418 417 367 375 419 418 371 379 420 419 375 383 421 420 379 387 422 421 383 391 423 422 387 388 424 425 392 384 426 424 388 380 427 426 384 376 428 427 380 372 429 428 376 368 430 429 372 364 431 430 368 360 432 431 364 356 433 432 360 119 199 433 356 200 434 435 201 434 436 437 435 206 438 439 207 438 440 441 439 436 442 443 437 440 444 445 441 442 446 447 443 444 448 449 445 446 450 451 447 448 452 453 449 450 454 455 451 452 456 457 453 454 458 459 455 456 460 461 457 458 462 463 459 460 464 465 461 462 466 467 463 464 468 469 465 466 470 471 467 468 472 473 469 474 438 206 246 475 440 438 474 476 444 440 475 477 448 444 476 478 452 448 477 479 456 452 478 480 460 456 479 481 464 460 480 482 468 464 481 483 472 468 482 414 434 200 178 415 436 434 414 416 442 436 415 417 446 442 416 418 450 446 417 419 454 450 418 420 458 454 419 421 462 458 420 422 466 462 421 423 470 466 422 424 469 473 425 426 465 469 424 427 461 465 426 428 457 461 427 429 453 457 428 430 449 453 429 431 445 449 430 432 441 445 431 433 439 441 432 199 207 439 433
+ 4 8 12 16 20 24 28 32 36 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 104 108 112 116 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 192 196 200 204 208 212 216 220 224 228 232 236 240 244 248 252 256 260 264 268 272 276 280 284 288 292 296 300 304 308 312 316 320 324 328 332 336 340 344 348 352 356 360 364 368 372 376 380 384 388 392 396 400 404 408 412 416 420 424 428 432 436 440 444 448 452 456 460 464 468 472 476 480 484 488 492 496 500 504 508 512 516 520 524 528 532 536 540 544 548 552 556 560 564 568 572 576 580 584 588 592 596 600 604 608 612 616 620 624 628 632 636 640 644 648 652 656 660 664 668 672 676 680 684 688 692 696 700 704 708 712 716 720 724 728 732 736 740 744 748 752 756 760 764 768 772 776 780 783 786 789 792 795 798 801 804 807 810 813 816 819 822 825 828 831 834 837 840 844 848 852 856 860 864 868 872 876 880 884 888 892 896 900 904 908 912 916 920 924 928 932 936 940 944 948 952 956 960 964 968 972 976 980 984 988 992 996 1000 1004 1008 1012 1016 1020 1024 1028 1032 1036 1040 1044 1048 1052 1056 1060 1064 1068 1072 1076 1080 1084 1088 1092 1096 1100 1104 1108 1112 1116 1120 1124 1128 1132 1136 1140 1144 1148 1152 1156 1160 1164 1168 1172 1176 1180 1184 1188 1192 1196 1200 1204 1208 1212 1216 1220 1224 1228 1232 1236 1240 1244 1248 1252 1256 1260 1264 1268 1272 1276 1280 1284 1288 1292 1296 1300 1304 1308 1312 1316 1320 1324 1328 1332 1336 1340 1344 1348 1352 1356 1360 1364 1368 1372 1376 1380 1384 1388 1392 1396 1400 1404 1408 1412 1416 1420 1424 1428 1432 1436 1440 1444 1448 1452 1456 1460 1464 1468 1472 1476 1480
+
+
+
+
diff --git a/tests/data/123456789/polyhedron_attribute.vtu b/tests/data/123456789/polyhedron_attribute.vtu
new file mode 100644
index 00000000..7c86fa9c
--- /dev/null
+++ b/tests/data/123456789/polyhedron_attribute.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/tests/data/123456789/triangulated_surface2d.vtp b/tests/data/123456789/triangulated_surface2d.vtp
new file mode 100644
index 00000000..bb34ba34
--- /dev/null
+++ b/tests/data/123456789/triangulated_surface2d.vtp
@@ -0,0 +1,21 @@
+
+
+
+
+
+ -61.7244 14.6963 -60.8099 -0.979751 -56.2378 27.1065 -43.1744 -5.29066 -38.8635 22.1424 -16.3945 -4.63749 -15.0882 19.791 16.5252 22.7956 20.1829 -4.76813 35.9895 -5.4213 40.3005 24.8857 41.3455 4.11496 42.6519 13.1287 33.7787 9.14871 41.0601 23.4894 41.9389 13.273 37.3251 -4.85291 42.2685 4.15511 51.0568 24.4781 54.682 -5.95145 68.5236 23.3796 71.0502 14.7011 71.4896 -6.94013 73.9064 1.62847 58.4724 7.35799 59.7405 17.2398 50.9449 17.0185 -60.8195 -1.62315 -59.9003 -12.2605 -56.4858 -21.5847 -41.7773 -5.69425 -33.1098 -28.0196 -20.3712 -4.9063 -1.46031 -27.757 0.640906 -5.16895 14.1675 -27.8883 16.9253 -5.03762 36.2302 -5.69425 40.4326 -27.1003 49.1001 -5.82558 67.6171 -30.6461 71.1628 -7.53281 74.446 -15.5437 76.1532 -25.2618 65.4426 -17.0775 52.7354 -17.3143
+
+
+ -61.724365234375 14.6962766647339 0 -60.8099250793457 -0.979751348495483 0 -56.2377586364746 27.1064682006836 0 -43.1743965148926 -5.29066038131714 0 -38.8634872436523 22.142391204834 0 -16.3945140838623 -4.63749170303345 0 -15.0881767272949 19.7909870147705 0 16.5251502990723 22.7955627441406 0 20.18288230896 -4.76812744140625 0 35.9895477294922 -5.42129564285278 0 40.3004531860352 24.8856983184814 0 41.3455276489258 4.11495876312256 0 42.65185546875 13.1286745071411 0 33.7787322998047 9.14871406555176 0 41.0600929260254 23.4894065856934 0 41.9389266967773 13.2729911804199 0 37.325065612793 -4.8529109954834 0 42.2684898376465 4.15511226654053 0 51.0568084716797 24.4780941009521 0 54.6819877624512 -5.95145130157471 0 68.5235900878906 23.3795547485352 0 71.0502166748047 14.7010917663574 0 71.4896469116211 -6.94013404846191 0 73.9064254760742 1.62847137451172 0 58.4723815917969 7.35799360275269 0 59.7404937744141 17.2398090362549 0 50.9449157714844 17.0184726715088 0 -60.8195457458496 -1.62315285205841 0 -59.9002723693848 -12.2605400085449 0 -56.4857978820801 -21.5846691131592 0 -41.7773132324219 -5.694251537323 0 -33.1098175048828 -28.0196323394775 0 -20.3712139129639 -4.90629720687866 0 -1.46030735969543 -27.7569789886475 0 0.640906095504761 -5.16894960403442 0 14.1674613952637 -27.8883056640625 0 16.9253005981445 -5.03762483596802 0 36.2301902770996 -5.694251537323 0 40.4326171875 -27.1003494262695 0 49.1001129150391 -5.8255763053894 0 67.6170501708984 -30.6461448669434 0 71.162841796875 -7.53281211853027 0 74.4459838867188 -15.5436840057373 0 76.1532211303711 -25.261791229248 0 65.4426422119141 -17.0774612426758 0 52.7353782653809 -17.3142528533936 0
+
+
+ 6 5 4 4 0 2 3 1 0 8 6 7 5 3 4 13 9 8 4 3 0 13 8 7 8 5 6 13 7 10 13 11 9 13 12 11 13 10 12 24 19 17 24 22 19 24 17 15 26 24 15 26 14 18 24 21 23 25 21 24 25 18 20 19 16 17 25 20 21 26 25 24 24 23 22 26 15 14 26 18 25 32 31 30 44 42 43 36 35 34 44 39 41 45 44 40 31 29 30 37 35 36 30 28 27 30 29 28 45 38 37 44 43 40 45 39 44 44 41 42 45 40 38 45 37 39 35 33 34 33 31 32 34 33 32 38 35 37
+ 8 4 4.29497e+09 6 4.29497e+09 4.29497e+09 4.29497e+09 4.29497e+09 6 8 4.29497e+09 7 4.29497e+09 6 0 10 4.29497e+09 7 4 2 1 5 3 9 4.29497e+09 0 3 7 4.29497e+09 12 11 4.29497e+09 5 12 4.29497e+09 10 9 4.29497e+09 11 14 21 15 24 4.29497e+09 13 13 4.29497e+09 16 23 15 25 25 4.29497e+09 26 19 4.29497e+09 24 22 18 23 26 4.29497e+09 22 4.29497e+09 4.29497e+09 13 20 4.29497e+09 19 26 19 16 18 4.29497e+09 14 16 4.29497e+09 17 17 20 23 43 32 4.29497e+09 39 4.29497e+09 37 33 42 4.29497e+09 38 4.29497e+09 39 38 37 40 4.29497e+09 35 27 45 29 4.29497e+09 35 4.29497e+09 4.29497e+09 32 4.29497e+09 34 40 45 41 28 4.29497e+09 31 41 30 31 30 4.29497e+09 28 31 4.29497e+09 36 36 4.29497e+09 38 4.29497e+09 44 29 4.29497e+09 27 44 42 43 4.29497e+09 4.29497e+09 33 36
+
+
+ 6 5 4 4 0 2 3 1 0 8 6 7 5 3 4 13 9 8 4 3 0 13 8 7 8 5 6 13 7 10 13 11 9 13 12 11 13 10 12 24 19 17 24 22 19 24 17 15 26 24 15 26 14 18 24 21 23 25 21 24 25 18 20 19 16 17 25 20 21 26 25 24 24 23 22 26 15 14 26 18 25 32 31 30 44 42 43 36 35 34 44 39 41 45 44 40 31 29 30 37 35 36 30 28 27 30 29 28 45 38 37 44 43 40 45 39 44 44 41 42 45 40 38 45 37 39 35 33 34 33 31 32 34 33 32 38 35 37
+ 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96 99 102 105 108 111 114 117 120 123 126 129 132 135 138
+
+
+
+
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
new file mode 100644
index 00000000..1906075c
--- /dev/null
+++ b/tests/mesh/cells/attribute/cell/test_cells_attribute_cell_protocols.py
@@ -0,0 +1,361 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.cells.attribute.cell.cells_attribute_cell_protocols import (
+ VtkMeshCellsAttributeCellView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id, viewable_file="regular_grid_2d.vti", viewer_elements_type="cells"
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
+
+
+def test_cells_cell_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["name"][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "RGB_data"}],
+ )
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "scalar_range"
+ ]["rpc"],
+ [{"id": mesh_id, "minimum": 0, "maximum": 255}],
+ )
+ assert server.compare_image("mesh/cells/cell_attribute.jpeg") == True
+
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "scalar_range"
+ ]["rpc"],
+ [{"id": mesh_id, "minimum": 0, "maximum": 10}],
+ )
+ assert server.compare_image("mesh/cells/cell_scalar_range.jpeg") == True
+
+
+def test_cells_cell_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["name"][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "RGB_data"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 255.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 255.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/cell_color_map.jpeg") == True
+
+
+def test_cells_cell_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["name"][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "RGB_data"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 255.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 255.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/cell_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 100.0,
+ 0,
+ 0,
+ 1.0,
+ 150.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 100.0,
+ "maximum": 150.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/cell_color_map_range_update.jpeg") == True
+
+
+def test_cells_cell_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["name"][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "RGB_data"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 255.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 255.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/cell_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 20.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 20.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/cell_color_map_red_shift.jpeg") == True
+
+
+def test_cells_cell_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict["name"][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "RGB_data"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 0.143 * 255,
+ 0,
+ 0,
+ 92 / 255,
+ 0.285 * 255,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 0.429 * 255,
+ 0,
+ 128 / 255,
+ 0,
+ 0.571 * 255,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 0.714 * 255,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 0.857 * 255,
+ 107 / 255,
+ 0,
+ 0,
+ 255.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 0.0,
+ "maximum": 255.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/cells/cell_color_map_rainbow_initial.jpeg") == True
+ )
+
+ # Update range via color map
+ server.call(
+ VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_prefix
+ + VtkMeshCellsAttributeCellView.mesh_cells_attribute_cell_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 50.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 50.0 + 0.143 * 50,
+ 0,
+ 0,
+ 92 / 255,
+ 50.0 + 0.285 * 50,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 50.0 + 0.429 * 50,
+ 0,
+ 128 / 255,
+ 0,
+ 50.0 + 0.571 * 50,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 50.0 + 0.714 * 50,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 50.0 + 0.857 * 50,
+ 107 / 255,
+ 0,
+ 0,
+ 100.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 50.0,
+ "maximum": 100.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/cell_color_map_rainbow.jpeg") == True
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
new file mode 100644
index 00000000..61f3e9d7
--- /dev/null
+++ b/tests/mesh/cells/attribute/vertex/test_cells_attribute_vertex_protocols.py
@@ -0,0 +1,361 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.cells.attribute.vertex.cells_attribute_vertex_protocols import (
+ VtkMeshCellsAttributeVertexView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id, viewable_file="regular_grid_2d.vti", viewer_elements_type="cells"
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
+
+
+def test_cells_vertex_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "points"}],
+ )
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "scalar_range"
+ ]["rpc"],
+ [{"id": mesh_id, "minimum": 2, "maximum": 498}],
+ )
+ assert server.compare_image("mesh/cells/vertex_attribute.jpeg") == True
+
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "scalar_range"
+ ]["rpc"],
+ [{"id": mesh_id, "minimum": 0, "maximum": 10}],
+ )
+ assert server.compare_image("mesh/cells/vertex_scalar_range.jpeg") == True
+
+
+def test_cells_vertex_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "points"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 2.0,
+ 0,
+ 0,
+ 1.0,
+ 498.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 2.0,
+ "maximum": 498.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/vertex_color_map.jpeg") == True
+
+
+def test_cells_vertex_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "points"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 2.0,
+ 0,
+ 0,
+ 1.0,
+ 498.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 2.0,
+ "maximum": 498.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 200.0,
+ 0,
+ 0,
+ 1.0,
+ 300.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 200.0,
+ "maximum": 300.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/vertex_color_map_range_update.jpeg") == True
+
+
+def test_cells_vertex_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "points"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 2.0,
+ 0,
+ 0,
+ 1.0,
+ 498.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 2.0,
+ "maximum": 498.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 50.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 50.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/vertex_color_map_red_shift.jpeg") == True
+
+
+def test_cells_vertex_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "points"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 2.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 2.0 + 0.143 * 496,
+ 0,
+ 0,
+ 92 / 255,
+ 2.0 + 0.285 * 496,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 2.0 + 0.429 * 496,
+ 0,
+ 128 / 255,
+ 0,
+ 2.0 + 0.571 * 496,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 2.0 + 0.714 * 496,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 2.0 + 0.857 * 496,
+ 107 / 255,
+ 0,
+ 0,
+ 498.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 2.0,
+ "maximum": 498.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/cells/vertex_color_map_rainbow_initial.jpeg") == True
+ )
+
+ # Set scalar range via color map
+ server.call(
+ VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_prefix
+ + VtkMeshCellsAttributeVertexView.mesh_cells_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 50.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 50.0 + 0.143 * 150,
+ 0,
+ 0,
+ 92 / 255,
+ 50.0 + 0.285 * 150,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 50.0 + 0.429 * 150,
+ 0,
+ 128 / 255,
+ 0,
+ 50.0 + 0.571 * 150,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 50.0 + 0.714 * 150,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 50.0 + 0.857 * 150,
+ 107 / 255,
+ 0,
+ 0,
+ 200.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 50.0,
+ "maximum": 200.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/cells/vertex_color_map_rainbow.jpeg") == True
diff --git a/tests/mesh/cells/test_mesh_cells_protocols.py b/tests/mesh/cells/test_mesh_cells_protocols.py
index c9218d47..6ac502fb 100644
--- a/tests/mesh/cells/test_mesh_cells_protocols.py
+++ b/tests/mesh/cells/test_mesh_cells_protocols.py
@@ -16,7 +16,7 @@
def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
dataset_factory(
- id=mesh_id, viewable_file="regular_grid_2d.vti", viewer_elements_type="polygons"
+ id=mesh_id, viewable_file="regular_grid_2d.vti", viewer_elements_type="cells"
)
server.call(
@@ -52,377 +52,3 @@ def test_cells_visibility(
[{"id": mesh_id, "visibility": False}],
)
assert server.compare_image("mesh/cells/visibility.jpeg") == True
-
-
-def test_cells_vertex_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "points"}],
- )
- assert server.compare_image("mesh/cells/vertex_attribute.jpeg") == True
-
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/cells/vertex_scalar_range.jpeg") == True
-
-
-def test_cells_cell_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_attribute"]["rpc"],
- [{"id": mesh_id, "name": "RGB_data"}],
- )
- assert server.compare_image("mesh/cells/cell_attribute.jpeg") == True
-
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/cells/cell_scalar_range.jpeg") == True
-
-
-def test_cells_vertex_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "points"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 2, "maximum": 498}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/cells/vertex_color_map.jpeg") == True
-
-
-def test_cells_vertex_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "points"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/cells/vertex_color_map.jpeg") == True
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 200.0, "maximum": 300.0}],
- )
-
- assert server.compare_image("mesh/cells/vertex_color_map_range_update.jpeg") == True
-
-
-def test_cells_vertex_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "points"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/cells/vertex_color_map.jpeg") == True
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0.0, "maximum": 50.0}],
- )
-
- assert server.compare_image("mesh/cells/vertex_color_map_red_shift.jpeg") == True
-
-
-def test_cells_vertex_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "points"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/cells/vertex_color_map_rainbow_initial.jpeg") == True
- )
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 50.0, "maximum": 200.0}],
- )
-
- assert server.compare_image("mesh/cells/vertex_color_map_rainbow.jpeg") == True
-
-
-def test_cells_cell_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_attribute"]["rpc"],
- [{"id": mesh_id, "name": "RGB_data"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 255}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/cells/cell_color_map.jpeg") == True
-
-
-def test_cells_cell_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_attribute"]["rpc"],
- [{"id": mesh_id, "name": "RGB_data"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/cells/cell_color_map.jpeg") == True
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 100.0, "maximum": 150.0}],
- )
-
- assert server.compare_image("mesh/cells/cell_color_map_range_update.jpeg") == True
-
-
-def test_cells_cell_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_attribute"]["rpc"],
- [{"id": mesh_id, "name": "RGB_data"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/cells/cell_color_map.jpeg") == True
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0.0, "maximum": 20.0}],
- )
-
- assert server.compare_image("mesh/cells/cell_color_map_red_shift.jpeg") == True
-
-
-def test_cells_cell_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_attribute"]["rpc"],
- [{"id": mesh_id, "name": "RGB_data"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/cells/cell_color_map_rainbow_initial.jpeg") == True
- )
-
- # Set scalar range
- server.call(
- VtkMeshCellsView.mesh_cells_prefix
- + VtkMeshCellsView.mesh_cells_schemas_dict["cell_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 50.0, "maximum": 100.0}],
- )
-
- assert server.compare_image("mesh/cells/cell_color_map_rainbow.jpeg") == True
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
new file mode 100644
index 00000000..6fd6c973
--- /dev/null
+++ b/tests/mesh/edges/attribute/edge/test_edges_attribute_edge_protocols.py
@@ -0,0 +1,28 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.edges.attribute.edge.edges_attribute_edge_protocols import (
+ VtkMeshEdgesAttributeEdgeView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id,
+ viewable_file="attributed_edged_curve.vtp",
+ viewer_elements_type="edges",
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
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
new file mode 100644
index 00000000..b8534683
--- /dev/null
+++ b/tests/mesh/edges/attribute/vertex/test_edges_attribute_vertex_protocols.py
@@ -0,0 +1,354 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.edges.attribute.vertex.edges_attribute_vertex_protocols import (
+ VtkMeshEdgesAttributeVertexView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id,
+ viewable_file="attributed_edged_curve.vtp",
+ viewer_elements_type="edges",
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
+
+
+def test_edges_vertex_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "vertex_attribute"}],
+ )
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "scalar_range"
+ ]["rpc"],
+ [{"id": mesh_id, "minimum": 0, "maximum": 58}],
+ )
+ assert server.compare_image("mesh/edges/vertex_attribute.jpeg") == True
+
+
+def test_edges_vertex_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "vertex_attribute"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 58.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 58.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/edges/vertex_color_map.jpeg") == True
+
+
+def test_edges_vertex_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "vertex_attribute"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 58.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 58.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/edges/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 50.0,
+ 0,
+ 0,
+ 1.0,
+ 58.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 50.0,
+ "maximum": 58.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/edges/vertex_color_map_range_update.jpeg") == True
+
+
+def test_edges_vertex_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "vertex_attribute"}],
+ )
+
+ # Set Blue to Red Map on [0, 58]
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 58.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 58.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/edges/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/edges/vertex_color_map_red_shift.jpeg") == True
+
+
+def test_edges_vertex_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "vertex_attribute"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 0.143 * 58,
+ 0,
+ 0,
+ 92 / 255,
+ 0.285 * 58,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 0.429 * 58,
+ 0,
+ 128 / 255,
+ 0,
+ 0.571 * 58,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 0.714 * 58,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 0.857 * 58,
+ 107 / 255,
+ 0,
+ 0,
+ 58.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 0.0,
+ "maximum": 58.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/edges/vertex_color_map_rainbow_initial.jpeg") == True
+ )
+
+ # Update rainbow range via color map
+ server.call(
+ VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_prefix
+ + VtkMeshEdgesAttributeVertexView.mesh_edges_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 10.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 10.0 + 0.143 * 10,
+ 0,
+ 0,
+ 92 / 255,
+ 10.0 + 0.285 * 10,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 10.0 + 0.429 * 10,
+ 0,
+ 128 / 255,
+ 0,
+ 10.0 + 0.571 * 10,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 10.0 + 0.714 * 10,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 10.0 + 0.857 * 10,
+ 107 / 255,
+ 0,
+ 0,
+ 20.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 10.0,
+ "maximum": 20.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/edges/vertex_color_map_rainbow.jpeg") == True
diff --git a/tests/mesh/edges/test_mesh_edges_protocols.py b/tests/mesh/edges/test_mesh_edges_protocols.py
index f72c80ca..a7d1aa35 100644
--- a/tests/mesh/edges/test_mesh_edges_protocols.py
+++ b/tests/mesh/edges/test_mesh_edges_protocols.py
@@ -3,7 +3,7 @@
# Third party imports
from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
-from opengeodeweb_viewer.rpc.mesh.edges.mesh_edges_protocols import VtkMeshEdgesView
+from opengeodeweb_viewer.rpc.mesh.edges.edges_protocols import VtkMeshEdgesView
# Local application imports
from tests.mesh.test_mesh_protocols import test_register_mesh
@@ -62,235 +62,3 @@ def test_edges_with_edged_curve(
[{"id": "123456789", "visibility": False}],
)
assert server.compare_image("mesh/edges/edged_curve_visibility.jpeg") == True
-
-
-def test_edges_vertex_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="attributed_edged_curve.vtp",
- viewer_elements_type="edges",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "vertex_attribute"}],
- )
- assert server.compare_image("mesh/edges/vertex_attribute.jpeg") == True
-
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/edges/vertex_scalar_range.jpeg") == True
-
-
-def test_edges_vertex_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="attributed_edged_curve.vtp",
- viewer_elements_type="edges",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "vertex_attribute"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 58}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/edges/vertex_color_map.jpeg") == True
-
-
-def test_edges_vertex_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="attributed_edged_curve.vtp",
- viewer_elements_type="edges",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "vertex_attribute"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/edges/vertex_color_map.jpeg") == True
-
- # Set scalar range: 50 to 58 (clamping data to the minimum color -> mostly BLUE)
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 50.0, "maximum": 58.0}],
- )
-
- assert server.compare_image("mesh/edges/vertex_color_map_range_update.jpeg") == True
-
-
-def test_edges_vertex_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="attributed_edged_curve.vtp",
- viewer_elements_type="edges",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "vertex_attribute"}],
- )
-
- # Set Blue to Red Map on [0, 1]
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/edges/vertex_color_map.jpeg") == True
-
- # Set scalar range: 0.0 to 1.0 (all data > 1.0 should become RED)
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0.0, "maximum": 1.0}],
- )
-
- assert server.compare_image("mesh/edges/vertex_color_map_red_shift.jpeg") == True
-
-
-def test_edges_vertex_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="attributed_edged_curve.vtp",
- viewer_elements_type="edges",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "vertex_attribute"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/edges/vertex_color_map_rainbow_initial.jpeg") == True
- )
-
- # Set scalar range
- server.call(
- VtkMeshEdgesView.mesh_edges_prefix
- + VtkMeshEdgesView.mesh_edges_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 10.0, "maximum": 20.0}],
- )
-
- assert server.compare_image("mesh/edges/vertex_color_map_rainbow.jpeg") == True
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
new file mode 100644
index 00000000..3f5e618b
--- /dev/null
+++ b/tests/mesh/points/attribute/vertex/test_points_attribute_vertex_protocols.py
@@ -0,0 +1,350 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.points.attribute.vertex.points_attribute_vertex_protocols import (
+ VtkMeshPointsAttributeVertexView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id,
+ viewable_file="hat.vtp",
+ viewer_elements_type="points",
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
+
+
+def test_points_vertex_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+ assert server.compare_image("mesh/points/vertex_attribute.jpeg") == True
+
+
+def test_points_vertex_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/points/vertex_color_map.jpeg") == True
+
+
+def test_points_vertex_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/points/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.8,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.8,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/points/vertex_color_map_range_update.jpeg") == True
+ )
+
+
+def test_points_vertex_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/points/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 0.1,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 0.1,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/points/vertex_color_map_red_shift.jpeg") == True
+
+
+def test_points_vertex_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "name"
+ ]["rpc"],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 0.143,
+ 0,
+ 0,
+ 92 / 255,
+ 0.285,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 0.429,
+ 0,
+ 128 / 255,
+ 0,
+ 0.571,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 0.714,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 0.857,
+ 107 / 255,
+ 0,
+ 0,
+ 1.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/points/vertex_color_map_rainbow_initial.jpeg")
+ == True
+ )
+
+ # Update rainbow range via color map
+ server.call(
+ VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_prefix
+ + VtkMeshPointsAttributeVertexView.mesh_points_attribute_vertex_schemas_dict[
+ "color_map"
+ ]["rpc"],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.1,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 0.1 + 0.143 * 0.3,
+ 0,
+ 0,
+ 92 / 255,
+ 0.1 + 0.285 * 0.3,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 0.1 + 0.429 * 0.3,
+ 0,
+ 128 / 255,
+ 0,
+ 0.1 + 0.571 * 0.3,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 0.1 + 0.714 * 0.3,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 0.1 + 0.857 * 0.3,
+ 107 / 255,
+ 0,
+ 0,
+ 0.4,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 0.1,
+ "maximum": 0.4,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/points/vertex_color_map_rainbow.jpeg") == True
diff --git a/tests/mesh/points/test_mesh_points_protocols.py b/tests/mesh/points/test_mesh_points_protocols.py
index 99e94ceb..bd8cc958 100644
--- a/tests/mesh/points/test_mesh_points_protocols.py
+++ b/tests/mesh/points/test_mesh_points_protocols.py
@@ -3,7 +3,7 @@
# Third party imports
from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
-from opengeodeweb_viewer.rpc.mesh.points.mesh_points_protocols import (
+from opengeodeweb_viewer.rpc.mesh.points.points_protocols import (
VtkMeshPointsView,
)
@@ -88,193 +88,3 @@ def test_points_with_point_set(
[{"id": mesh_id, "visibility": False}],
)
assert server.compare_image("mesh/points/point_set_visibility.jpeg") == True
-
-
-def test_points_vertex_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- test_register_mesh(server, dataset_factory)
-
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "lambert2SG"}],
- )
- assert server.compare_image("mesh/points/vertex_attribute.jpeg") == True
-
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/points/vertex_scalar_range.jpeg") == True
-
-
-def test_points_vertex_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "lambert2SG"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 1}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/points/vertex_color_map.jpeg") == True
-
-
-def test_points_vertex_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "lambert2SG"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/points/vertex_color_map.jpeg") == True
-
- # Set scalar range: 0.8 to 1 (clamping data to the minimum color -> mostly BLUE)
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0.8, "maximum": 1.0}],
- )
-
- assert (
- server.compare_image("mesh/points/vertex_color_map_range_update.jpeg") == True
- )
-
-
-def test_points_vertex_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "lambert2SG"}],
- )
-
- # Set Blue to Red Map on [0, 1]
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/points/vertex_color_map.jpeg") == True
-
- # Set scalar range: 0.0 to 0.1 (all data > 0.1 should become RED)
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0.0, "maximum": 0.1}],
- )
-
- assert server.compare_image("mesh/points/vertex_color_map_red_shift.jpeg") == True
-
-
-def test_points_vertex_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": mesh_id, "name": "lambert2SG"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/points/vertex_color_map_rainbow_initial.jpeg")
- == True
- )
-
- # Set scalar range: 0.1 to 0.4
- server.call(
- VtkMeshPointsView.mesh_points_prefix
- + VtkMeshPointsView.mesh_points_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0.1, "maximum": 0.4}],
- )
-
- assert server.compare_image("mesh/points/vertex_color_map_rainbow.jpeg") == True
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
new file mode 100644
index 00000000..6a9bd183
--- /dev/null
+++ b/tests/mesh/polygons/attribute/polygon/test_polygons_attribute_polygon_protocols.py
@@ -0,0 +1,386 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.polygons.attribute.polygon.polygons_attribute_polygon_protocols import (
+ VtkMeshPolygonsAttributePolygonView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id,
+ viewable_file="triangulated_surface2d.vtp",
+ viewer_elements_type="polygons",
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
+
+
+def test_polygons_polygon_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "triangle_vertices"}],
+ )
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "scalar_range"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "minimum": 3, "maximum": 45}],
+ )
+ assert server.compare_image("mesh/polygons/polygon_attribute.jpeg") == True
+
+
+def test_polygons_polygon_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "triangle_vertices"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 50.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 50.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/polygon_color_map.jpeg") == True
+
+
+def test_polygons_polygon_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "triangle_vertices"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 50.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 50.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/polygon_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 40.0,
+ 0,
+ 0,
+ 1.0,
+ 45.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 40.0,
+ "maximum": 45.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polygons/polygon_color_map_range_update.jpeg")
+ == True
+ )
+
+
+def test_polygons_polygon_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "triangle_vertices"}],
+ )
+
+ # Set Blue to Red Map on [0, 50]
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 50.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 50.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/polygon_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 3.0,
+ 0,
+ 0,
+ 1.0,
+ 4.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 3.0,
+ "maximum": 4.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polygons/polygon_color_map_red_shift.jpeg") == True
+ )
+
+
+def test_polygons_polygon_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "triangle_vertices"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 0.143 * 50,
+ 0,
+ 0,
+ 92 / 255,
+ 0.285 * 50,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 0.429 * 50,
+ 0,
+ 128 / 255,
+ 0,
+ 0.571 * 50,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 0.714 * 50,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 0.857 * 50,
+ 107 / 255,
+ 0,
+ 0,
+ 50.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 0.0,
+ "maximum": 50.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polygons/polygon_color_map_rainbow_initial.jpeg")
+ == True
+ )
+
+ # Update rainbow range via color map
+ server.call(
+ VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_prefix
+ + VtkMeshPolygonsAttributePolygonView.mesh_polygons_attribute_polygon_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 5.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 5.0 + 0.143 * 10,
+ 0,
+ 0,
+ 92 / 255,
+ 5.0 + 0.285 * 10,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 5.0 + 0.429 * 10,
+ 0,
+ 128 / 255,
+ 0,
+ 5.0 + 0.571 * 10,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 5.0 + 0.714 * 10,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 5.0 + 0.857 * 10,
+ 107 / 255,
+ 0,
+ 0,
+ 15.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 5.0,
+ "maximum": 15.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/polygon_color_map_rainbow.jpeg") == True
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
new file mode 100644
index 00000000..69189375
--- /dev/null
+++ b/tests/mesh/polygons/attribute/vertex/test_polygons_attribute_vertex_protocols.py
@@ -0,0 +1,381 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.polygons.attribute.vertex.polygons_attribute_vertex_protocols import (
+ VtkMeshPolygonsAttributeVertexView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ 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}],
+ )
+
+
+def test_polygons_vertex_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "scalar_range"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "minimum": 0, "maximum": 1}],
+ )
+ assert server.compare_image("mesh/polygons/vertex_attribute.jpeg") == True
+
+
+def test_polygons_vertex_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/vertex_color_map.jpeg") == True
+
+
+def test_polygons_vertex_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.8,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.8,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polygons/vertex_color_map_range_update.jpeg") == True
+ )
+
+
+def test_polygons_vertex_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Set Blue to Red Map on [0, 1]
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 0.1,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 0.1,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/vertex_color_map_red_shift.jpeg") == True
+
+
+def test_polygons_vertex_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "lambert2SG"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 0.143,
+ 0,
+ 0,
+ 92 / 255,
+ 0.285,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 0.429,
+ 0,
+ 128 / 255,
+ 0,
+ 0.571,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 0.714,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 0.857,
+ 107 / 255,
+ 0,
+ 0,
+ 1.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polygons/vertex_color_map_rainbow_initial.jpeg")
+ == True
+ )
+
+ # Update rainbow range via color map
+ server.call(
+ VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_prefix
+ + VtkMeshPolygonsAttributeVertexView.mesh_polygons_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.1,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 0.1 + 0.143 * 0.3,
+ 0,
+ 0,
+ 92 / 255,
+ 0.1 + 0.285 * 0.3,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 0.1 + 0.429 * 0.3,
+ 0,
+ 128 / 255,
+ 0,
+ 0.1 + 0.571 * 0.3,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 0.1 + 0.714 * 0.3,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 0.1 + 0.857 * 0.3,
+ 107 / 255,
+ 0,
+ 0,
+ 0.4,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 0.1,
+ "maximum": 0.4,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polygons/vertex_color_map_rainbow.jpeg") == True
diff --git a/tests/mesh/polygons/test_mesh_polygons_protocols.py b/tests/mesh/polygons/test_mesh_polygons_protocols.py
index 833a78ab..fd8ecf82 100644
--- a/tests/mesh/polygons/test_mesh_polygons_protocols.py
+++ b/tests/mesh/polygons/test_mesh_polygons_protocols.py
@@ -36,428 +36,3 @@ def test_polygons_visibility(
[{"id": "123456789", "visibility": False}],
)
assert server.compare_image("mesh/polygons/visibility.jpeg") == True
-
-
-def test_polygons_vertex_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- test_register_mesh(server, dataset_factory)
-
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "lambert2SG"}],
- )
- assert server.compare_image("mesh/polygons/vertex_attribute.jpeg") == True
-
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": "123456789", "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/polygons/vertex_scalar_range.jpeg") == True
-
-
-def test_polygons_polygon_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
-
- dataset_factory(
- id="123456789",
- viewable_file="triangulated_surface2d.vtp",
- viewer_elements_type="polygons",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": "123456789"}],
- )
- assert server.compare_image("mesh/polygons/register.jpeg") == True
-
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_attribute"]["rpc"],
- [{"id": "123456789", "name": "triangle_vertices"}],
- )
- assert server.compare_image("mesh/polygons/polygon_attribute.jpeg") == True
-
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_scalar_range"]["rpc"],
- [{"id": "123456789", "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/polygons/polygon_scalar_range.jpeg") == True
-
-
-def test_polygons_vertex_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "lambert2SG"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": "123456789", "minimum": 0, "maximum": 1}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polygons/vertex_color_map.jpeg") == True
-
-
-def test_polygons_vertex_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "lambert2SG"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polygons/vertex_color_map.jpeg") == True
-
- # Set scalar range: 0.8 to 1 (clamping data to the minimum color -> mostly BLUE)
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": "123456789", "minimum": 0.8, "maximum": 1.0}],
- )
-
- assert (
- server.compare_image("mesh/polygons/vertex_color_map_range_update.jpeg") == True
- )
-
-
-def test_polygons_vertex_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "lambert2SG"}],
- )
-
- # Set Blue to Red Map on [0, 1]
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polygons/vertex_color_map.jpeg") == True
-
- # Set scalar range: 0.0 to 0.1 (all data > 0.1 should become RED)
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": "123456789", "minimum": 0.0, "maximum": 0.1}],
- )
-
- assert server.compare_image("mesh/polygons/vertex_color_map_red_shift.jpeg") == True
-
-
-def test_polygons_vertex_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "lambert2SG"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/polygons/vertex_color_map_rainbow_initial.jpeg")
- == True
- )
-
- # Set scalar range: 0.1 to 0.4
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["vertex_scalar_range"]["rpc"],
- [{"id": "123456789", "minimum": 0.1, "maximum": 0.4}],
- )
-
- assert server.compare_image("mesh/polygons/vertex_color_map_rainbow.jpeg") == True
-
-
-def test_polygons_polygon_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="triangulated_surface2d.vtp",
- viewer_elements_type="polygons",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_attribute"]["rpc"],
- [{"id": mesh_id, "name": "triangle_vertices"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 0, "maximum": 50}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polygons/polygon_color_map.jpeg") == True
-
-
-def test_polygons_polygon_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="triangulated_surface2d.vtp",
- viewer_elements_type="polygons",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_attribute"]["rpc"],
- [{"id": mesh_id, "name": "triangle_vertices"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polygons/polygon_color_map.jpeg") == True
-
- # Set scalar range: 40 to 45 (clamping data to the minimum color -> mostly BLUE)
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 40.0, "maximum": 45.0}],
- )
-
- assert (
- server.compare_image("mesh/polygons/polygon_color_map_range_update.jpeg")
- == True
- )
-
-
-def test_polygons_polygon_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="triangulated_surface2d.vtp",
- viewer_elements_type="polygons",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_attribute"]["rpc"],
- [{"id": mesh_id, "name": "triangle_vertices"}],
- )
-
- # Set Blue to Red Map on [0, 1]
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polygons/polygon_color_map.jpeg") == True
-
- # Set scalar range: 3.0 to 4.0 (all data > 4 should become RED)
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 3.0, "maximum": 4.0}],
- )
-
- assert (
- server.compare_image("mesh/polygons/polygon_color_map_red_shift.jpeg") == True
- )
-
-
-def test_polygons_polygon_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- mesh_id = "123456789"
- dataset_factory(
- id=mesh_id,
- viewable_file="triangulated_surface2d.vtp",
- viewer_elements_type="polygons",
- )
-
- server.call(
- VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
- [{"id": mesh_id}],
- )
-
- # Set active attribute
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_attribute"]["rpc"],
- [{"id": mesh_id, "name": "triangle_vertices"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_color_map"]["rpc"],
- [
- {
- "id": mesh_id,
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/polygons/polygon_color_map_rainbow_initial.jpeg")
- == True
- )
-
- # Set scalar range: 5.0 to 15.0
- server.call(
- VtkMeshPolygonsView.mesh_polygons_prefix
- + VtkMeshPolygonsView.mesh_polygons_schemas_dict["polygon_scalar_range"]["rpc"],
- [{"id": mesh_id, "minimum": 5.0, "maximum": 15.0}],
- )
-
- assert server.compare_image("mesh/polygons/polygon_color_map_rainbow.jpeg") == True
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
new file mode 100644
index 00000000..82fcf8b8
--- /dev/null
+++ b/tests/mesh/polyhedra/attribute/polyhedron/test_polyhedra_attribute_polyhedron_protocols.py
@@ -0,0 +1,389 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.polyhedra.attribute.polyhedron.polyhedra_attribute_polyhedron_protocols import (
+ VtkMeshPolyhedraAttributePolyhedronView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id,
+ viewable_file="polyhedron_attribute.vtu",
+ viewer_elements_type="polyhedra",
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
+
+
+def test_polyhedra_polyhedron_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_polyhedra"}],
+ )
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "scalar_range"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "minimum": 3, "maximum": 6}],
+ )
+ assert server.compare_image("mesh/polyhedra/polyhedron_attribute.jpeg") == True
+
+
+def test_polyhedra_polyhedron_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_polyhedra"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 3.0,
+ 0,
+ 0,
+ 1.0,
+ 6.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 3.0,
+ "maximum": 6.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polyhedra/polyhedron_color_map.jpeg") == True
+
+
+def test_polyhedra_polyhedron_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_polyhedra"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 3.0,
+ 0,
+ 0,
+ 1.0,
+ 6.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 3.0,
+ "maximum": 6.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polyhedra/polyhedron_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 5.0,
+ 0,
+ 0,
+ 1.0,
+ 6.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 5.0,
+ "maximum": 6.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polyhedra/polyhedron_color_map_range_update.jpeg")
+ == True
+ )
+
+
+def test_polyhedra_polyhedron_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_polyhedra"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 3.0,
+ 0,
+ 0,
+ 1.0,
+ 6.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 3.0,
+ "maximum": 6.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polyhedra/polyhedron_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polyhedra/polyhedron_color_map_red_shift.jpeg")
+ == True
+ )
+
+
+def test_polyhedra_polyhedron_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_polyhedra"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 3.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 3.0 + 0.143 * 3,
+ 0,
+ 0,
+ 92 / 255,
+ 3.0 + 0.285 * 3,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 3.0 + 0.429 * 3,
+ 0,
+ 128 / 255,
+ 0,
+ 3.0 + 0.571 * 3,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 3.0 + 0.714 * 3,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 3.0 + 0.857 * 3,
+ 107 / 255,
+ 0,
+ 0,
+ 6.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 3.0,
+ "maximum": 6.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polyhedra/polyhedron_color_map_rainbow_initial.jpeg")
+ == True
+ )
+
+ # Update rainbow range via color map
+ server.call(
+ VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_prefix
+ + VtkMeshPolyhedraAttributePolyhedronView.mesh_polyhedra_attribute_polyhedron_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 3.5,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 3.5 + 0.143 * 2,
+ 0,
+ 0,
+ 92 / 255,
+ 3.5 + 0.285 * 2,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 3.5 + 0.429 * 2,
+ 0,
+ 128 / 255,
+ 0,
+ 3.5 + 0.571 * 2,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 3.5 + 0.714 * 2,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 3.5 + 0.857 * 2,
+ 107 / 255,
+ 0,
+ 0,
+ 5.5,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 3.5,
+ "maximum": 5.5,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polyhedra/polyhedron_color_map_rainbow.jpeg") == True
+ )
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
new file mode 100644
index 00000000..3c4c5b74
--- /dev/null
+++ b/tests/mesh/polyhedra/attribute/vertex/test_polyhedra_attribute_vertex_protocols.py
@@ -0,0 +1,386 @@
+# Standard library imports
+from typing import Callable
+
+# Third party imports
+from opengeodeweb_viewer.rpc.mesh.mesh_protocols import VtkMeshView
+from opengeodeweb_viewer.rpc.mesh.polyhedra.attribute.vertex.polyhedra_attribute_vertex_protocols import (
+ VtkMeshPolyhedraAttributeVertexView,
+)
+
+# Local application imports
+from tests.conftest import ServerMonitor
+
+# Local constants
+mesh_id = "123456789"
+
+
+def test_register(server: ServerMonitor, dataset_factory: Callable[..., str]) -> None:
+
+ dataset_factory(
+ id=mesh_id,
+ viewable_file="polyhedron_attribute.vtu",
+ viewer_elements_type="polyhedra",
+ )
+
+ server.call(
+ VtkMeshView.mesh_prefix + VtkMeshView.mesh_schemas_dict["register"]["rpc"],
+ [{"id": mesh_id}],
+ )
+
+
+def test_polyhedra_vertex_attribute(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_vertices"}],
+ )
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "scalar_range"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "minimum": 1, "maximum": 11}],
+ )
+ assert server.compare_image("mesh/polyhedra/vertex_attribute.jpeg") == True
+
+
+def test_polyhedra_vertex_color_map(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_vertices"}],
+ )
+
+ # Set color map: Blue to Red
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 1.0,
+ 0,
+ 0,
+ 1.0,
+ 11.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 1.0,
+ "maximum": 11.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polyhedra/vertex_color_map.jpeg") == True
+
+
+def test_polyhedra_vertex_color_map_range_update(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_vertices"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 1.0,
+ 0,
+ 0,
+ 1.0,
+ 11.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 1.0,
+ "maximum": 11.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polyhedra/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 10.0,
+ 0,
+ 0,
+ 1.0,
+ 11.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 10.0,
+ "maximum": 11.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polyhedra/vertex_color_map_range_update.jpeg")
+ == True
+ )
+
+
+def test_polyhedra_vertex_color_map_red_shift(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_vertices"}],
+ )
+
+ # Set Blue to Red Map
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 1.0,
+ 0,
+ 0,
+ 1.0,
+ 11.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 1.0,
+ "maximum": 11.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polyhedra/vertex_color_map.jpeg") == True
+
+ # Update range via color map
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 0.0,
+ 0,
+ 0,
+ 1.0,
+ 1.0,
+ 1.0,
+ 0,
+ 0,
+ ],
+ "minimum": 0.0,
+ "maximum": 1.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polyhedra/vertex_color_map_red_shift.jpeg") == True
+ )
+
+
+def test_polyhedra_vertex_color_map_rainbow(
+ server: ServerMonitor, dataset_factory: Callable[..., str]
+) -> None:
+
+ test_register(server, dataset_factory)
+
+ # Set active attribute
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "name"
+ ][
+ "rpc"
+ ],
+ [{"id": mesh_id, "name": "toto_on_vertices"}],
+ )
+
+ # Rainbow Desaturated Map
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 1.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 1.0 + 0.143 * 10,
+ 0,
+ 0,
+ 92 / 255,
+ 1.0 + 0.285 * 10,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 1.0 + 0.429 * 10,
+ 0,
+ 128 / 255,
+ 0,
+ 1.0 + 0.571 * 10,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 1.0 + 0.714 * 10,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 1.0 + 0.857 * 10,
+ 107 / 255,
+ 0,
+ 0,
+ 11.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 1.0,
+ "maximum": 11.0,
+ }
+ ],
+ )
+
+ assert (
+ server.compare_image("mesh/polyhedra/vertex_color_map_rainbow_initial.jpeg")
+ == True
+ )
+
+ # Update rainbow range via color map
+ server.call(
+ VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_prefix
+ + VtkMeshPolyhedraAttributeVertexView.mesh_polyhedra_attribute_vertex_schemas_dict[
+ "color_map"
+ ][
+ "rpc"
+ ],
+ [
+ {
+ "id": mesh_id,
+ "points": [
+ 2.0,
+ 71 / 255,
+ 71 / 255,
+ 219 / 255,
+ 2.0 + 0.143 * 6,
+ 0,
+ 0,
+ 92 / 255,
+ 2.0 + 0.285 * 6,
+ 0,
+ 255 / 255,
+ 255 / 255,
+ 2.0 + 0.429 * 6,
+ 0,
+ 128 / 255,
+ 0,
+ 2.0 + 0.571 * 6,
+ 255 / 255,
+ 255 / 255,
+ 0,
+ 2.0 + 0.714 * 6,
+ 255 / 255,
+ 97 / 255,
+ 0,
+ 2.0 + 0.857 * 6,
+ 107 / 255,
+ 0,
+ 0,
+ 8.0,
+ 224 / 255,
+ 77 / 255,
+ 77 / 255,
+ ],
+ "minimum": 2.0,
+ "maximum": 8.0,
+ }
+ ],
+ )
+
+ assert server.compare_image("mesh/polyhedra/vertex_color_map_rainbow.jpeg") == True
diff --git a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py
index ccff8f95..c58c4591 100644
--- a/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py
+++ b/tests/mesh/polyhedra/test_mesh_polyhedra_protocols.py
@@ -51,420 +51,3 @@ def test_polyhedra_visibility(
[{"id": "123456789", "visibility": False}],
)
assert server.compare_image("mesh/polyhedra/visibility.jpeg") == True
-
-
-def test_vertex_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "toto_on_vertices"}],
- )
- assert server.compare_image("mesh/polyhedra/vertex_attribute.jpeg") == True
-
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/polyhedra/vertex_scalar_range.jpeg") == True
-
-
-def test_polyhedron_attribute(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_attribute"][
- "rpc"
- ],
- [{"id": "123456789", "name": "toto_on_polyhedra"}],
- )
- assert server.compare_image("mesh/polyhedra/polyhedron_attribute.jpeg") == True
-
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 0, "maximum": 10}],
- )
- assert server.compare_image("mesh/polyhedra/polyhedron_scalar_range.jpeg") == True
-
-
-def test_polyhedra_vertex_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "toto_on_vertices"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 0, "maximum": 1}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polyhedra/vertex_color_map.jpeg") == True
-
-
-def test_polyhedra_vertex_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "toto_on_vertices"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polyhedra/vertex_color_map.jpeg") == True
-
- # Set scalar range: 10 to 11 (clamping data to the minimum color -> mostly BLUE)
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 10.0, "maximum": 11.0}],
- )
-
- assert (
- server.compare_image("mesh/polyhedra/vertex_color_map_range_update.jpeg")
- == True
- )
-
-
-def test_polyhedra_vertex_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "toto_on_vertices"}],
- )
-
- # Set Blue to Red Map on [0, 1]
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polyhedra/vertex_color_map.jpeg") == True
-
- # Set scalar range: 0.0 to 1.0 (all data > 1.0 should become RED)
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 0.0, "maximum": 1.0}],
- )
-
- assert (
- server.compare_image("mesh/polyhedra/vertex_color_map_red_shift.jpeg") == True
- )
-
-
-def test_polyhedra_vertex_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_attribute"]["rpc"],
- [{"id": "123456789", "name": "toto_on_vertices"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_color_map"]["rpc"],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/polyhedra/vertex_color_map_rainbow_initial.jpeg")
- == True
- )
-
- # Set scalar range: 2.0 to 8.0
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["vertex_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 2.0, "maximum": 8.0}],
- )
-
- assert server.compare_image("mesh/polyhedra/vertex_color_map_rainbow.jpeg") == True
-
-
-def test_polyhedra_polyhedron_color_map(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_attribute"][
- "rpc"
- ],
- [{"id": "123456789", "name": "toto_on_polyhedra"}],
- )
-
- # Set scalar range
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 0, "maximum": 1}],
- )
-
- # Set color map: Blue to Red
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedra_color_map"][
- "rpc"
- ],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polyhedra/polyhedron_color_map.jpeg") == True
-
-
-def test_polyhedra_polyhedron_color_map_range_update(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_attribute"][
- "rpc"
- ],
- [{"id": "123456789", "name": "toto_on_polyhedra"}],
- )
-
- # Set Blue to Red Map
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedra_color_map"][
- "rpc"
- ],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polyhedra/polyhedron_color_map.jpeg") == True
-
- # Set scalar range: 5 to 6 (clamping data to the minimum color -> mostly BLUE)
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 5.0, "maximum": 6.0}],
- )
-
- assert (
- server.compare_image("mesh/polyhedra/polyhedron_color_map_range_update.jpeg")
- == True
- )
-
-
-def test_polyhedra_polyhedron_color_map_red_shift(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_attribute"][
- "rpc"
- ],
- [{"id": "123456789", "name": "toto_on_polyhedra"}],
- )
-
- # Set Blue to Red Map on [0, 1]
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedra_color_map"][
- "rpc"
- ],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 0, 0, 255],
- [1.0, 255, 0, 0],
- ],
- }
- ],
- )
-
- assert server.compare_image("mesh/polyhedra/polyhedron_color_map.jpeg") == True
-
- # Set scalar range: 0.0 to 1.0 (all data > 1 should become RED)
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 0.0, "maximum": 1.0}],
- )
-
- assert (
- server.compare_image("mesh/polyhedra/polyhedron_color_map_red_shift.jpeg")
- == True
- )
-
-
-def test_polyhedra_polyhedron_color_map_rainbow(
- server: ServerMonitor, dataset_factory: Callable[..., str]
-) -> None:
- test_register_mesh(server, dataset_factory)
-
- # Set active attribute
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_attribute"][
- "rpc"
- ],
- [{"id": "123456789", "name": "toto_on_polyhedra"}],
- )
-
- # Rainbow Desaturated Map
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedra_color_map"][
- "rpc"
- ],
- [
- {
- "id": "123456789",
- "points": [
- [0.0, 71, 71, 219],
- [0.143, 0, 0, 92],
- [0.285, 0, 255, 255],
- [0.429, 0, 128, 0],
- [0.571, 255, 255, 0],
- [0.714, 255, 97, 0],
- [0.857, 107, 0, 0],
- [1.0, 224, 77, 77],
- ],
- }
- ],
- )
-
- assert (
- server.compare_image("mesh/polyhedra/polyhedron_color_map_rainbow_initial.jpeg")
- == True
- )
-
- # Set scalar range: 3.5 to 5.5
- server.call(
- VtkMeshPolyhedraView.mesh_polyhedra_prefix
- + VtkMeshPolyhedraView.mesh_polyhedra_schemas_dict["polyhedron_scalar_range"][
- "rpc"
- ],
- [{"id": "123456789", "minimum": 3.5, "maximum": 5.5}],
- )
-
- assert (
- server.compare_image("mesh/polyhedra/polyhedron_color_map_rainbow.jpeg") == True
- )