Samir
714-843-6685
Sent via Deja.com http://www.deja.com/
Before you buy.
I wouldn't like provide them for free, though. :-(
The SAVEASR12 route will convert the splines
into a series of straight line segments, not arcs,
*and* you can't control the precision of the resulting
polyline nor the number of resulting vertices.
With the lisps I developed, you can.
Also, if there's anyone interested in clothoids (Euler spirals
used widely in road and railway design) I also have
routines to draw them as tangential arcs with controlled
precision. Softdesk has something similar, but my algorithm
is more precise and creates less arcs then theirs for the same
deviation. :) The softdesk's clothoids also have a bug where the
arcs aren't exactly tangential to one another (at least that's what I
saw in files we've got from contractors who'd used this software).
Of course now it's called land development desktop.
It's also possible to create other types of curves, like involutes etc.
In fact, just about any parametric curve that is "usual" in a sense
that it has some continuity in it, can be represented as tangential
arcs. It has an effect of a HUGE reduction in DWG file's size as it
reduces the number of vertices needed for a representation with
a given tolerance _dramatically_.
Vlad,
http://vnestr.tripod.com
<alle...@my-deja.com> wrote in message news:8971pp$e31$1...@nnrp1.deja.com...
;================
;SPLINE-PLINE converts splines to splined polylines
;John Snow, 1999
(defun c:spline-pline()
(command "undo" "m")
;get entities, initialize
(setq aa (ssget) n (sslength aa) i 0)
;for each entity in aa, test for spline
(repeat n
(setq spline_name (ssname aa i)
spline_entity (entget spline_name)
i (1+ i)
)
;if is spline, get vertex list, make pline, turn pline into spline
(if (= (cdr (assoc 0 spline_entity)) "SPLINE")
(progn
(splverts)
(setvar "CLAYER" (cdr (assoc 8 spline_entity)))
(command "3dpoly")
(foreach a vtx_list (command a))
(command "")
(command "pedit" "l" "s" "")
(entdel spline_name)
);progn
);if
);repeat
);defun spline-pline
;======================================
;SPLVERTS takes SPLINE and returns vertex list
(defun splverts()
;determine length of spline_entity list
(setq m (length spline_entity)
j 0
vtx_list nil
)
;for each member of spline_entity list
(repeat m
;get the member
(setq vtx (nth j spline_entity))
(cond ((= 10 (car vtx))
(progn
; (print vtx)
(setq vtx_list (cons (list (cadr vtx) (caddr vtx) (cadddr
vtx)) vtx_list))
)
);set x,y,z
);cond
(setq j (1+ j));increment counter
);repeat n
)
;====================================
(princ "\nType SPLINE-PLINE to convert splines to splined 3dpolylines")
(princ)
;======================