;Place a custom linetype as an anonymous block. (uses UPOINT) ; The block entity is not placed in ; the drawing until the user terminates the input with a return ; supplied to the "next point" prompt. Size of the graphic elements ; is determined by the dimscale. If the user matches the dimscale ; with the drawing scale the graphics will scale the same on all ; drawings. The linetype consists of equally spaced squares (nearest ; to 1/2" spacing at scale for the length of arc or line) and lines ; between them that do not touch. If the variable modf = "EXST" the ; circle radius is 0.03125 x dimscale, if not it is 0.0469 x dimscale. ; ; AUTHOR: HENRY C. FRANCIS ; 425 N. ASHE ST. ; SOUTHERN PINES, NC 28387 ; ; All rights reserved without prejudice. ; ; Copyright: 6-7-95 ; Edited: 4-25-96 ; (DEFUN C:WOODFEN ( ) (setq osmod (getvar"osmode")) (setvar "osmode" 0) (setq begin "T") (setq dimsc (getvar"dimscale")) (if (eq modf "EXST") (setq cirad (* dimsc 0.044)) (setq cirad (* dimsc 0.066)) );if (if (eq modf "EXST") (setq pt1 (upoint 0 "" "Existing Fence beginning point" nil nil)) (setq pt1 (upoint 0 "" "Proposed Fence beginning point" nil nil)) );if (entmake (list (cons 0 "BLOCK") (cons 70 1) (cons 2 "*U") (cons 10 (list 0 0 0)) ) ) (while (setq pt2 (upoint 0 "" "Next fence point" nil pt1)) (setq fenl (distance pt1 pt2) count (1+(fix(/ fenl (* dimsc 0.5)))) cispc (/ fenl count) );setq (while (> count 0) (setq langl (angle pt1 pt2) lang2 (+ langl (* pi 0.25)) lang3 (+ langl (* pi 0.75)) pt3 (polar pt1 langl (* dimsc 0.0625)) pt4 (polar pt1 langl cispc) pt5 (polar pt4 (+ langl pi) (* dimsc 0.0625)) pt6 (polar pt4 lang2 cirad) pt7 (polar pt4 (+ pi lang2) cirad) pt8 (polar pt4 lang3 cirad) pt9 (polar pt4 (+ pi lang3) cirad) pta1 (polar pt1 lang2 cirad) pta2 (polar pt1 (+ pi lang2) cirad) pta3 (polar pt1 lang3 cirad) pta4 (polar pt1 (+ pi lang3) cirad) );setq (if begin (progn (entmake (list (cons 0 "LINE") (cons 10 pta1) (cons 11 pta3) (cons 8 "0") ) ) (entmake (list (cons 0 "LINE") (cons 10 pta3) (cons 11 pta2) (cons 8 "0") ) ) (entmake (list (cons 0 "LINE") (cons 10 pta2) (cons 11 pta4) (cons 8 "0") ) ) (entmake (list (cons 0 "LINE") (cons 10 pta4) (cons 11 pta1) (cons 8 "0") ) ) (grdraw pta1 pta3 7) (grdraw pta3 pta2 7) (grdraw pta2 pta4 7) (grdraw pta4 pta1 7) (setq begin nil) );progn );if (entmake (list (cons 0 "LINE") (cons 10 pt3) (cons 11 pt5) (cons 8 "0") ) ) (entmake (list (cons 0 "LINE") (cons 10 pt6) (cons 11 pt8) (cons 8 "0") ) ) (entmake (list (cons 0 "LINE") (cons 10 pt8) (cons 11 pt7) (cons 8 "0") ) ) (entmake (list (cons 0 "LINE") (cons 10 pt7) (cons 11 pt9) (cons 8 "0") ) ) (entmake (list (cons 0 "LINE") (cons 10 pt9) (cons 11 pt6) (cons 8 "0") ) ) (grdraw pt3 pt5 7) (grdraw pt6 pt8 7) (grdraw pt8 pt7 7) (grdraw pt7 pt9 7) (grdraw pt9 pt6 7) (setq pt1 pt4 count (1- count) );setq );while );while (setq nblk (entmake (list (cons 0 "endblk")))) (princ (strcat "\nBlock "(if nblk nblk "NOT")" Made\n")) (entmake (list (cons 0 "INSERT") (cons 2 nblk) (cons 10 (list 0 0 0)) (cons 8 (getvar"clayer")) (cons 70 1) ) ) (setvar "osmode" osmod) (princ) );defun