; JOIST.LSP [Article Figure 3] (c)1990, Barry Bowen ;------------------------- JOIST.LSP ----------------------- ; Copyright Barry R. Bowen 1990 ; VARIABLES: ; ANS = General variable for questions ; BNAME = Block name ; DEPTH = Joist depth ; DIST = End extension length ; JBPT = Joist bearing point ; JLGTH = Joist Partial length for detail ; LGTH = Default bearing length ; PT = See Fig. 5 for all point locations ; SL1 = Selection-set for block ; ---------------------------------------------------------- ; TOOLBOX ROUTINES USED: ; (V3) Start-up routine (Feb '89) ; (V4) Ending routine (Feb '89) ; (D90) Converts 90 degrees to radians (Mar '89) ; (D270) Converts 270 degrees to radians (Mar '89) ; (D45) Converts 45 degrees to radians (Mar '89) ; (E4) Extract DXF code from entity list (Sep '89) ; (CKEXT) Locates the intersection of four points. ; (JSEC) Draws a steel joist in Section. ; This program also uses the routines from the Parametric ; System for Structural Steel Shapes (Feb/Mar '90) ; ; SAMPLE CALL: (JOIST "24K12" 24) ; ; ---------------------------------------------------------- (defun JOIST (BNAME DEPTH / ANS DIST EN1 EN2 JBPT JLGTH ; 1 LGTH PT PT1 PT2 PT3 PT4 PT5 PT6 PT7 PT8 PT9 ; 2 PT10 PT1A PT1B PT5A PT6A PT6B PT9A PT10A ; 3 PT10B SL1) ; 4 (V3) ;Start-up ; 5 (LS "JOIST" "3" "") ;Layer/Color/Linetype routine ; 6 (ZC DEPTH) ;Zoom routine ; 7 (initget 1 "S E") ; 8 (setq SL1 nil ; 9 ANS (getkword "\nection or levation: ")) ;10 (cond ;11 ; ---------------------- Elevation ------------------------- ((= ANS "E") ;12 (initget 1 "C S") ;13 (setq ANS (getkword ;14 "\nBearing on oncrete or teel? ")) ;15 (if (= ANS "S") (setq LGTH 2.5) (setq LGTH 4)) ;16 (setq JBPT (getpoint "\nEdge of Bearing Point: ") ;17 JLGTH (getdist JBPT "\nPartial Length of Joist: "));18 (if (< JLGTH (* 1.75 DEPTH)) (setq JLGTH (* 2 DEPTH))) ;19 (ZC JLGTH) ;20 (initget 1 "N E") ;21 (setq ANS (getkword "\normal or nd Extension: "));22 (if (= ANS "N") ;Normal bearing ;23 (progn (setq PT2 (polar JBPT pi LGTH) ;24 DIST (distance JBPT PT2))) ;25 (progn ;End extension ;26 (setq DIST (getdist JBPT "\nEnd Extension Length: ");27 PT2 (polar JBPT pi DIST))) ;28 ) ;29 ; ------------------ Collect all points -------------------- (setq JLGTH (+ DIST JLGTH) ;30 PT (polar PT2 (D90) 1.25) ;31 PT1 (polar PT2 (D90) 2.5) ;32 PT3 (polar JBPT 0 0.5) ;1/2" clearance ;33 PT4 (polar PT3 (D90) 1.25) ;34 PT5 (polar PT4 pi 2.0) ;35 PT1A (polar PT1 (D270) (- DEPTH 1.25)) ;36 PT1B (polar PT1A 0 JLGTH) ;37 PT5A (polar PT5 5.764688 (* 1.5 DEPTH)) ;38 PT6 (inters PT5 PT5A PT1A PT1B nil) ;39 PT7 (polar PT6 pi 2.0) ;40 PT8 (polar PT7 (D270) 1.25) ;41 PT9 (polar PT1B (D270) 1.25) ;42 PT9A (polar PT1 0 JLGTH) ;43 PT10 (polar PT6 0 1.4375) ;44 PT10A (polar PT10 (D90) (- DEPTH 2.5)) ;45 PT10B (polar PT10A pi (- DEPTH 2.5))) ;46 ; ------------------ Draw in Elevation --------------------- (command "pline" PT4 "W" 0 0 PT3 PT2 PT1 PT9A "" ;47 "pline" PT9 "W" 0 0 PT8 PT7 PT1b "" ;48 "line" PT6 PT5 "" ;49 "break" PT5 "f" (inters PT4 PT3 PT5 PT6 nil) PT5);50 (setq EN2 (entlast)) ;51 (command "line" PT (polar PT 0 jlgth) "" ;52 "copy" EN2 "" "0.7567,0" "") ;53 (CKEXT PT4 PT3 nil) ;Find intersection point ;54 (command "line" PT10 PT10B "") ;55 (setq EN1 (entlast)) ;56 (command "copy" EN1 "" "0.55,0" "") ;57 (setq EN2 (entlast)) ;58 (command "mirror" EN1 "" (polar PT7 0 4.25) ;59 (polar (polar PT7 0 4.25) (D90) 12) "") ;60 (CKEXT PT9 PT9A T) ;Find intersection point ;61 (command "mirror" EN2 "" (polar PT7 0 4.25) ;62 (polar (polar PT7 0 4.25) (D90) 12) "") ;63 (CKEXT PT9 PT9A T) ;Find intersection point ;64 (command "line" (polar PT8 (D90) 0.25) ;65 (polar PT9 (D90) 0.25) "" ;66 "line" (polar PT2 (D90) 0.25) ;67 (polar PT3 (D90) 0.25) "" ;68 "line" (polar PT1 (D270) 0.25) ;69 (polar ;70 (polar PT1 (D270) 0.25) 0 JLGTH) "") ;71 ) ;End Elevation Cond line 12 ;72 ; ----------------------- Section -------------------------- (T (JSEC)) ;Call JSEC ;73 ) ;End Cond line 11 ;74 (RL) ;Restore previous layer ;75 (V4) ;Ending routine ;76 ) ;End DeFun ;77