Приложение "АВТОГРАФ" для автоматизации процесса формирования графического раздела архитектурно-строительной части проекта, страница 21

(setq to slto shzd(+ shzd (/ sprol us)))

)

)

(command "слой" "С" "$OSI" "")

(command "отрезок" lnpo (polar lnpo (dtr 0) dlzd ) "")

(setq ssprol(reverse ssprol))

(setq i 0)

(repeat (1- (length ssprol))

(progn

(command "копируй" "П" "" lnpo (polar lnpo (dtr 90) (nth i ssprol)))

(setq i(1+ i))

))

(command "отрезок" lnpo (polar lnpo (dtr 90) shzd) "")

(setq sskol(reverse sskol))

(setq i 0)

(repeat (1- (length sskol))

(progn

(command "копируй" "П" "" lnpo (polar lnpo (dtr 0) (nth i sskol)))

(setq i(1+ i))

))

; Сброс значений системных переменных

(setvar "BLIPMODE" 0)

(setvar "BLIPMODE" bm)

(setvar "CMDECHO" ce)

(princ)

);======================КОНЕЦ====================================

7.3.10 pbalka.lsp

;=====================ПОДКРАНОВАЯ БАЛКА=====================

(defun C:ПБАЛКА(/ vpbal traz  pbalka mash tvst)

(setq ce (getvar "CMDECHO"))

(setq bm (getvar "BLIPMODE"))

(setvar "CMDECHO" 0)

(setvar "BLIPMODE" 0)

(defun dtr(a)

(* PI (/ a 180.0))

)

;========================Программа==========================

(command "слой" "С" "$BAZA" "")

(initget 7)

(setq traz(getstring"\nРазрез ПРодольный/ПОперечный:"))

(if (eq traz "ПР") (setq r 1))

(if (eq traz "ПО") (setq r 0))

(initget 7)

(setq vpbal(getreal"\nВысота Пбалки,м 0.8/1.0/1.4:"))

(setq mash(/ 100 (getvar "USERR5")))

(setq tvst(getpoint"\nТочка вставки:"))

(setq pbalka(cond

((and (= vpbal 0.8) (= r 0)) "PKBR8_5")

((and (= vpbal 1.0) (= r 0)) "PKBR10_7")

((and (= vpbal 1.4) (= r 0)) "PKBR14_7")

((and (= vpbal 0.8) (= r 1)) "PKB8_5")

((and (= vpbal 1.0) (= r 1)) "PKB10_7")

((and (= vpbal 1.4) (= r 1)) "PKB14_7")

))

(command "вставь" pbalka tvst mash mash (dtr 0))

(setvar "BLIPMODE" bm)

(setvar "CMDECHO" ce)

(princ)

);==========================КОНЕЦ====================================

7.3.11 pferma.lsp

;=====================ФЕРМА ПОДСТРОПИЛЬНАЯ====================

(defun C:ПФЕРМА(/ tfer ferma mash tvst)

(setq ce (getvar "CMDECHO"))

(setq bm (getvar "BLIPMODE"))

(setvar "CMDECHO" 0)

(setvar "BLIPMODE" 0)

(defun dtr(a)

(* PI (/ a 180.0))

)

;========================Программа==========================

(command "слой" "С" "$POKR" "")

(initget 7)

(setq traz(getstring"\nРазрез ПРодольный/ПОперечный:"))

(if (eq traz "ПР") (setq r 1))

(if (eq traz "ПО") (setq r 0))

(initget 7)

(setq ppfer(getint"\nПролет Пфермы,м 12/18:"))

(if (= ppfer 12) (setq t1(getstring"\nПферма Крайняя/Средняя:")))

(setq mash(/ 100 (getvar "USERR5")))

(setq tvst(getpoint"\nТочка вставки:"))

(setq pferma(cond

((and (= ppfer 12) (= r 0) (eq t1 "К")) "PF-12K")

((and (= ppfer 12) (= r 0) (eq t1 "С")) "PF-12C")

((and (= ppfer 18) (= r 0)) "PF-18U")

((and (= ppfer 12) (= r 1)) "PFR-12")

((and (= ppfer 18) (= r 1)) "PFR-18")

))

(command "вставь" pferma tvst mash mash (dtr 0))

(setvar "BLIPMODE" bm)

(setvar "CMDECHO" ce)

(princ)

);===========================КОНЕЦ=================================

7.3.12 pkolp.lsp

;=================Колонны промышленные(план)================

(defun C:ПКОЛП(/ vkol tkol skol rkol pkol mash tvst)

(setq ce (getvar "CMDECHO"))

(setq bm (getvar "BLIPMODE"))

(setvar "CMDECHO" 0)

(setvar "BLIPMODE" 0)

;========================Программа==========================

(command "слой" "С" "$BAZA" "")

(initget 7)