On this page:
4.15.2 Importing ACIS Files
4.15.2.1 Import Options
4.15.3 Importing Facet Files
4.15.4 Importing FASTQ Files
4.15.5 Importing Granite Files
4.15.6 Importing IGES Files
4.15.6.1 Import Options
4.15.7 Importing STEP Files
4.15.7.1 Import Options
4.15.7.2 Import Settings
2022.4+26187-e1209cf7 Apr 14, 2022

4.15 Importing Geometry

4.15.1 Other Formats

Internally, Cubit represents geometry as either ACIS solid model geometry or mesh-based geometry. Cubit can import ACIS geometry in the native "sat" file format. Cubit can also import STEP and IGES files and internally converts them into ACIS solid model geometry. For compatibility with Sandia legacy applications, Cubit can import FASTQ input decks to create ACIS geometry, as well. If you have geometry that has been created in another format, such as in SolidWorks, you will need to translate that geometry into something that Cubit can read. Many solid modeling packages have an Export ACIS .sat command, which is probably the easiest way of translating your model. If you do not have that option, there are some other possibilities.

See Also

Importing a Mesh

4.15.2 Importing ACIS Files

The command used to read an ACIS file is:

Import Acis ’<acis_filename>’ [No_bodies][No_surfaces] [No_curves][No_vertices][Group {’<name>’|<id>}] [Binary|Ascii] [Show_Each] [Sort] [XML ’<xml_filename>’] [Attributes_On] [Separate_Bodies] [merge_gloabally] [Heal]

The import ACIS command is the primary mechanism for generating geometry within CUBIT. ACIS parts can be generated and saved with CUBIT, but in most cases are developed within a 3rd party CAD package and exported for use in CUBIT. CUBIT provides the capability to import ACIS solid models and make modifications to them so they can be meshed. CUBIT incorporates the commercial ACIS libraries developed and maintained by http://www.spatial.com. for reading and writing ACIS format files. IGES and STEP format files can also be imported and exported to/from CUBIT using the Spatial’s libraries.

4.15.2.1 Import Options

It is possible to include free entities (vertices, curves and surfaces) in the file. The default operation is to read all entities in the file whether they are included as part of a body or are free. By using any of the options no_bodies, no_surfaces, no_curves, or no_vertices, the user may exclude certain types of free entities.

The group option of the import command will allow the user to create a group for each set of imported geometry. The newly created group can later be accessed using the name or id specified with the group option.

The import capability of ACIS files supports both the ASCII format (.sat) and binary format (.sab). When importing, the filename extension will determine the default file type, be it ASCII or binary. A (.sat) extension will default to ASCII, while a (.sab) extension will default to binary. If you use a different file extension you can specify the type with the [binary|ascii] option. Binary files can be significantly faster but are not guaranteed to be upward compatible, nor cross-platform compatible. Therefore, it is recommended that models be archived in ASCII format.

Normally the numerical IDs of the geometric entities contained in the ACIS model are used directly within CUBIT. The sort option provides the capability to compress the IDs read from the ACIS file. The sort option does the same thing as the compress ids sort command, but combines it with the import command to remove a step in the process.

The show_each option is a graphics option that applies to how the volumes are shown as they are imported. If there are multiple volumes in the file, the graphics display will be updated between each volume during import.

The xml option will read assembly information and other metadata from an XML file in the DART metadata XML format. See the http://www-irn.sandia.gov/analyst for details.

The attributes_on option will enable attribute support for the file. Attributes include properties like entity color, entity id, and meshing scheme. Including the attributes option will only affect the current import. The settings will be restored to their previous settings after importing.

To retain any possible merge information when importing an ACIS file use the attribute_on command.

The separate_each option creates a separate body for each volume that is imported, preventing multi-volume bodies from being imported.

When importing, the use may specify the scope of the merge using merge_globally. The default behavior is to merge within the scope of the file being imported. With the merge_globally option, imported entities will merge with anything, including entities already in the Cubit session that have merge attributes on them.

Use the heal option to heal the entities when importing.

4.15.2.2 Case-Insensitive Entity Names

Entity names in Cubit are case-insensitive. This means that there is no difference between ’myvolume’ and MyVolume’. When importing entity names as attributes any names that are case-sensitive duplicates will be made unique. This is done by appending one or more underscores, ’_’, followed by a number 1 to 9 or a letter A to Z. For example, two names ’myvolume’ and ’MyVolume’ encountered in that order will result in the names ’myvolume’ and MyVolume_1’.

4.15.2.3 Importing ACIS files at startup

ACIS files can also be imported using the "-solid" option when starting CUBIT from the UNIX command prompt. (See Execution Command Syntax for details.) Note that the filename must be enclosed in single or double quotes. This command will create as many bodies within CUBIT as there are bodies in the input file.

See also Exporting ACIS Files.

4.15.3 Importing Facet Files

Cubit provides the capability to import a model composed of facets to create geometry. The command to import facets from a file is:

To import a facets file

  1. Select File and then Import.

  2. Select the file to be imported.

  3. Select Facets from the Files of type drop-down menu.

  4. Click Open. A new window will appear.

  5. Optionally specify any appropriate settings from this window.

  6. Click Finish.

Import [Facets|AVS|STL] "<filename>" [Feature_Angle] [LINEAR||Spline] [MERGE|No_merge] [Make_elements] [Stitch] [Improve]

Import STL "<filename>" [Feature_Angle <angle>] [Surface_Feature_Angle <angle>] [LINEAR|Gradient|Quadratic|Spline] [MERGE|No_merge] [Make_elements] [Stitch]

Facets are simply triangles that have been stitched together to form surfaces. Faceted geometry representations are commonly used for graphics, bio-medical, geotechnical and many other applications that output a discrete surface representation. Upon import, the resulting geometry representation is Mesh-Based Geometry. Figure 217. shows an example of a faceted model and the resulting geometry created in Cubit.

Figure 217: Example of faceted model and the resulting solid model created in Cubit from the facets.

4.15.3.1 Facet File Format

For convenience, the import facet command currently supports three different formats, facet, AVS and STL

The format for the ASCII facet file is as follows

n m
 id1 x1 y1 z1
 id2 x2 y2 z2
 id3 x3 y3 z3
 .
 .
 .
 idn xn yn zn
 fid1 id<1> id<2> id<3> [id<4>]
 fid2 id<1> id<2> id<3> [id<4>]
 fid3 id<1> id<2> id<3> [id<4>]
 .
 .
 .
 fidm id<1> id<2> id<3> [id<4>]

Where:

n = number of vertices
 m = number of facet
 id<i> = vertex ID of vertex i
 x<i> y<i> z<i> = location of vertex i
 fid<j> = facet ID if facet j
 id<1> id<2> id<3> = IDs of facet vertices
 [id<4>] = optional fourth vertex for quads

As noted above, the facets can be either quadrilaterals or triangles. Upon import, the facets serve as the underlying representation for the geometry. By default, the facets are not visible once the geometry has been imported. To view the facets, use the following command:

draw surf <id range> facets

4.15.3.2 Feature Angle

The feature angle option is used to specify the angle at which surfaces will be split by a curve or where curves will be split by a vertex. 180 degrees will generate a surface for every facet, while 0 degrees will define a single, unbroken surface from the shell of the mesh. The default angle is 135 degrees. This feature is identical to the feature angle option available when importing Exodus II files.

For the stl format, it is possible to independently control the feature angle for surfaces and curves. If surface_feature_angle is specified, it controls the angle at which surfaces will be split by a curve, while feature_angle controls the angle at which curves will be split by a vertex. If surface_feature_angle is not specified, feature_angle will control the angle for both surfaces and curves.

4.15.3.3 Smooth Curves and Surfaces

This option permits the use of a higher order approximation of the surface when remeshing/refining the resulting geometry. Default is to use the original facets themselves as the curve and surface geometry representation. If the facet model to be imported is to represent geometry with curved surfaces, it may be useful to apply this option. If the Spline option is selected, it will use a 4th order B-Spline approximation to the surface [Walton,96]. More information on using smooth approximation of the facets is available in Importing an Exodus II File.

4.15.3.4 Merge

This option allows the user to either merge or not merge the resulting surfaces. The default option is to merge adjacent surfaces. This results in non-manifold topology, where neighboring surfaces share common curves. The no_merge option, adjacent surfaces will generate distinct/separate curves.

4.15.3.5 Make elements

This option creates mesh elements from each of the facets on the facet surface.

4.15.3.6 Stitch

The stitch option is used with the facet or avs format files to try to merge vertices and triangles that are close. Figure 218 shows an example of where this might be employed. The model on the left contains facets that are not connected between the red and blue groups. In this case, the surfaces will not be water-tight, even though the vertices on the boundary between the two groups may be coincident. The stitch option attempts to eliminate the extra edge and vertex between the groups to form the model on the right. This option can be useful when importing facet files for 3D meshing. Cubit’ 3D meshing algorithms require a water-tight (closed) set of surfaces.

Figure 218: Example use of the stitch option on import.

4.15.3.7 Improve

The improve option will collapse short edges on the boundary of the triangulation that are less than 30% the length of the average edge length in the model. In some cases, short edges are the result of discrete boolean operations on the triangulation which may result in edges that are of negligible length. This option is particularly useful for boundaries where multiple surfaces come together at an edge. Figure 219. shows an example of where the improve option improved the quality of the triangles at the boundary. This option is especially useful if the facets themselves will be used for the FEA mesh.


Triangles near a boundary that have not been used the improve option


The same set of triangles where improve option has collapsed edges

Figure 219: Example use of the improve option

4.15.4 Importing FASTQ Files

Cubit can read a FASTQ file and convert it into an ACIS model:

Import Fastq ’<fastq_filename>’

The filename must be enclosed in single or double quotes.

FASTQ is an older, 2d meshing tool; (Blacker 88.) FASTQ files are a series of commands much like a Cubit journal file. All FASTQ commands are fully supported except for the "Body" command (it is unnecessary and ignored), the "corn" (corner) line type, and some of the specialized mapping primitive "Scheme" commands. Standard mapping, paving, and triangle primitive scheme commands are handled. The pentagon, semicircle, and transition primitives are not handled directly, but are meshed using the paving scheme. The FASTQ input file may have to be modified if the Scheme commands use any non-alphabetic characters such as ‘+’, ‘(‘, or ‘)’. Circular lines with non-constant radius are generated as a logarithmic decrement spiral in FASTQ; in Cubit they will be generated as an elliptical curve.

Since a FASTQ file by definition will be defined in a plane, it must be projected or swept to generate three dimensional geometry. Cubit supports sweeping options to convert imported FASTQ geometries into volumetric regions.

4.15.5 Importing Granite Files

Native Granite (Pro/Engineer) models can be directly read into Cubit via an add-on available from Coreform.

4.15.6 Importing IGES Files

IGES files can be read/written from Cubit using an added plugin available from Coreform. Contact mailto:sales@coreform.com?subject=Please%20provide%20details%20of%20IGES%20plugin%20for%20Cubit for details and pricing.

The ACIS IGES translator provides bi-directional functionality for data translation between ACIS and the IGES (Initial Graphics Exchange Specification) format.

To import an IGES file:

  1. Select File and then Import.

  2. Select the file to be imported.

  3. Select IGES from the Files of type drop-down menu.

  4. Click Open. A new window will appear.

  5. Optionally specify any appropriate settings from this window.

  6. Click Finish.

Import Iges ’<iges_filename>’ [No_bodies] [No_surfaces] [No_curves] [No_vertices] [Group {’<name>’|<id>}] [Nofreesurfaces] [HEAL|noheal] [Logfile [’filename’] [Display]] [Show_Each] [Sort]

4.15.6.1 Import Options

It is possible to include free entities (vertices, curves and surfaces) in the file. Default operation is to read all entities in the file whether they are included as part of a body or are free. By using any of the options no_bodies, no_surfaces, no_curves, or no_vertices, the user may exclude certain types of free entities.

The group option of the import command will allow the user to create a group for each set of imported geometry. The newly created group can later be accessed using the name or id specified with the group option.

The nofreesurfaces option will automatically convert free surfaces to bodies. By default this option is off.

By default, bodies are automatically healed when imported - if this causes problems, you can disable this option by using the noheal argument.

The logfile option specifies a file where informational messages generated during import of the STEP file will be written. The display option will display the file.

The show_each option is a graphics option that applies to how the volumes are shown as they are imported. If there are multiple volumes in the file, the graphics display will be updated between each volume during import.

Normally the numerical IDs of the geometric entities contained in the ACIS model are used directly within Cubit. The sort option provides the capability to compress the IDs read from the ACIS file. The sort option does the same thing as the compress ids sort command, but combines it with the import command to remove a step in the process.

Note that the IGES import and export functionality might not be available on all 64-bit platforms.

See also Exporting IGES Files.

4.15.7 Importing STEP Files

The ACIS STEP translator provides bi-directional functionality for data translation between ACIS and the file format standard STEP AP203.

STEP AP203 is an international standard which defines a neutral file format for representation of configuration control design data for a product.

The command used to import a STEP file are:

Import Step ’<step_filename>’ [No_bodies][No_surfaces] [No_curves] [No_vertices] [HEAL|Noheal] [Logfile [’filename’] [Display]] [Show_Each] [Group {’<name>’|<id>}] [Sort] [XML ’<xml_filename>’]

4.15.7.1 Import Options

It is possible to include free entities (vertices, curves and surfaces) in the file. The default operation is to read all entities in the file whether they are included as part of a body or are free. By using any of the options no_bodies, no_surfaces, no_curves, or no_vertices, the user may exclude certain types of free entities.

By default, bodies are automatically healed when imported - if this causes problems, you can disable this option by using the noheal argument.

The logfile option specifies a file where informational messages generated during import of the STEP file will be written. The display option will display the file.

The show_each option is a graphics option that applies to how the volumes are shown as they are imported. If there are multiple volumes in the file, the graphics display will be updated between each volume during import.

The group option of the import command will allow the user to create a group for each set of imported geometry. The newly created group can later be accessed using the name or id specified with the group option.

Normally the numerical IDs of the geometric entities contained in the STEP model are used directly within CUBIT. The sort option provides the capability to compress the IDs read from the STEP file. The sort option does the same thing as the compress ids sort command, but combines it with the import command to remove a step in the process.

The xml option will read assembly information and other metadata from an XML file in the DART metadata XML format. See the metadata documentation and the Analyst’s Home Page for details.

Beginning with version 13.0, Cubit will read assembly information embedded in the imported STEP file. No additional arguments are required. The resultant assembly/part structure will be displayed in the GUI’s main entity tree.

4.15.7.2 Import Settings

By default, names on bodies in STEP files are not read in. To change this, the following command is avaliable:

[set] Read Step Body Names [on|OFF]

4.15.7.3 Exporting a STEP file from Pro/Engineer

To export a STEP file from Pro/ENGINEER, from the Export STEP Dialog, Press Options.

In the file step_config.pro add the following:

STEP_EXPORT_FORMAT AP203_CD.

Also be sure your export option is set to Solids. If the geometry has problems in CUBIT, you may need to increase the geometry accuracy in Pro/ENGINEER.

See also Exporting STEP Files.