ansys-speos-core 0.4.0__py3-none-any.whl → 0.5.0__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.
@@ -28,13 +28,14 @@ It gathers functionaties and tools of these APIs.
28
28
  try:
29
29
  import importlib.metadata as importlib_metadata
30
30
  except ModuleNotFoundError: # pragma: no cover
31
- import importlib_metadata
31
+ import importlib_metadata # type: ignore[no-redef]
32
32
 
33
33
  # Version
34
34
  __version__ = importlib_metadata.version("ansys-speos-core")
35
35
 
36
36
 
37
37
  from ansys.speos.core.body import Body
38
+ import ansys.speos.core.bsdf as bsdf
38
39
  from ansys.speos.core.face import Face
39
40
  from ansys.speos.core.geo_ref import GeoRef
40
41
  from ansys.speos.core.intensity import Intensity
ansys/speos/core/body.py CHANGED
@@ -29,6 +29,7 @@ from typing import List, Mapping, Optional, Union
29
29
 
30
30
  from ansys.speos.core import proto_message_utils
31
31
  import ansys.speos.core.face as face
32
+ from ansys.speos.core.geo_ref import GeoRef
32
33
  from ansys.speos.core.kernel.body import ProtoBody
33
34
  from ansys.speos.core.kernel.client import SpeosClient
34
35
  import ansys.speos.core.part as part
@@ -81,6 +82,14 @@ class Body:
81
82
 
82
83
  self._geom_features = []
83
84
 
85
+ @property
86
+ def geo_path(self) -> GeoRef:
87
+ """Geometry path to be used within other speos objects."""
88
+ geo_paths = [self._name]
89
+ if isinstance(self._parent_part, part.Part.SubPart):
90
+ geo_paths.insert(0, self._parent_part.geo_path.metadata["GeoPath"])
91
+ return GeoRef.from_native_link("/".join(geo_paths))
92
+
84
93
  def create_face(
85
94
  self,
86
95
  name: str,