Мульти-вставка блока с автоматическим поворотом и масштабированием
(defun _ru-block-multi-insert-scaled-angle0
(block_name ins_code x_scale y_scale / x y angle_deg)
;|
МУльти-вставка блока с автоматическим поворотом и масштабированием
Код ins_code (1..10) определяет коэффициенты масштабирования и поворот
Эта функция вставляет блоки в аксонометрические схемы. Один
блок может быть вставлен в 10 вариантах
Коды использованы для совместимости с BestIA
|;
(setvar "ATTDIA" 1)
(cond
((= ins_code 1)
(setq x 1
y 1
angle_deg 0.0
) ;_ end of setq
)
((= ins_code 2)
(setq x 1
y 1
angle_deg 180.0
) ;_ end of setq
)
((= ins_code 3)
(setq x 1
y -1
angle_deg 135.0
) ;_ end of setq
)
((= ins_code 4)
(setq x -1
y 1
angle_deg 135.0
) ;_ end of setq
)
((= ins_code 5)
(setq x 1
y -1
angle_deg 90.0
) ;_ end of setq
)
((= ins_code 6)
(setq x -1
y 1
angle_deg 90.0
) ;_ end of setq
)
((= ins_code 7)
(setq x -1
y -1
angle_deg 135.0
) ;_ end of setq
)
((= ins_code 8)
(setq x 1
y 1
angle_deg 135.0
) ;_ end of setq
)
((= ins_code 9)
(setq x -1
y 1
angle_deg 0.0
) ;_ end of setq
)
((= ins_code 10)
(setq x 1
y -1
angle_deg 0.0
) ;_ end of setq
)
(t
(princ "_ru-block-multi-insert-scaled-angle0: Неверный код вставки!"
) ;_ end of princ
(setq x 1
y 1
angle_deg 0.0
) ;_ end of setq
)
) ;_ end of cond
(ru-block-multi-insert-scaled-rotated-or-angleask
block_name
(ru-conv-millimeter-in-paper-to-unit (* x x_scale))
(ru-conv-millimeter-in-paper-to-unit (* y y_scale))
(ru-conv-deg-to-rad angle_deg)
) ;_ end of ru-block-multi-insert-scaled-rotated-or-angleask
(princ)
) ;_ end of defun