Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Turn a cylender into a line/ or unloft command

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
538 Views, 5 Replies

Turn a cylender into a line/ or unloft command

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?

5 REPLIES 5
Message 2 of 6
Alfred.NESWADBA
in reply to: Anonymous

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 6
WarrenGeissler
in reply to: Anonymous

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)

Message 4 of 6
Anonymous
in reply to: Alfred.NESWADBA

I need the mid point of it. (i.e. the locus)

Message 5 of 6
S.Faris
in reply to: Anonymous

Check this Previous post : Extract radius and height from cylinders &boxes

SALMANUL FARIS

Message 6 of 6
leeminardi
in reply to: Anonymous

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)
)

 

lee.minardi

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Autodesk Design & Make Report