nastran_to_stl#
- ansys.aedt.core.syslib.nastran_import.nastran_to_stl(*args, **kwargs)#
Convert a Nastran file to STL format.
- Parameters:
- input_file
str Path to the input Nastran file.
- output_folder
str,optional Path to the output folder where the STL files will be saved. If
None, the directory of the input file is used.- decimation
int,optional The decimation factor for mesh simplification. Default is
0(no decimation).- enable_planar_merge
str,optional Whether to enable or not planar merge. It can be
"True","False"or"Auto"."Auto"will disable the planar merge if stl contains more than 50000 triangles.- previewbool,
optional Whether to generate a preview of the STL files using PyVista. Default is
False.- remove_multiple_connectionsbool,
optional Whether to remove multiple connections in the mesh. Default is
False.
- input_file
- Returns:
tuple- A tuple containing:
A list of paths to the generated STL files.
A dictionary representing the parsed Nastran data.
A boolean indicating whether planar merging was enabled.
Examples
>>> from ansys.aedt.core.syslib.nastran_import import nastran_to_stl >>> nastran_to_stl(input_file="my_file.nas", decimation=0, preview=True)