Skip to content

Commit 72dfe4f

Browse files
committed
temp
1 parent f6becf2 commit 72dfe4f

4 files changed

Lines changed: 27 additions & 0 deletions

File tree

src/opengeodeweb_viewer/object/object_methods.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,13 @@ def clearColors(self, data_id: str) -> None:
140140
output.GetPointData().SetActiveScalars("")
141141
output.GetCellData().SetActiveScalars("")
142142
mapper.ScalarVisibilityOff()
143+
144+
def SetCategoryEdgesVisibility(self, data_id: str, category: str, visibility: bool) -> None:
145+
actor = self.get_vtk_pipeline(data_id).category_actors.get(category)
146+
if actor:
147+
actor.GetProperty().SetEdgeVisibility(visibility)
148+
149+
def SetCategoryPointsVisibility(self, data_id: str, category: str, visibility: bool) -> None:
150+
actor = self.get_vtk_pipeline(data_id).category_actors.get(category)
151+
if actor:
152+
actor.GetProperty().SetVertexVisibility(visibility)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"rpc": "edges_visibility",
3+
"properties": {
4+
"id": { "type": "string" },
5+
"visibility": { "type": "boolean" }
6+
},
7+
"required": ["id", "visibility"]
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"rpc": "points_visibility",
3+
"properties": {
4+
"id": { "type": "string" },
5+
"visibility": { "type": "boolean" }
6+
},
7+
"required": ["id", "visibility"]
8+
}

src/opengeodeweb_viewer/vtk_protocol.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class VtkPipeline:
4343
filter: vtkAlgorithm | None = None
4444
actor: vtkActor = field(default_factory=vtkActor)
4545
blockDataSets: list[vtkDataObject | None] = field(default_factory=list)
46+
category_actors: dict[str, vtkActor] = field(default_factory=dict)
4647

4748

4849
class VtkTypingMixin:

0 commit comments

Comments
 (0)