Is there a way to make a cylender into a single line? I know there is a command for converting circle into a point so im guessing there probably is one for a cylender. Or is there a way to achieve this via a lisp?
Solved! Go to Solution.
Solved by leeminardi. Go to Solution.
Hi,
>> I know there is a command for converting circle into a point
No, there does not exist any command in AutoCAD that can do that.
There exists some tools which can search for a circle, place a point at the center of the circle and then delete the circle, but that's not a build in command.
>> Is there a way to make a cylender into a single line?
Which line do you want to get? A cylinder consists of 2 circles and a surface connecting these 2 circles, do you mean the line between the centers of the 2 circles?
Best would be you upload a dwg that shows some of the objects you want to "convert" and the lines you want to get as result.
- alfred -
If you are looking at extracting ISOLINES from a solid then you can get that >>HERE<<
Warren Geissler
Drafting Manager Denver Water
_____________________________________________
Please ACCEPT AS SOLUTON if this works
(...and doesn't melt your computer or cause Armageddon)
Check this Previous post : Extract radius and height from cylinders &boxes
SALMANUL FARIS
The following vlisp program will create a line along the axis of all selected solid cylinders. It will not work for circles that were swept or extruded.
;Adds a line along the axis of selected cylinders. ; Do not use for other solids. ; LRM 3/27/2019 (defun c:CylCL (/) (command "ucs" "") (vl-load-com) (if (setq s (ssget)) (progn (setq i 0 n (sslength s) ) (while (< i n) (setq e (ssname s i)) (if (and ;; changing ename to vla-object (setq ee (vlax-ename->vla-object e)) ;; checking if it's a 3d solid (= (vla-get-ObjectName ee) "AcDb3dSolid" ) ) (setq c (vlax-get ee 'Centroid) p1 (vlax-get ee 'Position) d (distance c p1) normal (mapcar '/ (mapcar '- c p1) (list d d d) ) h (* 2 d) p2 (mapcar '+ p1 (mapcar '* normal (list h h h)) ) ) (princ "\nInvalid Entity.") ) ; end if (setq i (1+ i)) (command "_line" p1 p2 "") ) ; end while ) ;end progn ) ; end if (princ) )
Can't find what you're looking for? Ask the community or share your knowledge.