(defun c:rasen () (command "undo" "be")) (setq m (getvar "osmode")) (setq o (getpoint "中心:")) (command "line" o (getdist o "\n半径:") "") (setq h (getdist o "\n高さ:")) (setq p (getint "\n分数:")) (setq s (entlast)) (setvar "osmode" 0) (command "array" s "" "p" o p 360 "y") (setq o s) (setq c 1) (while (< c p) (setq o (entnext o)) (command "move" o "" "0,0,0" (list 0 0 (* (/ h p) c))) (setq c (1+ c)) ) (command "copy" s "" "0,0,0" (list 0 0 h)) (command "3dpoly" (cdr (assoc 11 (entget s)))) (setq o s) (setq c 0) (while (< c p) (setq o (entnext o)) (command (cdr (assoc 11 (entget o)))) (setq c (1+ c)) ) (command "") (command "erase") (setq c 1) (while (< c p) (setq s (entnext s)) (command s) (setq c (1+ c)) ) (command "") (setvar "osmode" m) (command "undo" "e")) (princ) ) |