;; SwaMiti Surface Development Tool for Box Stiffener with Top Closed and Bottom Open, Visit www.swamiti.com for more ;;; BOXSTIFF2 - closed top / open inclined bottom, three bends, version 1.0 ;;; W,D,L: outside finished dimensions, mm. Open back attaches to support. ;;; L: highest top at support to lowest bottom at FRONT outside face. ;;; Both slopes FROM HORIZONTAL, RISING from front toward the support. ;;; Side bends: 90 deg; top bend rotation: 90 minus top slope. ;;; No bottom flap, radius, setback, allowance or weld clearance is applied. ;;; Bottom cut is developed at the OUTSIDE surface through the side radii; ;;; neutral-axis bend widths use R+K*t. Full-thickness cut bevel is not modeled. ;;; Top flap uses the same stepped, open-corner weld relief as BOXSTIFF1. (defun bs2:tan (ang) (/ (sin ang) (cos ang))) (defun bs2:get (key data) (cadr (assoc key data))) (defun bs2:calc (w d len thick radius alpha beta k gap / at ab ro rn tt st bat bas w0 hv h0 side et nt fw qt0 qt1 qb0 qb1 n) (setq at (/ (* alpha pi) 180.0) ab (/ (* beta pi) 180.0) ro (+ radius thick) rn (+ radius (* k thick)) tt (- (/ pi 2.0) at) st (* ro (bs2:tan (/ tt 2.0))) bat (* rn tt) bas (* rn (/ pi 2.0)) w0 (- w (* 2.0 ro)) hv (- len (* d (bs2:tan at))) h0 (- hv st) side (- d ro) et (+ bat (- (/ d (cos at)) st)) nt (+ bat (- (/ ro (cos at)) st)) fw (- w (* 2.0 (+ thick gap))) qb0 (* ro (bs2:tan ab)) qb1 (* d (bs2:tan ab)) qt0 (- len (* (- d ro) (bs2:tan at)) (/ (+ thick gap) (cos at))) qt1 (- len (/ (+ thick gap) (cos at))) n (max 18 (1+ (fix (* (/ pi 2.0) (sqrt (/ qb0 0.08))))))) (list (list 'w w) (list 'd d) (list 'len len) (list 't thick) (list 'r radius) (list 'alpha alpha) (list 'beta beta) (list 'k k) (list 'gap gap) (list 'ro ro) (list 'rn rn) (list 'st st) (list 'bat bat) (list 'bas bas) (list 'w0 w0) (list 'hv hv) (list 'h0 h0) (list 'side side) (list 'et et) (list 'nt nt) (list 'fw fw) (list 'qb0 qb0) (list 'qb1 qb1) (list 'qt0 qt0) (list 'qt1 qt1) (list 'flatw (+ w0 (* 2.0 (+ bas side)))) (list 'flath (+ h0 et)) (list 'n n) (list 'curve-error (/ (* qb0 (/ pi (* 2.0 n)) (/ pi (* 2.0 n))) 8.0)))) (defun bs2:reason (g / gap h a) (setq gap (bs2:get 'gap g) h (bs2:get 'h0 g) a (bs2:get 'w0 g)) (cond ((<= a (* 2.0 gap)) "W is too small for the side radii and top corner reliefs.") ((<= (bs2:get 'side g) 0.0) "D must exceed the outside radius R+t.") ((<= h gap) "L is too short for the top slope, radius and relief.") ((<= (bs2:get 'fw g) 0.0) "The top closure has no positive width.") ((< (bs2:get 'nt g) (bs2:get 'bat g)) "Top flap widening would enter its bend zone.") ((>= (bs2:get 'qb0 g) (- h gap)) "The open bottom cut reaches the top side-bend relief.") ((<= (bs2:get 'qt0 g) (bs2:get 'qb0 g)) "The side-wall edges meet or cross near the front.") ((<= (bs2:get 'qt1 g) (bs2:get 'qb1 g)) "The side-wall edges meet or cross at the support.") (T nil))) ;; x = Rn*lambda in the flat side bend; depth = Ro*(1-cos(lambda)). ;; The lower OUTSIDE edge satisfies z = depth*tan(beta) after folding. (defun bs2:cutpoint (g lambda) (list (* (bs2:get 'rn g) lambda) (* (bs2:get 'ro g) (- 1.0 (cos lambda)) (bs2:tan (/ (* (bs2:get 'beta g) pi) 180.0))))) (defun bs2:lower (g x / a bas ro qb1) (setq a (bs2:get 'w0 g) bas (bs2:get 'bas g) ro (bs2:get 'ro g) qb1 (bs2:get 'qb1 g)) (cond ((< x (- bas)) (* (+ ro (- (- bas) x)) (bs2:tan (/ (* (bs2:get 'beta g) pi) 180.0)))) ((< x 0.0) (cadr (bs2:cutpoint g (/ (- x) (bs2:get 'rn g))))) ((<= x a) 0.0) ((<= x (+ a bas)) (cadr (bs2:cutpoint g (/ (- x a) (bs2:get 'rn g))))) (T (* (+ ro (- x a bas)) (bs2:tan (/ (* (bs2:get 'beta g) pi) 180.0)))))) (defun bs2:outline (g / a h gap bs sd et nt fl fr qb0 qt0 qb1 qt1 n i p lower tail) (setq a (bs2:get 'w0 g) h (bs2:get 'h0 g) gap (bs2:get 'gap g) bs (bs2:get 'bas g) sd (bs2:get 'side g) et (bs2:get 'et g) nt (bs2:get 'nt g) fl (/ (- a (bs2:get 'fw g)) 2.0) fr (- a fl) qb0 (bs2:get 'qb0 g) qt0 (bs2:get 'qt0 g) qb1 (bs2:get 'qb1 g) qt1 (bs2:get 'qt1 g) n (bs2:get 'n g) i 1 lower (list (list a 0.0) '(0.0 0.0))) ;; Front lower edge left->right, then curved right side-bend lower edge. (repeat n (setq p (bs2:cutpoint g (/ (* i pi) (* 2.0 n))) lower (cons (list (+ a (car p)) (cadr p)) lower) i (1+ i))) (setq tail (list (list (+ a bs sd) qb1) (list (+ a bs sd) qt1) (list (+ a bs) qt0) (list (+ a bs) (- h gap)) (list a (- h gap)) (list (- a gap) (- h gap)) (list (- a gap) h) (list (- a gap) (+ h nt)) (list fr (+ h nt)) (list fr (+ h et)) (list fl (+ h et)) (list fl (+ h nt)) (list gap (+ h nt)) (list gap h) (list gap (- h gap)) (list 0.0 (- h gap)) (list (- bs) (- h gap)) (list (- bs) qt0) (list (- (+ bs sd)) qt1) (list (- (+ bs sd)) qb1) (list (- bs) qb0))) (setq tail (reverse tail) i (1- n)) ;; Curved left lower edge returns towards front web. Closing adds final point. (repeat (1- n) (setq p (bs2:cutpoint g (/ (* i pi) (* 2.0 n))) tail (cons (list (- (car p)) (cadr p)) tail) i (1- i))) (append (reverse lower) (reverse tail))) (defun bs2:point (base x y) (list (+ (car base) x) (+ (cadr base) y) (caddr base))) (defun bs2:make-original (data) (if (not (entmake data)) (progn (prompt "\nCould not create a drawing object.") (exit)))) (defun bs2:unique (table root / name index) (setq name root index 0) (while (tblsearch table name) (setq index (1+ index) name (strcat root "-" (itoa index)))) name) (defun bs2:layer (root color / name) (setq name (bs2:unique "LAYER" root)) (bs2:make (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") (cons 2 name) '(70 . 0) (cons 62 color) '(6 . "Continuous"))) name) (defun bs2:line (p q layer) (bs2:make (list '(0 . "LINE") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbLine") (cons 10 p) (cons 11 q)))) (defun bs2:text (p height value rotation layer style) (bs2:make (list '(0 . "TEXT") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbText") (cons 10 p) (cons 40 height) (cons 1 value) (cons 50 rotation) (cons 7 style) '(72 . 0) '(100 . "AcDbText") '(73 . 0)))) (defun bs2:center (p height value layer style) (bs2:make (list '(0 . "TEXT") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbText") (cons 10 p) (cons 11 p) (cons 40 height) (cons 1 value) '(50 . 0.0) (cons 7 style) '(72 . 1) '(100 . "AcDbText") '(73 . 2)))) (defun bs2:dim (p q location rotation layer style) (bs2:make (list '(0 . "DIMENSION") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbDimension") (cons 10 location) '(70 . 32) '(1 . "<>") (cons 3 style) '(100 . "AcDbAlignedDimension") (cons 13 p) (cons 14 q) (cons 50 rotation) '(100 . "AcDbRotatedDimension")))) ;;; Drawing primitives are bundled into BOXSTIFF2.lsp; no external files needed. (defun bs2:poly (base points layer / vertices p) (setq vertices nil) (foreach p points (setq vertices (cons (cons 10 (list (+ (car base) (car p)) (+ (cadr base) (cadr p)))) vertices))) (bs2:make (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbPolyline") (cons 90 (length points)) '(70 . 1) (cons 38 (caddr base))) (reverse vertices)))) (defun bs2:dash (base x1 y1 x2 y2 ht layer / dist ux uy step pos finish) (setq dist (sqrt (+ (* (- x2 x1) (- x2 x1)) (* (- y2 y1) (- y2 y1)))) ux (/ (- x2 x1) dist) uy (/ (- y2 y1) dist) step (* 3.0 ht) pos 0.0) (while (< pos dist) (setq finish (min dist (+ pos (* 1.8 ht)))) (bs2:line (bs2:point base (+ x1 (* pos ux)) (+ y1 (* pos uy))) (bs2:point base (+ x1 (* finish ux)) (+ y1 (* finish uy))) layer) (setq pos (+ pos step)))) (defun bs2:draw-main (g picked / base a h gap bas sd bat et eb maxx minx ht cut fold tangent dims notes font ds x v y row index w d len tval rad at ab fv sv pts j ang ro zt) (setq a (bs2:get 'w0 g) h (bs2:get 'h0 g) gap (bs2:get 'gap g) bas (bs2:get 'bas g) sd (bs2:get 'side g) bat (bs2:get 'bat g) et (bs2:get 'et g) eb 0.0 minx (- (+ bas sd)) maxx (+ a bas sd) ht (max 1.5 (/ (bs2:get 'flatw g) 180.0)) base (bs2:point picked (+ bas sd) eb) w (bs2:get 'w g) d (bs2:get 'd g) len (bs2:get 'len g) tval (bs2:get 't g) rad (bs2:get 'r g) ro (bs2:get 'ro g) at (/ (* (bs2:get 'alpha g) pi) 180.0) ab (/ (* (bs2:get 'beta g) pi) 180.0) zt h) (setq cut (bs2:layer "BS2-CUT" 7) fold (bs2:layer "BS2-BEND-CENTRES" 1) tangent (bs2:layer "BS2-TANGENTS-REFERENCE" 8) dims (bs2:layer "BS2-DIMS" 3) notes (bs2:layer "BS2-NOTES" 2) font (bs2:unique "STYLE" "BS2-TEXT")) (bs2:make (list '(0 . "STYLE") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbTextStyleTableRecord") (cons 2 font) '(70 . 0) '(40 . 0.0) '(41 . 1.0) '(50 . 0.0) '(71 . 0) (cons 42 ht) '(3 . "txt.shx") '(4 . ""))) (setq ds (bs2:unique "DIMSTYLE" "BS2-MM")) (bs2:make (list '(0 . "DIMSTYLE") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbDimStyleTableRecord") (cons 2 ds) '(70 . 0) '(40 . 1.0) (cons 41 (* ht 0.65)) (cons 42 (* ht 0.3)) (cons 44 (* ht 0.5)) (cons 140 ht) '(144 . 1.0) (cons 147 (* ht 0.3)) '(73 . 0) '(74 . 0) '(77 . 1) '(78 . 0) '(170 . 0) '(271 . 2) '(277 . 2) '(278 . 46) '(280 . 0) '(289 . 3) (cons 340 (tblobjname "STYLE" font)))) (bs2:poly base (bs2:outline g) cut) ;; Tangent lines bound each bend allowance strip. (foreach x (list (- bas) 0.0 a (+ a bas)) (bs2:dash base x (bs2:lower g x) x (- h gap) ht tangent)) (foreach y (list h (+ h bat)) (bs2:dash base gap y (- a gap) y ht tangent)) ;; Centre lines are halfway across the neutral-axis bend allowances. (foreach x (list (- (/ bas 2.0)) (+ a (/ bas 2.0))) (bs2:dash base x (bs2:lower g x) x (- h gap) ht fold)) (foreach y (list (+ h (/ bat 2.0))) (bs2:dash base gap y (- a gap) y ht fold)) (bs2:center (bs2:point base (/ a 2.0) (/ h 2.0)) (* ht 1.5) "FRONT WEB" notes font) (bs2:center (bs2:point base (+ minx (/ sd 2.0)) (/ h 2.0)) ht "LEFT SIDE" notes font) (bs2:center (bs2:point base (+ a bas (/ sd 2.0)) (/ h 2.0)) ht "RIGHT SIDE" notes font) (bs2:center (bs2:point base (/ a 2.0) (+ h (/ et 2.0))) ht "TOP CLOSURE" notes font) (bs2:center (bs2:point base (/ a 2.0) (* -3.0 ht)) ht "OPEN BOTTOM - CUT EDGE" notes font) (bs2:center (bs2:point base (- (/ bas 2.0)) (+ (/ h 2.0) (* 5.0 ht))) ht "B1" notes font) (bs2:center (bs2:point base (+ a (/ bas 2.0)) (+ (/ h 2.0) (* 5.0 ht))) ht "B2" notes font) (bs2:center (bs2:point base (/ a 2.0) (+ h (/ bat 2.0) (* 4.0 ht))) ht "B3" notes font) (bs2:dim (bs2:point base minx (- eb)) (bs2:point base maxx (- eb)) (bs2:point base minx (- (- eb) (* 12.0 ht))) 0.0 dims ds) (bs2:dim (bs2:point base maxx (- eb)) (bs2:point base maxx (+ h et)) (bs2:point base (+ maxx (* 8.0 ht)) 0.0) (/ pi 2.0) dims ds) (bs2:dim (bs2:point base 0.0 0.0) (bs2:point base a 0.0) (bs2:point base 0.0 (- (- eb) (* 6.0 ht))) 0.0 dims ds) (bs2:dim (bs2:point base minx 0.0) (bs2:point base minx h) (bs2:point base (- minx (* 8.0 ht)) 0.0) (/ pi 2.0) dims ds) ;; Chain marking the side planar panels and the 90-deg bend strips. (setq row (list minx (- bas) 0.0 a (+ a bas) maxx) index 0) (repeat 5 (bs2:dim (bs2:point base (nth index row) 0.0) (bs2:point base (nth (1+ index) row) 0.0) (bs2:point base 0.0 (- (- eb) (* 19.0 ht))) 0.0 dims ds) (setq index (1+ index))) ;; Top closure extension from web tangent to its back edge. (bs2:dim (bs2:point base (/ a 2.0) h) (bs2:point base (/ a 2.0) (+ h et)) (bs2:point base (+ (/ a 2.0) (* 14.0 ht)) h) (/ pi 2.0) dims ds) (bs2:text (bs2:point base minx (+ h et (* 12.0 ht))) (* ht 1.6) "BOXSTIFF2 - TOP CLOSED / BOTTOM OPEN - THREE BENDS" 0.0 notes font) (bs2:text (bs2:point base minx (+ h et (* 8.0 ht))) ht (strcat "OUTSIDE W=" (rtos w 2 2) " D=" (rtos d 2 2) " L=" (rtos len 2 2) " t=" (rtos tval 2 2) " inside R=" (rtos rad 2 2) " K=" (rtos (bs2:get 'k g) 2 3)) 0.0 notes font) (bs2:text (bs2:point base minx (+ h et (* 4.0 ht))) ht (strcat "TOP/BOTTOM slopes from horizontal=" (rtos (bs2:get 'alpha g) 2 2) "/" (rtos (bs2:get 'beta g) 2 2) " deg; BOTH RISE TOWARD SUPPORT. Top relief=" (rtos gap 2 2) " mm.") 0.0 notes font) ;; Bend schedule. (setq y (- (- eb) (* 30.0 ht))) (bs2:text (bs2:point base minx y) ht "BEND ROTATION INSIDE R ALLOWANCE BA OUTSIDE SETBACK DEDUCTION BD" 0.0 notes font) (setq index 1) (foreach row (list (list "B1 LEFT" 90.0 bas ro) (list "B2 RIGHT" 90.0 bas ro) (list "B3 TOP" (- 90.0 (bs2:get 'alpha g)) bat (bs2:get 'st g))) (bs2:text (bs2:point base minx (- y (* index 4.0 ht))) ht (strcat (car row) " " (rtos (cadr row) 2 2) " deg " (rtos rad 2 2) " BA=" (rtos (caddr row) 2 3) " SB=" (rtos (nth 3 row) 2 3) " BD=" (rtos (- (* 2.0 (nth 3 row)) (caddr row)) 2 3)) 0.0 notes font) (setq index (1+ index))) (bs2:text (bs2:point base minx (- y (* 22.0 ht))) ht "Red dashed: bend centres. Grey dashed: tangents. THREE folds toward open back / support. No bottom bend." 0.0 notes font) (bs2:text (bs2:point base minx (- y (* 26.0 ht))) ht "TOP corners: stepped weld relief. Bottom: outside-surface inclined cut through side radii; no bottom flap." 0.0 notes font) (bs2:text (bs2:point base minx (- y (* 30.0 ht))) ht "K is provisional: confirm by a trial bend. No springback, weld shrinkage or cutting kerf compensation." 0.0 notes font) ;; Finished reference front view, outside projection; tangent lines inside. (setq fv (bs2:point base (+ maxx (* 35.0 ht)) (- eb))) (bs2:poly fv (list '(0.0 0.0) (list w 0.0) (list w len) (list 0.0 len)) tangent) (foreach y (list (- len (* d (bs2:tan at)))) (bs2:line (bs2:point fv 0.0 y) (bs2:point fv w y) tangent)) (bs2:text (bs2:point fv 0.0 (+ len (* 6.0 ht))) ht "FV - OUTSIDE ENVELOPE" 0.0 notes font) (bs2:dim fv (bs2:point fv w 0.0) (bs2:point fv 0.0 (* -6.0 ht)) 0.0 dims ds) ;; Bottom line shows the OPEN inclined cut, not a closing plate. (setq sv (bs2:point fv (+ w (* 35.0 ht)) 0.0) pts (list '(0.0 0.0) (list d (bs2:get 'qb1 g)) (list d len))) (setq j 24) (repeat 25 (setq ang (/ (* j (- (/ pi 2.0) at)) 24.0) pts (append pts (list (list (- ro (* ro (cos ang))) (+ zt (* ro (sin ang)))))) j (1- j))) (bs2:poly sv pts tangent) (bs2:line (bs2:point sv d (* -5.0 ht)) (bs2:point sv d (+ len (* 8.0 ht))) fold) (bs2:line (bs2:point sv d (bs2:get 'qb1 g)) (bs2:point sv (+ d (* 8.0 ht)) (bs2:get 'qb1 g)) fold) (bs2:text (bs2:point sv 0.0 (+ len (* 12.0 ht))) ht "SV - SUPPORT AT RIGHT" 0.0 notes font) (bs2:dim sv (bs2:point sv d 0.0) (bs2:point sv 0.0 (* -6.0 ht)) 0.0 dims ds) (bs2:dim (bs2:point sv d 0.0) (bs2:point sv d len) (bs2:point sv (+ d (* 10.0 ht)) 0.0) (/ pi 2.0) dims ds) (bs2:text (bs2:point sv 0.0 (* -12.0 ht)) ht (strcat "OPEN bottom cut=" (rtos (bs2:get 'beta g) 2 2) " deg from horizontal.") 0.0 notes font) (prompt (strcat "\nBOXSTIFF2 created. Blank bounding size=" (rtos (bs2:get 'flatw g) 2 2) " x " (rtos (bs2:get 'flath g) 2 2) " mm. Use ZOOM Extents; one UNDO removes this run."))) (defun bs2:positive (message default / value) (initget 6) (setq value (getreal (strcat message " <" (rtos default 2 2) ">: "))) (if value value default)) (defun bs2:slope (message default / value valid) (while (not valid) (initget 4) (setq value (getreal (strcat message " <" (rtos default 2 2) ">: "))) (if (not value) (setq value default)) (if (>= value 90.0) (prompt "\nSlope must be >=0 and <90 deg from horizontal.") (setq valid T))) value) (defun bs2:kinput (/ value valid) (while (not valid) (initget 4) (setq value (getreal "\nK-factor, provisional default <0.50>: ")) (if (not value) (setq value 0.5)) (if (> value 1.0) (prompt "\nK-factor must be between 0 and 1.") (setq valid T))) value) ;; SwaMiti Surface Development Tool for Box Stiffener with Top Closed and Bottom Open, Visit www.swamiti.com for more (defun c:BOXSTIFF2 (/ *error* undoOpen w d len thick radius alpha beta k gap g reason picked) (defun *error* (message) (if undoOpen (command-s "_.UNDO" "_End")) (if (and message (not (wcmatch (strcase message) "*CANCEL*,*QUIT*,*EXIT*"))) (prompt (strcat "\nBOXSTIFF2: " message))) (if undoOpen (prompt "\nUse UNDO to remove any partial drawing.")) (princ)) (if (= 1 (getvar "CVPORT")) (prompt "\nSwitch to model space before running BOXSTIFF2.") (progn (prompt "\nBOXSTIFF2: top CLOSED, bottom OPEN; 3 bends; OUTSIDE finished dimensions, mm.") (setq w (bs2:positive "\nOutside front-view width W" 300.0) d (bs2:positive "\nDepth D, front outside face to support" 120.0) len (bs2:positive "\nOverall L, highest top to lowest bottom" 800.0) thick (bs2:positive "\nPlate thickness t" 6.0) radius (bs2:positive "\nInside radius R, all three bends" 8.0) alpha (bs2:slope "\nTop slope from horizontal (rises toward support)" 20.0) beta (bs2:slope "\nOPEN bottom cut slope from horizontal (rises toward support)" 30.0) k (bs2:kinput) gap (bs2:positive "\nTOP corner weld clearance / relief size" (max 1.0 (* thick 0.25))) g (bs2:calc w d len thick radius alpha beta k gap) reason (bs2:reason g)) (if reason (prompt (strcat "\nNo drawing: " reason)) (progn (setq picked (getpoint "\nPick blank bounding lower-left : ")) (if picked (setq picked (trans picked 1 0)) (setq picked '(0.0 0.0 0.0))) (command-s "_.UNDO" "_Begin") (setq undoOpen T) (bs2:draw g picked) (command-s "_.UNDO" "_End") (setq undoOpen nil))))) (princ)) (princ "\nLoaded BOXSTIFF2.lsp. Type BOXSTIFF2; Enter accepts sample values.") (princ) ;; SwaMiti Surface Development Tool for Box Stiffener with Top Closed and Bottom Open, Visit www.swamiti.com for more ;; Embedded vector logo derived from the approved SwaMiti logo asset. ;; Each run is a filled vector strip; no external raster reference is required. (defun bs2:logo-cell (p u v w h scale layer / a b c d) (setq a (bs2:point p (* u scale) (* v scale)) b (bs2:point a (* w scale) 0.0) c (bs2:point a 0.0 (* h scale)) d (bs2:point b 0.0 (* h scale))) (bs2:make (list '(0 . "SOLID") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(420 . 2957) '(100 . "AcDbTrace") (cons 10 a) (cons 11 b) (cons 12 c) (cons 13 d)))) (defun bs2:brand (p ht / layer style scale row) (setq layer (bs2:layer "SWAMITI-BRANDING" 7) style (bs2:unique "STYLE" "SWAMITI-TEXT") scale (/ (* 6.0 ht) 177.0)) (bs2:make (list '(0 . "STYLE") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbTextStyleTableRecord") (cons 2 style) '(70 . 0) '(40 . 0.0) '(41 . 1.0) '(50 . 0.0) '(71 . 0) (cons 42 ht) '(3 . "txt.shx") '(4 . ""))) (foreach row '( (27 176 58 1) (113 176 5 1) (23 175 64 1) (112 175 7 1) (20 174 68 1) (111 174 9 1) (18 173 70 1) (111 173 10 1) (17 172 72 1) (110 172 12 1) (15 171 74 1) (110 171 13 1) (14 170 75 1) (110 170 14 1) (13 169 75 1) (111 169 14 1) (13 168 75 1) (111 168 15 1) (12 167 75 1) (112 167 15 1) (11 166 75 1) (113 166 15 1) (11 165 19 1) (50 165 26 1) (114 165 15 1) (11 164 15 1) (51 164 20 1) (115 164 15 1) (11 163 13 1) (51 163 18 1) (116 163 15 1) (12 162 10 1) (51 162 16 1) (117 162 15 1) (12 161 9 1) (50 161 16 1) (118 161 15 1) (13 160 7 1) (49 160 16 1) (119 160 15 1) (15 159 3 1) (48 159 16 1) (120 159 15 1) (47 158 16 1) (120 158 16 1) (46 157 16 1) (121 157 16 1) (45 156 16 1) (122 156 16 1) (45 155 15 1) (122 155 17 1) (44 154 15 1) (123 154 17 1) (43 153 15 1) (123 153 18 1) (42 152 15 1) (123 152 19 1) (41 151 15 1) (123 151 20 1) (40 150 15 1) (124 150 19 1) (39 149 15 1) (123 149 21 1) (38 148 15 1) (123 148 22 1) (37 147 15 1) (123 147 23 1) (36 146 15 1) (123 146 24 1) (35 145 15 1) (123 145 25 1) (34 144 15 1) (123 144 26 1) (33 143 15 1) (123 143 27 1) (32 142 15 1) (122 142 29 1) (31 141 15 1) (122 141 30 1) (30 140 15 1) (121 140 12 1) (138 140 15 1) (29 139 16 1) (120 139 12 1) (139 139 15 1) (28 138 16 1) (120 138 11 1) (140 138 15 1) (27 137 16 1) (119 137 12 1) (141 137 15 1) (26 136 16 1) (118 136 13 1) (142 136 15 1) (25 135 16 1) (117 135 13 1) (143 135 15 1) (24 134 16 1) (117 134 13 1) (144 134 15 1) (23 133 16 1) (116 133 13 1) (144 133 16 1) (22 132 16 1) (115 132 14 1) (145 132 16 1) (21 131 16 1) (114 131 14 1) (146 131 16 1) (21 130 15 1) (113 130 14 1) (147 130 16 1) (20 129 15 1) (111 129 16 1) (148 129 16 1) (19 128 15 1) (110 128 16 1) (149 128 15 1) (18 127 15 1) (109 127 16 1) (150 127 15 1) (17 126 15 1) (108 126 16 1) (151 126 15 1) (16 125 15 1) (107 125 16 1) (152 125 15 1) (15 124 15 1) (106 124 16 1) (153 124 15 1) (14 123 15 1) (105 123 16 1) (154 123 15 1) (13 122 15 1) (103 122 17 1) (155 122 15 1) (12 121 15 1) (102 121 17 1) (156 121 14 1) (11 120 15 1) (101 120 17 1) (157 120 14 1) (11 119 14 1) (100 119 17 1) (158 119 14 1) (10 118 14 1) (99 118 16 1) (159 118 14 1) (9 117 15 1) (98 117 16 1) (159 117 14 1) (9 116 14 1) (96 116 17 1) (160 116 14 1) (8 115 14 1) (95 115 17 1) (161 115 13 1) (7 114 14 1) (94 114 17 1) (162 114 13 1) (7 113 13 1) (93 113 17 1) (162 113 13 1) (6 112 13 1) (92 112 16 1) (163 112 13 1) (6 111 13 1) (91 111 16 1) (164 111 12 1) (5 110 13 1) (90 110 16 1) (164 110 13 1) (5 109 12 1) (89 109 16 1) (165 109 12 1) (4 108 13 1) (88 108 16 1) (165 108 12 1) (4 107 12 1) (87 107 16 1) (166 107 12 1) (4 106 12 1) (86 106 15 1) (166 106 12 1) (3 105 12 1) (86 105 14 1) (166 105 12 1) (3 104 12 1) (85 104 14 1) (167 104 12 1) (3 103 12 1) (85 103 13 1) (167 103 12 1) (2 102 12 1) (84 102 13 1) (167 102 12 1) (2 101 12 1) (84 101 12 1) (168 101 11 1) (2 100 12 1) (83 100 13 1) (168 100 11 1) (1 99 12 1) (83 99 12 1) (168 99 12 1) (1 98 12 1) (83 98 11 1) (168 98 12 1) (1 97 12 1) (82 97 12 1) (168 97 12 1) (1 96 12 1) (82 96 11 1) (168 96 12 1) (1 95 12 1) (82 95 11 1) (169 95 11 1) (1 94 12 1) (82 94 11 1) (169 94 11 1) (0 93 13 1) (82 93 10 1) (169 93 11 1) (0 92 14 1) (81 92 11 1) (169 92 11 1) (0 91 15 1) (81 91 11 1) (169 91 11 1) (0 90 66 1) (81 90 11 1) (169 90 11 1) (0 89 67 1) (81 89 11 1) (169 89 11 1) (0 88 68 1) (81 88 11 1) (169 88 11 1) (0 87 68 1) (81 87 11 1) (169 87 11 1) (0 86 68 1) (81 86 11 1) (168 86 12 1) (0 85 68 1) (82 85 10 1) (168 85 12 1) (0 84 68 1) (82 84 11 1) (168 84 12 1) (0 83 68 1) (82 83 11 1) (168 83 12 1) (0 82 67 1) (82 82 11 1) (168 82 11 1) (0 81 65 1) (82 81 12 1) (168 81 11 1) (0 80 14 1) (82 80 12 1) (167 80 12 1) (0 79 13 1) (83 79 12 1) (167 79 12 1) (1 78 11 1) (83 78 12 1) (167 78 12 1) (1 77 11 1) (84 77 12 1) (167 77 11 1) (1 76 11 1) (84 76 13 1) (166 76 12 1) (1 75 12 1) (84 75 14 1) (166 75 12 1) (1 74 12 1) (85 74 14 1) (165 74 12 1) (1 73 12 1) (86 73 14 1) (165 73 12 1) (2 72 11 1) (86 72 15 1) (165 72 12 1) (2 71 12 1) (87 71 15 1) (164 71 12 1) (2 70 12 1) (88 70 15 1) (164 70 12 1) (2 69 12 1) (88 69 16 1) (163 69 13 1) (3 68 12 1) (89 68 16 1) (163 68 12 1) (3 67 12 1) (90 67 16 1) (162 67 13 1) (3 66 13 1) (91 66 17 1) (161 66 13 1) (4 65 12 1) (92 65 17 1) (161 65 13 1) (4 64 12 1) (93 64 17 1) (160 64 13 1) (4 63 13 1) (94 63 17 1) (159 63 14 1) (5 62 12 1) (95 62 17 1) (159 62 13 1) (5 61 13 1) (97 61 16 1) (158 61 13 1) (6 60 13 1) (98 60 17 1) (157 60 14 1) (6 59 13 1) (99 59 17 1) (156 59 14 1) (7 58 13 1) (100 58 17 1) (155 58 14 1) (7 57 13 1) (101 57 17 1) (154 57 15 1) (8 56 13 1) (102 56 17 1) (154 56 14 1) (8 55 14 1) (103 55 17 1) (153 55 14 1) (9 54 13 1) (105 54 16 1) (152 54 14 1) (10 53 13 1) (106 53 16 1) (151 53 14 1) (10 52 14 1) (107 52 15 1) (150 52 15 1) (11 51 14 1) (108 51 15 1) (149 51 15 1) (12 50 14 1) (109 50 15 1) (148 50 15 1) (12 49 15 1) (110 49 15 1) (148 49 14 1) (13 48 14 1) (111 48 15 1) (147 48 14 1) (14 47 14 1) (113 47 14 1) (146 47 14 1) (15 46 14 1) (114 46 13 1) (145 46 14 1) (15 45 15 1) (115 45 13 1) (144 45 14 1) (16 44 15 1) (116 44 13 1) (143 44 15 1) (17 43 15 1) (117 43 13 1) (142 43 15 1) (18 42 15 1) (118 42 12 1) (141 42 15 1) (19 41 15 1) (119 41 12 1) (141 41 14 1) (20 40 15 1) (120 40 12 1) (140 40 14 1) (21 39 15 1) (121 39 12 1) (138 39 15 1) (22 38 15 1) (122 38 30 1) (22 37 16 1) (122 37 29 1) (23 36 16 1) (123 36 28 1) (24 35 16 1) (124 35 26 1) (25 34 16 1) (124 34 25 1) (26 33 16 1) (125 33 23 1) (27 32 15 1) (125 32 22 1) (28 31 15 1) (126 31 20 1) (29 30 15 1) (126 30 19 1) (30 29 15 1) (126 29 18 1) (31 28 15 1) (126 28 17 1) (32 27 15 1) (126 27 17 1) (33 26 15 1) (126 26 16 1) (34 25 15 1) (125 25 16 1) (35 24 15 1) (125 24 15 1) (36 23 15 1) (124 23 15 1) (37 22 15 1) (124 22 14 1) (38 21 15 1) (123 21 14 1) (38 20 16 1) (122 20 14 1) (39 19 16 1) (121 19 15 1) (40 18 16 1) (120 18 15 1) (41 17 16 1) (119 17 15 1) (42 16 16 1) (118 16 15 1) (43 15 17 1) (117 15 15 1) (44 14 17 1) (116 14 16 1) (45 13 18 1) (115 13 16 1) (46 12 20 1) (114 12 17 1) (153 12 2 1) (47 11 22 1) (113 11 19 1) (148 11 9 1) (48 10 32 1) (112 10 46 1) (49 9 32 1) (111 9 48 1) (51 8 31 1) (111 8 48 1) (52 7 31 1) (111 7 48 1) (54 6 29 1) (111 6 48 1) (55 5 28 1) (111 5 48 1) (57 4 26 1) (111 4 47 1) (60 3 23 1) (112 3 45 1) (62 2 20 1) (112 2 43 1) (65 1 16 1) (114 1 37 1) (70 0 10 1) (117 0 27 1)) (bs2:logo-cell p (car row) (cadr row) (caddr row) (nth 3 row) scale layer)) (bs2:text (bs2:point p (+ (* 180.0 scale) (* 2.0 ht)) (* 2.0 ht)) ht "Prepared with SwaMiti Tool, Visit www.swamiti.com for more" 0.0 layer style)) ;; SwaMiti Surface Development Tool for Box Stiffener with Top Closed and Bottom Open, Visit www.swamiti.com for more ;; Collect extents from objects created by this run only. Dynamic locals belong ;; to the draw wrapper, so old objects and the current drawing extents are ignored. (defun bs2:make (data / pair p kind height) (setq kind (cdr (assoc 0 data))) (if (member kind '("LINE" "LWPOLYLINE" "TEXT" "DIMENSION" "SOLID")) (progn (foreach pair data (if (and (member (car pair) '(10 11 12 13 14)) (listp (cdr pair))) (progn (setq p (cdr pair)) (if (and (numberp (car p)) (numberp (cadr p))) (setq swaMinX (if swaMinX (min swaMinX (car p)) (car p)) swaMinY (if swaMinY (min swaMinY (cadr p)) (cadr p))))))) (if (= kind "TEXT") (progn (setq height (cdr (assoc 40 data))) (if (and height (> height 0.0)) (setq swaTextH (if swaTextH (min swaTextH height) height))))))) (bs2:make-original data)) (defun bs2:draw (g picked / swaMinX swaMinY swaTextH) (bs2:draw-main g picked) (if (and swaMinX swaMinY swaTextH) (bs2:brand (list swaMinX (- swaMinY (* 14.0 swaTextH)) 0.0) swaTextH)))