Skip to content

Commit e996fb6

Browse files
committed
Merge branch 'main' into release/0.7
2 parents 1a4e4d9 + 177df67 commit e996fb6

File tree

11 files changed

+42
-20
lines changed

11 files changed

+42
-20
lines changed

doc/changelog.d/1466.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
update CHANGELOG for v0.7.3

doc/changelog.d/1469.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
solving intersphinx warnings on paths

doc/changelog.d/1470.dependencies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bump sphinx from 8.0.2 to 8.1.0 in the docs-deps group

doc/changelog.d/1471.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``check_input_types`` not working with forward refs

doc/changelog.d/1472.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``share_topology`` is available on 24R2

doc/changelog.d/1473.dependencies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bump ansys-api-geometry from 0.4.10 to 0.4.11

doc/changelog.d/1475.dependencies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bump ansys-sphinx-theme to v1.1.3

doc/source/conf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ def intersphinx_pyansys_geometry(switcher_version: str):
192192
intersphinx_mapping = {
193193
"python": ("https://docs.python.org/3.11", None),
194194
"numpy": ("https://numpy.org/doc/stable", None),
195-
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
196-
"pyvista": ("https://docs.pyvista.org/version/stable", None),
197-
"grpc": ("https://grpc.github.io/grpc/python/", None),
195+
"scipy": ("https://docs.scipy.org/doc/scipy", None),
196+
"pyvista": ("https://docs.pyvista.org", None),
197+
"grpc": ("https://grpc.github.io/grpc/python", None),
198198
"pint": ("https://pint.readthedocs.io/en/stable", None),
199-
"beartype": ("https://beartype.readthedocs.io/en/stable/", None),
200-
"docker": ("https://docker-py.readthedocs.io/en/stable/", None),
199+
"beartype": ("https://beartype.readthedocs.io/en/stable", None),
200+
"docker": ("https://docker-py.readthedocs.io/en/stable", None),
201201
"pypim": ("https://pypim.docs.pyansys.com/version/stable", None),
202-
"semver": ("https://python-semver.readthedocs.io/en/latest/", None),
202+
"semver": ("https://python-semver.readthedocs.io/en/latest", None),
203203
}
204204

205205
# Conditional intersphinx mapping

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
]
2424

2525
dependencies = [
26-
"ansys-api-geometry==0.4.10",
26+
"ansys-api-geometry==0.4.11",
2727
"ansys-tools-path>=0.3,<1",
2828
"ansys-tools-visualization-interface>=0.2.6,<1",
2929
"beartype>=0.11.0,<0.20",
@@ -75,7 +75,7 @@ tests-minimal = [
7575
"pytest-xvfb==3.0.0",
7676
]
7777
doc = [
78-
"ansys-sphinx-theme[autoapi]==1.1.2",
78+
"ansys-sphinx-theme[autoapi]==1.1.3",
7979
"ansys-tools-path==0.6.0",
8080
"ansys-tools-visualization-interface==0.4.5",
8181
"beartype==0.19.0",
@@ -99,7 +99,7 @@ doc = [
9999
"scipy==1.14.1",
100100
"semver==3.0.2",
101101
"six==1.16.0",
102-
"sphinx==8.0.2",
102+
"sphinx==8.1.0",
103103
"sphinx-autodoc-typehints==2.5.0",
104104
"sphinx-copybutton==0.5.2",
105105
"sphinx-jinja==2.0.2",

src/ansys/geometry/core/tools/prepare_tools.py

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
from typing import TYPE_CHECKING
2525

26-
from beartype import beartype as check_input_types
2726
from google.protobuf.wrappers_pb2 import BoolValue, DoubleValue
2827

2928
from ansys.api.dbu.v0.dbumodels_pb2 import EntityIdentifier
@@ -41,7 +40,7 @@
4140
get_design_from_edge,
4241
get_design_from_face,
4342
)
44-
from ansys.geometry.core.misc.checks import min_backend_version
43+
from ansys.geometry.core.misc.checks import check_type_all_elements_in_iterable, min_backend_version
4544
from ansys.geometry.core.typing import Real
4645

4746
if TYPE_CHECKING: # pragma: no cover
@@ -65,7 +64,6 @@ def __init__(self, grpc_client: GrpcClient):
6564
self._prepare_stub = PrepareToolsStub(self._grpc_client.channel)
6665

6766
@protect_grpc
68-
@check_input_types
6967
@min_backend_version(25, 1, 0)
7068
def extract_volume_from_faces(
7169
self, sealing_faces: list["Face"], inside_faces: list["Face"]
@@ -87,10 +85,16 @@ def extract_volume_from_faces(
8785
list[Body]
8886
List of created bodies.
8987
"""
88+
from ansys.geometry.core.designer.face import Face
89+
9090
if not sealing_faces or not inside_faces:
9191
self._grpc_client.log.info("No sealing faces or inside faces provided...")
9292
return []
9393

94+
# Verify inputs
95+
check_type_all_elements_in_iterable(sealing_faces, Face)
96+
check_type_all_elements_in_iterable(inside_faces, Face)
97+
9498
parent_design = get_design_from_face(sealing_faces[0])
9599

96100
response = self._prepare_stub.ExtractVolumeFromFaces(
@@ -110,10 +114,9 @@ def extract_volume_from_faces(
110114
return []
111115

112116
@protect_grpc
113-
@check_input_types
114117
@min_backend_version(25, 1, 0)
115118
def extract_volume_from_edge_loops(
116-
self, sealing_edges: list["Edge"], inside_faces: list["Face"]
119+
self, sealing_edges: list["Edge"], inside_faces: list["Face"] = None
117120
) -> list["Body"]:
118121
"""Extract a volume from input edge loops.
119122
@@ -124,18 +127,28 @@ def extract_volume_from_edge_loops(
124127
----------
125128
sealing_edges : list[Edge]
126129
List of faces that seal the volume.
127-
inside_faces : list[Face]
128-
List of faces that define the interior of the solid (Not always necessary).
130+
inside_faces : list[Face], optional
131+
List of faces that define the interior of the solid (not always necessary).
129132
130133
Returns
131134
-------
132135
list[Body]
133136
List of created bodies.
134137
"""
138+
from ansys.geometry.core.designer.edge import Edge
139+
from ansys.geometry.core.designer.face import Face
140+
135141
if not sealing_edges:
136142
self._grpc_client.log.info("No sealing edges provided...")
137143
return []
138144

145+
# Assign default values to inside_faces
146+
inside_faces = [] if inside_faces is None else inside_faces
147+
148+
# Verify inputs
149+
check_type_all_elements_in_iterable(sealing_edges, Edge)
150+
check_type_all_elements_in_iterable(inside_faces, Face)
151+
139152
parent_design = get_design_from_edge(sealing_edges[0])
140153

141154
response = self._prepare_stub.ExtractVolumeFromEdgeLoops(
@@ -155,8 +168,7 @@ def extract_volume_from_edge_loops(
155168
return []
156169

157170
@protect_grpc
158-
@check_input_types
159-
@min_backend_version(25, 1, 0)
171+
@min_backend_version(24, 2, 0)
160172
def share_topology(
161173
self, bodies: list["Body"], tol: Real = 0.0, preserve_instances: bool = False
162174
) -> bool:
@@ -176,9 +188,14 @@ def share_topology(
176188
bool
177189
``True`` if successful, ``False`` if failed.
178190
"""
191+
from ansys.geometry.core.designer.body import Body
192+
179193
if not bodies:
180194
return False
181195

196+
# Verify inputs
197+
check_type_all_elements_in_iterable(bodies, Body)
198+
182199
share_topo_response = self._prepare_stub.ShareTopology(
183200
ShareTopologyRequest(
184201
selection=[GRPCBody(id=body.id) for body in bodies],

0 commit comments

Comments
 (0)