@@ -294,14 +294,14 @@ def get_aircraft_mesh_data(
294294 """Returns (x, y, z, i, j, k), and when symmetry: only y >= 0.0"""
295295
296296 cpacs_path = Path (cpacs .cpacs_file )
297- stl_name = cpacs_path .stem
297+ vtp_name = cpacs_path .stem
298298 if symmetry :
299- stl_name = f"{ stl_name } _symmetry"
300- stl_file = Path (tempfile .gettempdir ()) / f"{ stl_name } .stl "
299+ vtp_name = f"{ vtp_name } _symmetry"
300+ vtp_file = Path (tempfile .gettempdir ()) / f"{ vtp_name } .vtp "
301301
302- if force_regenerate or not stl_file .exists ():
302+ if force_regenerate or not vtp_file .exists ():
303303 try :
304- with st .spinner ("Meshing geometry (STL export)..." ):
304+ with st .spinner ("Meshing geometry (VTP export)..." ):
305305 warning_signature = "Warning: 1 face has been skipped due to null triangulation"
306306 with (
307307 tempfile .TemporaryFile (mode = "w+b" ) as stdout_capture ,
@@ -312,7 +312,7 @@ def get_aircraft_mesh_data(
312312 try :
313313 os .dup2 (stdout_capture .fileno (), 1 )
314314 os .dup2 (stderr_capture .fileno (), 2 )
315- cpacs .aircraft .tigl .exportMeshedGeometrySTL (str (stl_file ), 0.01 )
315+ cpacs .aircraft .tigl .exportMeshedGeometryVTK (str (vtp_file ), 0.01 )
316316 finally :
317317 os .dup2 (saved_stdout_fd , 1 )
318318 os .dup2 (saved_stderr_fd , 2 )
@@ -331,12 +331,12 @@ def get_aircraft_mesh_data(
331331 return None
332332
333333 try :
334- your_mesh = mesh .Mesh .from_file (stl_file )
334+ your_mesh = mesh .Mesh .from_file (vtp_file )
335335 except Exception as e :
336336 st .error (f"Cannot load 3D preview mesh file: { e = } ." )
337337 return None
338338
339- log .info (f"Mesh from stl at { stl_file = } " )
339+ log .info (f"Mesh from stl at { vtp_file = } " )
340340
341341 mesh_vectors = your_mesh .vectors
342342 if symmetry :
0 commit comments