Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

convert SPLINE to POLYLINE

0 views
Skip to first unread message

Weslley X Wang

unread,
Mar 26, 1998, 3:00:00 AM3/26/98
to

Does somebody know how to convert SPLINE to POLYLINE in R14? Does it can be
done in AutoLISP?


Thanks for any forward

Wes

Matt Dillon

unread,
Mar 26, 1998, 3:00:00 AM3/26/98
to

Save the drawing in R12 format, then open it back up in R14. Run
CONVERT to get your newly created polylines to LWPOLYLINES.


Matt Dillon
The D.C. CADD Company

Weslley X Wang

unread,
Mar 26, 1998, 3:00:00 AM3/26/98
to

I know this way, but I need do this work in part of a LISP routine. so I
look forward to do it without open a file

Matt Dillon wrote in message <351a86e0...@adesknews.autodesk.com>...

Vladimir Nesterovsky

unread,
Mar 27, 1998, 3:00:00 AM3/27/98
to

Weslley -- you can find the LISP routine that does that
on my pages.

HTH

------- Original message: -------
On Thu, 26 Mar 1998 12:00:46 -0600, - "Weslley X Wang"
<wesl...@aracnet.net> wrote in autodesk.autocad.customization:

>I know this way, but I need do this work in part of a LISP routine. so I
>look forward to do it without open a file

---
Live long and prosper :)
Vlad http://www.netvision.net.il/php/vnestr

Vladimir Nesterovsky

unread,
Mar 27, 1998, 3:00:00 AM3/27/98
to Vladimir Nesterovsky

Correction -- that routine will work correctly only for splined
plines, as it makes use of control points of the SPLINE entity to
make regular straight-lines polyline and calls PEDIT-Spline
option on it to create splined r12 pline. Then it uses the arc
segments verteces stored inside the splined pline to finally
make the regular arcs polyline.

Its result for a real spline may be pretty far from the original
entity (although ther will be a resemblance :) ).

Real splines have fit points also, and this information can't be
directly translated into R12-pline object, so the specialized
function must be written that will do direct approximation of
the spline.

To approximate it by straight line segments is easy --
just use DIVIDE command to collect the points along the spline
and make a POLYLINE from them (or use the vlax-curve-*
functions in VLISP to do that). If you want arcs, tangent one
to another, that's another matter, which is pretty difficult
to do.

Vladimir Nesterovsky wrote:
>
> Weslley -- you can find the LISP routine that does that
> on my pages.

> ------- Original message: -------
> On Thu, 26 Mar 1998 12:00:46 -0600, - "Weslley X Wang"
> <wesl...@aracnet.net> wrote in autodesk.autocad.customization:

--


Live long and prosper :)
Vlad

http://www.netvision.net.il/php/vnestr/

Terry W. Dotson

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

Vladimir Nesterovsky wrote:

> To approximate it by straight line segments is easy --
> just use DIVIDE command to collect the points along the spline

> and make a POLYLINE from them.

Works fine until you get a long spline with a lot of points and a small
divide distance. Locks up, doesn't slow down, it locks up. Major
problems with splines and divide/measure/area. Half baked.

Regards, Terry

Vladimir Nesterovsky

unread,
Mar 30, 1998, 3:00:00 AM3/30/98
to Terry W. Dotson

Terry -- so I guess we're stuck
with VLISP then? :)

(defun pts-along (lobj num / eparam x d pts)
(setq eparam
(vlax-curve-getendparam lobj)
d (/ eparam num)
x 0.0)
(while (<= x eparam)
(setq pts (cons
(vlax-curve-getpointatparam lobj x) pts)
x (+ x d)))
(reverse pts))

Cheers,

--

0 new messages