Community
(defun convCirc3dpoly (center rad segment / an ca ptlist model 3dpl)
(setq an (* 2.0 (sin (/ (* 0.5 segment) rad))) ca 0)
(while (< ca (* pi 2))
(setq ptlist (cons (polar center ca rad) ptlist) ca (+ ca an))
)
(setq model (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object))))
(setq 3dpl (vlax-invoke model 'Add3DPoly (apply 'append ptlist)))
(vla-put-closed 3dpl :vlax-true)
3dpl
)
(defun c:Test ()
(vl-load-com)
(if (and (setq ename (entsel) elist (entget (car ename)))(= (cdr (assoc 0 elist)) "CIRCLE"))
(if (convCirc3dpoly (cdr (assoc 10 elist))(cdr (assoc 40 elist)) 1.0)
(vla-delete (vlax-ename->vla-object (car ename)))
)
)
)
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<ee_gdd> wrote in messageHi,
href="news:6094591@discussion.autodesk.com">news:6094591@discussion.autodesk.com...
I want to convert a 3d circle to a 3dpolyline. but I don't exactly how to do
it. Steps: Measure the circle into points: lenght of segment = 1 Make a
selection set of the 3d-points: (setq ssp (ssget "x" '((0 . "point")))) Add
the 3d-points to a list: ??? Draw a closed 3dPoly with the points from the
list: ??? Can anyone help me?
Can't find what you're looking for? Ask the community or share your knowledge.