@@ -166,6 +166,9 @@ def test_body_tessellate_with_edges(modeler: Modeler):
166166 assert blocks_1 .bounds == pytest .approx ([0.0 , 4.0 , - 2.0 , 2.0 , 0.0 , 4.0 ])
167167 assert mesh_1 .n_arrays == 0
168168
169+ # Check cache with edges
170+ assert body_1 ._template ._tessellation is not None
171+
169172
170173@pytest .mark .skipif (
171174 not are_graphics_available (), reason = "Skipping due to graphics requirements missing"
@@ -213,7 +216,6 @@ def test_component_tessellate(modeler: Modeler):
213216 )
214217
215218
216- @pytest .mark .skip (reason = "Needs ApiServer fix. Disabled until then." )
217219def test_get_design_tessellation (modeler : Modeler ):
218220 """Test getting the entire design tessellation."""
219221 # Create a design with two bodies
@@ -246,6 +248,21 @@ def test_get_design_tessellation(modeler: Modeler):
246248 assert isinstance (design_tess , dict )
247249 assert len (design_tess ) == 2 # Two bodies in the design
248250
251+ box_tess = design_tess [box .id ]
252+ assert isinstance (box_tess , dict )
253+ assert len (box_tess ) == 18 # Six faces + Twelve edges on the box
254+
255+ for face_id , face_tess in box_tess .items ():
256+ assert isinstance (face_id , str )
257+ assert isinstance (face_tess , dict )
258+
259+ cyl_tess = design_tess [cyl .id ]
260+ assert isinstance (cyl_tess , dict )
261+ assert len (cyl_tess ) == 5 # Three faces + Two edges on the cylinder
262+
263+ # Check design cache
264+ assert design ._design_tess == design_tess
265+
249266
250267def test_get_body_raw_tessellation (modeler : Modeler ):
251268 """Test getting the raw tessellation from a body."""
@@ -275,4 +292,8 @@ def test_get_body_raw_tessellation(modeler: Modeler):
275292
276293 for id , tess in cyl_tess .items ():
277294 assert isinstance (id , str )
278- assert isinstance (tess , dict )
295+ assert isinstance (tess , dict )
296+
297+ # Check raw tessellation cache
298+ assert box ._template ._raw_tessellation == box_tess
299+ assert cylinder ._template ._raw_tessellation == cyl_tess
0 commit comments