OpenGeodeWeb-Viewer 1.14.0rc2__py3-none-any.whl → 1.15.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,7 +77,11 @@ class VtkObjectView(VtkView):
77
77
 
78
78
  def SetEdgesWidth(self, data_id: str, width: float) -> None:
79
79
  actor = self.get_object(data_id).actor
80
- actor.GetProperty().SetEdgeWidth(width)
80
+ max_dimension = self.get_object(data_id).max_dimension
81
+ if max_dimension == "edges":
82
+ actor.GetProperty().SetLineWidth(width)
83
+ else:
84
+ actor.GetProperty().SetEdgeWidth(width)
81
85
 
82
86
  def SetEdgesColor(self, data_id: str, red: int, green: int, blue: int) -> None:
83
87
  actor = self.get_object(data_id).actor
@@ -81,3 +81,13 @@ class VtkMeshEdgesView(VtkMeshView):
81
81
  )
82
82
  params = schemas.VertexColorMap.from_dict(rpc_params)
83
83
  self.setupColorMap(params.id, params.points)
84
+
85
+ @exportRpc(mesh_edges_prefix + mesh_edges_schemas_dict["edge_attribute"]["rpc"])
86
+ def setMeshEdgesEdgeAttribute(self, rpc_params: RpcParams) -> None:
87
+ validate_schema(
88
+ rpc_params,
89
+ self.mesh_edges_schemas_dict["edge_attribute"],
90
+ self.mesh_edges_prefix,
91
+ )
92
+ params = schemas.EdgeAttribute.from_dict(rpc_params)
93
+ self.displayAttributeOnCells(params.id, params.name)
@@ -3,5 +3,5 @@ from .visibility import *
3
3
  from .vertex_scalar_range import *
4
4
  from .vertex_color_map import *
5
5
  from .vertex_attribute import *
6
- from .size import *
6
+ from .edge_attribute import *
7
7
  from .color import *
@@ -1,18 +1,19 @@
1
1
  {
2
- "rpc": "size",
2
+ "rpc": "edge_attribute",
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "id": {
6
6
  "type": "string",
7
7
  "minLength": 1
8
8
  },
9
- "size": {
10
- "type": "integer"
9
+ "name": {
10
+ "type": "string",
11
+ "minLength": 1
11
12
  }
12
13
  },
13
14
  "required": [
14
15
  "id",
15
- "size"
16
+ "name"
16
17
  ],
17
18
  "additionalProperties": false
18
- }
19
+ }
@@ -3,9 +3,9 @@ from dataclasses import dataclass
3
3
 
4
4
 
5
5
  @dataclass
6
- class Size(DataClassJsonMixin):
6
+ class EdgeAttribute(DataClassJsonMixin):
7
7
  def __post_init__(self) -> None:
8
8
  print(self, flush=True)
9
9
 
10
10
  id: str
11
- size: int
11
+ name: str
@@ -1,5 +1,5 @@
1
1
  {
2
- "rpc": "size",
2
+ "rpc": "width",
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "id": {
@@ -13,6 +13,7 @@ from vtkmodules.vtkRenderingCore import (
13
13
  vtkRenderWindowInteractor,
14
14
  vtkAbstractMapper,
15
15
  vtkWorldPointPicker,
16
+ vtkPicker,
16
17
  )
17
18
  from vtkmodules.vtkInteractionStyle import vtkInteractorStyleTrackball
18
19
  from vtkmodules.vtkCommonCore import reference
@@ -224,20 +225,15 @@ class VtkViewerView(VtkView):
224
225
  params = schemas.PickedIDS.from_dict(rpc_params)
225
226
  renderWindow = self.getView("-1")
226
227
  renderer = renderWindow.GetRenderers().GetFirstRenderer()
227
- picker = vtkWorldPointPicker()
228
- picker.Pick([params.x, params.y, 0], renderer)
229
- point = picker.GetPickPosition()
230
- epsilon = self.computeEpsilon(renderer, point[2])
231
- bbox = vtkBoundingBox()
232
- bbox.AddPoint(point[0] + epsilon, point[1] + epsilon, point[2] + epsilon)
233
- bbox.AddPoint(point[0] - epsilon, point[1] - epsilon, point[2] - epsilon)
234
-
228
+ picker = vtkPicker()
229
+ picker.Pick(params.x, params.y, 0, renderer)
230
+ picked_actor = picker.GetActor()
235
231
  array_ids = []
236
- for id in params.ids:
237
- bounds = self.get_object(id).actor.GetBounds()
238
- bounds_box = vtkBoundingBox(bounds)
239
- if bbox.Intersects(bounds_box):
240
- array_ids.append(id)
232
+ if picked_actor:
233
+ for id in params.ids:
234
+ if self.get_object(id).actor == picked_actor:
235
+ array_ids.append(id)
236
+ break
241
237
 
242
238
  return {"array_ids": array_ids}
243
239
 
@@ -44,7 +44,6 @@ from .rpc.model.blocks.model_blocks_protocols import (
44
44
  from .rpc.generic.generic_protocols import VtkGenericView
45
45
  from .rpc.utils_protocols import VtkUtilsView
46
46
 
47
-
48
47
  # =============================================================================
49
48
  # Server class
50
49
  # =============================================================================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenGeodeWeb-Viewer
3
- Version: 1.14.0rc2
3
+ Version: 1.15.0rc2
4
4
  Summary: OpenGeodeWeb-Viewer is an open source framework that proposes handy python functions and wrappers for the OpenGeode ecosystem
5
5
  Author-email: Geode-solutions <team-web@geode-solutions.com>
6
6
  Project-URL: Homepage, https://github.com/Geode-solutions/OpenGeodeWeb-Viewer
@@ -24,7 +24,7 @@ Requires-Dist: kiwisolver>=1
24
24
  Requires-Dist: matplotlib>=3
25
25
  Requires-Dist: multidict>=6
26
26
  Requires-Dist: numpy>=2
27
- Requires-Dist: packaging==25.0
27
+ Requires-Dist: packaging==26.0
28
28
  Requires-Dist: pillow>=12
29
29
  Requires-Dist: propcache>=0
30
30
  Requires-Dist: pyparsing>=3
@@ -3,8 +3,8 @@ opengeodeweb_viewer/config.py,sha256=Iq04mCJWy3_1toGyLwkm2domVl3CEVPQY1kcPZM9sQA
3
3
  opengeodeweb_viewer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  opengeodeweb_viewer/utils_functions.py,sha256=Nh0tS78ctULkLjOtVtDoHaMLxKn2A70ARFGkucTe-Sk,758
5
5
  opengeodeweb_viewer/vtk_protocol.py,sha256=fbuL46xc3RfGMOyF7kawTed1OCAvijhvADhhOOwnyKE,5094
6
- opengeodeweb_viewer/vtkw_server.py,sha256=83Khwt_cLtT9ugefZZOfcY5wzQgQyOnER1ANoHTKgiE,6127
7
- opengeodeweb_viewer/object/object_methods.py,sha256=aZRfNtZDnJ-YJtuyfBBbklbEiy2sri7YUR7wtV8v3ak,5424
6
+ opengeodeweb_viewer/vtkw_server.py,sha256=10BQJCL79MVZh2zF2ZJ8X8bVH-WdSXzyj6TD7Hlk29Q,6126
7
+ opengeodeweb_viewer/object/object_methods.py,sha256=3JmCivSmCGAUgv11OvRO-xpFIP28Uqu1y1gbHx_96Jw,5594
8
8
  opengeodeweb_viewer/rpc/utils_protocols.py,sha256=18w2N9AuXpNke7wL66Jg_k86NNOhEoRy_cK1v6Z3gX8,2506
9
9
  opengeodeweb_viewer/rpc/generic/generic_protocols.py,sha256=GtBN4eopb95Ook84ioz4jelu2sE1A-ukC_nbGx343BA,2324
10
10
  opengeodeweb_viewer/rpc/generic/schemas/__init__.py,sha256=Foxm034o9OVDZ5cZkUVNlrZ6phd68HRrXBuvaLx-PD0,50
@@ -31,12 +31,12 @@ opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.json,sha256=TVZcv
31
31
  opengeodeweb_viewer/rpc/mesh/cells/schemas/vertex_scalar_range.py,sha256=5Vmf-HctIcH18C3hapDRpA6lpu0MjoomDxLDFC4gGPc,260
32
32
  opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.json,sha256=MSlbqbHsPOiUZXzSfVrZXtYIMbnBQR4PhRKtrkZHtv8,263
33
33
  opengeodeweb_viewer/rpc/mesh/cells/schemas/visibility.py,sha256=OAC2F5S08RuSte2V1elIU1UwZf-IKiA39eY8yOMqr3I,236
34
- opengeodeweb_viewer/rpc/mesh/edges/mesh_edges_protocols.py,sha256=jdxdJQS7jQ3Yxg2z4Y85xqEAMjCt1dSHkgUuTZ2UPN4,3215
35
- opengeodeweb_viewer/rpc/mesh/edges/schemas/__init__.py,sha256=MgU0fjwSPvGzThhX8WmSC-QKs-6BgwEYNWDFe57Ryuw,187
34
+ opengeodeweb_viewer/rpc/mesh/edges/mesh_edges_protocols.py,sha256=Hr4ydi1oXjDyN1uVzZEgyByGkR5v83bTMD6BtISPo2Q,3650
35
+ opengeodeweb_viewer/rpc/mesh/edges/schemas/__init__.py,sha256=L0gKtt5kkGJ4J7JP11JQWEgNdkTGOXBSdT8neL_Dijs,197
36
36
  opengeodeweb_viewer/rpc/mesh/edges/schemas/color.json,sha256=tGWsxiaaYsiDmyF7Ed1RTWxqfe63mHAWxSi2SmTUN6Y,818
37
37
  opengeodeweb_viewer/rpc/mesh/edges/schemas/color.py,sha256=RdjSQB-ZKsJHP10roQV0pVt8jvu6trJ20NuZTVrNAIM,444
38
- opengeodeweb_viewer/rpc/mesh/edges/schemas/size.json,sha256=tnHXOHMvdaymp1mfptzecSUadpI_zvvm5IZJQ6oZARQ,245
39
- opengeodeweb_viewer/rpc/mesh/edges/schemas/size.py,sha256=rMuHn079FcRIIcyp6EUMrMEzf6FFL3YgzLs4e8uxn0Q,223
38
+ opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.json,sha256=1M5h7h-GvBqbbOED9dMh8xixS7_ScoXjj8npsS-FxOs,277
39
+ opengeodeweb_viewer/rpc/mesh/edges/schemas/edge_attribute.py,sha256=8dZQhh6BnPrbBny1BmEC3EBBw3GgAfRBVJnvRajJtuA,232
40
40
  opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.json,sha256=0ep_P2-DyUs8E9pnIceArInwyLf-JujiJh1FmsBkpNA,278
41
41
  opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_attribute.py,sha256=iHcmXyaEiftkiCEMIK3KcUO-Iq3SBjpSy6PEP3Z8e2s,234
42
42
  opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_color_map.json,sha256=7Bm5rLp1sQVQhPutHQM1Ez5aa9TBLXcn9XTb5K-q7JI,459
@@ -45,7 +45,7 @@ opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.json,sha256=TVZcv
45
45
  opengeodeweb_viewer/rpc/mesh/edges/schemas/vertex_scalar_range.py,sha256=5Vmf-HctIcH18C3hapDRpA6lpu0MjoomDxLDFC4gGPc,260
46
46
  opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.json,sha256=MSlbqbHsPOiUZXzSfVrZXtYIMbnBQR4PhRKtrkZHtv8,263
47
47
  opengeodeweb_viewer/rpc/mesh/edges/schemas/visibility.py,sha256=OAC2F5S08RuSte2V1elIU1UwZf-IKiA39eY8yOMqr3I,236
48
- opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json,sha256=-TrnInMPuQFKcCBuL9ihrQQNGyGzX8JgZhT_aiQ8Q2c,246
48
+ opengeodeweb_viewer/rpc/mesh/edges/schemas/width.json,sha256=0RysliQkGh91r1OBkx3cyMQjxvqVOuoYiQeo7BmQMuY,247
49
49
  opengeodeweb_viewer/rpc/mesh/edges/schemas/width.py,sha256=ms0xK5dePaWdf4WiV1Zeqcro00-6yNmNVcP6NTjKkR4,227
50
50
  opengeodeweb_viewer/rpc/mesh/points/mesh_points_protocols.py,sha256=P15dVhAVKJUtpoTboZOoAcg1TEzO3OMAFdd2sVTCpVs,3246
51
51
  opengeodeweb_viewer/rpc/mesh/points/schemas/__init__.py,sha256=pwiz4YpRQKFz_ns39R4gULYscyBLOiC2hFtXfB9nQfw,166
@@ -159,7 +159,7 @@ opengeodeweb_viewer/rpc/schemas/import_project.json,sha256=c6v1iXiGQYfHQXA9qWEe6
159
159
  opengeodeweb_viewer/rpc/schemas/import_project.py,sha256=bjK9KdlkpC8kQFN6Ni8i9OIp9z8hE-mhPT0czTxyedo,215
160
160
  opengeodeweb_viewer/rpc/schemas/kill.json,sha256=RRvuOM7424eFBwdd_0gG51zHpUMKnMmLHzIhw6PoUcs,110
161
161
  opengeodeweb_viewer/rpc/schemas/kill.py,sha256=DbQyF57NJ4BsOo7UbKzKwm5rERkphIAh28QVt2DJcA8,206
162
- opengeodeweb_viewer/rpc/viewer/viewer_protocols.py,sha256=ry0ui0eX_sFLU-aRwyD5rnBCn96yk4X-nl9Pg6fcjok,12187
162
+ opengeodeweb_viewer/rpc/viewer/viewer_protocols.py,sha256=LooKx__gN-0C5jRNv8cKWpb2LIqgxdmVthhF6qb6NHo,11905
163
163
  opengeodeweb_viewer/rpc/viewer/schemas/__init__.py,sha256=ej0Q9XCiNjhF1segnn-YlhQV1HzWayoeBzo7OOZ2kvY,343
164
164
  opengeodeweb_viewer/rpc/viewer/schemas/axes.json,sha256=-HC7kogMCpqKr1YS53fxzhEn3CKkKFd6EsVDv4BCthw,183
165
165
  opengeodeweb_viewer/rpc/viewer/schemas/axes.py,sha256=A3UCe6nBvIox41mlXokjPgskxD2_p6AZIoVk47xUf7s,218
@@ -185,9 +185,9 @@ opengeodeweb_viewer/rpc/viewer/schemas/update_camera.json,sha256=OtovtEwLvR4L63y
185
185
  opengeodeweb_viewer/rpc/viewer/schemas/update_camera.py,sha256=noEZ3V2AysEn5NFXBFLwKE0I4sb0KB5fnP9KaJL1hms,521
186
186
  opengeodeweb_viewer/rpc/viewer/schemas/update_data.json,sha256=h1T_aNWZFaJ-LTXyqjTK4MLbFJgt9vH23CHY1Gr55f4,195
187
187
  opengeodeweb_viewer/rpc/viewer/schemas/update_data.py,sha256=E-S4ZP_6nYhlFitKp2ynvztDcmeL5zqoAZD96WyvIhw,215
188
- opengeodeweb_viewer-1.14.0rc2.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
189
- opengeodeweb_viewer-1.14.0rc2.dist-info/METADATA,sha256=ekkiOBIsSXnPatiywDAByE5QYd3PZ-fi2obKEKfwu60,1503
190
- opengeodeweb_viewer-1.14.0rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
191
- opengeodeweb_viewer-1.14.0rc2.dist-info/entry_points.txt,sha256=j4uMjTs3z5mwZYxNRBtnmuQV5mDH9XUFHfVTDMEciG0,83
192
- opengeodeweb_viewer-1.14.0rc2.dist-info/top_level.txt,sha256=wTvrUNOJeR3p9tJ68l0AzSUSWPwA2mCeCZHYBafdoP8,20
193
- opengeodeweb_viewer-1.14.0rc2.dist-info/RECORD,,
188
+ opengeodeweb_viewer-1.15.0rc2.dist-info/licenses/LICENSE,sha256=LoTB-aqQvzTGxoTRXNnhNV0LKiqdk2bQv6MB34l8zkI,1079
189
+ opengeodeweb_viewer-1.15.0rc2.dist-info/METADATA,sha256=0L2CRHyHT5XM-pnVec0NPMFiVkgCECjeo_WFahvjgSw,1503
190
+ opengeodeweb_viewer-1.15.0rc2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
191
+ opengeodeweb_viewer-1.15.0rc2.dist-info/entry_points.txt,sha256=j4uMjTs3z5mwZYxNRBtnmuQV5mDH9XUFHfVTDMEciG0,83
192
+ opengeodeweb_viewer-1.15.0rc2.dist-info/top_level.txt,sha256=wTvrUNOJeR3p9tJ68l0AzSUSWPwA2mCeCZHYBafdoP8,20
193
+ opengeodeweb_viewer-1.15.0rc2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5