• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

draw a wing profile from a .dat file

  • Thread starter Thread starter Betoniera
  • Start date Start date

Betoniera

Guest
Hello everyone
Please help to extract the coordinates from a text file to be used to draw a wing profile. I'll explain better.
there are databases of alar profiles that provide the coordinates of a profile in the form indicated below (see file hq3014.dat)
- the first number indicates the coordinate x
- the second number indicates the coordinate y
- the first group of numbers indicates the coordinates y positive
- the second group of numbers indicates the negative y coordinates
I know the lisp (not the visual lisp), but I have trouble managing files and field separators.

I look for a fragment of code that:
- open the filenamefile.dat
- jump the first 2 rows
- check the x,y positive coordinates (34 lines)
- jumps 1 row
- assign negative x,t coordinates (34 lines)
- drawings a positive spline
- drawings a negative spline
- close the filenamefile.dat

Can you help me?
Thank you.


content of file text hq3014.dat

hq 3.0/14 airfoil
39. 39.

0.0000000
0.0025000
0.0140500
0.0087500 0.0194200
0.0125000 0.0235800
0.0187500
0.0250000 0.0342500
0.0375 0.0424200
0.0500 0.0492000
0.0750000 0.0600600
0.1000 0.0684400
0.1250000 0.0751100
0.1500 0.0804900
0.1750000 0.0849300
0.2000 0.0885600
0.2250000 0.0914600
0.2500 0.0937500
0.2750000 0.0955900
0.3000 0.0970200
0.3250000 0.0980200
0.3500 0.0985300
0.3750000 0.0986000
0.4000 0.0982700
0.4500 0.0965300
0.5000 0.0932800
0.5500 0.0884700
0.6000 0.0821400
0.6500 0.0744100
0.7000 0.0655900
0.7500 0.0557200
0.8000 0.0450600
0.8250000 0.0394900
0.8500 0.0338900
0.8750000 0.0283000
0.9000 0.0226400
0.9250000 0.0170200
0.9500 0.0111900
0.9750000
100000000000

0.0000000
0.0025000 -.0055100
0.0050000 -.0080800
0.0087500 -.0110900
0.0125000 -.0135200
0.0187500 -.0167400
0.0250000 -.0191200
0.0375000 -.0228200
0.0500000 -.0255700
0.0750000 -.0297300
0.1000000 -.0328100
0.1250000 -.0352300
0.1500000 -.0371400
0.1750000 -.0385500
0.2000000 -.0395700
0.2250000 -.0403000
0.2500000 -.0407900
0.2750000 -.0411000
0.3000000 -.0412900
0.3250000 -.0413900
0.3500000 -.0413300
0.3750000 -.0408500
0.4000000 -.0399500
0.4500000 -.0372800
0.5000000 -.0335500
0.5500000 -.0290300
0.6000000 -.0238800
0.6500000 -.0184000
0.7000000 -.0129700
0.7500000 -.0078500
0.8000000 -.0034700
0.8250000 -.0017400
0.8500000 -.0003800
0.8750000 0.0004700
0.9000000 0.0010000
0.9250000 0.0010200
0.9500000000
0.9750000
100000000000
 
thanks rpor66
thanks for the work done and for the speed
"to her" stands for "to you" (I imagine) because in the forums you give yourself some.
I'll try to experiment.
Of course, before asking for help, I also did some experiments and I got stuck on the fact that the file "hq3014.dat" was not read.
I assumed that, placed in a search directory the file was read. It's not like that. from the complete path.
but also here I find difficulties:
for example by entering the file in the directory "c:\programs\autodesk\autocad 2014\lisp\hq3014.dat"
Does education (findfile "hq3014.dat") give me a wrong path (do you not recognize the subdirectotory "lisp"?
Do you have any idea why this happens? .
Anyway, now I try to see your instructions and complete everything.
Thank you.
we will resent when I have completed the work and we will also make it available to others who may be interested.
Hello, everyone.
 
"to her" was a friendly way to turn to an acquaintance of "forum".
the \ character in lisp has a particular meaning, if you want to use it to describe a search path or use \\ or /
Hi.
 
And come on, and come on, eventually, with the help of rpor66, I did it.
I make the job available for those interested.
especially for glider enthusiasts who want to design their own models.
the program profala.lsp seve to draw the alar profiles on the basis of files available on the network.
I refer in particular to the program profiles2 free, downloadable from the site: http://www.profili2.com/ita/products.aspa selected fly profile can be downloaded from the "export" menu the file in .dat or .txt format (example hq3014.dat)
as the file name must also contain the path, it should be inserted in c:\. when the file name will be requested, you will need to write c:\hq3014. ♪
to run the file type (load "profala.lsp")
in the image below you see the profile2 program to download the .dat file and the autocad design where the profile is automatically scaled to the desired rope (in example 250 mm).
hello to all and a thanks to rpor66
ala349.jpg
 

Attachments

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top