NASTRAN Object

Import a NASTRAN file.

Methods

Reset

Resets the import options to the default.

 

FileName ( filename filename )

Sets the name of the imported file.

 

Id ( int id )

A CAD file may be imported more than once into the same project with different settings of import options. In order to improve the performance of structure rebuilds, an intermediate sat file is stored during the import process which allows to quickly re-read the data during rebuilds in case that the original CAD file has not been modified. The naming convention of the intermediate sat file has to be unique for each individual import step. Therefore, in case that the same file is imported more than once or a file with the same name is imported into the project, the Id setting needs to be increased. The Id will then be incorporated into the file name which ensures unique file names for every import.

 

Version ( double version )

Sets the version of the import filter, since the behaviour of the import may slightly change from version to version. This setting is available for backward compatibility reasons and should ensure that later versions of the import can exactly reproduce the behaviour of earlier versions. The most recent version of the import is 8.5.

 

ScaleToUnit ( bool switch )

If set to True the imported model is scaled to the currently active unit. The scale factor is determined by the unit of the import model and the currently active unit in the project. As the unit of the import model are not defined in the import file you have to specify the unit of the import model by using  ImportFileUnits. If not activated no scaling occurs.

 

ImportFileUnits ( enum {"m", "cm", "mm", "um", "nm", "ft", "mil", "in"} units )

Sets the units of the imported model. The units have to be defined when ScaleToUnit is activated.

 

ImportToActiveCoordinateSystem ( bool switch )

Import the CAD data relative to the active coordinate system.

 

ImportAttributes ( bool  switch )

Identifies if attributes like solid names, wire names, material names and material color should be read from the import file.

 

Curves ( bool  switch )

Identifies if curves should be imported as curves or as solids.

 

ReadPointsOnly ( bool  switch )

Set this import option in order to read the points from the NASTRAN file. The points are written into a textfile which is added to the navigation tree.

 

ReadTrianglInfoOnly ( bool  switch )

Set this import option in order to read the triangle info from the NASTRAN file. The triangle id, the center point coordinates and the normal vector of each triangle are written into a textfile which is added to the navigation tree.

 

CreateWires ( bool  switch )

Set this parameter to "True" in order to create the curves of the imported data as wires.

 

CreateSolidWires ( bool  switch )

Set this parameter to "True" in order to create the curves of the imported data as solid wires.

 

SetDecimationActive ( bool  switch )

Set this option to enable the triangle decimation.

 

SetDecimationLimit (  double limit )

Set the decimation limit. Is used by the decimation algorithm to estimate the error which would result by deletion of a point. Must be > 0.

 

SetMaximalAngle (  double maxangle  )

Sets the maximal angle. Must be between 0 and 180 degree.

To preserve the shape and topology of the original geometry better, choose a maximal angle closer to 180 degree.

 

SetDecimationIterations ( int iterations )

Sets the number of iterations for the decimation process. Must be > 0.

 

Read

Starts the actual import of the file.

 

Write  ( name name )

Performs the export for the solid with the given name or for all solids of the given component name.

 

WriteAll

Exports all data.

Default Settings

FileName ("")

ImportToActiveCoordinateSystem (True)

ImportCurves (True)

ReadPointsOnly (False)

CreateWires (True)

SetDecimationActive (True)

SetDecimationLimit (1.0)

SetMaximalAngle (140)

SetDecimationIterations (1)

Example

With NASTRAN

     .Reset

     .FileName (".\example.nas")

     .Id ("1")

     .Version ("8.5")

     .ImportToActiveCoordinateSystem ("True")

     .ImportCurves ("True")

     .ReadPointsOnly ("False")

     .CreateWires ("True")

     .SetDecimationActive ("True")

     .SetDecimationLimit ("1.0")

     .SetMaximalAngle ("140")

     .SetDecimationIterations ("1")

     .ImportAttributes (True)

     .Read

End With