Import Spreadsheet X/Y Data As Points
I need to make airfoil ribs on my 3D printer for RC gliders. The data is originally a text document with an X/Y pair on each line representing a point. Later, they are connected with a spline function. The data set can also be put into a CSV spreadsheet. How would I import this data so I don't have to draw or type in each point? The X data is normalized to the foil length of 1.0 but the Y data goes out to six places and each set may have over 200 points.
Thanks
-
Select File on the Insert tab.
Change import type with drop down box.
0 -
I get "Error (0) 0 0" if I import a 2D data set and "Error (0) 0 0 0" if I import a 3D set with zero for all Z values. What is the exact format needed for the imported TXT file and what mode should I use in DSM? Here is the first 10 lines from the TXT file. The X and Y values are separated by one space.
0 0
0.0005 0.002339
0.001 0.0037271
0.002 0.0058025
0.004 0.0089238
0.008 0.013735
0.012 0.0178581
0.02 0.0253735
0.03 0.0330215
0.04 0.03912830 -
I got it to work, sort of. The file header is sensitive to the tab character that Notepad++ inserts. The problem is that only a few points are used so the shape is wrong. Also, the end points of the two curves do not form a closed surface so cannot pull it to create thickness.
I did find a converter for CSV to DXF which produces the right shape as it uses all the points. Now trying SketchUp to get a SKP file for import.
0 -
I have a point version of the airfoil in NanoCAD in DXF and DWG format. I just need to get either into DSM as points then I'll do my own spline fit.
0 -
If you haven't got Sketchup Pro to import DXF files, use Sketchup7 it can open dwg and dxf files.
There is a link to get an old version in the video.
https://www.youtube.com/watch?v=optT5myXlcQ
You may have to adjust the scale.
0 -
Another method is to use DesignSpark PCB as the file converter from DXF to DS Mechanical IDF for import.
I realized this the other day when answering a question about importing from Corel Draw to DS Mechanical:
https://www.rs-online.com/designspark/mechanical-software/questions/i-need-import-or-open-line-work-file-from-coraldraw-for-made-3d-object-in-ds-mechanical
With DS PCB installed, the procedure is as follows:Note: This first set of steps creates an empty PCB file to use as a container to import the DXF file into.
You only need to go through the steps to create it once. Future times, you can start with the PCB file you just created, using the steps following the next Note:In DS PCB, choose File > New, and in the open dialog, click on PCB Design.Then Click OK.
The new board wizard will open. Click Next.
Choose a Design Technology file to base the board on. I used singlesided (the simplest), but it really doesn't matter, since you aren't going to use it to make a regular printed circuit board.
Choose the design units you wish to use.
Click next.
Make sure Use Layers From Chosen Technology File is checked.
Click Define Board Size. Enter a size in the Width and Height fields. A couple of inches each direction is fine. (You are going to delete it anyway.)
Click Next. Give it a filename (like DxfContainer), letting it use the default extension of .PCB
Click Finish.Click on the Board Outline. Press Delete.
Choose File > Save
Note: At this point, you have an empty PCB to use as a container for the imported DXF.
Start here when importing additional .DXF files in the future.Choose File > Import, and choose your DXF file.
Click Open.
The DXF Import dialog will open.
DXF files use arbitrary units - if something is specified as length 10 in the DXF file, it might be 10 inches, or ten millimeters, or ten miles. So you need to tell DS PCB whether the coordinates in the DXF represent English units (inches or mils), or Metric units (meters or millimeters).
Choose units and scale such that the object in the DXF will be less than 1 meter square. If the object you are importing is bigger than a meter square, you will need to specify a scale factor of less than one to shrink it to fit in the square meter work area. You can scale it up when you bring it from DS PCB into DS Mechanical.
In the Shape Items section of DXF Import dialog, select the layer containing the object(s) you wish to import, then select Yes in the corresponding Import This Layer coumn, and Board in the Import As column.
Now select Output > DesignSpark Mechanical (IDF)..., enter a filename/location to save into, and click OK.
(The file extension will be idb.)Open DS Mechanical. Open a design to import the content into. Click on Import PCB. Choose the file you just output from DS PCB. Click Open.
Your content should now be in DS Mechanical drawing.
0 -
I came up with a similar technique using FreeCAD as the DXF to STP converter. Here's the full sequence.
1. Obtain airfoil data file from:
https://m-selig.ae.illinois.edu/ads/coord_database.html#A
2. Open in a spreadsheet program such as LibreOffice Calc. Save as CSV.
3. Convert to DXF in online site.
https://mygeodata.cloud/converter/csv-to-dxf
4. Open DXF in NanoCAD and scale to desired length. Foil patterns are normalized to the range 0 to 1. Save as DXF.
5. Open FreeCAD. Import DXF file then export as STP. You don't have to know how to use the program.
6. Import STP file into DSM. Start at the rear tip of the dot pattern and construct a spline fit line returning to the rear tip finishing at the same point as started. Edit in plan mode and add all braces, bosses, and spar sockets. Pull various parts to desired thickness. When doing the spline, do not accidentally double click too early. You will have to finish with another line which will cause a problem when offsetting the outer flange.
It's messy but it works. If DSM could import a DXF, or CSV of points then it would be much easier.
0 -
Here's the DSM image. This is a ClarkY foil scaled to 9.5" length. It printed very well on a Creality Ender-5.
1 -
What method did you use to get the file into DSM?
0 -
I used the File button in the Insert category then select STP as the file type. The points then appear in the plan view in the X/Y plane. The tedious part is connecting all the points with the spline tool.
0 -
Select all of the 'points' and 'Pull' them up the thickness you want. This will create vertical lines. Select all the lines 'Pull' with the 'Blend' option. If you get an error you may have to do it in two halves as in the image.
0 -
Does the blend option use a spline to connect the lines? In airfoils, smoothness is essential.
0 -
I would presume that the blend would be 'tangent' to all of the lines. Except where there is a sharp point. That is why you may have to do it in two parts.
Check in the online help files. Top right ? in DSM. Select Search - Blend
You can just select the 'points' and 'Blend' them. It would be the same as using the 'Spline' tool to draw to every point.
It will be a 'Spline' and remember each 'Node' on the 'Spline can be moved, the 'tangent' between adjacent nodes will be updated.
0 -
I tried that but it will not help me. The blend works with both the original points and the points pulled into lines. However, an additional curve is generated above the upper surface and greatly distorted, ballooned up. It's part of the correct curve so cannot be deleted. Also, a surface is not generated within the correct curve. I need the surface to build the framework of the rib. I'll have stay with my spline connecting all the points. When you make it all the way around and double click the original point then a closed loop is generated and the associated surface.
Thank you for all your help. This has been a mind expanding experience.
0 -
However, an additional curve is generated above the upper surface and greatly distorted, ballooned up.
This additional curve could be because you are trying to create a 'closed' curve. At the endpoint where you double clicked, the spline maybe trying to make a 'tangent' between the second and next to last point.
Maybe if you leave a small gap near the endpoints may help, making an open curve. This gap can easily be made good once it is a solid with the 'Fill' tool.
Would you care to share the STP file so I could take a closer look?
0 -
I don't see a way of attaching a file to this post. How would I do this?
0 -
Use https://wetransfer.com There is no need to register.
Send as link. Copy and paste the link in your message here.
0 -
Here's the link.
0 -
That worked great
However you sent me an STL file. I can't play with the points with that.
0 -
Here's the Step file.
0 -
The problem is where the original points where placed. It seems they where placed or read from the file in a random order.
Just to check I placed a new point on top of the original points on a new Layer, in a logical order from the tail.
Turned off Layer0 and used the new points to 'Blend'. It worked.
I know, I may as well have just drawn a 'Spline' I just wanted to figure it out.
Select the 'Spline' and use the 'Fill' tool to create a surface.
Here's a link to the file.
0 -
Looks perfect. The original file from the airfoil database starts at the nose and goes along the top to the tail. The second half of the file does the same direction along the bottom. Therefore, the sequence is broken in the middle by jumping from the tail back to the nose. Most airfoil files are like that. However, my spline starts at the tail, follows the bottom to the nose, then along the top back to the tail where it's finished with a double click. That's necessary as the spline can't make a sharp turn at the tail. But, the sequence problem can be fixed in the spreadsheet
0 -
You may find this link informative.
0 -
Thanks, that's exactly what I need when I start the Horten HO9 design. I already have the airfoil in DSM but the complex wing shape is a problem. That will come after I finish the flying wing super glider.
0 -
Another method:
--> http://airfoiltools.com/ plotter page – set needed Chord size – Plot
--> download SVG file
--> Open in Inkscape ( ungroup, delete unneeded text and lines, close gap at trailing edge, if any )
--> save as normal SVG
--> https://www.tinkercad.com/ new project – import SVG – export STL
--> Open STL in DesignSpark Mechanical – convert to solid maybe0
Please sign in to leave a comment.
Comments
25 comments