nastran_to_stl#

ansys.aedt.core.syslib.nastran_import.nastran_to_stl(*args, **kwargs)#

Convert a Nastran file to STL format.

Parameters:
input_filestr

Path to the input Nastran file.

output_folderstr, optional

Path to the output folder where the STL files will be saved. If None, the directory of the input file is used.

decimationint, optional

The decimation factor for mesh simplification. Default is 0 (no decimation).

enable_planar_mergestr, 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.

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)