TA的每日心情![](source/plugin/dsu_paulsign/img/emot/kx.gif) | 开心 2024-8-31 15:58 |
---|
签到天数: 89 天 [LV.6]常住居民II
管理员
- 积分
- 3366
|
[code](defun c:KM()
(command "layer" "m" "Line" "c" "152" "" "l" "CENTER" """")
(command "layer" "m" "Line" "LW" "0.13" """")
(setq v1 (getvar "cmdecho"))
(setq v2 (getvar "blipmode"))
(setq cly (getvar "clayer"))
(setq v4 (getvar "osmode"))
(setvar "cmdecho" 0)
(setvar "blipmode" 0)
(setq p1 (getpoint "\n输入矩形门的一个角点:"))
(setq p3 (getpoint p1 "\n输入矩形门的另一个角点:"))
(setq x1 (car p1))
(setq y1 (cadr p1))
(setq x3 (car p3))
(setq y3 (cadr p3))
(setq p2 (list x3 y1))
(setq p4 (list x1 y3))
(setq x5 (+ x1 (* 1 (- x3 x1))))
(setq y5 (+ y1 (* 0.5 (- y3 y1))))
(setq p5 (list x5 y5))
(setvar "osmode" 0)
(command "pline" p1 p5 p4 "")
(setvar "cmdecho" v1)
(setvar "blipmode" v2)
(setvar "clayer" cly)
(setvar "osmode" v4)
(princ)
)[/code] |
|