回复 a170285 的帖子
按这个改吧,也是画楼梯的你将左右向加进去就行了 - (defun c:hlt()
- (setvar "cmdecho" 0)
- (setvar "osmode" 0)
- (setq p1 (getpoint "\n插入点:"))
- (setq w (getreal "\n梯宽:"))
- (setq h (getreal "\n梯高:"))
- (setq n (getint "\n级数:"))
- (setq p2 (polar p1 0 w))
- (setq p3 (polar p2 (/ pi 2) h))
- (command "line" p1 p2 p3 "")
- (setq w1 (/ w n))
- (setq h1 (/ h n))
- (setq pa p1)
- (repeat n
- (setq pb (polar pa (/ pi 2) h1))
- (setq pc (polar pb 0 w1))
- (command "line" pa pb pc "")
- (setq pa pc)
- (prin1)))
- (prompt "\n命令:hlt")
|