;; SwaMiti Surface Development Tool for Eccentric Cone, Visit www.swamiti.com for more ;;; CONEDEV2 - eccentric circular-ended frustum, INTERNAL d1,d2. ;;; Parallel end planes z=h (small) and z=0 (large). Small centre offset +E ;;; in X. h is perpendicular plane spacing; t is NORMAL wall thickness. ;;; Offset E is adjustable; default (d2-d1)/2 gives one vertical side. ;;; True mean surface: normal offset t/2, then trim at the SAME end planes. ;;; Its end curves are generally not circles; no uniform mean-D correction. ;;; Numerical isometric unfolding uses generator turn and local normal turn. ;;; E=0 agrees with CONEDEV1, within the stated polyline tolerance. (defun cn2:get (key data) (cadr (assoc key data))) (defun cn2:reason (d1 d2 height thick eccentric / delta nz0) (cond ((<= d1 0.0) "Small internal diameter d1 must be positive.") ((<= d2 d1) "Large internal diameter d2 must exceed d1.") ((<= height 0.0) "Perpendicular height h must be positive.") ((<= thick 0.0) "Normal wall thickness t must be positive.") ((< eccentric 0.0) "Centre offset E must be nonnegative.") (T (setq delta (/ (- d2 d1) 2.0) nz0 (/ (- delta eccentric) (sqrt (+ (* height height) (* (- delta eccentric) (- delta eccentric)))))) (if (<= (+ (/ (/ d1 2.0) delta) (/ (* 0.5 thick nz0) height)) 0.0) "Thickness/offset moves the trimmed mean surface beyond the virtual apex; revise these extreme inputs." nil)))) (defun cn2:params (d1 d2 height thick eccentric) (if (cn2:reason d1 d2 height thick eccentric) nil (list (list 'd1 d1) (list 'd2 d2) (list 'h height) (list 't thick) (list 'E eccentric) (list 'r1 (/ d1 2.0)) (list 'r2 (/ d2 2.0)) (list 'delta (/ (- d2 d1) 2.0)) (list 'half (/ thick 2.0)) (list 'minslant (sqrt (+ (* height height) (* (- (/ (- d2 d1) 2.0) eccentric) (- (/ (- d2 d1) 2.0) eccentric))))) (list 'maxslant (sqrt (+ (* height height) (* (+ (/ (- d2 d1) 2.0) eccentric) (+ (/ (- d2 d1) 2.0) eccentric)))))))) ;; delta=(d2-d1)/2; D(phi)=(delta*cos(phi)-E,delta*sin(phi),-h). ;; ell=|D|, W=sqrt(h^2+(delta-E*cos(phi))^2). ;; beta'=delta*W/ell^2; normal-turn coefficient c=h*ell/W^2. ;; Return beta', c, ell, normal-Z. (defun cn2:rates (delta eccentric height phi / q w ell) (setq q (- delta (* eccentric (cos phi))) w (sqrt (+ (* height height) (* q q))) ell (sqrt (+ (* height height) (* delta delta) (* eccentric eccentric) (- (* 2.0 delta eccentric (cos phi)))))) (list (/ (* delta w) (* ell ell)) (/ (* height ell) (* w w)) ell (/ q w))) ;; Actual mean 3D point at the specified fixed z end plane. 'off' is measured ;; along the outward normal: 0=inside, t/2=mean, t=outside. (defun cn2:mean3 (g phi z off / delta eccentric height radius q w nx ny nz dx dy) (setq delta (cn2:get 'delta g) eccentric (cn2:get 'E g) height (cn2:get 'h g) radius (- (cn2:get 'r2 g) (/ (* delta z) height)) q (- delta (* eccentric (cos phi))) w (sqrt (+ (* height height) (* q q))) nx (/ (* height (cos phi)) w) ny (/ (* height (sin phi)) w) nz (/ q w) dx (- (* delta (cos phi)) eccentric) dy (* delta (sin phi))) (list (+ (/ (* eccentric z) height) (* radius (cos phi)) (* off (+ nx (/ (* nz dx) height)))) (+ (* radius (sin phi)) (* off (+ ny (/ (* nz dy) height)))) z)) ;; Row format: phi, beta, small-X, small-Y, large-X, large-Y, true generator. ;; If u_flat=(cos(beta),sin(beta)), w' = c*(-sin(beta),cos(beta)). ;; mean flat point = rho*u_flat + (t/2)*w, with rho adjusted for fixed z trims. (defun cn2:row (delta eccentric height r1 half phi beta wx wy / rates ell rho ax ay) (setq rates (cn2:rates delta eccentric height phi) ell (nth 2 rates) rho (* (+ (/ r1 delta) (/ (* half (nth 3 rates)) height)) ell) ax (+ (* rho (cos beta)) (* half wx)) ay (+ (* rho (sin beta)) (* half wy))) (list phi beta ax ay (+ ax (* ell (cos beta))) (+ ay (* ell (sin beta))) ell)) ;; Fourth-order Runge-Kutta integration of beta and the normal-offset image. (defun cn2:rkrows (g n / delta eccentric height r1 half step i phi beta wx wy rows r0 rm re b0 bm be c0 cm ce p1 p2 p3 p4 nextx nexty) (setq delta (cn2:get 'delta g) eccentric (cn2:get 'E g) height (cn2:get 'h g) r1 (cn2:get 'r1 g) half (cn2:get 'half g) step (/ (* 2.0 pi) n) i 0 beta 0.0 wx 0.0 wy 0.0 rows nil) (repeat (1+ n) (setq phi (* i step) rows (cons (cn2:row delta eccentric height r1 half phi beta wx wy) rows)) (if (< i n) (progn (setq r0 (cn2:rates delta eccentric height phi) rm (cn2:rates delta eccentric height (+ phi (/ step 2.0))) re (cn2:rates delta eccentric height (+ phi step)) b0 (car r0) bm (car rm) be (car re) c0 (cadr r0) cm (cadr rm) ce (cadr re) p1 beta p2 (+ beta (/ (* step b0) 2.0)) p3 (+ beta (/ (* step bm) 2.0)) p4 (+ beta (* step bm)) nextx (+ wx (* (/ step 6.0) (+ (- (* c0 (sin p1))) (- (* 2.0 cm (sin p2))) (- (* 2.0 cm (sin p3))) (- (* ce (sin p4)))))) nexty (+ wy (* (/ step 6.0) (+ (* c0 (cos p1)) (* 2.0 cm (cos p2)) (* 2.0 cm (cos p3)) (* ce (cos p4))))) beta (+ beta (* (/ step 6.0) (+ b0 (* 4.0 bm) be))) wx nextx wy nexty))) (setq i (1+ i))) (reverse rows)) (defun cn2:A (row) (list (nth 2 row) (nth 3 row))) (defun cn2:B (row) (list (nth 4 row) (nth 5 row))) (defun cn2:perimeters (rows / small large prev row) (setq small 0.0 large 0.0 prev (car rows)) (foreach row (cdr rows) (setq small (+ small (distance (cn2:A prev) (cn2:A row))) large (+ large (distance (cn2:B prev) (cn2:B row))) prev row)) (list small large)) (defun cn2:midpoint (a b) (list (/ (+ (car a) (car b)) 2.0) (/ (+ (cadr a) (cadr b)) 2.0))) ;; Compare N rows with 2N rows. Chord test uses fine midpoint vs adjacent ;; fine even endpoints; integrator test compares coarse/fine coincident phi. (defun cn2:compare (coarse fine / c f chord integ r0 r1 r2 p q) (setq c coarse f fine chord 0.0 integ 0.0) (while (cdr c) (setq r0 (car f) r1 (cadr f) r2 (caddr f) chord (max chord (distance (cn2:A r1) (cn2:midpoint (cn2:A r0) (cn2:A r2))) (distance (cn2:B r1) (cn2:midpoint (cn2:B r0) (cn2:B r2)))) integ (max integ (distance (cn2:A (car c)) (cn2:A r0)) (distance (cn2:B (car c)) (cn2:B r0))) c (cdr c) f (cddr f))) (setq integ (max integ (distance (cn2:A (car c)) (cn2:A (car f))) (distance (cn2:B (car c)) (cn2:B (car f)))) p (cn2:perimeters coarse) q (cn2:perimeters fine)) (list chord integ (max (abs (- (car p) (car q))) (abs (- (cadr p) (cadr q)))))) (defun cn2:rotate (point angle) (list (- (* (car point) (cos angle)) (* (cadr point) (sin angle))) (+ (* (car point) (sin angle)) (* (cadr point) (cos angle))))) (defun cn2:orient (rows turn / gamma out row a b) (setq gamma (- (/ pi 2.0) (/ turn 2.0)) out nil) (foreach row rows (setq a (cn2:rotate (cn2:A row) gamma) b (cn2:rotate (cn2:B row) gamma) out (cons (list (car row) (+ (cadr row) gamma) (car a) (cadr a) (car b) (cadr b) (nth 6 row)) out))) (reverse out)) (defun cn2:bounds (rows / xmin xmax ymin ymax row) (setq xmin (nth 2 (car rows)) xmax xmin ymin (nth 3 (car rows)) ymax ymin) (foreach row rows (setq xmin (min xmin (nth 2 row) (nth 4 row)) xmax (max xmax (nth 2 row) (nth 4 row)) ymin (min ymin (nth 3 row) (nth 5 row)) ymax (max ymax (nth 3 row) (nth 5 row)))) (list xmin ymin xmax ymax)) (defun cn2:build (g / n coarse fine errors done perims lastrow turn rows bounds) (setq n 180 coarse (cn2:rkrows g n) done nil) (while (not done) (setq fine (cn2:rkrows g (* 2 n)) errors (cn2:compare coarse fine)) (if (and (<= (car errors) 0.01) (<= (cadr errors) 0.0005) (<= (caddr errors) 0.01)) (setq done T) (if (>= (* 2 n) 5760) (progn (prompt "\nRefinement limit reached before tolerance; no drawing created.") (exit)) (setq coarse fine n (* 2 n))))) (setq n (* 2 n) perims (cn2:perimeters fine) lastrow (last fine) turn (cadr lastrow) rows (cn2:orient fine turn) bounds (cn2:bounds rows)) (append g (list (list 'n n) (list 'rows rows) (list 'turn turn) (list 'perim1 (car perims)) (list 'perim2 (cadr perims)) (list 'chordcheck (car errors)) (list 'rkcheck (cadr errors)) (list 'perimcheck (caddr errors)) (list 'bounds bounds)))) (defun cn2:outline-points (g / small large row) (setq small nil large nil) (foreach row (cn2:get 'rows g) (setq small (cons (cn2:A row) small) large (cons (cn2:B row) large))) (append (reverse large) small)) (defun cn2:stations (g / rows step i out) (setq rows (cn2:get 'rows g) step (fix (/ (cn2:get 'n g) 18)) i 0 out nil) (repeat 19 (setq out (cons (list i (* 20.0 i) (nth (* i step) rows)) out) i (1+ i))) (reverse out)) (defun cn2:point (base x y) (list (+ (car base) x) (+ (cadr base) y) (caddr base))) (defun cn2:make-original (data) (if (not (entmake data)) (progn (prompt "\nCould not create a drawing object.") (exit)))) (defun cn2: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 cn2:layer (root color / name) (setq name (cn2:unique "LAYER" root)) (cn2:make (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") (cons 2 name) '(70 . 0) (cons 62 color) '(6 . "Continuous"))) name) (defun cn2:line (p q layer) (cn2:make (list '(0 . "LINE") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbLine") (cons 10 p) (cons 11 q)))) (defun cn2:text (p height value rotation layer style) (cn2: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 cn2:center (p height value layer style) (cn2: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 cn2:dim (p q location rotation layer style) (cn2: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 cn2:xy (base point) (cn2:point base (car point) (cadr point))) (defun cn2:poly (base points layer / data point) (setq data (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(67 . 0) '(410 . "Model") (cons 8 layer) '(100 . "AcDbPolyline") (cons 90 (length points)) '(70 . 1) (cons 38 (caddr base)))) (foreach point points (setq data (append data (list (cons 10 (list (+ (car base) (car point)) (+ (cadr base) (cadr point)))))))) (cn2:make data)) (defun cn2:draw-main (g picked / bounds xmin ymin xmax ymax base ht cut divs dims notes meanlayer font ds row vertex i p q beta loc tableY colwidth x y fv phi off a b r1 r2 eccentric height half) (setq bounds (cn2:get 'bounds g) xmin (car bounds) ymin (cadr bounds) xmax (caddr bounds) ymax (nth 3 bounds) base (cn2:point picked (- xmin) (- ymin)) ht (/ (cn2:get 'minslant g) 70.0) r1 (cn2:get 'r1 g) r2 (cn2:get 'r2 g) eccentric (cn2:get 'E g) height (cn2:get 'h g) half (cn2:get 'half g)) (setq cut (cn2:layer "CN2-CUT" 5) divs (cn2:layer "CN2-GENERATORS" 8) dims (cn2:layer "CN2-DIMS" 3) notes (cn2:layer "CN2-NOTES" 2) meanlayer (cn2:layer "CN2-MEAN-SECTION" 3) font (cn2:unique "STYLE" "CN2-TEXT")) (cn2: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 (cn2:unique "DIMSTYLE" "CN2-MM")) (cn2: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)))) (cn2:poly base (cn2:outline-points g) cut) (foreach vertex (cn2:stations g) (setq i (car vertex) row (caddr vertex) p (cn2:xy base (cn2:A row)) q (cn2:xy base (cn2:B row)) beta (cadr row)) (if (and (> i 0) (< i 18)) (cn2:line p q divs)) (cn2:center (cn2:point q (* 3.0 ht (cos beta)) (* 3.0 ht (sin beta))) ht (itoa i) notes font) (if (or (= i 0) (= i 9)) (progn (setq loc (cn2:point (list (/ (+ (car p) (car q)) 2.0) (/ (+ (cadr p) (cadr q)) 2.0) (caddr p)) (* -3.0 ht (sin beta)) (* 3.0 ht (cos beta)))) (cn2:dim p q loc (rem (+ beta (* 2.0 pi)) (* 2.0 pi)) dims ds)))) (cn2:dim (cn2:point base xmin ymin) (cn2:point base xmax ymin) (cn2:point base xmin (- ymin (* 8.0 ht))) 0.0 dims ds) (cn2:dim (cn2:point base xmax ymin) (cn2:point base xmax ymax) (cn2:point base (+ xmax (* 8.0 ht)) ymin) (/ pi 2.0) dims ds) (cn2:text (cn2:point base xmin (+ ymax (* 14.0 ht))) (* 1.6 ht) "CONEDEV2 - ECCENTRIC FRUSTUM - LOCAL NORMAL MEAN SURFACE" 0.0 notes font) (cn2:text (cn2:point base xmin (+ ymax (* 10.0 ht))) ht (strcat "INTERNAL d1=" (rtos (cn2:get 'd1 g) 2 2) " d2=" (rtos (cn2:get 'd2 g) 2 2) " PERPENDICULAR h=" (rtos height 2 2) " NORMAL t=" (rtos (cn2:get 't g) 2 2) " CENTRE OFFSET E=" (rtos eccentric 2 2) " mm") 0.0 notes font) (cn2:text (cn2:point base xmin (+ ymax (* 6.0 ht))) ht (strcat "Mean rim lengths small/large=" (rtos (cn2:get 'perim1 g) 2 3) "/" (rtos (cn2:get 'perim2 g) 2 3) " mm; numerical outline=" (itoa (cn2:get 'n g)) " intervals.") 0.0 notes font) (cn2:text (cn2:point base xmin (+ ymax (* 2.0 ht))) ht "18 marked azimuth divisions at 20 deg. Seam at shortest generator, toward offset (+X). Rims generally not circular." 0.0 notes font) ;; Horizontal station schedule uses inside-circle azimuth, NOT equal mean ;; perimeter pitch. The fine calculation mesh is separate from these marks. (setq tableY (- ymin (* 16.0 ht)) colwidth (/ (- xmax xmin) 18.0)) (foreach vertex (cn2:stations g) (setq i (car vertex) row (caddr vertex) x (+ xmin (* i colwidth))) (cn2:center (cn2:point base x tableY) ht (itoa i) notes font) (cn2:center (cn2:point base x (- tableY (* 3.0 ht))) ht (strcat (rtos (cadr vertex) 2 0) "d") notes font) (cn2:center (cn2:point base x (- tableY (* 6.0 ht))) ht (rtos (nth 6 row) 2 2) notes font)) (cn2:text (cn2:point base xmin (- tableY (* 11.0 ht))) ht "Schedule rows: station / inside-circle azimuth / true mean-surface generator length (mm). 0 and 18 are seam edges." 0.0 notes font) (cn2:text (cn2:point base xmin (- tableY (* 15.0 ht))) ht "Mean surface = inner cone offset t/2 along LOCAL normal, trimmed at SAME fixed end planes. No single d+t correction." 0.0 notes font) (cn2:text (cn2:point base xmin (- tableY (* 19.0 ht))) ht "No weld gap, overlap, rolling/kerf compensation or cut-face bevel modeled. All lengths mm; dimensions non-associative." 0.0 notes font) ;; Inside, mean and outside section in the eccentricity plane (azimuth 0/pi). (setq fv (cn2:point base (+ xmax r2 (* 35.0 ht)) ymin)) (foreach phi (list 0.0 pi) (foreach off (list 0.0 half (cn2:get 't g)) (setq a (cn2:mean3 g phi height off) b (cn2:mean3 g phi 0.0 off)) (cn2:line (cn2:point fv (car a) (caddr a)) (cn2:point fv (car b) (caddr b)) (if (= off 0.0) cut (if (= off half) meanlayer divs))))) (cn2:line (cn2:point fv 0.0 (* -5.0 ht)) (cn2:point fv 0.0 (+ height (* 5.0 ht))) divs) (cn2:line (cn2:point fv eccentric (* -5.0 ht)) (cn2:point fv eccentric (+ height (* 5.0 ht))) divs) (cn2:text (cn2:point fv (- r2) (+ height (* 13.0 ht))) ht "SECTION IN OFFSET PLANE: BLUE INSIDE / GREEN MEAN / GREY OUTSIDE" 0.0 notes font) (cn2:dim (cn2:point fv (- eccentric r1) height) (cn2:point fv (+ eccentric r1) height) (cn2:point fv eccentric (+ height (* 6.0 ht))) 0.0 dims ds) (cn2:dim (cn2:point fv (- r2) 0.0) (cn2:point fv r2 0.0) (cn2:point fv 0.0 (* -6.0 ht)) 0.0 dims ds) (cn2:dim (cn2:point fv r2 0.0) (cn2:point fv r2 height) (cn2:point fv (+ r2 (* 9.0 ht) eccentric) 0.0) (/ pi 2.0) dims ds) (if (> eccentric 0.0) (cn2:dim (cn2:point fv 0.0 (/ height 2.0)) (cn2:point fv eccentric (/ height 2.0)) (cn2:point fv 0.0 (/ height 2.0)) 0.0 dims ds)) (prompt (strcat "\nCONEDEV2 created with " (itoa (cn2:get 'n g)) " fine intervals. Generator min/max=" (rtos (cn2:get 'minslant g) 2 3) "/" (rtos (cn2:get 'maxslant g) 2 3) ". Use ZOOM Extents; one UNDO removes this run."))) (defun cn2:positive (message default / value) (initget 6) (setq value (getreal (strcat message " <" (rtos default 2 2) ">: "))) (if value value default)) (defun cn2:offset (default / value) (initget 4) (setq value (getreal (strcat "\nCentre offset E, default=(d2-d1)/2, one side vertical <" (rtos default 2 2) ">: "))) (if value value default)) ;; SwaMiti Surface Development Tool for Eccentric Cone, Visit www.swamiti.com for more (defun c:CONEDEV2 (/ *error* undoOpen d1 d2 height thick eccentric reason g picked) (defun *error* (message) (if undoOpen (command-s "_.UNDO" "_End")) (if (and message (not (wcmatch (strcase message) "*CANCEL*,*QUIT*,*EXIT*"))) (prompt (strcat "\nCONEDEV2: " message))) (if undoOpen (prompt "\nUse UNDO to remove partial drawing objects.")) (princ)) (if (= 1 (getvar "CVPORT")) (prompt "\nSwitch to model space first.") (progn (prompt "\nCONEDEV2: INTERNAL diameters, PERPENDICULAR height, NORMAL thickness, adjustable centre offset E.") (setq d1 (cn2:positive "\nSmall internal diameter d1" 1000.0) d2 (cn2:positive "\nLarge internal diameter d2, greater than d1" 2000.0) height (cn2:positive "\nPerpendicular spacing h between parallel end planes" 1000.0) thick (cn2:positive "\nPlate thickness t, NORMAL to local wall" 10.0) eccentric (cn2:offset (/ (- d2 d1) 2.0)) reason (cn2:reason d1 d2 height thick eccentric)) (if reason (prompt (strcat "\nNo drawing: " reason)) (progn (prompt "\nCalculating/refining the local-normal mean-surface development...") (setq g (cn2:build (cn2:params d1 d2 height thick eccentric)) 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) (cn2:draw g picked) (command-s "_.UNDO" "_End") (setq undoOpen nil))))) (princ)) (princ "\nLoaded CONEDEV2.lsp. Type CONEDEV2; Enter accepts the one-side-vertical sample.") (princ) ;; SwaMiti Surface Development Tool for Eccentric 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 cn2:logo-cell (p u v w h scale layer / a b c d) (setq a (cn2:point p (* u scale) (* v scale)) b (cn2:point a (* w scale) 0.0) c (cn2:point a 0.0 (* h scale)) d (cn2:point b 0.0 (* h scale))) (cn2: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 cn2:brand (p ht / layer style scale row) (setq layer (cn2:layer "SWAMITI-BRANDING" 7) style (cn2:unique "STYLE" "SWAMITI-TEXT") scale (/ (* 6.0 ht) 177.0)) (cn2: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)) (cn2:logo-cell p (car row) (cadr row) (caddr row) (nth 3 row) scale layer)) (cn2:text (cn2: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 Eccentric 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 cn2: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))))))) (cn2:make-original data)) (defun cn2:draw (g picked / swaMinX swaMinY swaTextH) (cn2:draw-main g picked) (if (and swaMinX swaMinY swaTextH) (cn2:brand (list swaMinX (- swaMinY (* 14.0 swaTextH)) 0.0) swaTextH)))