Skip to content

Commit 13f8889

Browse files
committed
rename class andupdate polygon test
1 parent f6bdb24 commit 13f8889

9 files changed

Lines changed: 463 additions & 423 deletions

File tree

src/opengeodeweb_viewer/rpc/model/model_protocols.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _get_block_style(self, pipeline: VtkPipeline, block_id: int) -> BlockStyle:
6464
if block_id not in pipeline.block_styles:
6565
pipeline.block_styles[block_id] = BlockStyle(
6666
name="",
67-
association="",
67+
attribute_location="point",
6868
points=[],
6969
minimum=0.0,
7070
maximum=1.0,
@@ -84,7 +84,7 @@ def updateBlockColors(self, pipeline: VtkPipeline, block_id: int) -> None:
8484

8585
field_data = (
8686
block.GetPointData()
87-
if style["association"] == "points"
87+
if style["attribute_location"] == "point"
8888
else block.GetCellData()
8989
)
9090
scalar_array = field_data.GetArray(style["name"])
@@ -119,7 +119,7 @@ def updateBlockColors(self, pipeline: VtkPipeline, block_id: int) -> None:
119119

120120
other_field_data = (
121121
block.GetCellData()
122-
if style["association"] == "points"
122+
if style["attribute_location"] == "point"
123123
else block.GetPointData()
124124
)
125125
other_field_data.SetActiveScalars("")
@@ -183,7 +183,7 @@ def displayAttributeOnVertices(
183183
for block_id in block_ids:
184184
style = self._get_block_style(pipeline, block_id)
185185
style["name"] = name
186-
style["association"] = "points"
186+
style["attribute_location"] = "point"
187187
self.updateBlockColors(pipeline, block_id)
188188

189189
def displayAttributeOnCells(
@@ -192,7 +192,7 @@ def displayAttributeOnCells(
192192
for block_id in block_ids:
193193
style = self._get_block_style(pipeline, block_id)
194194
style["name"] = name
195-
style["association"] = "cells"
195+
style["attribute_location"] = "cell"
196196
self.updateBlockColors(pipeline, block_id)
197197

198198
def setupColorMap(

src/opengeodeweb_viewer/vtk_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class HighlightPipeline:
5656

5757
class BlockStyle(TypedDict):
5858
name: str
59-
association: str
59+
attribute_location: Literal["point", "cell"]
6060
points: list[float]
6161
minimum: float
6262
maximum: float
440 Bytes
Loading
1.95 KB
Loading
10.9 KB
Loading
20.2 KB
Loading
6.24 KB
Loading
20.1 KB
Loading

0 commit comments

Comments
 (0)