pete
/
psc
1
0
Fork 0

CODE REVISIONS PER 2024/04/04 MEETING

- Changes to fab18 template:
  background fill enabled for all 1x fractional dimensions
  added dimension style 1xfractional_hr
- all dimensions now have background fill enabled
- dimensions at handrail are inline with pipe and have no ticks or lines
- section arrow has been removed, views will not be labeled
- rise/run square display is removed
- cap notes for posts and mid-lines are included in sheet notes
- template scale of 18 has replaced 24
master
Dennis Dreischmeyer 1 month ago
parent 11fe246123
commit 278a0533d2

Binary file not shown.

@ -45,6 +45,7 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
"util/object/dimension.lsp"
) ;_ quoted-list
) ;_ psc-include
(setvar 'luprec 4)
(defun hor-dim (p1 p2)
(vla-put-layer-r
(vla-AddDimRotated blk
@ -74,18 +75,17 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
) ;_ cond
) ;_ defun inv-xpt
(setq
ins (?? ins '(48.0 120.0))
ins (?? ins '(36.0 90.0))
cane-p (zerop (read guard_sty))
post-p (= 'X11 (read lpost_con))
side-p (and (not cane-p) (not post-p))
piece-mark (?? piece-mark (next-mark-prefix))
) ;_ setq
(if side-p
(vla-put-color
(vla-put-layer-r
(add-polyline modelspace ins
(#! '((-12 0) (#(+ guard_lng 60) 0)))
(#! '((-12 0) (#(+ guard_lng 48) 0)))
nil
) ;_ add-polyline modelspace
"hidden"
@ -147,7 +147,7 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(defun dim-guard-front-post ( / t-lng)
(setq t-lng (/ (- guard_lng 1.5) 2.0))
(setq dim-y (+ guard_hgt 9.0))
(setq dim-y (+ guard_hgt (* 2 dimspace)))
(hor-dim
(list t-lng guard_hgt)
(list 0 (- guard_hgt 3))
@ -156,7 +156,7 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(list (- guard_lng t-lng) guard_hgt)
(list guard_lng (- guard_hgt 3))
) ;_ hor-dim
(setq dim-y (+ dim-y 6.0))
(setq dim-y (+ dim-y dimspace))
(hor-dim
(list 0 (- guard_hgt 3))
(list guard_lng (- guard_hgt 3))
@ -187,11 +187,6 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(list 0 (- guard_hgt 34))
'((0 0) (1 0) (1 -3) (2 -3))
) ;_ add-mat-lst
(add-mleader blk
(list (/ guard_lng -2.0) 0)
'((0 0) (0 -2) (3 -2))
"CAP ENDS TYP."
) ;_ add-mleader
) ;_ defun dim-guard-front-post
(defun dim-guard-front-cane ( / bpl)
@ -252,82 +247,55 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(add-marks-front-cane)
) ;_ defun dim-guard-front-cane
(defun dim-guard-front-std ( / ang-dim add-r/r k-spc)
(defun ang-dim (pt1 pt2 con / pt0 an1 an2 pt3)
(defun dim-guard-front-std ( / ang-dim)
(defun ang-dim (pt1 pt2 con / pt0 an1)
(setq pt0 (list (if (= con 'hrl_con) 0 guard_lng) guard_hgt))
(setq pt1 (inv-xpt pt1))
(setq pt2 (inv-xpt pt2))
(setq an1 (angle pt2 pt1))
(setq an2 (if (= 'hrl_con con) 1.0 -1.0))
(setq an2 (* an2 (if (= (read (eval con)) 'X13) 0.5 1.5)))
(setq an2 (+ (* pi an2) an1))
(setq pt3 (polar pt1 an2 9.0))
(add-r/r pt2 con)
(set-active-dimstyle "1xFRACTIONAL")
(hor-dim pt0 (inv-xpt pt1))
(setq pt1 (3dpt pt1) pt2 (3dpt pt2) pt3 (3dpt pt3))
(tog-bg-fill (vla-AddDimRotated blk pt1 pt2 pt3 an1))
(set-active-dimstyle "1xFRACTIONAL_HR")
(setq pt1 (3dpt pt1) pt2 (3dpt pt2))
(vla-AddDimRotated blk pt1 pt2 pt1 an1)
) ;_ defun ang-dim
(defun add-r/r (ins con / add-txt u/d l/r mir ang ris obl)
(defun add-txt (str off / obj)
(setq obj (add-text blk (mapcar '+ ins off) str 1.875 1 'left))
(add-to-list 'obl obj)
) ;_ defun add-txt
(setq u/d (if (= (read (eval con)) 'X13) 'u 'd))
(setq l/r (read (substr (vl-symbol-name con) 3 1)))
(setq mir (member (list u/d l/r) '((u l) (d r))))
(setq ang (if (= u/d 'd) an1 an2))
(setq ins (polar ins ang (if (= u/d 'd) -4.5 15.0)))
(add-to-list 'obl
(add-polyline blk ins '((0 0) (0 -7) (11 -7)) nil)
) ;_ add-to-list
(setq ang (if (= con 'hrl_con) hrl_ang hrr_ang))
(setq ris (* 11.0 (tan (dtr ang))))
(map-apply 'add-txt
(list
(list "11" '(3.5 -10.0))
(list (rtos ris 2 2) '(-6.75 -4.5))
(list (strcat (to-string ang) "%%d") '(2.0 -4.5))
) ;_ list
) ;_ map-apply
(if mir (foreach obj obl (mirror&delete obj ins 'Y)))
) ;_ defun add-r/r
(setq cen (car cen))
(repeat num-mid
(add-to-list 'dim-x (+ 1.5 clr-dst (?f (last dim-x))))
) ;_ repeat
(mapcar! '(lambda (x) (list x (- guard_hgt 1.5))) 'dim-x)
(setq dim-y (+ guard_hgt 9.0))
(setq dim-y (+ guard_hgt (* 2 dimspace)))
(while dim-x
(hor-dim (car dim-x) (mapcar '+ (car dim-x) '(1.5 0.0)))
(setq dim-x (cdr dim-x))
) ;_ while
(set-active-dimstyle "1xFRACTIONAL_HR")
(if (member (read (?s hrl_con)) '(X13 X14))
(ang-dim (cadr cen) (car cen) 'hrl_con)
) ;_ if
(if (member (read (?s hrr_con)) '(X13 X14))
(ang-dim (cadr (reverse cen)) (last cen) 'hrr_con)
) ;_ if
(cond
( (and cen (member (read hrl_con) '(X13 X14 X15)))
(setq dim-y (- (cadadr cen) 9.0))
(tog-bg-fill
(hor-dim (cadr cen) (caddr cen))
) ;_ tog-bg-fill
) ;_ condif
( (and cen (member (read hrr_con) '(X13 X14 X15)))
(setq dim-y (- (cadadr cen) 9.0))
(tog-bg-fill
(hor-dim (car cen) (cadr cen))
) ;_ tog-bg-fill
) ;_ condif
( (= T) (list) )
) ;_ cond
( (lambda (dim-y)
(cond
( (and cen (member (read hrl_con) '(X13 X14 X15)))
(hor-dim (cadr cen) (caddr cen))
) ;_ condif
( (and cen (member (read hrr_con) '(X13 X14 X15)))
(hor-dim (car cen) (cadr cen))
) ;_ condif
( (= T) (list) )
) ;_ cond
) ;_ lambda
(if cen (cadadr cen))
) ;_ lambda-func
(set-active-dimstyle "1xFRACTIONAL")
(repeat (1+ num-mid)
(add-to-list 'dim-x (+ 1.5 (?f (last dim-x))))
(add-to-list 'dim-x (+ clr-dst (last dim-x)))
) ;_ repeat
(mapcar! '(lambda (x) (list x (- guard_hgt 1.5))) 'dim-x)
(setq dim-y (+ guard_hgt 15.0))
(setq dim-y (+ dim-y dimspace))
(hor-dim
(list 1.5 (- guard_hgt 1.5))
(list 0 guard_hgt)
@ -340,37 +308,20 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(list (- guard_lng 1.5) (- guard_hgt 1.5))
(list guard_lng guard_hgt)
) ;_ hor-dim
(setq dim-y (+ guard_hgt 21.0))
(setq dim-y (+ dim-y dimspace))
(hor-dim
(list 0 guard_hgt)
(list guard_lng guard_hgt)
) ;_ hor-dim
(if (= 400 (read guard_sty))
( (lambda ( / obj pt1 pt2 ins)
(setq
k-spc (rail-calc-picket-spacing clr-dst)
dim-x (- guard_lng 1.5) dim-y (- guard_hgt 29.75)
pt1 (list dim-x dim-y) pt2 (list (- dim-x k-spc) dim-y)
obj (tog-bg-fill (hor-dim pt1 pt2))
ins (variant-value (vla-get-textposition obj))
ins (car (vlax-safearray->list ins))
ins (list ins (- (cadr pt1) 2.5))
obj (add-mtext blk ins "(TYP.)" 6.0 'middlecenter)
) ;_ setq
(setpropertyvalue (vlobj>ename obj) "backgroundfill" 1)
( (lambda ( / dim-x dim-y)
(setq dim-x (- guard_lng 1.5) dim-y (- guard_hgt 29.75))
(set-active-dimstyle "1xFRACTIONAL_TYP")
(hor-dim (list (- dim-x pick-spc) dim-y) (list dim-x dim-y))
(set-active-dimstyle "1xFRACTIONAL")
) ;_ lambda
) ;_ lambda-func
) ;_ if
(if side-p
(progn
(add-text blk '(-8 -10.0) "A" 1.875 1 'middlecenter)
(add-polyline blk '(-4.5 -12.0) '((0 -1) (0 11)) nil)
(vla-SetWidth
(add-polyline blk '(-4.5 -12.0) '((-5 0) (-2 0) (1 0)) nil)
0 0 1
) ;_ vla-SetWidth
) ;_ progn
) ;_ if
(add-marks-front-std)
) ;_ defun dim-guard-front-std
@ -454,23 +405,23 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(progn
(add-mat-lst "rail-c"
(list (- 3.0) guard_hgt)
'((0 0) (0 6) (8 6))
'((0 0) (0 4.5) (6 4.5))
) ;_ add-mat-lst
) ;_ progn
(progn
(add-mat-lst "rail-c"
(list (- (- guard_lng 3.0)) guard_hgt)
'((0 0) (0 6) (-8 6))
'((0 0) (0 4.5) (-6 4.5))
) ;_ add-mat-lst
) ;_ progn
) ;_ if
(add-mat-lst "l-post"
(list 0 (- guard_hgt 24.0))
'((0 0) (2 0) (2 -6) (4 -6))
(list 0 (- guard_hgt 18.0))
'((0 0) (2 0) (2 -4) (4 -4))
) ;_ add-mat-lst
(add-mat-lst "r-post"
(list (- guard_lng) (- guard_hgt 24.0))
'((0 0) (-2 0) (-2 -6) (-4 -6))
(list (- guard_lng) (- guard_hgt 18.0))
'((0 0) (-2 0) (-2 -4) (-4 -4))
) ;_ add-mat-lst
(if (member (cadr con) '(12 52))
(progn
@ -484,7 +435,7 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(progn
(add-mat-lst "m-post"
(list (- (- guard_lng 1.5 clr-dst)) (- guard_hgt 3.0))
'((0 0) (-2 0) (-2 9) (-3 9))
'((0 0) (-2 0) (-2 6) (-3 6))
) ;_ add-mat-lst
) ;_ progn
) ;_ if
@ -494,8 +445,8 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
) ;_ condif
( (= sty 300)
(add-mat-lst "t-fill"
(list (- (- guard_lng 3.0)) (- guard_hgt 36.75))
'((0 0) (0 1) (-6 1))
(list (- (- guard_lng 3.0)) (- guard_hgt 31.5))
'((0 0) (0 1.5) (-6 1.5))
) ;_ add-mat-lst
) ;_ condif
( (= sty 400)
@ -508,37 +459,29 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
) ;_ not
(add-mat-lst "rail-h"
(list -3.0 (- guard_hgt 35.75))
'((0 0) (0 1.5) (6.0 1.5))
'((0 0) (0 3) (6 3))
) ;_ add-mat-lst
) ;_ if
(add-mat-lst "k-fill"
(list (- (- guard_lng 1.5 k-spc)) (- guard_hgt 34.25))
'((0 0) (-1.5 0) (-1.5 -4.5) (-6.0 -4.5))
(list (- (- guard_lng 1.5 pick-spc)) (- guard_hgt 34.25))
'((0 0) (-1.5 0) (-1.5 -4.5) (-7.5 -4.5))
) ;_ add-mat-lst
) ;_ condif
( (= T) (list))
) ;_ cond
(if (= "1" guard_hand)
(if (= 'X13 (read hrl_con))
(progn
(add-mat-lst "h-rail"
(list (- (- guard_lng 4.5)) (+ (cadadr cen) 0.83))
(if (< sty 300)
'((0 0) (0 15) (-7.5 15))
'((0 0) (0 12) (-7.5 12))
) ;_ if
) ;_ add-mat-lst
) ;_ progn
(progn
( (lambda (x-ins k-off x-off y-off)
(add-mat-lst "h-rail"
(list -4.5 (+ (cadadr cen) 0.83))
(if (< sty 300)
'((0 0) (0 15) (7.5 15))
'((0 0) (0 12) (7.5 12))
) ;_ if
(list (- (+ x-ins k-off)) (+ (cadadr cen) 0.83))
(#! '((0 0) (0 #y-off) (#x-off #y-off)))
) ;_ add-mat-lst
) ;_ progn
) ;_ if
(add-mat-lst "z-brkt" nil nil)
) ;_ lambda
(if (= 'X13 (read hrl_con)) (- guard_lng 4.5) 4.5)
(cond ( (/= sty 400) 0) ( (= 'X13 (read hrl_con)) 1.5) (-1.5))
(if (= 'X13 (read hrl_con)) -7.5 7.5)
(if (= sty 200) 12.75 10.5)
) ;_ lambda-func
) ;_ if
(if (= guard_kick "1")
(progn
@ -555,7 +498,10 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(add-marks-front-con)
) ;_ defun add-marks-front-std
(defun add-marks-front-200 ( / p-off y-lst)
(defun add-marks-front-200 ( / h-fill-p p-off y-lst)
(defun h-fill-p (con off)
(and (= sty 200) (= 'X13 (read (?s con))) (<= (+ 1.25 off) -3.5))
) ;_ defun h-fill-p
(defun p-off (pt) (mapcar '+ pt (?? ins '(0 0 0))))
(setq y-lst (filter def '(member '("type" "pipe") (car x))))
(setq y-lst (remove y-lst '(member '("handrail" "1") (car x))))
@ -565,58 +511,37 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
) ;_ lambda
'y-lst
) ;_ mapcar
(progn (sort! 'y-lst '<) (if (= sty 200) (setq y-lst (cdr y-lst))))
;;; hss infill
(if (= sty 200)
(if (= 'X13 (read (?s hrl_con)))
(progn
( (lambda (x-ins x-off)
(add-mat-lst "rail-h"
(list (- (- guard_lng 3.0)) (- guard_hgt 4.5))
'((0 0) (0 7.5) (-6.0 7.5))
(list x-ins (- guard_hgt 4.5))
(#! '((0 0) (0 6.0) (#x-off 6.0)))
) ;_ add-mat-lst
) ;_ progn
(progn
(add-mat-lst "rail-h"
(list -3.0 (- guard_hgt 4.5))
'((0 0) (0 7.5) (6.0 7.5))
) ;_ add-mat-lst
) ;_ progn
) ;_ if
) ;_ lambda
(if (= 'X13 (read (?s hrl_con))) (- (- guard_lng 3)) -3)
(if (= 'X13 (read (?s hrl_con))) -6 6)
) ;_ lambda-func
) ;_ if
;;; non-hrail pipe
(add-mat-lst "p-fill"
(list (- (- guard_lng 3.0)) (- (apply 'min y-lst) 0.83))
(if (= sty 100)
'((0 0) (0 -15) (-6 -15))
'((0 0) (0 -1) (-6 -1))
) ;_ if
(list (- (- guard_lng 3.0)) (- (car y-lst) 0.83))
(if (= sty 100) '((0 0) (0 -6) (-6 -6)) '((0 0) (0 -1.5) (-6 -1.5)))
) ;_ add-mat-lst
;;; triangle fill left
(if
(and
(= sty 200)
(= 'X13 (read (?s hrl_con)))
(<= (+ 1.25 hrl_off) -3.5)
) ;_ and
(progn
(add-mat-lst "h-fill"
(list -4.25 (+ (apply 'max y-lst) 4.625))
'((0 0) (-0.25 0.4375) (5 3.375) (17 4.375))
) ;_ add-mat-lst
) ;_ progn
(if (h-fill-p hrl_con hrl_off)
(add-mat-lst "h-fill"
(list -4.25 (+ (last y-lst) 4.625))
'((0 0) (-0.25 0.4375) (5 3.375) (17 4.375))
) ;_ add-mat-lst
) ;_ if
;;; triangle fill right
(if
(and
(= sty 200)
(= 'X13 (read (?s hrr_con)))
(<= (+ 1.25 hrr_off) -3.5)
) ;_ and
(progn
(add-mat-lst "h-fill"
(list (- (- guard_lng 4.25)) (+ (apply 'max y-lst) 4.625))
'((0 0) (0.25 0.4375) (-5 3.375) (-17 4.375))
) ;_ add-mat-lst
) ;_ progn
(if (h-fill-p hrr_con hrr_off)
(add-mat-lst "h-fill"
(list (- (- guard_lng 4.25)) (+ (last y-lst) 4.625))
'((0 0) (0.25 0.4375) (-5 3.375) (-17 4.375))
) ;_ add-mat-lst
) ;_ if
) ;_ defun add-marks-front-200
@ -694,14 +619,14 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
(defun draw-guard-side (ins / off blk)
(setq
off (list (+ guard_lng 48.0) 0.0)
off (list (+ guard_lng 36.0) 0.0)
blk (guard-section "l" (mapcar '+ ins off))
) ;_ setq
) ;_ defun draw-guard-side
(defun draw-guard-top (ins / off ins blk)
(setq
off (list guard_lng (+ guard_hgt 48.0))
off (list guard_lng (+ guard_hgt 36.0))
blk (draw-guard dat (mapcar '+ ins off))
) ;_ setq
(vla-put-rotation blk pi)
@ -773,7 +698,7 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
( (= ref "s-guss")
'( ("ref" #ref)
("qty" 4) ("desc" "FLAT BAR 1/4 x 2")
("length" #(rtos t-lng 5 5))
("length" #(rtos t-lng 5 5)) ("typ" T)
) ;_ quoted-list
) ;_ condif
;;; cane frame
@ -793,7 +718,7 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
;;; cane horz
( (= ref "cane-h")
'( ("ref" #ref) ("dtl" "cope-2")
("qty" #(1+ num-mid)) ("desc" "PIPE 1 1/4 DIA (1.66 OD) x 0.140")
("qty" 1) ("desc" "PIPE 1 1/4 DIA (1.66 OD) x 0.140")
("length" #(rtos (- cen-dst 0.75) 5 5))
) ;_ quoted-list
) ;_ condif
@ -927,6 +852,11 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
("length" #(rtos tab-lng 5 5))
) ;_ quoted-list
) ;_ condif
( (= ref "z-brkt")
'( ("ref" #ref)
("qty" #(+ num-mid 2)) ("desc" "PSC Z-BRACKET")
) ;_ quoted-list
) ;_ condif
( (= T) (#! '( ("NULL" #ref))) )
) ;_ cond
) ;_ macro-expand
@ -943,7 +873,7 @@ Essentially a composition of %make-generic-fab and %fab-combine-guards"
'(lambda (ldr / mark obj)
(setq mark (xd-value "mark" dat))
(if (and (xd-value "typ" dat) (> (xd-value "qty" dat) 1))
(setq mark (strcat mark " (TYP.)"))
(setq mark (strcat mark " TYP"))
) ;_ if
(if (= "wgnr-p" (xd-value "ref" dat))
(setq mark (add-flg (strcat "\n" mark)))

@ -124,10 +124,10 @@
dwgno template piece-mark obj assemblies clayer dwg-width
dwg-height mat-table hdw-table ass-table row galv-p
std-hole-dia part-details tmp notes notes-loc notes-width
dimspace error-p fab-p style sigil )
dimspace error-p fab-p style sigil dwt-scale)
"Creates a generic fab drawing in the current folder
DATA is the data list of properties and ENT-TYPE is either 'stair or 'land."
DATA is the data list of properties and ENT-TYPE is either 'stair 'land or 'guard."
(declare (vars (data list)
(ent-type sym (member ent-type '(stair land guard)))))
;; inhibit legacy allload.lsp
@ -149,19 +149,21 @@ DATA is the data list of properties and ENT-TYPE is either 'stair or 'land."
(xd-value "bot_hdw" data))))))
(if (= ret 0) 0.6875 ret)))
(if galv-p 0.75 0.6875))
notes (strcat "{\\LSHOP NOTES}:\n"
"1. ALL MATERIAL TO BE ASTM-A36\n"
"2. GRIND BURRS & ROUGH EDGES SMOOTH\n"
((lambda(/ hole-str)
(setq hole-str (strcat "3. ALL OPEN HOLES TO BE "
(frac std-hole-dia)
"\"%%c U.N.O.\n"))
(if galv-p
(strcat hole-str "4. HOT DIP GALVANIZE AFTER FAB")
(strcat hole-str
(if (begins-with (xd-value "finish" data) "Bare")
""
"4. SHOP PRIME PAINT AFTER FAB"))))))
notes ( (lambda ( / i)
(defun num-lst () (strcat (itoa (setq i (1+ (?n i)))) ". "))
(strcat
"{\\LSHOP NOTES}:\n"
(num-lst) "ALL MATERIAL TO BE ASTM-A36\n"
(num-lst) "GRIND BURRS & ROUGH EDGES SMOOTH\n"
(if (= ent-type 'guard) (strcat (num-lst) "CAP ALL POSTS AND MIDLINE PIPES U.N.O.\n") "")
(num-lst) "ALL OPEN HOLES TO BE " (frac (?n std-hole-dia)) "\"%%c U.N.O.\n"
(cond
( (begins-with (to-string (xd-value "finish" data)) "Bare") "")
( galv-p (strcat (num-lst) "HOT DIP GALVANIZE AFTER FAB\n"))
( T (strcat (num-lst) "SHOP PRIME PAINT AFTER FAB\n"))
) ;_ cond
) ;_ strcat
) ) ;_ lambda
fab-p T)
(cond ((= ent-type 'stair)
@ -174,13 +176,14 @@ DATA is the data list of properties and ENT-TYPE is either 'stair or 'land."
notes-width 90
style "STAIRS"))
((= ent-type 'guard)
(setq template "fab/fab24.dwt"
(setq dwt-scale 18
template (strcat "fab/fab" (itoa dwt-scale) ".dwt")
piece-sigil "GR"
sigil "GR"
dwg-width 398
dwg-height 254
notes-width 60
notes-loc (list 240 24)
dwg-width (- (* 17.0 dwt-scale) 10)
dwg-height (- (* 11.0 dwt-scale) 10)
notes-width (* dwt-scale 2.5)
notes-loc (list (* dwt-scale 10) (+ dwt-scale 1.5))
style "GUARD RAILS"))
((= ent-type 'land)
(setq template "fab/fab21.dwt"

Loading…
Cancel
Save