Connecting the Dots – Inserting SOLIDWORKS XYZ Curves
Most of us know how to create sketches in SOLIDWORKS, but what if we’re given a set of data-point coordinates that need to be connected by a curve path? One common example of this is the importing of 2D coordinates for an airfoil profile – here’s how we do it.
We’ll start at the UIUC Airfoil Coordinates Database, and select an NACA 4418 airfoil (see gif below).
This database supplies X,Y coordinates in the form of .dat file type which is not currently compatible with SOLIDWORKS.
SOLIDWORKS is able to read .sldcrv files or .txt files that use the same format as .sldcrv files, so in this example the .dat file must be converted. To do this, we’ll copy the coordinates from the database into Excel, making sure to include only the coordinates and not column-heading notation.
Next, the data must be separated into respective columns within Excel. Go to the Data tab in Excel and select Text to Columns
Select “Fixed width” and then “Finish”. Continue through steps 2 & 3 if further parameter control is desired.
We now have two distinct columns but need to add a third for the Z-coordinate. The SOLIDWORKS XYZ Curve command requires all three coordinates.
One thing to consider at this point, is scale. For example, the coordinates here are fractions of an inch and so would need to be converted to proper relative dimensions if we wanted a realistic airfoil scale. This is easily done while still in Excel by simply multiplying the coordinates with a desired scaling factor.
Finally, save-as text file (Tab delimited .txt):
Now that the X, Y, Z coordinates are saved to a compatible file type for SOLIDWORKS, we can insert them into a sketch.
Create a new sketch > Insert > Curve > Curve Through XYZ Points…
Browse to and open the text file. It should populate the Curve File table:
Note: from here it is possible to edit the table (adding/deleting rows or changing cell values). Decimal place accuracy for the table can be controlled through Document Properties > Units. Click OK and the curve will be generated.
Keep in mind there is really nothing you can do to the curve at this point except edit the coordinate parameters in the Curve Table. If we want to extrude it, we need to create a new sketch and Convert Entities making sure to close any open gaps that may be present in the curve etc.
Once this is complete, it’s business as usual with Boss Extrude etc.
The general process is the same when bringing in 3D coordinates. In that case, converting entities in a 3D sketch would be necessary.
I hope you found some useful information in this article to streamline your data point import projects. Until next time!
James Carlin, CSWE
Computer Aided Technology