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.
As a last resort, contact the Cubit team. They might have other options for importing your file.
See Also
4.15.2 Importing ACIS Files
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]
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
Select File and then Import.
Select the file to be imported.
Select Facets from the Files of type drop-down menu.
Click Open. A new window will appear.
Optionally specify any appropriate settings from this window.
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]
![]()
Figure 210: 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
Facet format: The facet file format is a simple ASCII file that contains vertex coordinates and connectivities. The facet file format is described below.
AVS format: The AVS format is a general geometry format that can support a variety of polygonal shapes. In Cubit’ implementation of the AVS import, it will support only triangles.
STL format: Perhaps the most common format in the industry is Stereolithography (STL). Cubit supports both ASCII and binary forms of the STL format. While the STL format is adequate for graphics and visualization, it can be problematic for geometry applications such as Cubit. Each triangle in the STL format is represented independently. This means that multiple definitions of a single vertex are included in the file. Cubit will attempt to merge duplicate vertices to form a water-tight surface. In cases where the vertex locations may not correspond exactly, an optional tolerance argument may be used on the import command. The tolerance option is used only for STL format files.
The format for the ASCII facet file is as follows
n m |
Where:
n = number of vertices |
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
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 #f. 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.
4.15.4 Importing FASTQ Files
Import Fastq ’<fastq_filename>’
The filename must be enclosed in single or double quotes.
FASTQ is an legacy 2D meshing tool 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:
Select File and then Import.
Select the file to be imported.
Select IGES from the Files of type drop-down menu.
Click Open. A new window will appear.
Optionally specify any appropriate settings from this window.
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.
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
[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.
STEP_EXPORT_FORMAT AP203_CD.
See also Exporting STEP Files.