MeshImporter

The mesh importer.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Auto determine the mesh file type and import it into the current project

project.Importer.Mesh:Import(FEKO_HOME..[[/shared/Resources/Automation/demo_RM.nas]])

Usage locations (object properties)

The following objects have properties using the MeshImporter object:

Property List

ConversionType
Conversion type. Only valid when the file format is RAW. (Read/Write ImportMeshConversionTypeEnum)
GroupPartsByLabelEnabled
Group into separate parts (using labels). (Read/Write boolean)
MeshMergingMediaEnabled
Enables merging identical media while importing mesh. Only applicable when the file format is RAW. (Read/Write boolean)
MeshRelabelingEnabled
Re-label mesh using the *.map file (when available). Only applicable when the file format is NASTRAN. (Read/Write boolean)
PolygonImportingEnabled
Enables mesh polygon importing. Only applicable when the file format is ASCII or FEMAP. (Read/Write boolean)
Prefix
Merge identical media with a prefix. Only applicable when the file format is RAW. (Read/Write string)
QuadrangleImportingEnabled
Enables mesh quadrangle importing. Only applicable when the file format is ABAQUS, ANSYS, FEMAP, GID, NASTRAN or PATRAN. For the AutoCAD file format, use the TriangleImportingEnabled property to import quadrangles. . (Read/Write boolean)
ScaleFactor
Scale factor if the imported mesh is not in metres. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, CONCEPT, FEMAP, GID, NASTRAN, PATRAN or STL. (Read/Write Expression)
SegmentImportingEnabled
Enables mesh segment importing. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, FEMAP, GID, NASTRAN, NEC or PATRAN. (Read/Write boolean)
SegmentLength
Line elements divided in segments according to this length. Only applicable when the file format is AutoCAD. (Read/Write Expression)
TetrahedronImportingEnabled
Enables mesh tetrahedron importing. Only applicable when the file format is ABAQUS, ANSYS, ASCII, FEMAP, GID, NASTRAN or PATRAN. (Read/Write boolean)
TriangleImportingEnabled
Enables mesh triangle importing. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, FEMAP, GID, NASTRAN or PATRAN. For the AutoCAD file format, quadrangles are imported as well. . (Read/Write boolean)
Type
The object type string. (Read only string)
VertexTolerance
The mesh vertex tolerance. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, CONCEPT, FEMAP, GID, NASTRAN, NEC, PATRAN or STL. (Read/Write Expression)
WireRadius
The default wire radius. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, CONCEPT, FEMAP, GID, NASTRAN, PATRAN, STL or UNV. (Read/Write Expression)

Method List

GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
Import (filename string)
Import the specified file. (Returns a List of Mesh object.)
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.

Static Function List

GetDefaultProperties ()
Creates a table containing the default settings to create an object. (Returns a table object.)

Property Details

ConversionType
Conversion type. Only valid when the file format is RAW.
Type
ImportMeshConversionTypeEnum
Access
Read/Write
GroupPartsByLabelEnabled
Group into separate parts (using labels).
Type
boolean
Access
Read/Write
MeshMergingMediaEnabled
Enables merging identical media while importing mesh. Only applicable when the file format is RAW.
Type
boolean
Access
Read/Write
MeshRelabelingEnabled
Re-label mesh using the *.map file (when available). Only applicable when the file format is NASTRAN.
Type
boolean
Access
Read/Write
PolygonImportingEnabled
Enables mesh polygon importing. Only applicable when the file format is ASCII or FEMAP.
Type
boolean
Access
Read/Write
Prefix
Merge identical media with a prefix. Only applicable when the file format is RAW.
Type
string
Access
Read/Write
QuadrangleImportingEnabled
Enables mesh quadrangle importing. Only applicable when the file format is ABAQUS, ANSYS, FEMAP, GID, NASTRAN or PATRAN. For the AutoCAD file format, use the TriangleImportingEnabled property to import quadrangles. .
Type
boolean
Access
Read/Write
ScaleFactor
Scale factor if the imported mesh is not in metres. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, CONCEPT, FEMAP, GID, NASTRAN, PATRAN or STL.
Type
Expression
Access
Read/Write
SegmentImportingEnabled
Enables mesh segment importing. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, FEMAP, GID, NASTRAN, NEC or PATRAN.
Type
boolean
Access
Read/Write
SegmentLength
Line elements divided in segments according to this length. Only applicable when the file format is AutoCAD.
Type
Expression
Access
Read/Write
TetrahedronImportingEnabled
Enables mesh tetrahedron importing. Only applicable when the file format is ABAQUS, ANSYS, ASCII, FEMAP, GID, NASTRAN or PATRAN.
Type
boolean
Access
Read/Write
TriangleImportingEnabled
Enables mesh triangle importing. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, FEMAP, GID, NASTRAN or PATRAN. For the AutoCAD file format, quadrangles are imported as well. .
Type
boolean
Access
Read/Write
Type
The object type string.
Type
string
Access
Read only
VertexTolerance
The mesh vertex tolerance. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, CONCEPT, FEMAP, GID, NASTRAN, NEC, PATRAN or STL.
Type
Expression
Access
Read/Write
WireRadius
The default wire radius. Only applicable when the file format is ABAQUS, ANSYS, ASCII, AutoCAD, CONCEPT, FEMAP, GID, NASTRAN, PATRAN, STL or UNV.
Type
Expression
Access
Read/Write

Method Details

GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
Return
table
A properties table.
Import (filename string)
Import the specified file.
Input Parameters
filename(string)
The name of the file to be imported.
Return
List of Mesh
The imported mesh.
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Input Parameters
properties(table)
A table of properties defining the new state of the object.

Static Function Details

GetDefaultProperties ()
Creates a table containing the default settings to create an object.
Return
table
The default properties table.