- UID
- 430592
- 积分
- 233
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2006-4-29
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
;;;----------------------------------------------------------------------------
(defun C:yPltD (/ pt1 pt2 pt3 pt4 l p0 n p1 p2 P3 P4 P5 P6 P7 P8 p9 p10 p11 K K1 K2 K3)
(setq pt1 (getpoint "\n右下角点:"))
(setq pt2 (getpoint pt1 "\n左下角点:"))
(setq pt4 (polar pt1 (/ pi 2.0) 1100))
(setq pt3 (polar pt2 (/ pi 2.0) 1100))
(setvar "osmode" 0)
(command "line" pt1 pt2 pt3 pt4 "c")
(setq k (angle pt1 pt2))
(setq L (distance pt1 pt2))
(setq P1 (polar pt2 (/ pi 2.0) 100))
(setq k2 (- k pi))
(setq k3 (+ k (* 0.5 pi)))
(setq P2 (polar p1 k2 (+ L 100)))
(setq P3 (polar p2 K3 200))
(setq P4 (polar p3 k (+ L 200)))
(setq P5 (polar p4 (/ pi 2.0) 1300))
(setq P6 (polar p5 k2 (+ L 200)))
(setq P7 (polar p6 K3 200))
(setq P8 (polar p7 K (+ l 100)))
(command "line" p1 p2 P3 P4 P5 P6 P7 P8 "")
(setq P9 (polar p2 (/ pi 2.0) 450))
(setq P10 (polar P9 k 450))
(setq P11 (polar p10 k 450))
(command "Pline" P9 "W" "0" "" p11 "")
(command "Pline" p10 "W" "70" "0" p11 "")
(setq N (/ L 200))
(setq I 1)
(setq P0 P1)
(while (<= i N)
(setq P1 (polar p0 (/ pi 2.0) 900))
(command "line" p0 p1 "")
(setq p0 (polar p0 k2 200))
(setq I (+ i 1))
(setvar "osmode" 32)
(setq *error* olderr)
(princ)
)
)
这是本人写的画楼梯洞程序,想请高手改进一下,在程序中增加一段创建楼梯图层的语句,程序运行时,自动创建一楼梯图层,画出的图形放在该图层中,完成后返回0层 |
|