ansys-fluent-visualization 0.21.dev1__tar.gz → 0.22.dev0__tar.gz

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.
Files changed (41) hide show
  1. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/PKG-INFO +19 -5
  2. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/README.rst +13 -0
  3. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/pyproject.toml +8 -5
  4. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/post_objects/meta.py +4 -30
  5. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/post_objects/post_helper.py +46 -28
  6. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/post_objects/post_object_definitions.py +101 -33
  7. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/post_objects/post_objects_container.py +2 -0
  8. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/__init__.py +3 -1
  9. ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/abstract_renderer_defn.py → ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/base/renderer.py +22 -5
  10. ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/containers.py +403 -0
  11. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/graphics/graphics_windows.py +23 -67
  12. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/graphics/graphics_windows_manager.py +312 -240
  13. ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/graphics/pyvista/graphics_defns.py → ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/graphics/pyvista/renderer.py +81 -65
  14. ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/graphics/single_qt_windows.py +70 -0
  15. ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/plotter/matplotlib/plotter_defns.py → ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/plotter/matplotlib/renderer.py +89 -62
  16. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/plotter/plotter_windows.py +11 -24
  17. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/plotter/plotter_windows_manager.py +105 -67
  18. ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/plotter/pyvista/__init__.py +21 -0
  19. ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/plotter/pyvista/plotter_defns.py → ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/plotter/pyvista/renderer.py +53 -45
  20. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/post_data_extractor.py +33 -47
  21. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/registrar.py +2 -2
  22. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/renderer.py +50 -21
  23. ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/containers.py +0 -235
  24. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/AUTHORS +0 -0
  25. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/LICENSE +0 -0
  26. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/__init__.py +0 -0
  27. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/post_objects/__init__.py +0 -0
  28. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/post_objects/check_in_notebook.py +0 -0
  29. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/interface/post_objects/singleton_meta.py +0 -0
  30. {ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/graphics/pyvista → ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/base}/__init__.py +0 -0
  31. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/config.py +0 -0
  32. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/contour.py +0 -0
  33. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/graphics/__init__.py +0 -0
  34. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/graphics/graphics_objects.py +0 -0
  35. {ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/plotter/matplotlib → ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/graphics/pyvista}/__init__.py +0 -0
  36. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/matplotlib/__init__.py +0 -0
  37. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/plotter/__init__.py +0 -0
  38. {ansys_fluent_visualization-0.21.dev1/src/ansys/fluent/visualization/plotter/pyvista → ansys_fluent_visualization-0.22.dev0/src/ansys/fluent/visualization/plotter/matplotlib}/__init__.py +0 -0
  39. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/plotter/plotter_objects.py +0 -0
  40. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/pyvista/__init__.py +0 -0
  41. {ansys_fluent_visualization-0.21.dev1 → ansys_fluent_visualization-0.22.dev0}/src/ansys/fluent/visualization/visualization_windows_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ansys-fluent-visualization
3
- Version: 0.21.dev1
3
+ Version: 0.22.dev0
4
4
  Summary: A python wrapper for ansys Fluent visualization
5
5
  License: MIT
6
6
  Author: ANSYS, Inc.
@@ -16,13 +16,14 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
- Requires-Dist: ansys-fluent-core (>=0.33.dev0)
20
- Requires-Dist: imageio (>=2.36.1)
19
+ Provides-Extra: interactive
20
+ Provides-Extra: single-window
21
+ Requires-Dist: ansys-fluent-core (>=0.35.dev0,<1.0)
21
22
  Requires-Dist: importlib-metadata (>=4.0,<5.0) ; python_version < "3.9"
22
23
  Requires-Dist: matplotlib (>=3.6.0)
23
- Requires-Dist: pyside6 (>=6.8.1,<6.9.0)
24
+ Requires-Dist: pyside6 (>=6.8.1,<6.9.0) ; extra == "single-window"
24
25
  Requires-Dist: pyvista (>=0.44.0)
25
- Requires-Dist: pyvistaqt (>=0.11.1,<0.12.0)
26
+ Requires-Dist: pyvistaqt (>=0.11.1,<0.12.0) ; extra == "interactive" or extra == "single-window"
26
27
  Project-URL: Documentation, https://visualization.fluent.docs.pyansys.com/
27
28
  Project-URL: Repository, https://github.com/ansys/pyfluent-visualization
28
29
  Project-URL: Source, https://github.com/ansys/pyfluent-visualization
@@ -95,6 +96,19 @@ Install the latest release from `PyPI
95
96
 
96
97
  pip install ansys-fluent-visualization
97
98
 
99
+ There are optional dependencies depending on the desired usage mode.
100
+ To run the plotter in interactive mode, install with:
101
+
102
+ .. code:: console
103
+
104
+ pip install ansys-fluent-visualization[interactive]
105
+
106
+ For interactive mode with graphics displayed in a single Qt window using multiple tabs, install with:
107
+
108
+ .. code:: console
109
+
110
+ pip install ansys-fluent-visualization[single-window]
111
+
98
112
  Alternatively, install the latest release from `GitHub
99
113
  <https://github.com/ansys/pyfluent-visualization>`_ with:
100
114
 
@@ -64,6 +64,19 @@ Install the latest release from `PyPI
64
64
 
65
65
  pip install ansys-fluent-visualization
66
66
 
67
+ There are optional dependencies depending on the desired usage mode.
68
+ To run the plotter in interactive mode, install with:
69
+
70
+ .. code:: console
71
+
72
+ pip install ansys-fluent-visualization[interactive]
73
+
74
+ For interactive mode with graphics displayed in a single Qt window using multiple tabs, install with:
75
+
76
+ .. code:: console
77
+
78
+ pip install ansys-fluent-visualization[single-window]
79
+
67
80
  Alternatively, install the latest release from `GitHub
68
81
  <https://github.com/ansys/pyfluent-visualization>`_ with:
69
82
 
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
  [tool.poetry]
6
6
  # Check https://python-poetry.org/docs/pyproject/ for all available sections
7
7
  name = "ansys-fluent-visualization"
8
- version = "0.21.dev1"
8
+ version = "0.22.dev0"
9
9
  description = "A python wrapper for ansys Fluent visualization"
10
10
  license = "MIT"
11
11
  authors = ["ANSYS, Inc. <ansys.support@ansys.com>"]
@@ -25,12 +25,15 @@ packages = [
25
25
  [tool.poetry.dependencies]
26
26
  python = ">=3.10,<4.0"
27
27
  importlib-metadata = {version = "^4.0", python = "<3.9"}
28
- ansys-fluent-core = ">=0.33.dev0"
28
+ ansys-fluent-core = "~=0.35.dev0"
29
29
  pyvista = ">=0.44.0"
30
30
  matplotlib = ">=3.6.0"
31
- pyvistaqt = "~=0.11.1"
32
- pyside6 = "~=6.8.1"
33
- imageio= ">=2.36.1"
31
+ pyvistaqt = { version = "~=0.11.1", optional = true }
32
+ pyside6 = { version = "~=6.8.1", optional = true }
33
+
34
+ [tool.poetry.extras]
35
+ interactive = ["pyvistaqt"]
36
+ single-window = ["pyvistaqt", "pyside6"]
34
37
 
35
38
  [tool.poetry.urls]
36
39
  "Documentation" = "https://visualization.fluent.docs.pyansys.com/"
@@ -254,6 +254,8 @@ class PyLocalBaseMeta(type):
254
254
  attrs["root"] = property(lambda self: self.get_root())
255
255
  attrs["path"] = property(lambda self: self.get_path())
256
256
  attrs["session"] = property(lambda self: self.get_session())
257
+ attrs["field_data"] = property(lambda self: self.get_session().field_data)
258
+ attrs["monitors"] = property(lambda self: self.get_session().monitors)
257
259
  attrs["session_handle"] = property(lambda self: self.get_session_handle())
258
260
  return super(PyLocalBaseMeta, cls).__new__(cls, name, bases, attrs)
259
261
 
@@ -261,33 +263,6 @@ class PyLocalBaseMeta(type):
261
263
  class PyLocalPropertyMeta(PyLocalBaseMeta):
262
264
  """Metaclass for local property classes."""
263
265
 
264
- @classmethod
265
- def __create_validate(cls):
266
- def wrapper(self, value):
267
- attrs = getattr(self, "attributes", None)
268
- if attrs:
269
- for attr in attrs:
270
- if attr == "range":
271
- if self.range and (
272
- value < self.range[0] or value > self.range[1]
273
- ):
274
- raise DisallowedValuesError("value", value, self.range)
275
- elif attr == "allowed_values":
276
- if isinstance(value, list):
277
- if not all(
278
- v is None or v in self.allowed_values for v in value
279
- ):
280
- raise DisallowedValuesError(
281
- "value", value, self.allowed_values
282
- )
283
- elif value is not None and value not in self.allowed_values:
284
- raise DisallowedValuesError(
285
- "value", value, self.allowed_values
286
- )
287
- return value
288
-
289
- return wrapper
290
-
291
266
  @classmethod
292
267
  def __create_init(cls):
293
268
  def wrapper(self, parent, api_helper, name=""):
@@ -342,8 +317,8 @@ class PyLocalPropertyMeta(PyLocalBaseMeta):
342
317
 
343
318
  @classmethod
344
319
  def __create_set_state(cls):
345
- def wrapper(self, value, validate=True):
346
- self.value = self._validate(value) if validate else value
320
+ def wrapper(self, value):
321
+ self.value = value
347
322
  for on_change_cb in self._on_change_cbs:
348
323
  on_change_cb()
349
324
 
@@ -359,7 +334,6 @@ class PyLocalPropertyMeta(PyLocalBaseMeta):
359
334
  def __new__(cls, name, bases, attrs):
360
335
  attrs["__init__"] = cls.__create_init()
361
336
  attrs["__call__"] = cls.__create_get_state()
362
- attrs["_validate"] = cls.__create_validate()
363
337
  attrs["_register_on_change_cb"] = cls.__create_register_on_change()
364
338
  attrs["set_state"] = cls.__create_set_state()
365
339
  return super(PyLocalPropertyMeta, cls).__new__(cls, name, bases, attrs)
@@ -57,14 +57,14 @@ class PostAPIHelper:
57
57
  @staticmethod
58
58
  def surface_name_on_server(local_surface_name):
59
59
  """Return the surface name on server."""
60
- return "_dummy_surface_for_pyfluent:" + local_surface_name.lower()
60
+ return local_surface_name.lower()
61
61
 
62
62
  def _get_api_handle(self):
63
63
  return self.obj.get_root().session.results.surfaces
64
64
 
65
65
  def _delete_if_exists_on_server(self):
66
- field_info = self.obj._api_helper.field_info()
67
- surfaces_list = list(field_info.get_surfaces_info().keys())
66
+ field_data = self.obj._api_helper.field_data()
67
+ surfaces_list = list(field_data.surfaces())
68
68
  if self._surface_name_on_server in surfaces_list:
69
69
  self.delete_surface_on_server()
70
70
 
@@ -91,28 +91,47 @@ class PostAPIHelper:
91
91
  }
92
92
  elif self.obj.definition.type() == "plane-surface":
93
93
  plane_surface = self.obj.definition.plane_surface
94
- xy_plane = plane_surface.xy_plane
95
- yz_plane = plane_surface.yz_plane
96
- zx_plane = plane_surface.zx_plane
97
- self._delete_if_exists_on_server()
98
- if xy_plane():
99
- method = "xy-plane"
100
- position = "z"
101
- value = xy_plane.z()
102
- elif yz_plane():
103
- method = "yz-plane"
104
- position = "x"
105
- value = yz_plane.x()
94
+ if plane_surface.creation_method() == "point-and-normal":
95
+ self._get_api_handle().plane_surface[
96
+ self._surface_name_on_server
97
+ ] = {
98
+ "method": "point-and-normal",
99
+ "normal": [
100
+ plane_surface.normal.x(),
101
+ plane_surface.normal.y(),
102
+ plane_surface.normal.z(),
103
+ ],
104
+ "point": [
105
+ plane_surface.point.x(),
106
+ plane_surface.point.y(),
107
+ plane_surface.point.z(),
108
+ ],
109
+ }
106
110
  else:
107
- method = "zx-plane"
108
- position = "y"
109
- value = zx_plane.y()
110
- self._get_api_handle().plane_surface[self._surface_name_on_server] = {
111
- "method": method,
112
- position: value,
113
- }
114
- field_info = self.obj._api_helper.field_info()
115
- surfaces_list = list(field_info.get_surfaces_info().keys())
111
+ xy_plane = plane_surface.xy_plane
112
+ yz_plane = plane_surface.yz_plane
113
+ zx_plane = plane_surface.zx_plane
114
+ self._delete_if_exists_on_server()
115
+ if xy_plane():
116
+ method = "xy-plane"
117
+ position = "z"
118
+ value = xy_plane.z()
119
+ elif yz_plane():
120
+ method = "yz-plane"
121
+ position = "x"
122
+ value = yz_plane.x()
123
+ else:
124
+ method = "zx-plane"
125
+ position = "y"
126
+ value = zx_plane.y()
127
+ self._get_api_handle().plane_surface[
128
+ self._surface_name_on_server
129
+ ] = {
130
+ "method": method,
131
+ position: value,
132
+ }
133
+ field_data = self.obj._api_helper.field_data()
134
+ surfaces_list = list(field_data.surfaces())
116
135
  if self._surface_name_on_server not in surfaces_list:
117
136
  raise SurfaceCreationError()
118
137
 
@@ -126,7 +145,6 @@ class PostAPIHelper:
126
145
  def __init__(self, obj):
127
146
  """__init__ method of PostAPIHelper class."""
128
147
  self.obj = obj
129
- self.field_info = lambda: obj.get_root().session.fields.field_info
130
148
  self.field_data = lambda: obj.get_root().session.fields.field_data
131
149
  if obj.__class__.__name__ == "Surface":
132
150
  self.surface_api = PostAPIHelper._SurfaceAPI(obj)
@@ -144,14 +162,14 @@ class PostAPIHelper:
144
162
  def get_field_unit(self, field):
145
163
  """Return the unit of the field."""
146
164
  session = self.obj.get_root().session
147
- if FluentVersion(session.scheme_eval.version) < FluentVersion.v252:
165
+ if FluentVersion(session.scheme.version) < FluentVersion.v252:
148
166
  quantity = self._field_unit_quantity(field)
149
167
  if quantity == "*null*":
150
168
  return ""
151
169
  scheme_eval_str = f"(units/get-pretty-wb-units-from-dimension (units/inquire-dimension '{quantity}))" # noqa: E501
152
170
  return " ".join(self._scheme_str_to_py_list(scheme_eval_str))
153
171
  else:
154
- fields_info = self.field_info().get_scalar_fields_info()
172
+ fields_info = self.field_data().scalar_fields()
155
173
  return get_si_unit_for_fluent_quantity(fields_info[field]["quantity_name"])
156
174
 
157
175
  def _field_unit_quantity(self, field):
@@ -161,7 +179,7 @@ class PostAPIHelper:
161
179
  def _scheme_str_to_py_list(self, scheme_eval_str):
162
180
  session = self.obj.get_root().session
163
181
  if hasattr(session, "scheme_eval"):
164
- str_val = session.scheme_eval.string_eval(scheme_eval_str)
182
+ str_val = session.scheme.string_eval(scheme_eval_str)
165
183
  return list(filter(None, re.split(r'[\s()"\']', str_val)))
166
184
  else:
167
185
  return ["*null*"]
@@ -107,7 +107,7 @@ class MonitorDefn(PlotDefn):
107
107
  @Attribute
108
108
  def allowed_values(self):
109
109
  """Monitor set allowed values."""
110
- return self.session.monitors.get_monitor_set_names()
110
+ return self.monitors.get_monitor_set_names()
111
111
 
112
112
 
113
113
  class XYPlotDefn(PlotDefn):
@@ -138,7 +138,7 @@ class XYPlotDefn(PlotDefn):
138
138
  @Attribute
139
139
  def allowed_values(self):
140
140
  """Y axis function allowed values."""
141
- return list(self.session.field_info.get_scalar_fields_info())
141
+ return list(self.field_data.scalar_fields())
142
142
 
143
143
  class x_axis_function(metaclass=PyLocalPropertyMeta):
144
144
  """X Axis Function."""
@@ -158,7 +158,7 @@ class XYPlotDefn(PlotDefn):
158
158
  @Attribute
159
159
  def allowed_values(self):
160
160
  """Surface list allowed values."""
161
- return list(self.session.field_info.get_surfaces_info()) + list(
161
+ return list(self.field_data.surfaces()) + list(
162
162
  self.get_root()._local_surfaces_provider()
163
163
  )
164
164
 
@@ -176,7 +176,7 @@ class MeshDefn(GraphicsDefn):
176
176
  @Attribute
177
177
  def allowed_values(self):
178
178
  """Surface list allowed values."""
179
- return list(self.session.field_info.get_surfaces_info()) + list(
179
+ return list(self.field_data.surfaces()) + list(
180
180
  self.get_root()._local_surfaces_provider()
181
181
  )
182
182
 
@@ -209,7 +209,7 @@ class PathlinesDefn(GraphicsDefn):
209
209
  @Attribute
210
210
  def allowed_values(self):
211
211
  """Field allowed values."""
212
- return list(self.session.field_info.get_scalar_fields_info())
212
+ return list(self.field_data.scalar_fields())
213
213
 
214
214
  class surfaces(metaclass=PyLocalPropertyMeta):
215
215
  """List of surfaces for pathlines."""
@@ -219,7 +219,7 @@ class PathlinesDefn(GraphicsDefn):
219
219
  @Attribute
220
220
  def allowed_values(self):
221
221
  """Surface list allowed values."""
222
- return list(self.session.field_info.get_surfaces_info()) + list(
222
+ return list(self.field_data.surfaces()) + list(
223
223
  self.get_root()._local_surfaces_provider()
224
224
  )
225
225
 
@@ -268,7 +268,83 @@ class SurfaceDefn(GraphicsDefn):
268
268
  @Attribute
269
269
  def allowed_values(self):
270
270
  """Surface type allowed values."""
271
- return ["xy-plane", "yz-plane", "zx-plane"]
271
+ return ["xy-plane", "yz-plane", "zx-plane", "point-and-normal"]
272
+
273
+ class point(metaclass=PyLocalObjectMeta):
274
+ """Point entry for point-and-normal surface."""
275
+
276
+ @Attribute
277
+ def is_active(self):
278
+ """Check whether current object is active or not."""
279
+ return self._parent.creation_method() == "point-and-normal"
280
+
281
+ class x(metaclass=PyLocalPropertyMeta):
282
+ """X value."""
283
+
284
+ value: float = 0
285
+
286
+ @Attribute
287
+ def range(self):
288
+ """X value range."""
289
+ return self.field_data.scalar_fields.range("x-coordinate", True)
290
+
291
+ class y(metaclass=PyLocalPropertyMeta):
292
+ """Y value."""
293
+
294
+ value: float = 0
295
+
296
+ @Attribute
297
+ def range(self):
298
+ """Y value range."""
299
+ return self.field_data.scalar_fields.range("y-coordinate", True)
300
+
301
+ class z(metaclass=PyLocalPropertyMeta):
302
+ """Z value."""
303
+
304
+ value: float = 0
305
+
306
+ @Attribute
307
+ def range(self):
308
+ """Z value range."""
309
+ return self.field_data.scalar_fields.range("z-coordinate", True)
310
+
311
+ class normal(metaclass=PyLocalObjectMeta):
312
+ """Normal entry for point-and-normal surface."""
313
+
314
+ @Attribute
315
+ def is_active(self):
316
+ """Check whether current object is active or not."""
317
+ return self._parent.creation_method() == "point-and-normal"
318
+
319
+ class x(metaclass=PyLocalPropertyMeta):
320
+ """X value."""
321
+
322
+ value: float = 0
323
+
324
+ @Attribute
325
+ def range(self):
326
+ """X value range."""
327
+ return [-1, 1]
328
+
329
+ class y(metaclass=PyLocalPropertyMeta):
330
+ """Y value."""
331
+
332
+ value: float = 0
333
+
334
+ @Attribute
335
+ def range(self):
336
+ """Y value range."""
337
+ return [-1, 1]
338
+
339
+ class z(metaclass=PyLocalPropertyMeta):
340
+ """Z value."""
341
+
342
+ value: float = 0
343
+
344
+ @Attribute
345
+ def range(self):
346
+ """Z value range."""
347
+ return [-1, 1]
272
348
 
273
349
  class xy_plane(metaclass=PyLocalObjectMeta):
274
350
  """XY Plane definition."""
@@ -286,9 +362,7 @@ class SurfaceDefn(GraphicsDefn):
286
362
  @Attribute
287
363
  def range(self):
288
364
  """Z value range."""
289
- return self.session.field_info.get_scalar_field_range(
290
- "z-coordinate", True
291
- )
365
+ return self.field_data.scalar_fields.range("z-coordinate", True)
292
366
 
293
367
  class yz_plane(metaclass=PyLocalObjectMeta):
294
368
  """YZ Plane definition."""
@@ -306,9 +380,7 @@ class SurfaceDefn(GraphicsDefn):
306
380
  @Attribute
307
381
  def range(self):
308
382
  """X value range."""
309
- return self.session.field_info.get_scalar_field_range(
310
- "x-coordinate", True
311
- )
383
+ return self.field_data.scalar_fields.range("x-coordinate", True)
312
384
 
313
385
  class zx_plane(metaclass=PyLocalObjectMeta):
314
386
  """ZX Plane definition."""
@@ -326,9 +398,7 @@ class SurfaceDefn(GraphicsDefn):
326
398
  @Attribute
327
399
  def range(self):
328
400
  """Y value range."""
329
- return self.session.field_info.get_scalar_field_range(
330
- "y-coordinate", True
331
- )
401
+ return self.field_data.scalar_fields.range("y-coordinate", True)
332
402
 
333
403
  class iso_surface(metaclass=PyLocalObjectMeta):
334
404
  """Iso surface definition."""
@@ -346,7 +416,7 @@ class SurfaceDefn(GraphicsDefn):
346
416
  @Attribute
347
417
  def allowed_values(self):
348
418
  """Field allowed values."""
349
- return list(self.session.field_info.get_scalar_fields_info())
419
+ return list(self.field_data.scalar_fields())
350
420
 
351
421
  class rendering(metaclass=PyLocalPropertyMeta):
352
422
  """Iso surface rendering."""
@@ -383,9 +453,7 @@ class SurfaceDefn(GraphicsDefn):
383
453
  """Iso value range."""
384
454
  field = self._parent.field()
385
455
  if field:
386
- return self.session.field_info.get_scalar_field_range(
387
- field, True
388
- )
456
+ return self.field_data.scalar_fields.range(field, True)
389
457
 
390
458
 
391
459
  class ContourDefn(GraphicsDefn):
@@ -401,7 +469,7 @@ class ContourDefn(GraphicsDefn):
401
469
  @Attribute
402
470
  def allowed_values(self):
403
471
  """Field allowed values."""
404
- return list(self.session.field_info.get_scalar_fields_info())
472
+ return list(self.field_data.scalar_fields())
405
473
 
406
474
  class surfaces(metaclass=PyLocalPropertyMeta):
407
475
  """Contour surfaces."""
@@ -411,7 +479,7 @@ class ContourDefn(GraphicsDefn):
411
479
  @Attribute
412
480
  def allowed_values(self):
413
481
  """Surfaces list allowed values."""
414
- return list(self.session.field_info.get_surfaces_info()) + list(
482
+ return list(self.field_data.surfaces()) + list(
415
483
  self.get_root()._local_surfaces_provider()
416
484
  )
417
485
 
@@ -525,8 +593,8 @@ class ContourDefn(GraphicsDefn):
525
593
  if getattr(self, "_value", None) is None:
526
594
  field = self.get_ancestors_by_type(ContourDefn).field()
527
595
  if field:
528
- field_info = self.session.field_info
529
- field_range = field_info.get_scalar_field_range(
596
+ field_data = self.field_data
597
+ field_range = field_data.scalar_fields.range(
530
598
  field,
531
599
  self.get_ancestors_by_type(ContourDefn).node_values(),
532
600
  )
@@ -554,8 +622,8 @@ class ContourDefn(GraphicsDefn):
554
622
  if getattr(self, "_value", None) is None:
555
623
  field = self.get_ancestors_by_type(ContourDefn).field()
556
624
  if field:
557
- field_info = self.session.field_info
558
- field_range = field_info.get_scalar_field_range(
625
+ field_data = self.field_data
626
+ field_range = field_data.scalar_fields.range(
559
627
  field,
560
628
  self.get_ancestors_by_type(ContourDefn).node_values(),
561
629
  )
@@ -581,7 +649,7 @@ class VectorDefn(GraphicsDefn):
581
649
  @Attribute
582
650
  def allowed_values(self):
583
651
  """Vectors of allowed values."""
584
- return list(self.session.field_info.get_vector_fields_info())
652
+ return list(self.field_data.vectors())
585
653
 
586
654
  class field(metaclass=PyLocalPropertyMeta):
587
655
  """Vector color field."""
@@ -591,7 +659,7 @@ class VectorDefn(GraphicsDefn):
591
659
  @Attribute
592
660
  def allowed_values(self):
593
661
  """Field allowed values."""
594
- return list(self.session.field_info.get_scalar_fields_info())
662
+ return list(self.field_data.scalar_fields())
595
663
 
596
664
  class surfaces(metaclass=PyLocalPropertyMeta):
597
665
  """List of surfaces for vector graphics."""
@@ -601,7 +669,7 @@ class VectorDefn(GraphicsDefn):
601
669
  @Attribute
602
670
  def allowed_values(self):
603
671
  """Surface list allowed values."""
604
- return list(self.session.field_info.get_surfaces_info()) + list(
672
+ return list(self.field_data.surfaces()) + list(
605
673
  self.get_root()._local_surfaces_provider()
606
674
  )
607
675
 
@@ -668,8 +736,8 @@ class VectorDefn(GraphicsDefn):
668
736
  def value(self):
669
737
  """Range minimum property setter."""
670
738
  if getattr(self, "_value", None) is None:
671
- field_info = self.session.field_info
672
- field_range = field_info.get_scalar_field_range(
739
+ field_data = self.field_data
740
+ field_range = field_data.scalar_fields.range(
673
741
  "velocity-magnitude",
674
742
  False,
675
743
  )
@@ -689,8 +757,8 @@ class VectorDefn(GraphicsDefn):
689
757
  def value(self):
690
758
  """Range maximum property setter."""
691
759
  if getattr(self, "_value", None) is None:
692
- field_info = self.session.field_info
693
- field_range = field_info.get_scalar_field_range(
760
+ field_data = self.field_data
761
+ field_range = field_data.scalar_fields.range(
694
762
  "velocity-magnitude",
695
763
  False,
696
764
  )
@@ -135,6 +135,8 @@ class Container:
135
135
  f"create() got an unexpected keyword argument '{next(iter(unexpected_args))}'." # noqa: E501
136
136
  )
137
137
  for key, value in kwargs.items():
138
+ if key == "surfaces":
139
+ value = list(value)
138
140
  setattr(new_object, key, value)
139
141
  return new_object
140
142
 
@@ -27,7 +27,7 @@ try:
27
27
  except ModuleNotFoundError:
28
28
  import importlib_metadata
29
29
 
30
- _VERSION_INFO = "Build date: June 13, 2025 08:20 UTC ShaID: d5c70c4"
30
+ _VERSION_INFO = "Build date: August 12, 2025 07:23 UTC ShaID: 897e757"
31
31
  __version__ = importlib_metadata.version(__name__.replace(".", "-"))
32
32
 
33
33
 
@@ -49,9 +49,11 @@ def version_info() -> str:
49
49
  from ansys.fluent.visualization.config import config, get_config, set_config
50
50
  from ansys.fluent.visualization.containers import ( # noqa: F401
51
51
  Contour,
52
+ IsoSurface,
52
53
  Mesh,
53
54
  Monitor,
54
55
  Pathline,
56
+ PlaneSurface,
55
57
  Surface,
56
58
  Vector,
57
59
  XYPlot,
@@ -29,14 +29,31 @@ class AbstractRenderer(ABC):
29
29
  """Abstract class for rendering graphics and plots."""
30
30
 
31
31
  @abstractmethod
32
- def render(self, data, grid, position, subplot_title, **kwargs) -> None:
33
- """Render graphics and plots in window.
32
+ def render(self, meshes: list[list[dict]]) -> None:
33
+ """Render graphics and plots in a window.
34
34
 
35
35
  Parameters
36
36
  ----------
37
- data : dict
38
- Data to plot. Data consists the list of x and y
39
- values for each curve.
37
+ meshes : list[list[dict]]
38
+ A nested list structure defining the layout and content of the graphics
39
+ to be rendered.
40
+
41
+ - The outer list represents the number of subplots to be plotted
42
+ into a single plotter window.
43
+
44
+ - Each inner list corresponds to a single sub-plot and
45
+ contains multiple surface definitions.
46
+
47
+ - Each dictionary in the inner list defines a surface to be plotted,
48
+ with the following keys:
49
+
50
+ - 'data': The mesh or 2d plot object to be plotted.
51
+ - 'position': tuple(int, int), Location of subplot. Defaults to (0, 0).
52
+ - 'opacity': int, Sets the transparency of the subplot. Defaults to 1,
53
+ meaning fully opaque.
54
+ - 'title': str, Title of the subplot.
55
+ - 'kwargs': A dictionary of additional keyword arguments passed
56
+ directly to the plotter.
40
57
  """
41
58
  pass
42
59