View Full Version : Creating splines
cheater
20-10-2004, 10:59 AM
i have to draw splines with points like(x,y,z). with spline obj i cannot draw with points.in spline object you have to give tan()values. is is true?
thanks...
samohtwerdna
20-10-2004, 12:23 PM
I found this in the VBA help -
hopefully it helps! :D
' Define the Spline Object
startTan(0) = 10: startTan(1) = 10: startTan(2) = 10
endTan(0) = 10: endTan(1) = 10: endTan(2) = 10
fitPoints(0) = 0: fitPoints(1) = 10: fitPoints(2) = 10
fitPoints(0) = 10: fitPoints(1) = 10: fitPoints(2) = 10
fitPoints(0) = 15: fitPoints(1) = 10: fitPoints(2) = 10
Set splineObj = ThisDrawing.ModelSpace.AddSpline(fitPoints, startTan, endTan)
cheater
22-10-2004, 11:26 AM
i couldnt catch the xyz points of Spline points :)
it is : fitPoints(0,1,2)=x1,y1,z1
fitPoints(3,4,5)=x2,y2,z2 ....
it is meaningless to plan objects like this :))
thanks ...
tparran
10-01-2005, 01:17 AM
Hi:
This is not an actual reply to this topic but a request for just about the same level of help.
I am trying to plot an airfoil using AddSpline
I have 27 upper ordinates for the station location
27 upper ordinates for the height locations
27 for the lower station.
27 for the lower height.
There is also the "Z" axis, or location form the center of the fuselage.
Everything is a closed SPLINE
I am using the AddSpline syntax, but it is driving me crazy since for the life of me, I am having a problem understanding what is my StartTan, and EndTan points, since they do not start at 0 (Zero).
The main wing leading edge is 21.32 inches in front of the center of gravity. It is 63" long, and the Chord center line is 42 inches above ground reference. For each positive "Z" axis, it has a negative axis.
If interested I can send you the code, with the understanding that I am the owner of said code.
I have tried to run this progam in AutoCAD and I get a funky plot, but nothing that looks like an airfoil. It looks more like a spider on drugs.
Thanks in advance for your time.
Tony
hendie
10-01-2005, 08:46 AM
I was trying something similar recently and the Tan values proved a real problem.
I ended up drawing it manually first then examined the Tan values and applied that in my formula but it only worked when all the parameters were the same. Change any of the other parameters and the Tan values can get weird.
Eventually I ended up changing from spline to polyline.
I tried searching for information on how to calculate Tan values but couldn't find anything I could understand.
You could use a polyline with the S option to approximate the aerofoil but I don't know how much accuracy you are looking for.
TCARPENTER
11-01-2005, 11:51 AM
Cheater,
Sorry, I'm afraid I don't know much about the spline problem however, an option might be as hendie suggested and create a polyline with the spline fit option and then convert the spline fit polyline into a spline. I use this method a lot when designing airplanes however, I'm not trying to duplicate an exact set of points, I'm just approximating curves and outlines and a spline is easier to work with as they stay smooth when using grips to push or pull a curve to get the right look.
Tony,
As for your airfoil plotting program, drop the spline and use the polyline option. When you smooth the polyline, you use the fit - option. Why? The coordinates needed to create the airfoil are critical (a few thousands of an inch can create a really crappy flying airplane), and the fit option for polylines, creates a smooth curve through the points whereas the spline fit option ignores the points. You can see this if set SPLFRAME = 1 and regen your drawing. If you're just laying out plans, you don't really need to bother with the fitting option - it can just make your drawing too heavy, but if your creating templates, you'll definitely want to do this before you start cutting.
HTH
Todd
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.