; The Codewriting Workbook ; Creating Computational Architecture in AutoLISP ; by Robert J. Krawczyk ; Princeton Architectural Press, 2008 ; -------------------------------------------------------------------------- ; CH05B.LSP ; -------------------------------------------------------------------------- ; Disclaimer: The information contained in this file is distributed on an ; "as is" basis, without warranty. Although every precaution has been taken ; in the preparation of this work, the author and publisher shall not have ; any liability to any person or entity with respect to any loss or damage ; caused or alleged to be caused directly or indirectly by the information ; contained in this work. ; -------------------------------------------------------------------------- (defun dtr (a) (* pi (/ a 180.0))) (defun rtd (a) (/ (* a 180.0) pi)) (defun tan (a) (/ (sin a) (cos a))) ; -------------------------------------------------------------------------- ;--------------------------------------------------------------------------- ; VT - top view (defun c:vt () (command "vpoint" "r" 270 90) (command "zoom" "e" "ucs" "v" "zoom" ".9x") (princ) ) ; VL - left view (defun c:vl () (command "vpoint" "r" 180 0) (command "zoom" "e" "ucs" "v" "zoom" ".9x") (princ) ) ; VR - right view (defun c:vr () (command "vpoint" "r" 0 0) (command "zoom" "e" "ucs" "v" "zoom" ".9x") (princ) ) ; VF - front view (defun c:vf () (command "vpoint" "r" 270 0) (command "zoom" "e" "ucs" "v" "zoom" ".9x") (princ) ) ; VB - back view (defun c:vb () (command "vpoint" "r" 90 0) (command "zoom" "e" "ucs" "v" "zoom" ".9x") (princ) ) ; VSW - SW view (defun c:vsw () (command "vpoint" "r" 270 90) (command "ucs" "v") (command "vpoint" "r" 225 45) (command "zoom" "e" "zoom" ".9x") (princ) ) ; VSE - SE view (defun c:vse () (command "vpoint" "r" 270 90) (command "ucs" "v") (command "vpoint" "r" 315 45) (command "zoom" "e" "zoom" ".9x") (princ) ) ; VNE - NE view (defun c:vne () (command "vpoint" "r" 270 90) (command "ucs" "v") (command "vpoint" "r" 45 45) (command "zoom" "e" "zoom" ".9x") (princ) ) ; VNW - NW view (defun c:vnw () (command "vpoint" "r" 270 90) (command "ucs" "v") (command "vpoint" "r" 135 45) (command "zoom" "e" "zoom" ".9x") (princ) ) ; -------------------------------------------------------------------------- (defun dtr (a) (* pi (/ a 180.0))) (defun rtd (a) (/ (* a 180.0) pi)) ; -------------------------------------------------------------------------- (defun prog01 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg01 - Circle") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oRad (getdist cpnt "\nEnter outside radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq NumSegs (getint "\nEnter number of segments: ")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq SweepAngle 360.0) (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; start mesh (command ".3DMESH" (+ NumSegs 1) "5") (repeat (+ NumSegs 1) ; compute top (setq top oHeight) ; compute outside edge (setq oradpt (polar cpnt (dtr ang) oRad)) (setq xoff (nth 0 oradpt)) (setq yoff (nth 1 oradpt)) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) ; compute inside edge (setq iradpt cpnt) (setq xoff (nth 0 iradpt)) (setq yoff (nth 1 iradpt)) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt1) ; inc ang (setq ang (+ ang anginc)) ) (setvar "CMDECHO" 1) (princ) ) ; -------------------------------------------------------------------------- (defun prog02 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg02 - Circle") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oRad (getdist cpnt "\nEnter outside radius: ")) (setq iRad (getdist cpnt "\nEnter inside radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq NumSegs (getint "\nEnter number of segments: ")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq SweepAngle 360.0) (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; start mesh (command ".3DMESH" (+ NumSegs 1) "5") (repeat (+ NumSegs 1) ; compute top (setq top oHeight) ; compute outside edge (setq oradpt (polar cpnt (dtr ang) oRad)) (setq xoff (nth 0 oradpt)) (setq yoff (nth 1 oradpt)) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) ; compute inside edge (setq iradpt (polar cpnt (dtr ang) iRad)) (setq xoff (nth 0 iradpt)) (setq yoff (nth 1 iradpt)) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt1) ; inc ang (setq ang (+ ang anginc)) ) (setvar "CMDECHO" 1) (princ) ) ;---------------------------------------------------------------------------- ; -------------------------------------------------------------------------- (defun prog03 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg03 - Circle") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oXRad (getdist cpnt "\nEnter outside X radius: ")) (setq oYRad (getdist cpnt "\nEnter outside Y radius: ")) (setq iXRad (getdist cpnt "\nEnter inside X radius: ")) (setq iYRad (getdist cpnt "\nEnter inside Y radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq NumSegs (getint "\nEnter number of segments: ")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq SweepAngle 360.0) (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; start mesh (command ".3DMESH" (+ NumSegs 1) "5") (repeat (+ NumSegs 1) ; compute top (setq top oHeight) ; compute outside edge (setq xoff (* oXRad (cos (dtr ang)))) (setq yoff (* oYRad (sin (dtr ang)))) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) ; compute inside edge (setq xoff (* iXRad (cos (dtr ang)))) (setq yoff (* iYRad (sin (dtr ang)))) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt1) ; inc ang (setq ang (+ ang anginc)) ) (setvar "CMDECHO" 1) (princ) ) ; -------------------------------------------------------------------------- (defun prog04 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg04 - Circle") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oXRad (getdist cpnt "\nEnter outside X radius: ")) (setq oYRad (getdist cpnt "\nEnter outside Y radius: ")) (setq iXRad (getdist cpnt "\nEnter inside X radius: ")) (setq iYRad (getdist cpnt "\nEnter inside Y radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq iHeight (getdist cpnt "\nEnter inside height: ")) (setq NumSegs (getint "\nEnter number of segments: ")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq SweepAngle 360.0) (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; start mesh (command ".3DMESH" (+ NumSegs 1) "5") (repeat (+ NumSegs 1) ; compute top (setq top oHeight) ; compute outside edge (setq xoff (* oXRad (cos (dtr ang)))) (setq yoff (* oYRad (sin (dtr ang)))) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) ; compute top (setq top iHeight) ; compute inside edge (setq xoff (* iXRad (cos (dtr ang)))) (setq yoff (* iYRad (sin (dtr ang)))) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt1) ; inc ang (setq ang (+ ang anginc)) ) (setvar "CMDECHO" 1) (princ) ) ; -------------------------------------------------------------------------- (defun prog05 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg05 - Circle") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oXRad (getdist cpnt "\nEnter outside X radius: ")) (setq oYRad (getdist cpnt "\nEnter outside Y radius: ")) (setq iXRad (getdist cpnt "\nEnter inside X radius: ")) (setq iYRad (getdist cpnt "\nEnter inside Y radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq iHeight (getdist cpnt "\nEnter inside height: ")) (setq NumSegs (getint "\nEnter number of segments: ")) (setq SweepAngle (getreal "\nEnter total sweep angle:")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; segment count (setq nseg 0) ; start mesh, check sweep angle (if (= SweepAngle 360) (command ".3DMESH" (+ NumSegs 1) "5") (command ".3DMESH" (+ NumSegs 3) "5") ) (repeat (+ NumSegs 1) ; compute top (setq top oHeight) ; compute outside edge (setq xoff (* oXRad (cos (dtr ang)))) (setq yoff (* oYRad (sin (dtr ang)))) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) ; compute top (setq top iHeight) ; compute inside edge (setq xoff (* iXRad (cos (dtr ang)))) (setq yoff (* iYRad (sin (dtr ang)))) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; inc segment (setq nseg (+ nseg 1)) ; compute midpoint of bottom (setq mpnt (polar pnt4 (angle pnt4 pnt1) (/ (distance pnt4 pnt1) 2))) ; check if to close at start (if (and (/= SweepAngle 360) (= nseg 1)) (command mpnt mpnt mpnt mpnt mpnt) ) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt1) ; check if to close at end (if (and (/= SweepAngle 360) (= nseg (+ NumSegs 1))) (command mpnt mpnt mpnt mpnt mpnt) ) ; inc ang (setq ang (+ ang anginc)) ) (setvar "CMDECHO" 1) (princ) ) ; -------------------------------------------------------------------------- (defun prog06 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg06 - Circle") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oXRad (getdist cpnt "\nEnter outside X radius: ")) (setq oYRad (getdist cpnt "\nEnter outside Y radius: ")) (setq iXRad (getdist cpnt "\nEnter inside X radius: ")) (setq iYRad (getdist cpnt "\nEnter inside Y radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq oHeightOff (getdist cpnt "\nEnter outside height offset: ")) (setq iHeight (getdist cpnt "\nEnter inside height: ")) (setq iHeightOff (getdist cpnt "\nEnter inside height offset: ")) (setq NumSegs (getint "\nEnter number of segments: ")) (setq SweepAngle (getreal "\nEnter total sweep angle:")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; segment count (setq nseg 0) ; start mesh, check sweep angle (if (= SweepAngle 360) (command ".3DMESH" (+ NumSegs 1) "5") (command ".3DMESH" (+ NumSegs 3) "5") ) (repeat (+ NumSegs 1) ; compute top (setq top (+ oHeight (* (sin (dtr (* ang 2))) oHeightOff))) ; compute outside edge (setq xoff (* oXRad (cos (dtr ang)))) (setq yoff (* oYRad (sin (dtr ang)))) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) ; compute top (setq top (+ iHeight (* (cos (dtr (* ang 3))) iHeightOff))) ; compute inside edge (setq xoff (* iXRad (cos (dtr ang)))) (setq yoff (* iYRad (sin (dtr ang)))) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; inc segment (setq nseg (+ nseg 1)) ; compute midpoint of bottom (setq mpnt (polar pnt4 (angle pnt4 pnt1) (/ (distance pnt4 pnt1) 2))) ; check if to close at start (if (and (/= SweepAngle 360) (= nseg 1)) (command mpnt mpnt mpnt mpnt mpnt) ) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt1) ; check if to close at end (if (and (/= SweepAngle 360) (= nseg (+ NumSegs 1))) (command mpnt mpnt mpnt mpnt mpnt) ) ; inc ang (setq ang (+ ang anginc)) ) (setvar "CMDECHO" 1) (princ) ) ; -------------------------------------------------------------------------- (defun prog07 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg07 - Circle") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oXRad (getdist cpnt "\nEnter outside X radius: ")) (setq oYRad (getdist cpnt "\nEnter outside Y radius: ")) (setq iXRad (getdist cpnt "\nEnter inside X radius: ")) (setq iYRad (getdist cpnt "\nEnter inside Y radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq oHeightOff (getdist cpnt "\nEnter outside height offset: ")) (setq iHeight (getdist cpnt "\nEnter inside height: ")) (setq iHeightOff (getdist cpnt "\nEnter inside height offset: ")) (setq NumSegs (getint "\nEnter number of segments: ")) (setq SweepAngle (getreal "\nEnter total sweep angle:")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; segment count (setq nseg 0) ; start mesh, check sweep angle (if (= SweepAngle 360) (command ".3DMESH" (+ NumSegs 1) "7") (command ".3DMESH" (+ NumSegs 3) "7") ) (repeat (+ NumSegs 1) ; compute top (setq otop (+ oHeight (* (sin (dtr (* ang 2))) oHeightOff))) ; compute outside edge (setq xoff (* oXRad (cos (dtr ang)))) (setq yoff (* oYRad (sin (dtr ang)))) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) otop)) ; compute top (setq itop (+ iHeight (* (cos (dtr (* ang 3))) iHeightOff))) ; compute inside edge (setq xoff (* iXRad (cos (dtr ang)))) (setq yoff (* iYRad (sin (dtr ang)))) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) itop)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; inc segment (setq nseg (+ nseg 1)) ; compute midpoint of bottom (setq mpnt (polar pnt4 (angle pnt4 pnt1) (/ (distance pnt4 pnt1) 2))) ; check if to close at start (if (and (/= SweepAngle 360) (= nseg 1)) (command mpnt mpnt mpnt mpnt mpnt mpnt mpnt) ) ; compute mirrored points (setq pnt5 (list (nth 0 pnt3) (nth 1 pnt3) (- itop))) (setq pnt6 (list (nth 0 pnt1) (nth 1 pnt1) (- otop))) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt5 pnt6 pnt1) ; check if to close at end (if (and (/= SweepAngle 360) (= nseg (+ NumSegs 1))) (command mpnt mpnt mpnt mpnt mpnt mpnt mpnt) ) ; inc ang (setq ang (+ ang anginc)) ) ; rotate vertical (command ".ZOOM" "e") (command ".ROTATE3D" "all" "" "Y" "" "-90") (command ".ZOOM" "e") (setvar "CMDECHO" 1) (princ) ) ; -------------------------------------------------------------------------- ; -------------------------------------------------------------------------- (defun prog08 () (graphscr) ; circular curve (setvar "CMDECHO" 0) ; center point (setq cpnt (list 0.0 0.0 0.0)) ; get curve parameters (princ "\nProg08 - Any curve") (setq CurveLayer (getstring "\nEnter layer name: ")) (setq oRad (getdist cpnt "\nEnter outside radius: ")) (setq oHeight (getdist cpnt "\nEnter outside height: ")) (setq NumSegs (getint "\nEnter number of segments: ")) ; clear layer (command ".LAYER" "THAW" "*" "ON" "*" "") (command ".LAYER" "MAKE" CurveLayer "") (command ".LAYER" "SET" 0 "") (command ".LAYER" "OFF" "@*" "FREEZE" "@*" "") (command ".LAYER" "THAW" CurveLayer "ON" CurveLayer "SET" CurveLayer "") (command ".ERASE" "ALL" "") ; calculate curve variables (setq SweepAngle 360.0) (setq anginc (/ SweepAngle NumSegs)) ; start angle (setq ang 0.0) ; set ground elev (setq grdelev 0.0) ; start mesh (command ".3DMESH" (+ NumSegs 1) "5") (repeat (+ NumSegs 1) ; compute top (setq top oHeight) ; compute outside edge (setq xoff (* oRad (cos (dtr ang)))) (setq yoff (* oRad (expt (sin (dtr ang)) 13.0))) ;(setq oradpt (polar cpnt (dtr ang) oRad)) ;(setq xoff (nth 0 oradpt)) ;(setq yoff (nth 1 oradpt)) ; outside edge (setq pnt1 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) (setq pnt2 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) ; compute inside edge (setq iradpt cpnt) (setq xoff (nth 0 iradpt)) (setq yoff (nth 1 iradpt)) (setq pnt3 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) top)) (setq pnt4 (list (+ (nth 0 cpnt) xoff) (+ (nth 1 cpnt) yoff) grdelev)) ; add to mesh (command pnt1 pnt2 pnt3 pnt4 pnt1) ; inc ang (setq ang (+ ang anginc)) ) (setvar "CMDECHO" 1) (princ) ) ; -------------------------------------------------------------------------- ;---------------------------------------------------------------------------- ;---------------------------------------------------------------------------- ; load solid modelling DLL (arxload "geom3d") ;----------------------------------------------------------------------------