关于AUTOLISP的问题
初学AUTOLISP,编了如下的程序,希望的效果是,但实际上总是只有最外面的方形,求修改!(DEFUNC:FQ(/PMTGWWHHP1P2P3P4P5P6P7P8)(SE...
初学AUTOLISP,编了如下的程序,希望的效果是
,但实际上总是只有最外面的方形,求修改!
(DEFUN C:FQ(/ PM TG WW HH P1 P2 P3 P4 P5 P6 P7 P8)
(SETVAR "CMDECHO" 0)
(SETVAR "BLIPMODE" 0)
(SETQ PM (GETPOINT "\n 输入第一点:"))
(SETQ TG (GETREAL "\n 输入窗台高:"))
(SETQ WW (GETREAL "\n 门窗宽度:"))
(SETQ HH (GETREAL "\n 门窗高度:"))
(SETQ P1 (LIST(- (CAR PM) (/ WW 2))(+ (CADR PM) TG)))
(SETQ P2 (POLAR P1 0 WW))
(SETQ P3 (POLAR P2 (/ PI 2) HH))
(SETQ P4 (POLAR P1 (/ PI 2) HH))
(SETQ P5 (LIST(+ (CAR P1) 50)(+ (CADR P1) 50)))
(SETQ P6 (POLAR P5 0 (- WW 100)))
(SETQ P7 (POLAR P6 (/ PI 2) (- HH 100)))
(SETQ P8 (POLAR P5 (/ PI 2) (- HH 100)))
(COMMAND "PLINE" P1 P2 P3 P4 "C")
(COMMAND "PLINE" P5 P6 P7 P8 "C")
(COMMAND "LINE" P1 P5 "")
(COMMAND "LINE" P2 P6 "")
(COMMAND "LINE" P3 P7 "")
(COMMAND "LINE" P4 P8 "")
(PRINC)
)
这是希望出来的效果 展开
,但实际上总是只有最外面的方形,求修改!
(DEFUN C:FQ(/ PM TG WW HH P1 P2 P3 P4 P5 P6 P7 P8)
(SETVAR "CMDECHO" 0)
(SETVAR "BLIPMODE" 0)
(SETQ PM (GETPOINT "\n 输入第一点:"))
(SETQ TG (GETREAL "\n 输入窗台高:"))
(SETQ WW (GETREAL "\n 门窗宽度:"))
(SETQ HH (GETREAL "\n 门窗高度:"))
(SETQ P1 (LIST(- (CAR PM) (/ WW 2))(+ (CADR PM) TG)))
(SETQ P2 (POLAR P1 0 WW))
(SETQ P3 (POLAR P2 (/ PI 2) HH))
(SETQ P4 (POLAR P1 (/ PI 2) HH))
(SETQ P5 (LIST(+ (CAR P1) 50)(+ (CADR P1) 50)))
(SETQ P6 (POLAR P5 0 (- WW 100)))
(SETQ P7 (POLAR P6 (/ PI 2) (- HH 100)))
(SETQ P8 (POLAR P5 (/ PI 2) (- HH 100)))
(COMMAND "PLINE" P1 P2 P3 P4 "C")
(COMMAND "PLINE" P5 P6 P7 P8 "C")
(COMMAND "LINE" P1 P5 "")
(COMMAND "LINE" P2 P6 "")
(COMMAND "LINE" P3 P7 "")
(COMMAND "LINE" P4 P8 "")
(PRINC)
)
这是希望出来的效果 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询