Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1ee66b0
reenabling tests
jacobrkerstetter Nov 11, 2025
f44f953
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
218d1ee
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
a4d4b97
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
8ccedee
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
5ee9f23
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
d422338
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
e08393c
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
fbc2bc1
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
2706d06
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
cf3d1ac
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
a247fcd
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
302e705
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
b73ef24
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
576c9db
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
b8e167e
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
f9db98a
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
1e6213a
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
0fd98f9
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
33b184a
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
1b58d7b
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
eb8d2c5
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
0dc1176
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
3a7d8ba
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
8e726e8
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
153220c
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
1efdffa
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
1053634
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
e91684d
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
47081e3
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
c09b0be
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
3eb8d1c
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
d5c717f
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
bae65d9
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
b6e13fc
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
bad12c9
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
41a27b8
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
9dd453f
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
59ada96
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
5891aa0
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
fef901b
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
636206b
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
ee1ec18
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
d6e71c9
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
c6660e6
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
b700af1
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
ed8f457
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
6fea17d
backwards compat attempt
jacobrkerstetter Nov 11, 2025
4552fc0
Merge branch 'test/reenable_tessellation_tests' of https://github.com…
jacobrkerstetter Nov 11, 2025
77d8e43
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
0457de0
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
8a8c902
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
1402c70
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
58c622a
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
c73fe33
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
e92694c
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
781228b
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
7d2f89e
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
b5c21b5
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
c87a88a
chore: adding changelog file 2369.test.md [dependabot-skip]
pyansys-ci-bot Nov 11, 2025
7c9a0a5
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Nov 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/2369.test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Re-enable tessellation tests
122 changes: 83 additions & 39 deletions tests/integration/test_tessellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
@pytest.mark.skipif(
not are_graphics_available(), reason="Skipping due to graphics requirements missing"
)
@pytest.mark.skip(reason="Skipping to promote new CS package")
def test_body_tessellate(modeler: Modeler):
"""Test the body tessellation."""
sketch_1 = Sketch()
Expand Down Expand Up @@ -75,33 +74,59 @@ def test_body_tessellate(modeler: Modeler):
blocks_2 = body_2.tessellate()
assert "MultiBlock" in str(blocks_2)
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.02000513783799312, 0.03999486216200688, 0.0, 0.03],
rel=1e-6,
abs=1e-8,
)
if modeler._grpc_client.backend_version < (26, 1, 0):
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],
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],
rel=1e-6,
abs=1e-8,
)
else:
assert blocks_2.bounds == pytest.approx(
[0.019999999999999997, 0.04, 0.02000513783799312, 0.03999486216200688, 0.0, 0.03],
rel=1e-6,
abs=1e-8,
)
if not BackendType.is_core_service(modeler.client.backend_type):
assert blocks_2.bounds == pytest.approx(
[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.02000513783799312, 0.03999486216200688, 0.0, 0.03],
rel=1e-6,
abs=1e-8,
)

assert blocks_2.center == pytest.approx([0.03, 0.03, 0.015], rel=1e-6, abs=1e-8)

# Tessellate the body merging the individual faces
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 == 392
assert mesh_2.n_points == 396
assert mesh_2.n_arrays == 0
if modeler._grpc_client.backend_version < (26, 1, 0):
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_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_arrays == 0
else:
assert "PolyData" in str(mesh_2)
assert mesh_2.n_cells == 392
assert mesh_2.n_points == 396
assert mesh_2.n_arrays == 0
if not BackendType.is_core_service(modeler.client.backend_type):
assert "PolyData" in str(mesh_2)
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 == 392
assert mesh_2.n_points == 396
assert mesh_2.n_arrays == 0

# Make sure instance body tessellation is the same as original
comp_1_instance = design.add_component("Component_1_Instance", comp_1)
Expand Down Expand Up @@ -176,7 +201,6 @@ def test_body_tessellate_with_edges(modeler: Modeler):
@pytest.mark.skipif(
not are_graphics_available(), reason="Skipping due to graphics requirements missing"
)
@pytest.mark.skip(reason="Skipping to promote new CS package")
def test_component_tessellate(modeler: Modeler):
"""Test the component tessellation."""
# Create a sketch
Expand All @@ -200,24 +224,44 @@ def test_component_tessellate(modeler: Modeler):
mesh = comp.tessellate()
comp.plot()
assert "PolyData" in str(mesh)
if not BackendType.is_core_service(modeler.client.backend_type):
assert mesh.n_cells == 976
assert mesh.n_arrays == 0
assert mesh.n_points == 996
assert mesh.bounds == pytest.approx(
[-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0],
rel=1e-6,
abs=1e-8,
)
if modeler._grpc_client.backend_version < (26, 1, 0):
if not BackendType.is_core_service(modeler.client.backend_type):
assert mesh.n_cells == 3280
assert mesh.n_arrays == 0
assert mesh.n_points == 3300
assert mesh.bounds == pytest.approx(
[-25.0, 25.0, -24.999251562526105, 24.999251562526105, 0.0, 20.0],
rel=1e-6,
abs=1e-8,
)
else:
assert mesh.n_cells == 3280
assert mesh.n_arrays == 0
assert mesh.n_points == 3300
assert mesh.bounds == pytest.approx(
[-25.0, 25.0, -24.999251562526105, 24.999251562526105, 0.0, 20.0],
rel=1e-6,
abs=1e-8,
)
else:
assert mesh.n_cells == 976
assert mesh.n_arrays == 0
assert mesh.n_points == 996
assert mesh.bounds == pytest.approx(
[-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0],
rel=1e-6,
abs=1e-8,
)
if not BackendType.is_core_service(modeler.client.backend_type):
assert mesh.n_cells == 976
assert mesh.n_arrays == 0
assert mesh.n_points == 996
assert mesh.bounds == pytest.approx(
[-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0],
rel=1e-6,
abs=1e-8,
)
else:
assert mesh.n_cells == 976
assert mesh.n_arrays == 0
assert mesh.n_points == 996
assert mesh.bounds == pytest.approx(
[-25.0, 25.0, -24.991140278086316, 24.991140278086316, 0.0, 20.0],
rel=1e-6,
abs=1e-8,
)


def test_get_design_tessellation(modeler: Modeler):
Expand Down
Loading