diff --git a/doc/changelog.d/2098.test.md b/doc/changelog.d/2098.test.md new file mode 100644 index 0000000000..e56a713c2f --- /dev/null +++ b/doc/changelog.d/2098.test.md @@ -0,0 +1 @@ +Logo removal should work on linux now \ No newline at end of file diff --git a/src/ansys/geometry/core/tools/prepare_tools.py b/src/ansys/geometry/core/tools/prepare_tools.py index 380bdc20ec..8526b41a62 100644 --- a/src/ansys/geometry/core/tools/prepare_tools.py +++ b/src/ansys/geometry/core/tools/prepare_tools.py @@ -374,8 +374,10 @@ def find_and_remove_logos( """ from ansys.geometry.core.designer.body import Body - if BackendType.is_linux_service(self._grpc_client.backend_type): - # not yet available in Linux + if BackendType.is_linux_service( + self._grpc_client.backend_type + ) and self._grpc_client.backend_version < (26, 1, 0): + # not yet available on Linux until 26.1.0 LOG.warning("Logo detection not available on Linux") return diff --git a/tests/integration/test_prepare_tools.py b/tests/integration/test_prepare_tools.py index aed264616c..40bb904651 100644 --- a/tests/integration/test_prepare_tools.py +++ b/tests/integration/test_prepare_tools.py @@ -23,7 +23,6 @@ from pint import Quantity -from ansys.geometry.core.connection.backend import BackendType from ansys.geometry.core.math.point import Point2D from ansys.geometry.core.misc.measurements import UNITS from ansys.geometry.core.modeler import Modeler @@ -136,9 +135,6 @@ def test_detect_logos(modeler: Modeler): result = modeler.prepare_tools.find_logos(max_height=0.005) assert len(result.face_ids) == 147 success = modeler.prepare_tools.find_and_remove_logos(max_height=0.005) - # Skip the rest of the test if running on a Linux service backend - if BackendType.is_linux_service(modeler.client.backend_type): - return assert success is True assert len(body.faces) == 42 result = modeler.prepare_tools.find_and_remove_logos(None, min_height=0.001, max_height=0.005) @@ -162,9 +158,6 @@ def test_detect_and_fix_logo_as_problem_area(modeler: Modeler): # Test finding logos with max height result_with_max_height = modeler.prepare_tools.find_logos(max_height=0.005) assert len(result_with_max_height.face_ids) == 147 - # Skip fix-related assertions if running on a Linux service backend - if BackendType.is_linux_service(modeler.client.backend_type): - return # Test removing logos with max height success_remove_logos = modeler.prepare_tools.find_and_remove_logos(max_height=0.005) assert success_remove_logos is True