Параметрические изображения объектов проектирования на основе использования языка АВТОЛИСП в среде АВТОКАД. Притыкин Ф.Н. - 101 стр.

UptoLike

Составители: 

101
Ответы к задачам главы 3
Задача 3.1 (command "LAYER" "M" "6" "C" "2" "6" "LTYPE"
"center2" "6" "")
Задача 3.2 (SETVAR "DIMASZ" 10.)(SETVAR "DIMTXT" 7.)
(SETVAR "DIMEXE" 4.)(SETVAR "DIMDLI" 1.)
Задача 3.3 (command "line" p1 p5 p4 p3 "" "arc" p1 p2 p3 "circle" p6 r)
Задача 3.4 (sl0)(command "pline" p1 p5 p7 p4 p1 ""
"pline" p6 p2 p3 p8 p6 "" )
(sl1)(command "hatch" "jis_wood" "10" "0" p4 p8 "")
(sl0)(command "line" p5 p6 "" "pline" p7 p8 "")
Задача 3.5 (sl0)(command "line" p1 p2 p3 p4 p1 "" "line" p6 p7 p8 p5 "")
(sl1)(command "horiz" P4 P8 P9 "" "horiz" P1 P8 P10 ""
"vertical" p8 p7 p11 (strcat "%%c" (rtos d1 2 0))
"vertical" p3 p4 p12 (strcat "%%c" (rtos d2 2 0)) "exit")
Ответы к задачам главы 4
Задача 4.1 (foreach l1 (10 20 30 40) (sqrt l1))
Задача 4.2 (setq LL1 (ssget “W” p1 p2))
Задача 4.3 (setq ew1 entlast))
(setq prim1 (entget ew1))
(setq spisok (nth 10 prim1))
Задача 4.4 (setq tt (strcat " - " t11 "-" t12 "-" ) tl (* 5 (strlen tt)
p1 (list 80 100) p2 (polar p1 1.57 h) p3 (polar p2 0 tl)
p4 (polar p1 0 tl) p5 (polar p1 0.78 3)
) (command "line" p1 p2 p3 p4 p1 "")
(command "text" p5 "5" "0" tt )
Задача 4.5 (command "dim" "horiz" p1 p2 p3 (strcat "М" (rtos dr 2 0) "×"
(rtos ss 2 0)) "exit")
                         Ответы к задачам главы 3


• Задача 3.1 − (command "LAYER" "M" "6" "C" "2" "6" "LTYPE"
                             "center2" "6" "") −
• Задача 3.2 − (SETVAR "DIMASZ" 10.)(SETVAR "DIMTXT" 7.)
                (SETVAR "DIMEXE" 4.)(SETVAR "DIMDLI" 1.) −
• Задача 3.3 − (command "line" p1 p5 p4 p3 "" "arc" p1 p2 p3 "circle" p6 r) −
• Задача 3.4 − (sl0)(command "pline" p1 p5 p7 p4 p1 ""
                               "pline" p6 p2 p3 p8 p6 "" )
                (sl1)(command "hatch" "jis_wood" "10" "0" p4 p8 "")
                (sl0)(command "line" p5 p6 "" "pline" p7 p8 "") −
• Задача 3.5 − (sl0)(command "line" p1 p2 p3 p4 p1 "" "line" p6 p7 p8 p5 "")
               (sl1)(command "horiz" P4 P8 P9 "" "horiz" P1 P8 P10 ""
                 "vertical" p8 p7 p11 (strcat "%%c" (rtos d1 2 0))
                 "vertical" p3 p4 p12 (strcat "%%c" (rtos d2 2 0)) "exit") −


                          Ответы к задачам главы 4


• Задача 4.1 − (foreach l1 (10 20 30 40) (sqrt l1)) −
• Задача 4.2 − (setq LL1 (ssget “W” p1 p2)) −
• Задача 4.3 − (setq ew1 entlast))
               (setq prim1 (entget ew1))
               (setq spisok (nth 10 prim1)) −
• Задача 4.4 − (setq tt (strcat " - " t11 "-" t12 "-" ) tl (* 5 (strlen tt)
                     p1 (list 80 100) p2 (polar p1 1.57 h) p3 (polar p2 0 tl)
                     p4 (polar p1 0 tl)     p5 (polar p1 0.78 3)
                  ) (command "line" p1 p2 p3 p4 p1 "")
                   (command "text" p5 "5" "0" tt ) −
• Задача 4.5 − (command "dim" "horiz" p1 p2 p3 (strcat "М" (rtos dr 2 0) "×"
                                  (rtos ss 2 0)) "exit")



                                     101