- (defun c:Test (/ a b h p c)
- ;; Tharwat. ;;
- (initget 1 "Gray Blue greeN Yellow Red Magenta")
- (if (and (setq h (getkword "\nEnter COLOR [Gray/Blue/greeN/Yellow/Red/Magenta]: "))
- (setq c (nth (vl-position h '("Gray" "Blue" "greeN" "Yellow" "Red" "Magenta")) '(252 5 3 2 1 200)))
- )
- (while (and
- (setq a (getpoint "\nSpecify 1st point :"))
- (setq b (getpoint "\nSpecify 2nd point :" a))
- (entmake (list '(0 . "CIRCLE") (cons 10 (setq p (mapcar '(lambda (q p) (/ (+ q p) 2.)) a b)))
- (cons 40 (/ (distance a b) 2.))
- )
- )
- )
- (command "_-hatch" "Properties" "_Solid" "_COLOR" c "" p "")
- (entmake (list '(0 . "LINE") (cons 10 a) (cons 11 b)))
- )
- )
- (princ)
- )
-
|