Keith Brown suggested I post here...
Code below works to get the vertices of AEC_PolyGon, AEC_Space, or LTPOLYLINE vertices.
I have a move function to adjust the vertices to the right coordinates for AEC_PolyGon and AEC_Space... however, I don't have a rotate function.
could someone set give me a leg up?
Maybe there's a better method too - I know move function is probably the long way around?
(defun MEPObjVertices
(/ Obj Vla
-Obj ObjType Vla
-BasePro IsPoly BasePnt BaseProfile coords Rotation xylist
) (setq Obj
(car (entsel "\nSelect an AEC_PolyGon, AEC_Space, or a LTPolyline: "))) )
)
)
)
)
)
)
(setq xylist
(lst2lists coords
2)) (setq xylist
(LM:UniqueFuzz xylist
0.09)) xylist
):
: thanks from http://www.lee-mac.com/uniqueduplicate.html to eliminate nearly coincident vertices.
;
(defun LM:UniqueFuzz
( l f
/ x r
) )
)
)
(defun move
(FROMPNT TOPNT PNTLIST
/ DIST
) )
PNTLIST
)
)
)
(defun lst2lists
(LST
; LiST to DIVide into list of lists DIV / ; integer qnt of elements to put in each list
INC ; INCrement
LSTPART ; LiST PART length of which = DIV
RETLST) ; the RETurned LiST of lists
INC (+ INC DIV))
)
)
(defun sublst
(LST
; LiST to operate on N ; "N"th atom to start with - 0 being the first one
NUM / ; NUMber of atoms to get in sequence
L) ; sub List
)
)
; go is a check function so long as 'pnts' var stores the vertices
;
)
)