home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p190 / 3.ddi / LSP / PM.LSP < prev    next >
Encoding:
Text File  |  1987-07-15  |  2.1 KB  |  55 lines

  1. ;************************************************************
  2. ;*  This program to dimension the symbols about a section!  *
  3. ;************************************************************
  4. (setq st (getstring "\npM or pS? <M>: "))
  5. (if (or (= st "S") (= st "s")) (progn
  6.    (setq st1 (getstring "\ndirection:(+=CCW; -=CW:) <+>: "))
  7.    (if (= st1 "-") (setq a (/ pi 2)) (setq a (* -1 (/ pi 2))))
  8. ))
  9. (scale1)
  10. (setq n (getint "\nnumber of dim. points: <2>: "))
  11. (if (null n) (setq n 2))
  12. (setq st1 (getstring "\nsymbol of section: "))
  13. (setq pt1 (getpoint "\nthe first dim. point: "))
  14. (command "layer" "s" 6 "")
  15. (setq m 1)
  16. (while (< m n)
  17.    (setq pt2 (getpoint "\nnext point: "))
  18.    (setq a1 (angle pt1 pt2))
  19.    (setq pt3 (polar pt1 (+ a1 pi) (* 8 sca)))
  20.    (setq pt4 (polar pt1 a1 (* 8 sca)))
  21.    (setq pt5 (polar pt2 (+ a1 pi) (* 8 sca)))
  22.    (setq pt6 (polar pt2 a1 (* 8 sca)))
  23.    (if (= m 1)
  24.      (command "pline" pt1 "w" 0.3 0.3 pt3 "")
  25.      (command "pline" pt1 "w" 0.3 0.3 pt4 "")
  26.    )
  27.    (if (= m (1- n))
  28.      (command "pline" pt2 "w" 0.3 0.3 pt6 "")
  29.      (command "pline" pt2 "w" 0.3 0.3 pt5 "")
  30.    )
  31.    (if (or (= st "S") (= st "s")) (progn
  32.       (if (= m 1)
  33.         (command "line" pt3 (polar pt3 (+ a a1) (* sca 3)) ""
  34.                "pline" (polar pt3 (+ a a1) (* sca 3)) "w" (* 1.2 sca) 0 
  35.                        (polar pt3 (+ a a1) (* sca 10)) "")
  36.       )
  37.       (if (= m (1- n))
  38.         (command "line" pt6 (polar pt6 (+ a a1) (* sca 3)) ""
  39.                "pline" (polar pt6 (+ a a1) (* sca 3)) "w" (* 1.2 sca) 0 
  40.                        (polar pt6 (+ a a1) (* sca 10)) "")
  41.       )
  42. ))
  43.    (setq pt9 (getpoint "\nlocation point of text: <RETURN for default>: "))
  44.    (if (null pt9) (setq pt9 (polar pt1 (+ a1 (* 0.5 pi) 0.2) (* sca 8))))
  45.    (command "text" pt9 (* sca 5) 0 st1)
  46.    (if (= m (1- n)) (progn
  47.    (setq pt10 (getpoint "\nlocation point of text: <RETURN for default>: "))
  48.    (if (null pt10) (setq pt10 (polar pt6 (+ a1 (* 0.5 pi) 0.2) (* sca 8))))
  49.    (command "text" pt10 (* sca 5) 0 st1)
  50.    ))
  51.    (setq pt1 pt2 m (1+ m))
  52. )
  53. (redraw)
  54. (cmdprompt)
  55.