;;;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: 7-29-2005 ;;; (DEFUN C:WOODFEN () (SETQ osmod (GETVAR "osmode")) (SETVAR "osmode" 0) (SETQ begin "T") (IF dimscl nil (LOAD "dimscl" "\nFile DIMSCL.LSP not loaded! ") ) ;_ end of IF (IF upoint nil (LOAD "upoint" "\nFile UPOINT.LSP not loaded! ") ) ;_ end of if (dimscl) (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)) ) ;_ end of list ) ;_ end of entmake (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") ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 pta3) (CONS 11 pta2) (CONS 8 "0") ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 pta2) (CONS 11 pta4) (CONS 8 "0") ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 pta4) (CONS 11 pta1) (CONS 8 "0") ) ;_ end of list ) ;_ end of entmake (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") ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 pt6) (CONS 11 pt8) (CONS 8 "0") ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 pt8) (CONS 11 pt7) (CONS 8 "0") ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 pt7) (CONS 11 pt9) (CONS 8 "0") ) ;_ end of list ) ;_ end of entmake (ENTMAKE (LIST (CONS 0 "LINE") (CONS 10 pt9) (CONS 11 pt6) (CONS 8 "0") ) ;_ end of list ) ;_ end of entmake (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" ) ;_ end of if " Made\n" ) ;_ end of strcat ) ;_ end of princ (ENTMAKE (LIST (CONS 0 "INSERT") (CONS 2 nblk) (CONS 10 (LIST 0 0 0)) (CONS 8 (GETVAR "clayer")) (CONS 70 1) ) ;_ end of list ) ;_ end of entmake (SETVAR "osmode" osmod) (PRINC) ) ;defun ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 0 0 T T nil T) ;*** DO NOT add text below the comment! ***|;