STEP Format CAD Import for Automated Meshing#
Rather than building the geometry in ESP, the user can load a STEP file into the Engineering Sketch Pad (ESP), label the faces and edges in ESP, and save the labeled geometry as an EGADS file. Then, the EGADS file can be directly uploaded to our cluster via the Python API or using the Web UI.
Quick Example#
Here is an example CSM script for importing the example.step file and labeling the faces.
import $/example.step -1
group -1
store $prism
store $cylinder
store $box
mark
restore $prism
attribute faceName $prism
attribute groupName $prism
restore $cylinder
attribute faceName $cylinder
attribute groupName $cylinder
restore $box
attribute faceName $box
attribute groupName $box
dump $/example.egads 0 1 0
For
import
anddump
, the$/
means the STEP and EGADS files are in the same folder as the CSM file.For
import
, the-1
means import all solid bodies.For
group
, the-1
means ungroup the solid bodies so the user canstore
them separately later on. The user can determine the order of the ungrouped solid bodies interactively in ESP.For
dump
, the0 1 0
meansremove=false toMark=true withTess=false
i.e. all solid bodies frommark
will be exported into the EGADS file. More details aboutdump
can be found in the ESP documentation.
As shown in the example above, immediately after the user restores a solid body, the user can assign attributes to the solid body as well as all faces belonging to this solid body. For more options on selecting and attributing faces and edges, see Adding Face and Group Attributes and Adding Edge Attribute
Currently face attributes from third-party CAD software will not be passed to our automated meshing workflow, though we are currently developing a feature to extract ADVANCED_FACE
names from STEP files, which will pass the face attributes through our workflow.
Common Issues#
This section summarizes common issues when using a STEP file as an entry point for automated meshing.
Lofting Surfaces#
When lofting the surfaces, it is strongly recommended to avoid sharp corners between edges or small gaps between adjacent surfaces.
The schematic above shows two typical issues: (a) the sharp corner between surface-A/B/C could cause surface mesh failure on surface-B (b) the gap between surface-C/D can result in a surface mesh mismatch. It is worth noting that the size of the gap between surface-C/D is exaggerated for illustration. As shown in the screenshot below, in reality, the gap could be so small that it is almost invisible to the human eye.
Boolean Operations#
When improving a design, changes often affect only a small portion of the geometry, leaving the rest unaltered. In such cases, users can import a baseline STEP file and then create a parametric geometry in ESP to represent the modified part. Before performing the UNION
operation, it is critical to ensure that the additional parametric geometry is fully extruded into the baseline geometry. This precaution prevents the occurrence of small gaps or sharp corners in 3D space.
Solid Body v.s. Sheet Body#
Solid bodies output to STEP files are more robust than sheet bodies.
In ESP, when dealing with sheet bodies, patching gaps/holes and “sewing” patches into a closed solid body is possible. However, this process heavily depends on the tolerance and may lead to issues during surface mesh generation. Hence, direct export of solid bodies to STEP files is strongly recommended.
During surface mesh generation, we will always check the watertightness. Gaps or holes will trigger warning messages as follows: "WARNING! There is only one neighboring face for an edge." As aforementioned, these gaps may be extremely small and invisible to the human eye.
As shown in the following screenshots, when preparing a half or quasi-3D model, it is recommended to keep the side faces on the “symmetric plane” and create solid bodies. The automated mesher will handle the side faces, eliminating the need for manual removal of these side faces by the user.