import_nastran#
- Modeler3D.import_nastran(file_path, import_lines=True, lines_thickness=0, import_as_light_weight=False, decimation=0, group_parts=True, enable_planar_merge='True', save_only_stl=False, preview=False, merge_angle=0.001, remove_multiple_connections=False)#
Import Nastran file into 3D Modeler by converting the faces to stl and reading it.
The solids are translated directly to AEDT format.
- Parameters:
- file_path
str Path to .nas file.
- import_linesbool,
optional Whether to import the lines or only triangles. Default is
True.- lines_thickness
float,optional Whether to thicken lines after creation and it’s default value. Every line will be parametrized with a design variable called
xsection_linename.- import_as_light_weightbool,
optional Import the stl generatated as light weight. It works only on SBR+ and HFSS Regions. Default is
False.- decimation
float,optional Fraction of the original mesh to remove before creating the stl file. If set to
0.9, this function tries to reduce the data set to 10% of its original size and removes 90% of the input triangles.- group_partsbool,
optional Whether to group imported parts by object ID. The default is
True.- 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.- save_only_stlbool,
optional Whether to import the model in HFSS or only generate the stl file.
- previewbool,
optional Whether to preview the model in pyvista or skip it.
- merge_angle
float,optional Angle in radians for which faces will be considered planar. Default is
1e-3.- remove_multiple_connectionsbool,
optional Whether to remove multiple connections in the mesh. Default is
False.
- file_path
- Returns:
Listofansys.aedt.core.modeler.cad.object_3d.Object3d,dictNew object created and nastran dictionary.