From 32f7a8bb538fc452a8cbd81eae3d197d72d1ce2d Mon Sep 17 00:00:00 2001 From: Jacob Kerstetter Date: Thu, 23 Oct 2025 10:54:01 -0400 Subject: [PATCH 1/4] update tests to match new nuget package --- tests/integration/test_tessellation.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/integration/test_tessellation.py b/tests/integration/test_tessellation.py index 3237f08ed0..45e49b8c45 100644 --- a/tests/integration/test_tessellation.py +++ b/tests/integration/test_tessellation.py @@ -76,13 +76,13 @@ def test_body_tessellate(modeler: Modeler): assert blocks_2.n_blocks == 3 if not BackendType.is_core_service(modeler.client.backend_type): assert blocks_2.bounds == pytest.approx( - [0.019999999999999997, 0.04, 0.020151922469877917, 0.03984807753012208, 0.0, 0.03], + [0.019999999999999997, 0.04, 0.02000513783799312, 0.03999486216200688, 0.0, 0.03], rel=1e-6, abs=1e-8, ) else: assert blocks_2.bounds == pytest.approx( - [0.019999999999999997, 0.04, 0.020151922469877917, 0.03984807753012208, 0.0, 0.03], + [0.019999999999999997, 0.04, 0.02000513783799312, 0.03999486216200688, 0.0, 0.03], rel=1e-6, abs=1e-8, ) @@ -93,13 +93,13 @@ def test_body_tessellate(modeler: Modeler): mesh_2 = body_2.tessellate(merge=True) if not BackendType.is_core_service(modeler.client.backend_type): assert "PolyData" in str(mesh_2) - assert mesh_2.n_cells == 72 - assert mesh_2.n_points == 76 + assert mesh_2.n_cells == 392 + assert mesh_2.n_points == 396 assert mesh_2.n_arrays == 0 else: assert "PolyData" in str(mesh_2) - assert mesh_2.n_cells == 72 - assert mesh_2.n_points == 76 + assert mesh_2.n_cells == 392 + assert mesh_2.n_points == 396 assert mesh_2.n_arrays == 0 # Make sure instance body tessellation is the same as original @@ -199,20 +199,20 @@ def test_component_tessellate(modeler: Modeler): comp.plot() assert "PolyData" in str(mesh) if not BackendType.is_core_service(modeler.client.backend_type): - assert mesh.n_cells == 3280 + assert mesh.n_cells == 976 assert mesh.n_arrays == 0 - assert mesh.n_points == 3300 + assert mesh.n_points == 996 assert mesh.bounds == pytest.approx( - [-25.0, 25.0, -24.999251562526105, 24.999251562526105, 0.0, 20.0], + [-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0], rel=1e-6, abs=1e-8, ) else: - assert mesh.n_cells == 3280 + assert mesh.n_cells == 976 assert mesh.n_arrays == 0 - assert mesh.n_points == 3300 + assert mesh.n_points == 996 assert mesh.bounds == pytest.approx( - [-25.0, 25.0, -24.999251562526105, 24.999251562526105, 0.0, 20.0], + [-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0], rel=1e-6, abs=1e-8, ) From b918a727b8e54580b60a1868cea9487610ca6a60 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Thu, 23 Oct 2025 14:57:04 +0000 Subject: [PATCH 2/4] chore: adding changelog file 2341.test.md [dependabot-skip] --- doc/changelog.d/2341.test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/2341.test.md diff --git a/doc/changelog.d/2341.test.md b/doc/changelog.d/2341.test.md new file mode 100644 index 0000000000..07965a49e3 --- /dev/null +++ b/doc/changelog.d/2341.test.md @@ -0,0 +1 @@ +Fix tessellation tests From 2f75b20ec3ab5a0b78e4effef3ac24ce1dc898a6 Mon Sep 17 00:00:00 2001 From: Jacob Kerstetter Date: Wed, 29 Oct 2025 07:43:17 -0400 Subject: [PATCH 3/4] fixing find logos --- src/ansys/geometry/core/tools/prepare_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ansys/geometry/core/tools/prepare_tools.py b/src/ansys/geometry/core/tools/prepare_tools.py index 30c4d66046..0abb5a6f0d 100644 --- a/src/ansys/geometry/core/tools/prepare_tools.py +++ b/src/ansys/geometry/core/tools/prepare_tools.py @@ -370,9 +370,9 @@ def find_logos( bodies = [] if bodies is None else bodies # Convert the height inputs to Distance if they are not already - if min_height: + if min_height is not None: min_height = min_height if isinstance(min_height, Distance) else Distance(min_height) - if max_height: + if max_height is not None: max_height = max_height if isinstance(max_height, Distance) else Distance(max_height) response = self._grpc_client._services.prepare_tools.find_logos( From 4202460b342c756da541fdfaaf882d1117b7e97a Mon Sep 17 00:00:00 2001 From: Jacob Kerstetter Date: Wed, 29 Oct 2025 07:44:37 -0400 Subject: [PATCH 4/4] fix find_and_remove_logos --- src/ansys/geometry/core/tools/prepare_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ansys/geometry/core/tools/prepare_tools.py b/src/ansys/geometry/core/tools/prepare_tools.py index 0abb5a6f0d..b6723641fe 100644 --- a/src/ansys/geometry/core/tools/prepare_tools.py +++ b/src/ansys/geometry/core/tools/prepare_tools.py @@ -432,9 +432,9 @@ def find_and_remove_logos( bodies = [] if bodies is None else bodies # Convert the height inputs to Distance if they are not already - if min_height: + if min_height is not None: min_height = min_height if isinstance(min_height, Distance) else Distance(min_height) - if max_height: + if max_height is not None: max_height = max_height if isinstance(max_height, Distance) else Distance(max_height) response = self._grpc_client._services.prepare_tools.find_and_remove_logos(