home *** CD-ROM | disk | FTP | other *** search
- ;************************************************************
- ;* This program to dimension the symbols about a section! *
- ;************************************************************
- (setq st (getstring "\npM or pS? <M>: "))
- (if (or (= st "S") (= st "s")) (progn
- (setq st1 (getstring "\ndirection:(+=CCW; -=CW:) <+>: "))
- (if (= st1 "-") (setq a (/ pi 2)) (setq a (* -1 (/ pi 2))))
- ))
- (scale1)
- (setq n (getint "\nnumber of dim. points: <2>: "))
- (if (null n) (setq n 2))
- (setq st1 (getstring "\nsymbol of section: "))
- (setq pt1 (getpoint "\nthe first dim. point: "))
- (command "layer" "s" 6 "")
- (setq m 1)
- (while (< m n)
- (setq pt2 (getpoint "\nnext point: "))
- (setq a1 (angle pt1 pt2))
- (setq pt3 (polar pt1 (+ a1 pi) (* 8 sca)))
- (setq pt4 (polar pt1 a1 (* 8 sca)))
- (setq pt5 (polar pt2 (+ a1 pi) (* 8 sca)))
- (setq pt6 (polar pt2 a1 (* 8 sca)))
- (if (= m 1)
- (command "pline" pt1 "w" 0.3 0.3 pt3 "")
- (command "pline" pt1 "w" 0.3 0.3 pt4 "")
- )
- (if (= m (1- n))
- (command "pline" pt2 "w" 0.3 0.3 pt6 "")
- (command "pline" pt2 "w" 0.3 0.3 pt5 "")
- )
- (if (or (= st "S") (= st "s")) (progn
- (if (= m 1)
- (command "line" pt3 (polar pt3 (+ a a1) (* sca 3)) ""
- "pline" (polar pt3 (+ a a1) (* sca 3)) "w" (* 1.2 sca) 0
- (polar pt3 (+ a a1) (* sca 10)) "")
- )
- (if (= m (1- n))
- (command "line" pt6 (polar pt6 (+ a a1) (* sca 3)) ""
- "pline" (polar pt6 (+ a a1) (* sca 3)) "w" (* 1.2 sca) 0
- (polar pt6 (+ a a1) (* sca 10)) "")
- )
- ))
- (setq pt9 (getpoint "\nlocation point of text: <RETURN for default>: "))
- (if (null pt9) (setq pt9 (polar pt1 (+ a1 (* 0.5 pi) 0.2) (* sca 8))))
- (command "text" pt9 (* sca 5) 0 st1)
- (if (= m (1- n)) (progn
- (setq pt10 (getpoint "\nlocation point of text: <RETURN for default>: "))
- (if (null pt10) (setq pt10 (polar pt6 (+ a1 (* 0.5 pi) 0.2) (* sca 8))))
- (command "text" pt10 (* sca 5) 0 st1)
- ))
- (setq pt1 pt2 m (1+ m))
- )
- (redraw)
- (cmdprompt)