|
(defunc:luoxian(/) w& E% O; A2 D( S: @
(setq b1 (getpoint "指定螺旋線基點: "))
: N/ o B! ?8 w (setq r (getreal "請輸入螺紋平均半徑: "))
{7 ~! X1 W- h2 f. @6 n4 ]$ N+ Q" V (setq disp (getreal "請輸入螺紋節距: "))5 j0 E" L, k6 Y0 F
(setq n (getint "請輸入每圈細化數:"))1 m: w% |8 w( }1 k0 z
(setq delta (/ (* 2.0 pi) n))6 ^2 H) K. \' Q, {0 `) l: k
(setq j (/ disp n)). ~0 e3 T# e1 k# S, k8 w0 }
(setq bb (caddr b1))6 c4 J9 a: R1 P
(setq and 0)4 k' d/ Q8 m: r! U. D1 j! D
(setq jj 0)
5 d% ^* }" F3 T$ p (command "ucs" "0" b1)) U$ r( T/ F1 j, K7 \" N
(command "3dpoly" (list r 0 0))
5 v3 X8 @7 t* r! J (repeat n
7 A# R8 [0 a. _9 ^, j% o (setq jj (+ jj)), T( S9 b9 E L& E2 I
(setq ang (+ delta ang)) W V$ `7 ^9 f. F2 u' I. c
(setq pt2 (list (* r (cos ang)) (* r (sin ang)) (+ 0 * (j jj))))
) i% @# y2 e8 w, _/ I6 @ (command pt2)
# q8 d8 h- `4 {7 W/ k )6 I! I& m: P4 Z Z
(command "")
; _7 p w, ] W. d" w), D/ _$ L4 m _% F
2 o! n0 w: @; S" L {
;; 补了多处空格
" g' e+ M4 z' }- r9 P5 D! p;; 但这句改不出来 (setq pt2 (list (* r (cos ang)) (* r (sin ang)) (+ 0 * (j jj))))
- _9 {7 `, _1 [: M" O; n7 v4 [! a6 V;; 这个肯定是错的 ====> (+ 0 * (j jj)) |
|