- UID
- 430592
- 积分
- 233
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2006-4-29
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
; Draw all size door
(defun c:dd(/ ds point1 point2 point3 point4 point5 point6 )
(setq ds (getint "Please input door size:"))
(command "-osnap" "INT")
(setq point1 (getpoint "Pick the nearest point"))
(setq point2 (list (nth 0 point1) (+ 50 (nth 1 point1))))
(setq point3 (list (nth 0 point1) (+ (* ds 100) (nth 1 point1))))
(setq point4 (list (+ 50 (nth 0 point3)) (nth 1 point3)))
(setq point5 (list (+ (- (* ds 100) 50) (nth 0 point4))
(- (nth 1 point4) (- (* ds 100) 50))))
(setq point6 (list (nth 0 point5) (- (nth 1 point5) 50 )))
(command "pline" point1 "W" "0" "" point2 point3 point4 "arc" point5 "line" point6 "")
(setq door (ssget "L"))
(command "rectangle" point2 point4)
(ssadd (entlast) door)
(initget 1 "Rotate Mirror Quit")
(setq input (getkword "Rotate\\Mirror\\Quit:"))
(while (or (= input "Rotate")(= input "Mirror"))
(cond
((= input "Rotate")
(command "rotate" door "" point1 pause ))
((= input "Mirror")
(command "mirror" door "" point1 pause "y"))
)
(initget "Rotate Mirror Quit")
(setq input (getkword "Rotate\\Mirror\\Quit:")))
(setvar "osmode" 33)
)
; Draw all size double door
(defun c:ddd(/ ds point1 point2 point3 point4 point5 point6 point7 point8 point9 )
(setq ds (getint "Please input door size:"))
(command "-osnap" "INT")
(setq point1 (getpoint "Pick the nearest point"))
(setq point2 (list (nth 0 point1) (+ 50 (nth 1 point1))))
(setq point3 (list (nth 0 point1) (+ (* ds 50) (nth 1 point1))))
(setq point4 (list (+ 50 (nth 0 point3)) (nth 1 point3)))
(setq point5 (list (+ (- (* ds 50) 50) (nth 0 point4)) (- (nth 1 point4)
(- (* ds 50) 50))))
(setq point6 (list (+ (- (* ds 50) 50) (nth 0 point5)) (+ (- (* ds 50) 50)
(nth 1 point5))))
(setq point7 (list (+ 50 (nth 0 point6)) (nth 1 point6)))
(setq point8 (list (nth 0 point7) (- (nth 1 point7) (- (* ds 50) 50))))
(setq point9 (list (nth 0 point8) (- (nth 1 point8) 50)))
(command "pline" point1 "W" "0" "" point2 point3 point4 "arc" point5 "angle" "-90"
point6 "line" point7 point8 point9 "")
(setq d-door (ssget "L"))
(command "rectangle" point2 point4 )
(ssadd (entlast) d-door)
(command "rectangle" point6 point8)
(ssadd (entlast) d-door)
(initget 1 "Rotate Mirror Quit")
(setq input (getkword "Rotate\\Mirror\\Quit:"))
(while (or (= input "Rotate")(= input "Mirror"))
(cond
((= input "Rotate")
(command "rotate" d-door "" point1 pause ))
((= input "Mirror")
(command "mirror" d-door "" point1 pause "y"))
)
(initget "Rotate Mirror Quit")
(setq input (getkword "Rotate\\Mirror\\Quit:"))
)
)
这是从本论坛下载的两个画门的程序,一个画单开门,一个画双开门,我想把两个程序合并为一个程序,合并后的程序这样运行,当输入的门宽大于1.1M画双开门,小于1.1M画单开门 |
|