Jump to content

Recommended Posts

Posted

How can I incorperate radius into 3dpoly as I want to extrude a circle along the path of a 3dpoly. I know you can in 2dpoly but can't seem to with 3dpoly.

Posted

I think sweep command would do it, ill try it out myself now!

Posted

not sure how you would do that with that tool

Posted

You cant fillet or use arc segments in a 3Dpoly.

Posted

Damn sorry about that I was way off, :-)

didn't read the question right

Posted
You cant fillet or use arc segments in a 3Dpoly.

 

So there is no way to put an arc or radius in a 3d poly?

Posted

Try this? DRaw some 3D lines and run PP:

 


;;;Simple example, turning 3D lines into 'piping'

(defun Arc2Tube    (e)
  (setq elist (entget e))
  (setq Psenter (cdr (assoc 10 elist)))
  (setq Rbue (cdr (assoc 40 elist)))
  (setq Alfa (cdr (assoc 50 elist)))
  (setq Beta (cdr (assoc 51 elist)))
  (setq Teta
      (if (> Beta Alfa)
         (- Beta Alfa)
         (+ (- (* 2 PI) Alfa) Beta)
      )
  )
  (princ "\nBend: ")
  (princ (* 180 (/ Teta PI)))
  (princ "  ,  ")
  (princ "R= ")
  (princ Rbue)
  (command "ucs" "object" e)
  (command "ucs" "x" "90")
  (command "circle" (list Rbue 0 0) R)
  (command "extrude" "last" "" "path" e)
  (command "ucs" "")
)
(defun line2tube (e)
  (setq elist (entget e))
  (setq P1 (cdr (assoc 10 elist)))
  (setq P2 (cdr (assoc 11 elist)))
  (command "cylinder" P1 R "C" P2)
  (setq l (distance P1 P2))
  (princ "\nRett stykke, L= ")
  (princ l)
)
(defun c:pp ()
  (princ "\nRTM simple piping :-) ")
  (initget 0)
  (if D
     (setq svar (getreal (strcat "\nDiameter : <" (rtos D) ">")))
     (setq D (getreal "\nDiameter : "))
  )
  (if svar  (setq D svar)   )
  (setq R (/ D 2.0))  ;Modify here if you want to specify a bend radius, R
  (setq Rapport T)
  (setvar "cmdecho" 0)
  (setvar "ucsicon" 0)
  (command "undo" "begin")
  (setq i 0)
  (if (setq ss    (ssget '((-4 . "<OR") (0 . "ARC") (0 . "LINE") (-4 . "OR>"))
       )
      )
     (repeat (sslength ss)
    (setq e (ssname ss i))
    (setq etype (cdr (assoc 0 (entget e))))
    (cond
       ((= etype "ARC") (arc2tube e))
       ((= etype "LINE") (line2tube e))
       (t nil)
       ;;Flere etterhvert
    )
    (setq i (1+ i))
     )
     ;;else if
     (alert "Du må velge linjer eller buer.")
  )
  (command "undo" "end")
  (setvar "cmdecho" 1)
  (setvar "ucsicon" 1)
  (princ)
)

Posted

Can you tell me what PP is?

Posted

piping autolisp(code above).

 

dry drawing two separate lines in 3d(not 3dpoly, just LINE) and use fillet between them, see if that works for you.

Posted
piping autolisp(code above).

 

dry drawing two separate lines in 3d(not 3dpoly, just LINE) and use fillet between them, see if that works for you.

 

 

How do I input that code? Im not quite following the draw 2 lines in 3d. sorry for my ignorance on this!

Posted

You can copy paste the code from above to the command line i AutoCAD.

 

You draw 3D Lines in the same way as you would draw 3D Plines.

If you have a 3D Pline you can explode it.

The lisp routine could of course explode it for you, but the code I pasted here was done "quick and dirty".

 

I attach the lsp file here.

You can save it and the use the command APPLOAD to load it in AutoCAD.

 

I think I called the command PP just because it's fast to type.

RTM_3D.LSP

Posted

Hmm. I tried it now (in Bricscad V9) and I didn't get any bends. Does it work in AutoCAD?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...