AutoCAD/AutoCAD Mech Desktop

Advertisement


Question

-------------------------

Followup To

Question -
Your answer for the spiral question was great, but when I loaded the spiral.lsp into AutoCAD Mechanical desktop and when I tried to extrude an object (i.e. a circle), but it would not let me.  It says "Cannont extrude along this path". What am I doing wrong?

Thanks!
Christina

Answer -
Christina,

I'm assuming you're using Autocad Mechanical (not Mechanical Desktop)? The process is different for both packages. However, ensure the path is a 3D polyline & run a sweep command using the circle along the path. Hope this helps, let me know!

Regards,
J. B. Borge


Actually I am using both AutoCAD 2006 and AutoCAD Mechanical Desktop 2006. The spiral.lsp creates a 2D polyline. How do you convert the polyline to 3D? Or is that another lisp routine...
Thanks!
Christina  

Answer
Christina,

Maybe the lisp no longer work w/ the acad 2006.  Try using helix.lsp provided below - this should generate your helical path.  However, ensure to create the circle object perpendicular to the path (the starting point of the path must land in the center of the circle object). You can do this by manipulating your ucs & view command & then creating the circle. Run the sweep command & this should create your spiral/helix. Hope this helps, let me know!

Regards,
JBB



;;;Start Copy & Paste
(defun c:helix()
 (setq spin -1); -1=CW, 1=CCW
 (setq ri (getreal "Base radius: ") rf (getreal "Top radius: "))
 (initget (+ 1 4))
 (setq h (getreal "Height: "))
 (initget (+ 1 2 4))
 (setq tu (getreal "Number of turns: "))
 (setq segs (getint "Number of segments per turn <20>: ")); more=smoother
 (if (= segs nil)(setq segs 20))
 (setq old (getvar "osmode"))
 (setvar "cmdecho" 0)  
 (setq fi1 (/ (* 2 PI) segs) i 0)
 (setq points (fix (* tu segs))
  h1 (/ h points) r1 (/ (- rf ri) points)
  s (getpoint "Center of base: ")
  end (list (car s) (cadr s) (+ h (caddr s))))
 (setvar "osmode" 0 )
 (command "line" s end "")
 (command "chprop" "l" "" "c" 1 "")
 (command "3dpoly")
 (setq i 0)
 (repeat (1+ points)
   (setq fi (* i fi1) h (* i h1) r (+ ri (* i r1)))
   (setq x (* r (cos fi)) y (* spin r (sin fi)))
   (command (list (+ (car s) x) (+ (cadr s) y) (+ (caddr s) h)))
   (setq i (1+ i)))
 (command "")
 (setvar "osmode" old))
(princ "\nRoutine loaded. Type HELIX at the command prompt.")
(princ)
;;;End Copy & Paste

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


J. B. Borge

Expertise

I can answer general questions about Autocad & Solid Works.

Experience

I've been in the 3D/2D CAD industry for over 16 yrs. & also had the opportunity/exposure to work with several mainstream design platforms including Helix Design Systems to Solid Works to Civil 3D.

Education/Credentials
Austin College, Tarrant County College, ITT

Awards and Honors
AUGI Top Dawg Dallas 2004

Past/Present Clients
Freightliner, Mac Trucks, Arctic Cat, Walmart, & Sam's Club

©2012 About.com, a part of The New York Times Company. All rights reserved.