Search the Community
Showing results for tags 'solid threads'.
-
Hi, I'm trying to create a routine to draw trapezoidal threads in Adcad2000. I don't understand why it does not work. Can someone help me? I really appreciate, hugs. Code: ;Program that subtracts a 'cut entity' of a cylinder, shifts it along ;and turns it to make new cut, "N" times each "M" turns. ;Requirements: horizontal cylinder axle and load of "geom3d.arx" (Acad2000). (DEFUN C:LATHE (/) (Setq AUN (getvar "aunits")) (setvar "aunits" 0) (progn (setq Cylinder (entsel "\nClik the Cylinder to 'lathe': ")) (setq PtoA (GETPOINT "\nClick at START (center) of Cylinder: ")) (setq PtoB (GETPOINT "\nClick at END of Cylinder (center): ")) (setq CutEntity (entsel "\nSelect a 'CUT-ENTITY': ")) (princ "\nTotal Number of TURNS (spiral): ") (setq NTv (getint)) (setq Nv 1) (princ "\nHow many CUTS by TURN (resolution): ") (setq NCv (getint)) (setq Nc 1) (setq Step (/ (distance PtoA PtoB) (* NCv NTv))) (setq AngularStep (/ 360 NCv)) (setq PtoC (polar PtoA (angle PtoA PtoB) Step)) (while (>= NTv Nv) (while (>= NCv Nc) (command "copy" CutEntity "" "0,0,0" "0,0,0") (command "subtract" Cylinder "" CutEntity "") (command "move" Cylinder PtoC PtoA) (command "rotate3d" Cylinder PtoA PtoB AngularStep) (setq Nc (+ Nc 1)) ) (setq Nv (+ Nv 1)) (setq Nc 1) ) ) (setvar "aunits" AUN) )
- 4 replies
-
- spiral
- solid threads
-
(and 2 more)
Tagged with: