×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

getting an interpolation of a list of points

getting an interpolation of a list of points

getting an interpolation of a list of points

(OP)
Is it possible to input a list of points via script and get AutoCAD to interpolate a nice smooth transition form one point to another? I have to have the smooth curve from one point to another as they are for a ship?
I dont want the usual stuff from AutoCAD where it generates a curve thats close to the points ..it has to be on them
 My boss is using rhino to generate it and import it into CAD..
He said he was not aware of a function to generate it in CAD....
The rhino version hes got is old so there is no layer function in it. To make life easier and remove the guess factor I need the layers....

RE: getting an interpolation of a list of points

Create a polyline from the points, then edit the polyline with the the "fit" option, which creates a smooth fit through the points.

You could input the points via a script, such as;

polyline
x1,y1
x2,y2
x3,y3,
etc...
[blank line at end, to end the command]

Another way is to start the "pline" command, then copy and paste a point group from Excel or a text file into the command line.
 

RE: getting an interpolation of a list of points

(OP)
Sorry mate no cigar for you .. It still does not make them hit the points ...just closer than earlier. I was not aware of the fit command for it ..so I learned something.
 I did a dummy up test... the control points are the points I intended the line to go through  but in spline it just makes the line go closer to em....
Need either a script or something that makes the line go through the line.
Would have thought AutoCAD had it all.. and not have to use Rhino

RE: getting an interpolation of a list of points

OK I was going on memory - there are 2 curve/fit options under "pedit". If "fit" didn't go through the points, try the other one, "curve" i think...

RE: getting an interpolation of a list of points

If you create a script file as CarlB suggested, but use _pline instead of polyline, I guarantee you, Autocad will hit all points exactly. But before you start the script you'll have to turn Object Snap off.

RE: getting an interpolation of a list of points

Occupant is correct but AutoCAD will join the points with straight line segments.  I thought the OP was looking for a curve fitting routine that would use arc segments instead.  To my knowledge AutoCAD will do that if you invoke the SPLNE command, set the first two points, then set the FIT TOLERANCE to zero and continue so set points.

RE: getting an interpolation of a list of points

(OP)
does anyone have a list of code commands that you can use in script and  some rule that you use when writing the code/

RE: getting an interpolation of a list of points

(OP)
I  done the scripting a while ago .. .. we had a way  of plotting a spline in a layer  of it own... can someone remind me  so I can help  my mate now who  wants to put in over a hundred points ..has it ready to roll in excel  but  does he have to have  the command infront of each point or what...I could use an example of the scripting if anyone has some lying about!
I looked the that sites
 

RE: getting an interpolation of a list of points

I described one way in my first post above.

A little more detail, create a column of coordinates in Excel that has the x-y coordinates.
Formula in say col c would be:
=A1&","&B1

copy down for all cells/points.
In AutoCAD, start the "spline" command
Copy & paste entire column range of coordinates
then manually close the spline command with 2 "enters".

You could also do it with a script file, formatted as follows:

Spline
x1,y1
x2,y2
x3,y3
;;etc
;;2 blank lines to finish

RE: getting an interpolation of a list of points

I understand, you wanted to match the given points exactly. That's what the _pline or _3Dpoly (if you are in 3D) commands do. The only thing you can do afterwards is to use the _fit command on the thing to create arcs out of the straight line segments. If your given points do not represent a mathematically correct curve, the only thing you can do, in my opinion, is to use some regression algorithm on them to get them there. If the given points already represent a spline then, of course, you'll have to use the _spline command in your script file.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

eBook - 10 Reasons to Choose CATIA on the Cloud
To compete in today’s fast-paced and competitive market, smaller and newer firms need a powerful platform that will enable them to compete with bigger players, without the heavy investments needed in computer hardware, software and personnel. Download Now
White Paper - Smart Manufacturing for Electronics
This white paper describes a transformative approach to electronics manufacturing made possible by the addition of Mentor Graphics to the Siemens family. It describes a completely digitalized strategy that supports both printed circuit board (PCB) and mechanical design and manufacturing, uniting the entire product lifecycle – from idea and production to customers and back. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close