Skip to content

Commit c5080d2

Browse files
committed
feat(ZScaling): New function ZScaling
1 parent bb26932 commit c5080d2

File tree

3 files changed

+36
-26
lines changed

3 files changed

+36
-26
lines changed

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
jsonschema
2-
wslink
2+
wslink<2
33
websocket-client

requirements.txt

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,56 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.9
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
55
# pip-compile requirements.in
66
#
7-
aiohttp==3.9.3
7+
aiohappyeyeballs==2.6.1
8+
# via aiohttp
9+
aiohttp==3.12.14
810
# via wslink
9-
aiosignal==1.3.1
11+
aiosignal==1.4.0
1012
# via aiohttp
11-
async-timeout==4.0.3
13+
async-timeout==5.0.1
1214
# via aiohttp
13-
attrs==23.2.0
15+
attrs==25.3.0
1416
# via
1517
# aiohttp
1618
# jsonschema
1719
# referencing
18-
frozenlist==1.4.1
20+
frozenlist==1.7.0
1921
# via
2022
# aiohttp
2123
# aiosignal
22-
idna==3.6
24+
idna==3.10
2325
# via yarl
24-
jsonschema==4.21.1
26+
jsonschema==4.24.0
2527
# via -r requirements.in
26-
jsonschema-specifications==2023.12.1
28+
jsonschema-specifications==2025.4.1
2729
# via jsonschema
28-
multidict==6.0.5
30+
multidict==6.6.3
2931
# via
3032
# aiohttp
3133
# yarl
32-
python-dotenv==1.0.1
33-
# via -r requirements.in
34-
referencing==0.33.0
34+
propcache==0.3.2
35+
# via
36+
# aiohttp
37+
# yarl
38+
referencing==0.36.2
3539
# via
3640
# jsonschema
3741
# jsonschema-specifications
38-
rpds-py==0.18.0
42+
rpds-py==0.26.0
3943
# via
4044
# jsonschema
4145
# referencing
42-
websocket-client==1.7.0
46+
typing-extensions==4.14.1
47+
# via
48+
# aiosignal
49+
# multidict
50+
# referencing
51+
websocket-client==1.8.0
4352
# via -r requirements.in
4453
wslink==1.12.4
4554
# via -r requirements.in
46-
yarl==1.9.4
55+
yarl==1.20.1
4756
# via aiohttp

src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,20 @@ def renderNow(self, params):
281281

282282
@exportRpc(viewer_prefix + viewer_schemas_dict["set_z_scaling"]["rpc"])
283283
def setZScaling(self, params):
284-
285284
validate_schema(
286285
params, self.viewer_schemas_dict["set_z_scaling"], self.viewer_prefix
287286
)
288287
z_scale = params["z_scale"]
289-
290288
renderWindow = self.getView("-1")
291289
renderer = renderWindow.GetRenderers().GetFirstRenderer()
292-
293-
actors = renderer.GetActors()
294-
295-
for actor in actors:
296-
transform = vtkTransform()
297-
transform.Scale(1, 1, z_scale)
298-
actor.SetUserTransform(transform)
290+
cam = renderer.GetActiveCamera()
291+
transform = vtk.vtkTransform()
292+
transform.Scale(1, 1, z_scale)
293+
cam.SetModelTransformMatrix(transform.GetMatrix())
294+
295+
if "grid_scale" in self.get_data_base():
296+
cube_axes_actor = self.get_object("grid_scale")["actor"]
297+
cube_axes_actor.SetUse2DMode(1)
298+
else:
299+
Exception("The object 'grid_scale' does not exist.")
299300
self.render()

0 commit comments

Comments
 (0)