Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Mentor
hypersonic
Posts: 227
Registered: ‎12-27-2007
Message 1 of 5 (238 Views)

Does anyone have a curve fit routine they could share?

238 Views, 4 Replies
04-17-2012 11:30 AM

i.e. one that would apply best fit lines and arcs to a segmented polyline?

Thanks!

*Expert Elite*
Alfred.NESWADBA
Posts: 9,420
Registered: ‎06-29-2007
Message 2 of 5 (237 Views)

Re: Does anyone have a curve fit routine they could share?

04-17-2012 11:34 AM in reply to: hypersonic

Hi,

 

if you don't describe what you want to have exactly most of us will think of "use the PEDIT-command".

So you should describe what you want to have in another way, or at least why you can't use PEDIT. Let us see some samples what AutoCAD does and what you want to have instead.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Mentor
stevor
Posts: 881
Registered: ‎12-26-2005
Message 3 of 5 (210 Views)

Re: Does anyone have a curve fit routine they could share?

04-18-2012 09:51 AM in reply to: hypersonic

By chance, do want to create a LWPOLYLINE

from a random collection of ARCs and LINEs,

without manually selecting each entity in the correct order?

 

S
Distinguished Contributor
jmaeding
Posts: 1,045
Registered: ‎12-27-2006
Message 4 of 5 (207 Views)

Re: Does anyone have a curve fit routine they could share?

04-18-2012 10:04 AM in reply to: hypersonic

I get exactly what you mean, and I have not seen code for that so far.

You would have to loop through the points, and test is the "trend" of a line is happening, or that of an arc.

The user would have to specify some tolerances for accuracy and shortest line allowed. You would not want a ton of short lines as the result.

Planners would need this to convert hand drawn lines to street centerlines or curbs.

Its not trivial, and would involve some artistic thinking.

I'll see what I can find. Its a bit similar to weeding routines I have done, they are not linear, but look back and forth to see if criteria is met when doing things.

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

Mentor
hypersonic
Posts: 227
Registered: ‎12-27-2007
Message 5 of 5 (174 Views)

Re: Does anyone have a curve fit routine they could share?

04-19-2012 07:15 AM in reply to: jmaeding

Interesting.  I know I had a 3rd party routine years ago, but it worked outside of Autocad, and involved creating dxf files, importing, exporting etc.....

I would love to try to write something too, just too slamed right now, can't believe there isn't something already floating around for this.  You would think this would be some standard command in Autocad by now. :smileyhappy:

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!