How to Use Software for CAD Data Exchanges
I have been following 3D solid modeling technology and development since the late ‘80s. Back then,3D models were built mostly by defining XYZ coordinates in a text file and having the associated CAD or finite element analysis (FEA)program render the results. The advent of graphical user interface (GUI)-based solid modeling presented a giant leap forward. However, each system had its own method of implementing the geometry definition and the underlying “kernel” technology. Exchanging models among these different CAD systems was difficult. In the late ‘90s, Virtual Reality Modeling Language (VRML) showed promise of becoming the 3D equivalent of HTML; however, the idea of a universal markup language for 3D solids never took hold.
One of my first experiences with exchanging CAD data was with trying to read a customer’s Pro/ENGINEER files into SOLIDWORKS. The process was essentially a series of lobs of “What are you able to write?”/”What are you able to read?” I began to understand how and why these different CAD formats existed and how to get them to talk to one another. This article will discuss some of these formats and will focus on SOLIDWORKS model exchange with other systems.
A Test Model
We will start with a simple block modeled in SOLIDWORKS (see Figure 1). Since coordinate systems and units of measure are critical to achieving successful model transfers, we will ensure that the origin (0,0,0) is at one corner of the block and the extrusion is in the positive Z direction. These points are not mandatory for achieving successful neutral file exports, but having them can help with debugging and confirming the geometry transfer.
The model is exported using the SOLIDWORKS menu command File > Save As, which brings up the file format menu shown in Figure 2. These are a combination of 2D and 3D file formats (it seems that VRML still survives).
Figure 2. SOLIDWORKS export file formats.
We will save the file in the popular STEP AP203 format. The STEP export options are shown in Figure 3, and we will leave them in their default settings. STEP is governed by an ISO standard (ISO 10303-21), which was initially released in 1994.
Figure 3. STEP export options.
Saving this file will create a file with the same filename as the part but with a STEP extension so that we now have a file named ExampleBlock.STEP. So what exactly is in this file? Since it is a text file, we can open it in any word processing program. We don’t need anything fancy to do this, so we will use Microsoft Notepad.
Figure 4. Anatomy of a STEP file.
Figure 4 shows the key anatomy of the STEP file, with the Header and the Data sections. No, it’s not necessary to view this file with every transfer, but being able to open the file at all provides some confidence that the export was successful. The very top of the file gives the specification for the format, namely, ISO 10303-21, which was mentioned previously. Although we are working with the STEP format, all files (CAD or otherwise) have what is called a header section. This provides instructions to the receiving system about what information and format they will be receiving in the file. Also, there is information on the generator of the file format. In this case, it is ‘SolidWorks 2016’. The Datasection is where the actual geometry is defined.
A simple test that can be performed before submitting models in a neutral format is to reimport the file into the same CAD package that performed the export to test that package’s translator. In this case, STEP translator. In SOLIDWORKS, this task can be performed by simply selecting the STEP file from the File >Open menu as shown in Figure 5.
Figure 5.The SOLIDWORKS File> Open Dialog.
The “Options…” button brings up a menu of import options as shown in Figure 6.
This menu is typical of settings for STEP and other formats such as Initial Graphics Exchange Specification (IGES). Staying with the default options, we have a familiar sight upon importing—our original (2x3x4 block) file as shown in Figure 7.
Figure 7. Solid reimported STEP file.
The block imports as a solid “Imported1” file and the software offers the option to perform feature recognition. Depending on the complexity of the part and its intended further use, it may be more efficient to recreate the part and features natively than to use the automatic feature recognition.
We have exported and reimported a simple part, but the STEP format also supports assemblies. GrabCAD is an online repository of solid models that has worldwide contributors and disparate CAD systems. STEP is a popular format on that site. I randomly selected a component that did not identify any native CAD system as the source. The component file was simply named “GEAR HOOD.stp”. Opening this file in SOLIDWORKS and keeping the import options in their default settings, we have the model shown in Figure 8.
Figure 8. A sample file opened in SOLIDWORKS.
Notice that this is an assembly and that the STEP file contains information on each of the parts as well as the relative position of the parts. The STEP file does not contain mate information, but mates can be easily added in the software at this point. Also, the description of each part remains intact from the original CAD system.
Next, we will import a Parasolid neutral file. Parasolid is a popular modeling kernel for solid modeling programs. Most CAD systems can read and write a Parasolid neutral file format and a common neutral file extension is .x_t for this format. We will test this format by importing a pillow block bearing part from file “PillowBlockGrabCAD.x_t”. First, we will look at the header section to get an idea of the file’s origin. A segment of the file with the header is shown in Figure 9. We see that the kernel version is Parasolid 28.0 and that the originating system was SOLIDWORKS 2016 (coincidentally). This suggests that it may be a reliable translation from the neutral file to our own SOLIDWORKS model, but it is certainly no guarantee. Things can get lost in translation even with identical source and target systems.
Figure 9. A file segment with header.
The file is opened using the same menu commands that are used for opening a native SOLIDWORKS part; File > Open. Selecting the “Parasolid” option in the file filter dialog and opening the file gives us the part in SOLIDWORKS as shown in Figure 10. The part appears visually accurate, but key dimensions should be queried to ensure that they are in the expected scale. The Parasolid neutral file definition is in SI units and scaling may be required when importing into U.S.customary units.
Figure 10. Parasolid imported file.
The IGES file format is another popular 3D interchange neutral format. However, the raw IGES text file is not as rich as the STEP file shown in Figure 10. I have always considered IGES to be more of a wireframe protocol, but in a pinch it does support solid geometry. Importing the IGES version of the previous pillow block bearing gives us the result shown in Figure 11. This is visually nearly identical to the Parasolid imported file shown in Figure 10, but in general the Parasolid neutral file will be more robust when further handling these imported parts.
Figure 11. IGES imported file.
Solid modeling software programs use proprietary implementations of the core modeling engine and kernel. Therefore, exchanging data between different CAD programs requires neutral files that drop proprietary information and reproduce only the essential geometry. In this article, we looked at several formats such as STEP, IGES and Parasolid neutral files.
In my experience, the STEP format is the most robust with the highest fidelity transfer. However, a successful transfer still involves trial and error among these formats to suit particular systems and models. Fortunately, programs such as SOLIDWORKS offer import and export options in numerous neutral file formats.
About the Author
Attilio Colangelo has more than 25 years of experience in engineering and project management in the chemical, process, ceramic and advanced-materials industries. His specialties include CAE, with an emphasis on FEA, high-temperature and heavy industrial design. His software skills include SOLIDWORKS Simulation, NASTRAN, Caesar II, ANSYS and iOS programming.