@@ -289,6 +289,38 @@ def test_axisymmetric_surfaces(mnemonic, params, expected_type, attr, value):
289289 assert getattr (surf , attr ) == approx (value )
290290
291291
292+ @mark .parametrize ("mnemonic" , ["x" , "y" , "z" ])
293+ def test_axisymmetric_surfaces_cone (mnemonic ):
294+ # cone with a r=1 bottom at plane=0 and a r=2 top at plane=3
295+ coeffs = (0.0 , 1.0 , 3.0 , 2.0 )
296+ surf = convert_surface (mnemonic , coeffs )
297+
298+ # Helper to build a point (x,y,z) given radial distance r and axial coord a
299+ def pt (r : float , a : float ):
300+ if mnemonic == "x" :
301+ return (a , r , 0.0 ) # axial along x; radius in y
302+ elif mnemonic == "y" :
303+ return (r , a , 0.0 ) # axial along y; radius in x
304+ else : # "z"
305+ return (r , 0.0 , a ) # axial along z; radius in x
306+
307+ # Points near the r=1 slice (at axial ~ 0)
308+ assert pt (0.0 , 0.01 ) in - surf
309+ assert pt (0.0 , - 0.01 ) in - surf
310+ assert pt (0.99 , 0.01 ) in - surf
311+ assert pt (1.05 , 0.01 ) in + surf
312+
313+ # Points near the r=2 slice (at axial ~ 3)
314+ assert pt (1.99 , 2.99 ) in - surf
315+ assert pt (2.0 , 2.99 ) in + surf
316+ assert pt (0.0 , 2.99 ) in - surf
317+ assert pt (0.0 , 3.01 ) in - surf
318+
319+ # Points between the r=1 and r=2 slices (at axial = 1.5)
320+ assert pt (1.49 , 1.5 ) in - surf
321+ assert pt (1.51 , 1.5 ) in + surf
322+
323+
292324@mark .parametrize (
293325 "mnemonic, params, expected_type, up_expected" ,
294326 [
0 commit comments