;; SwaMiti Surface Development Tool for Concentric Cone, Visit www.swamiti.com for more ;;; CONEDEV1 - concentric conical frustum, MEAN-SURFACE development. ;;; d1,d2 are INTERNAL diameters at axial planes z=h and z=0, d2>d1>0. ;;; t is NORMAL wall thickness, h is AXIAL height; both end planes square ;;; to the common axis. No weld gap, rolling allowance, kerf or bevel modeled. ;;; Mean offset t/2 is normal to the cone. At a fixed axial plane the radial ;;; increase is t/(2*cos(alpha)), so Dmean = Dinternal+t/cos(alpha). ;;; Outline uses exact circular-arc bulges, not polygonal chords. (defun cn1:get (key data) (cadr (assoc key data))) (defun cn1:reason (d1 d2 height thick) (cond ((<= d1 0.0) "Small internal diameter d1 must be positive.") ((<= d2 d1) "Large internal diameter d2 must exceed d1; this case is a frustum, not a cylinder.") ((<= height 0.0) "Axial height h must be positive.") ((<= thick 0.0) "Normal wall thickness t must be positive.") (T nil))) (defun cn1:calc (d1 d2 height thick / delta slant cosa correction dm1 dm2 rs rl theta) (if (cn1:reason d1 d2 height thick) nil (progn (setq delta (/ (- d2 d1) 2.0) slant (sqrt (+ (* height height) (* delta delta))) cosa (/ height slant) correction (/ thick cosa) dm1 (+ d1 correction) dm2 (+ d2 correction) rs (/ (* 0.5 dm1 slant) delta) rl (/ (* 0.5 dm2 slant) delta) theta (/ (* 2.0 pi delta) slant)) (list (list 'd1 d1) (list 'd2 d2) (list 'h height) (list 't thick) (list 'delta delta) (list 'slant slant) (list 'cosa cosa) (list 'alpha (atan delta height)) (list 'correction correction) (list 'dm1 dm1) (list 'dm2 dm2) (list 'rs rs) (list 'rl rl) (list 'theta theta) (list 'degrees (/ (* theta 180.0) pi)) (list 'a0 (/ (- pi theta) 2.0)) (list 'a1 (/ (+ pi theta) 2.0)) (list 'bulge (/ (sin (/ theta 4.0)) (cos (/ theta 4.0)))) (list 'c1 (* pi dm1)) (list 'c2 (* pi dm2)) (list 'pitch1 (/ (* pi dm1) 18.0)) (list 'pitch2 (/ (* pi dm2) 18.0)) (list 'area (* pi (/ (+ dm1 dm2) 2.0) slant)))))) (defun cn1:polar2 (radius angle) (list (* radius (cos angle)) (* radius (sin angle)))) (defun cn1:vertices (g / rs rl a0 a1 b) (setq rs (cn1:get 'rs g) rl (cn1:get 'rl g) a0 (cn1:get 'a0 g) a1 (cn1:get 'a1 g) b (cn1:get 'bulge g)) (list (list (* rl (cos a0)) (* rl (sin a0)) b) (list (* rl (cos a1)) (* rl (sin a1)) 0.0) (list (* rs (cos a1)) (* rs (sin a1)) (- b)) (list (* rs (cos a0)) (* rs (sin a0)) 0.0))) (defun cn1:stations (g / i angle result) (setq i 0 result nil) (repeat 19 (setq angle (+ (cn1:get 'a0 g) (/ (* i (cn1:get 'theta g)) 18.0)) result (cons (list i (* i 20.0) angle (cn1:polar2 (cn1:get 'rs g) angle) (cn1:polar2 (cn1:get 'rl g) angle)) result) i (1+ i))) (reverse result)) (defun cn1:point (base x y) (list (+ (car base) x) (+ (cadr base) y) (caddr base))) (defun cn1:make-original (data) (if (not (entmake data)) (progn (prompt "\nCould not create a drawing object.") (exit)))) (defun cn1: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 cn1:layer (root color / name) (setq name (cn1:unique "LAYER" root)) (cn1:make (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") (cons 2 name) '(70 . 0) (cons 62 color) '(6 . "Continuous"))) name) (defun cn1:line (p q layer) (cn1:make (list '(0 . "LINE") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbLine") (cons 10 p) (cons 11 q)))) (defun cn1:text (p height value rotation layer style) (cn1: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 cn1:center (p height value layer style) (cn1: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 cn1:dim (p q location rotation layer style) (cn1: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")))) (defun cn1:xy (base point) (cn1:point base (car point) (cadr point))) (defun cn1:outline (base g layer / data vertex) (setq data (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbPolyline") '(90 . 4) '(70 . 1) (cons 38 (caddr base)))) (foreach vertex (cn1:vertices g) (setq data (append data (list (cons 10 (list (+ (car base) (car vertex)) (+ (cadr base) (cadr vertex)))) (cons 42 (caddr vertex)))))) (cn1:make data)) (defun cn1:arc (center radius a0 a1 layer) (cn1:make (list '(0 . "ARC") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbCircle") (cons 10 center) (cons 40 radius) '(100 . "AcDbArc") (cons 50 (rem (+ a0 (* 2.0 pi)) (* 2.0 pi))) (cons 51 (rem (+ a1 (* 2.0 pi)) (* 2.0 pi)))))) (defun cn1:draw-main (g base / ht rs rl theta a0 a1 outline divs dims notes font ds row angle p q y fv delta correction h d1 d2 xmax n endpoint) (setq rs (cn1:get 'rs g) rl (cn1:get 'rl g) theta (cn1:get 'theta g) a0 (cn1:get 'a0 g) a1 (cn1:get 'a1 g) ht (/ (cn1:get 'slant g) 65.0) h (cn1:get 'h g) d1 (cn1:get 'd1 g) d2 (cn1:get 'd2 g) correction (cn1:get 'correction g)) (setq outline (cn1:layer "CN1-CUT" 5) divs (cn1:layer "CN1-GENERATORS" 8) dims (cn1:layer "CN1-DIMS" 3) notes (cn1:layer "CN1-NOTES" 2) font (cn1:unique "STYLE" "CN1-TEXT")) (cn1: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 (cn1:unique "DIMSTYLE" "CN1-MM")) (cn1: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)))) (cn1:outline base g outline) (foreach row (cn1:stations g) (setq angle (nth 2 row) p (cn1:xy base (nth 3 row)) q (cn1:xy base (nth 4 row))) (if (and (> (car row) 0) (< (car row) 18)) (cn1:line p q divs)) (cn1:center (cn1:xy base (cn1:polar2 (+ rl (* 3.0 ht)) angle)) ht (itoa (car row)) notes font)) ;; Radial extension references from virtual apex, O, outside the cut part. (cn1:line base (cn1:xy base (cn1:polar2 rl a0)) divs) (cn1:line base (cn1:xy base (cn1:polar2 rl a1)) divs) (cn1:line (cn1:point base (* -2.0 ht) 0.0) (cn1:point base (* 2.0 ht) 0.0) notes) (cn1:line (cn1:point base 0.0 (* -2.0 ht)) (cn1:point base 0.0 (* 2.0 ht)) notes) (cn1:center (cn1:point base 0.0 (* -4.0 ht)) ht "O - VIRTUAL APEX / ARC CENTRE" notes font) (cn1:arc base (* rs 0.35) a0 a1 divs) (cn1:center (cn1:point base 0.0 (* rs 0.45)) ht (strcat "Sector angle = " (rtos (cn1:get 'degrees g) 2 4) " deg") notes font) (foreach row (list (list rs (- (/ pi 2.0) (* theta 0.20)) "R SMALL = ") (list rl (+ (/ pi 2.0) (* theta 0.28)) "R LARGE = ")) (setq endpoint (cn1:xy base (cn1:polar2 (car row) (cadr row)))) (cn1:line base endpoint divs) (cn1:text (cn1:xy base (cn1:polar2 (* (car row) 0.60) (cadr row))) ht (strcat (caddr row) (rtos (car row) 2 3)) 0.0 notes font)) (cn1:dim (cn1:point base 0.0 rs) (cn1:point base 0.0 rl) (cn1:point base (* 6.0 ht) 0.0) (/ pi 2.0) dims ds) (cn1:text (cn1:point base (- rl) (+ rl (* 13.0 ht))) (* ht 1.6) "CONEDEV1 - CONCENTRIC FRUSTUM - MEAN SURFACE" 0.0 notes font) (cn1:text (cn1:point base (- rl) (+ rl (* 9.0 ht))) ht (strcat "INTERNAL d1=" (rtos d1 2 2) " d2=" (rtos d2 2 2) " AXIAL h=" (rtos h 2 2) " NORMAL t=" (rtos (cn1:get 't g) 2 2) " mm") 0.0 notes font) (cn1:text (cn1:point base (- rl) (+ rl (* 5.0 ht))) ht (strcat "Mean d1=" (rtos (cn1:get 'dm1 g) 2 3) " d2=" (rtos (cn1:get 'dm2 g) 2 3) "; cone half-angle=" (rtos (/ (* (cn1:get 'alpha g) 180.0) pi) 2 4) " deg FROM AXIS.") 0.0 notes font) (setq y (* -11.0 ht)) (foreach row (list (strcat "TRUE CIRCULAR ARCS. Seam / generator length=" (rtos (cn1:get 'slant g) 2 3) " mm.") (strcat "Small arc length=" (rtos (cn1:get 'c1 g) 2 3) "; large arc length=" (rtos (cn1:get 'c2 g) 2 3) " mm (mean circumferences).") (strcat "18 equal circumferential divisions, 20 deg on cone; developed step=" (rtos (/ (cn1:get 'degrees g) 18.0) 2 4) " deg.") (strcat "Arc pitch small/large=" (rtos (cn1:get 'pitch1 g) 2 3) "/" (rtos (cn1:get 'pitch2 g) 2 3) " mm. These are ARC lengths, not chords.") "Thickness is normal to wall. Fixed end planes: Dmean = Dinternal + t/cos(half-angle)." "No weld gap, overlap, rolling compensation, bevel or cutting kerf allowance. All dimensions mm.") (cn1:text (cn1:point base (- rl) y) ht row 0.0 notes font) (setq y (- y (* 4.0 ht)))) ;; Axial section reference, showing inside, mean and outside generator lines. (setq xmax (if (<= theta pi) (* rl (sin (/ theta 2.0))) rl) fv (cn1:point base (+ xmax (/ d2 2.0) correction (* 28.0 ht)) (* rs 0.2))) (foreach n '(-1.0 1.0) (foreach delta (list 0.0 (/ correction 2.0) correction) (cn1:line (cn1:point fv (* n (+ (/ d2 2.0) delta)) 0.0) (cn1:point fv (* n (+ (/ d1 2.0) delta)) h) (if (= delta 0.0) outline divs)))) (cn1:line (cn1:point fv 0.0 (* -5.0 ht)) (cn1:point fv 0.0 (+ h (* 5.0 ht))) divs) (cn1:text (cn1:point fv (- (/ d2 2.0)) (+ h (* 10.0 ht))) ht "AXIAL SECTION: INNER / MEAN / OUTER" 0.0 notes font) (cn1:dim (cn1:point fv (- (/ d1 2.0)) h) (cn1:point fv (/ d1 2.0) h) (cn1:point fv 0.0 (+ h (* 5.0 ht))) 0.0 dims ds) (cn1:dim (cn1:point fv (- (/ d2 2.0)) 0.0) (cn1:point fv (/ d2 2.0) 0.0) (cn1:point fv 0.0 (* -5.0 ht)) 0.0 dims ds) (cn1:dim fv (cn1:point fv 0.0 h) (cn1:point fv (+ (/ d2 2.0) correction (* 8.0 ht)) 0.0) (/ pi 2.0) dims ds) (prompt (strcat "\nCONEDEV1 created. Small/large developed radii=" (rtos rs 2 3) "/" (rtos rl 2 3) "; sector=" (rtos (cn1:get 'degrees g) 2 4) " deg. Use ZOOM Extents. One UNDO removes this run."))) (defun cn1:positive (message default / value) (initget 6) (setq value (getreal (strcat message " <" (rtos default 2 2) ">: "))) (if value value default)) ;; SwaMiti Surface Development Tool for Concentric Cone, Visit www.swamiti.com for more (defun c:CONEDEV1 (/ *error* undoOpen d1 d2 height thick reason g base) (defun *error* (message) (if undoOpen (command-s "_.UNDO" "_End")) (if (and message (not (wcmatch (strcase message) "*CANCEL*,*QUIT*,*EXIT*"))) (prompt (strcat "\nCONEDEV1: " message))) (if undoOpen (prompt "\nUse UNDO to remove partial drawing objects.")) (princ)) (if (= 1 (getvar "CVPORT")) (prompt "\nSwitch to model space before running CONEDEV1.") (progn (prompt "\nCONEDEV1: INTERNAL diameters, AXIAL height, NORMAL thickness; millimetres.") (setq d1 (cn1:positive "\nSmall TOP internal diameter d1" 1000.0) d2 (cn1:positive "\nLarge BOTTOM internal diameter d2, greater than d1" 2000.0) height (cn1:positive "\nAxial height h" 1000.0) thick (cn1:positive "\nWall thickness t measured NORMAL to cone surface" 10.0) reason (cn1:reason d1 d2 height thick)) (if reason (prompt (strcat "\nNo drawing: " reason)) (progn (setq g (cn1:calc d1 d2 height thick) base (getpoint "\nPick developed arc CENTRE / virtual apex O : ")) (if base (setq base (trans base 1 0)) (setq base '(0.0 0.0 0.0))) (command-s "_.UNDO" "_Begin") (setq undoOpen T) (cn1:draw g base) (command-s "_.UNDO" "_End") (setq undoOpen nil))))) (princ)) (princ "\nLoaded CONEDEV1.lsp. Type CONEDEV1; Enter accepts sample values.") (princ) ;; SwaMiti Surface Development Tool for Concentric Cone, 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 cn1:logo-cell (p u v w h scale layer / a b c d) (setq a (cn1:point p (* u scale) (* v scale)) b (cn1:point a (* w scale) 0.0) c (cn1:point a 0.0 (* h scale)) d (cn1:point b 0.0 (* h scale))) (cn1: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 cn1:brand (p ht / layer style scale row) (setq layer (cn1:layer "SWAMITI-BRANDING" 7) style (cn1:unique "STYLE" "SWAMITI-TEXT") scale (/ (* 6.0 ht) 177.0)) (cn1: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)) (cn1:logo-cell p (car row) (cadr row) (caddr row) (nth 3 row) scale layer)) (cn1:text (cn1: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 Concentric Cone, 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 cn1: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))))))) (cn1:make-original data)) (defun cn1:draw (g base / swaMinX swaMinY swaTextH) (cn1:draw-main g base) (if (and swaMinX swaMinY swaTextH) (cn1:brand (list swaMinX (- swaMinY (* 14.0 swaTextH)) 0.0) swaTextH)))