Skip to content

Commit d8d5c4c

Browse files
jacobrkerstetterpyansys-ci-botRobPasMueRyanJWard
authored
test: fix tessellation tests (#2341)
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Co-authored-by: Ryan Ward <129954471+RyanJWard@users.noreply.github.com>
1 parent 672622c commit d8d5c4c

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

doc/changelog.d/2341.test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix tessellation tests

tests/integration/test_tessellation.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ def test_body_tessellate(modeler: Modeler):
7777
assert blocks_2.n_blocks == 3
7878
if not BackendType.is_core_service(modeler.client.backend_type):
7979
assert blocks_2.bounds == pytest.approx(
80-
[0.019999999999999997, 0.04, 0.020151922469877917, 0.03984807753012208, 0.0, 0.03],
80+
[0.019999999999999997, 0.04, 0.02000513783799312, 0.03999486216200688, 0.0, 0.03],
8181
rel=1e-6,
8282
abs=1e-8,
8383
)
8484
else:
8585
assert blocks_2.bounds == pytest.approx(
86-
[0.019999999999999997, 0.04, 0.020151922469877917, 0.03984807753012208, 0.0, 0.03],
86+
[0.019999999999999997, 0.04, 0.02000513783799312, 0.03999486216200688, 0.0, 0.03],
8787
rel=1e-6,
8888
abs=1e-8,
8989
)
@@ -94,13 +94,13 @@ def test_body_tessellate(modeler: Modeler):
9494
mesh_2 = body_2.tessellate(merge=True)
9595
if not BackendType.is_core_service(modeler.client.backend_type):
9696
assert "PolyData" in str(mesh_2)
97-
assert mesh_2.n_cells == 72
98-
assert mesh_2.n_points == 76
97+
assert mesh_2.n_cells == 392
98+
assert mesh_2.n_points == 396
9999
assert mesh_2.n_arrays == 0
100100
else:
101101
assert "PolyData" in str(mesh_2)
102-
assert mesh_2.n_cells == 72
103-
assert mesh_2.n_points == 76
102+
assert mesh_2.n_cells == 392
103+
assert mesh_2.n_points == 396
104104
assert mesh_2.n_arrays == 0
105105

106106
# Make sure instance body tessellation is the same as original
@@ -201,20 +201,20 @@ def test_component_tessellate(modeler: Modeler):
201201
comp.plot()
202202
assert "PolyData" in str(mesh)
203203
if not BackendType.is_core_service(modeler.client.backend_type):
204-
assert mesh.n_cells == 3280
204+
assert mesh.n_cells == 976
205205
assert mesh.n_arrays == 0
206-
assert mesh.n_points == 3300
206+
assert mesh.n_points == 996
207207
assert mesh.bounds == pytest.approx(
208-
[-25.0, 25.0, -24.999251562526105, 24.999251562526105, 0.0, 20.0],
208+
[-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0],
209209
rel=1e-6,
210210
abs=1e-8,
211211
)
212212
else:
213-
assert mesh.n_cells == 3280
213+
assert mesh.n_cells == 976
214214
assert mesh.n_arrays == 0
215-
assert mesh.n_points == 3300
215+
assert mesh.n_points == 996
216216
assert mesh.bounds == pytest.approx(
217-
[-25.0, 25.0, -24.999251562526105, 24.999251562526105, 0.0, 20.0],
217+
[-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0],
218218
rel=1e-6,
219219
abs=1e-8,
220220
)

0 commit comments

Comments
 (0)