Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Airfoil DAT to Spline

62 REPLIES 62
Reply
Message 1 of 63
scorpio9999
12124 Views, 62 Replies

Airfoil DAT to Spline

Hi everyone!

 

I decided to create dedicated thread for my Airfoil DAT to Spline  script.

Here you can share your ideas, ask questions and get support as from me as from other members of community who already using it.

On time of writing script has been downloaded over 800 times.

 

Most number of issues which I have got by e-mail with script was due to wrong DAT file structure.

For example, all values in one line, wrong delimiters, etc.

Proper DAT file should look like this

 

CLARK Y AIRFOIL
1.00000  0.00060
0.99000  0.00297
0.98000  0.00533
0.97000  0.00769
0.96000  0.01002
0.94000  0.01462
0.92000  0.01912
0.90000  0.02350
0.88000  0.02779
0.86000  0.03197
0.84000  0.03605
0.82000  0.04002
0.80000  0.04388
0.78000  0.04763
0.76000  0.05126
0.74000  0.05477
0.72000  0.05816
0.70000  0.06143
0.68000  0.06458
0.66000  0.06760
0.64000  0.07048
0.62000  0.07321
0.60000  0.07576
0.58000  0.07815
0.56000  0.08035
0.54000  0.08237
0.52000  0.08421
0.50000  0.08588
0.48000  0.08736
0.46000  0.08864
0.44000  0.08972
0.42000  0.09057
0.40000  0.09117
0.38000  0.09152
0.36000  0.09163
0.34000  0.09151
0.32000  0.09119
0.30000  0.09068
0.28000  0.09000
0.26000  0.08908
0.24000  0.08783
0.22000  0.08614
0.20000  0.08392
0.18000  0.08107
0.16000  0.07757
0.14000  0.07344
0.12000  0.06862
0.10000  0.06300
0.08000  0.05643
0.06000  0.04876
0.05000  0.04428
0.04000  0.03913
0.03000  0.03302
0.02000  0.02537
0.01200  0.01786
0.00800  0.01374
0.00400  0.00892
0.00200  0.00580
0.00100  0.00373
0.00050  0.00234
0.00000  0.00000
0.00050 -0.00467
0.00100 -0.00594
0.00200 -0.00781
0.00400 -0.01051
0.00800 -0.01429
0.01200 -0.01697
0.02000 -0.02027
0.03000 -0.02261
0.04000 -0.02452
0.05000 -0.02605
0.06000 -0.02713
0.08000 -0.02846
0.10000 -0.02938
0.12000 -0.02996
0.14000 -0.03024
0.16000 -0.03025
0.18000 -0.03005
0.20000 -0.02967
0.22000 -0.02914
0.24000 -0.02852
0.26000 -0.02782
0.28000 -0.02707
0.30000 -0.02631
0.32000 -0.02556
0.34000 -0.02482
0.36000 -0.02409
0.38000 -0.02336
0.40000 -0.02263
0.42000 -0.02190
0.44000 -0.02117
0.46000 -0.02044
0.48000 -0.01970
0.50000 -0.01896
0.52000 -0.01823
0.54000 -0.01749
0.56000 -0.01676
0.58000 -0.01602
0.60000 -0.01529
0.62000 -0.01456
0.64000 -0.01382
0.66000 -0.01309
0.68000 -0.01235
0.70000 -0.01162
0.72000 -0.01088
0.74000 -0.01015
0.76000 -0.00941
0.78000 -0.00868
0.80000 -0.00794
0.82000 -0.00721
0.84000 -0.00648
0.86000 -0.00574
0.88000 -0.00501
0.90000 -0.00427
0.92000 -0.00354
0.94000 -0.00280
0.96000 -0.00207
0.97000 -0.00170
0.98000 -0.00133
0.99000 -0.00097
1.00000 -0.00060

or like this

 

EPPLER 557 (w commas)
1.00000, 0.00000
0.99668, 0.00144
0.98772, 0.00542
0.97412, 0.01075
0.95547, 0.01657
0.93163, 0.02306
0.90304, 0.03026
0.87014, 0.03806
0.83341, 0.04631
0.79337, 0.05484
0.75055, 0.06343
0.70549, 0.07184
0.65873, 0.07984
0.61076, 0.08718
0.56211, 0.09364
0.51325, 0.09899
0.46460, 0.10306
0.41664, 0.10570
0.36975, 0.10679
0.32431, 0.10625
0.28069, 0.10407
0.23921, 0.10022
0.20011, 0.09480
0.16368, 0.08799
0.13028, 0.07998
0.10021, 0.07093
0.07373, 0.06101
0.05106, 0.05044
0.03238, 0.03945
0.01782, 0.02833
0.00748, 0.01743
0.00151, 0.00726
0.00045, 0.00385
0.00013, 0.00207
0.00001, 0.00038
0.00003, -0.00042
0.00011, -0.00119
0.00027, -0.00192
0.00052, -0.00263
0.00087, -0.00334
0.00129, -0.00406
0.00233, -0.00553
0.00361, -0.00701
0.00596, -0.00926
0.01636, -0.01627
0.03236, -0.02355
0.05314, -0.03040
0.07846, -0.03669
0.10798, -0.04235
0.14125, -0.04729
0.17779, -0.05132
0.21709, -0.05422
0.25862, -0.05560
0.30216, -0.05491
0.34786, -0.05189
0.39581, -0.04661
0.44615, -0.03942
0.49872, -0.03111
0.55291, -0.02243
0.60797, -0.01395
0.66303, -0.00619
0.71717, 0.00039
0.76936, 0.00548
0.81857, 0.00886
0.86373, 0.01046
0.90383, 0.01039
0.93794, 0.00884
0.96512, 0.00621
0.98462, 0.00324
0.99619, 0.00090
1.00000, 0.00000

The first line should be name of airfoil and new sketch will be renamed with use of it.

All following lines are X and Y coordinates (relatively to selected construction plane).

If the first and last coordinates are the same spline will be closed. If different, spline will be open.

 

As bonus I attached the latest (unpublished) version of "Airfoil DAT to Spline" script. Hopefully you know what to do with it.

62 REPLIES 62
Message 2 of 63
Anonymous
in reply to: scorpio9999

Using the .zip archiv for installation on a macbook work well for me. Unpacking the .zip in the download folder and using the green "+" next to my scripts did the trick. The location of the script in the filesystem seems not to matter. Using the appstore download installation was reported successful, but no script was visible afterwards.

Message 3 of 63
scorpio9999
in reply to: Anonymous

Klaus,

 

You right. Script location doesn't matter for Fusion 360.

I suppose default folders are useful when you going to backup all of them in one archive and restore them let's say on new computer.

In your case need to view details of the particular script to find where it is stored.

Message 4 of 63
scorpio9999
in reply to: scorpio9999

Hi everyone!

 

Just to let you know that in addendum to this script I published a new one.

Airfoil DAT Optimizer

Message 5 of 63
scorpio9999
in reply to: scorpio9999

Version 1.8 has been submitted to Autodesk. Stay tuned.

 

Message 6 of 63
Anonymous
in reply to: scorpio9999

I have just downloaded Fusion 360 to my laptop, and tried to install the script, but no success.... 😞

I get a .pkg file, but it seems not to install automatically.

Sorry for the newbie question, but I really need it to work....

Could you help me?

Message 7 of 63
scorpio9999
in reply to: Anonymous

Unfortunately I cannot help with MacOS.

The package has been successfully tested by other user.

 

Maybe someone can help you.

Message 8 of 63
louis_dionne
in reply to: Anonymous

I used the zip file or version 1.7 located in the first message in this topic. Unzipped in the folders where the other Python scripts are and added to My Scripts using the green +.

Message 9 of 63
Anonymous
in reply to: scorpio9999

Thank you for the awesome plugins!  They will be very useful for me in designing radio control gliders.

 

I was wondering if you could do a version of the DAT optimizer for the Mac?  I would be happy to help with testing.

 

Regards,

    Bill

Message 10 of 63
mringNQ9L7
in reply to: Anonymous

I am using Windows but by default it downloaded the .pkg-version. If you are on windows, make sure to select "Windows" and it downloads an .msi-file which works like a charm!

Message 11 of 63
Anonymous
in reply to: scorpio9999

Hello,
I cannot import a dat file in my Mac with Airfoil DAT to spline, each time I try I get the same answer. I have browsed the web and could not find what I do wrong. Thanks for your help.Capture d’écran 2020-03-01 à 12.20.15.jpg

 

Message 12 of 63
scorpio9999
in reply to: Anonymous

Hi!

 

Could you post here first 10 lines of DAT file?

Message 13 of 63
scorpio9999
in reply to: Anonymous

You need plain text editor if you going to edit DAT files.

Rich text format with fonts, etc. not supported.

Message 14 of 63
Anonymous
in reply to: scorpio9999

For instance I copy paste that in text edit under a rtf format:

1.00000 0.0
0.99572 0.00057
0.98296 0.00218
0.96194 0.00463
0.93301 0.00770
0.89668 0.01127
0.85355 0.01522
0.80438 0.01945
0.75000 0.02384
0.69134 0.02823
0.62941 0.03247
0.56526 0.03638
0.50000 0.03978
0.43474 0.04248
0.37059 0.04431
0.33928 0.04484
0.30866 0.04509
0.27886 0.04504
0.25000 0.04466
0.22221 0.04397
0.19562 0.04295
0.17033 0.04161
0.14645 0.03994
0.12408 0.03795
0.10332 0.03564
0.08427 0.03305
0.06699 0.03023
0.05156 0.02720
0.03806 0.02395
0.02653 0.02039
0.01704 0.01646
0.00961 0.01214
0.00428 0.00767
0.00107 0.00349
0.0 0.0
0.00107 -0.00349
0.00428 -0.00767
0.00961 -0.01214
0.01704 -0.01646
0.02653 -0.02039
0.03806 -0.02395
0.05156 -0.02720
0.06699 -0.03023
0.08427 -0.03305
0.10332 -0.03564
0.12408 -0.03795
0.14645 -0.03994
0.17033 -0.04161
0.19562 -0.04295
0.22221 -0.04397
0.25000 -0.04466
0.27886 -0.04504
0.30866 -0.04509
0.33928 -0.04484
0.37059 -0.04431
0.43474 -0.04248
0.50000 -0.03978
0.56526 -0.03638
0.62941 -0.03247
0.69134 -0.02823
0.75000 -0.02384
0.80438 -0.01945
0.85355 -0.01522
0.89668 -0.01127
0.93301 -0.00770
0.96194 -0.00463
0.98296 -0.00218
0.99572 -0.00057
1.00000 0.0

Message 15 of 63
Anonymous
in reply to: Anonymous

I changed it in dat in the finder and it works now ! No idea why I was stuck !!

Message 16 of 63
scorpio9999
in reply to: Anonymous

If you will see again error message, last two lines, you will understand the reason.

 

Script is reading file line by line.

First line converted to title of sketch.

Second and all following lines converted from text to float values.

If it cannot convert to number it fails. In you case it found following.

 

{\\fonttbl\\f0\\fmodern\\fcharset0

There are no coordinates. It's part of rich text format file, description of used font. This is why it failed.

 

If you found airfoil in http://airfoiltools.com/search/index then you don't need to copy-paste content.

Just export it in Selig format dat file. Link on right side.

This is example for CLARKY airfoil.

http://airfoiltools.com/airfoil/seligdatfile?airfoil=clarky-il

 

Message 17 of 63
scorpio9999
in reply to: Anonymous

Yes, it’s fine.
Just make sure you selected «All files» in filter of file extensions when File Open dialog window will pop-up.
DAT file extension is just default value.
 
 
 
Message 18 of 63
Anonymous
in reply to: scorpio9999

It drives me mad, it only works with my naca 0009 dat file and doesn't work with Naca 2424, no idea why, they both look alike.

I have to admit I do not undesrtand what you mean by:

"If you found airfoil in http://airfoiltools.com/search/index then you don't need to copy-paste content.

Just export it in Selig format dat file. Link on right side.

This is example for CLARKY airfoil.

http://airfoiltools.com/airfoil/seligdatfile?airfoil=clarky-il"

neither can I understand:
Just make sure you selected «All files» in filter of file extensions when File Open dialog window will pop-up.
DAT file extension is just default value.

I need more details to understand what you mean. I am not good with all that stuff...

Message 19 of 63
Anonymous
in reply to: Anonymous

I partly found what the problem is. The Naca 000P profile modified in dat shows no formating menu at the top of the window while the other profile modified in dat as well but is still in a text format. But no idea why ?

What did I do differently for the first file ?

Message 20 of 63
Anonymous
in reply to: scorpio9999

i have got this error message  after importing the dat file that i have downloaded from airfoil tools 

 

---------------------------
Fusion 360
---------------------------
Failed:
Traceback (most recent call last):
File "C:/Users/sayf/AppData/Roaming/Autodesk/ApplicationPlugins/Airfoil_DAT_to_Spline_v1.8.bundle/Contents/Airfoil_DAT_to_Spline_v1.8.py", line 47, in notify
airfoil.Execute(sel0.entity, input1.value, input2.value, input3.value, input4.value, input5.value);
File "C:/Users/sayf/AppData/Roaming/Autodesk/ApplicationPlugins/Airfoil_DAT_to_Spline_v1.8.bundle/Contents/Airfoil_DAT_to_Spline_v1.8.py", line 134, in Execute
sketch = root.sketches.add(Plane);
File "C:/Users/sayf/AppData/Local/Autodesk/webdeploy/production/8b802e7a3c3d3db523b64fd80db49d9f63efcaf3/Api/Python/packages\adsk\fusion.py", line 26230, in add
return _fusion.Sketches_add(self, *args)
RuntimeError: 3 : not a planar entity

---------------------------
OK
---------------------------

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report