Raster Autocad Online
;; --- User Input --- (princ "\nSpecify first corner of raster area: ") (setq p1 (getpoint "\nPick first corner: ")) (if (null p1) (exit)) (setq p2 (getcorner p1 "\nSpecify opposite corner: ")) (if (null p2) (exit))
(defun c:RASTERGRID (/ p1 p2 width height rows cols x-spacing y-spacing i j x-pos y-pos pt-list point-obj total-points) (setvar "cmdecho" 0) (command "_.UNDO" "_BEGIN") raster autocad
includes an optional Z-axis sine wave pattern – replace the math with your own elevation data (e.g., from a CSV file or formula). ;; --- User Input --- (princ "\nSpecify first
(command "_.UNDO" "_END") (setvar "cmdecho" 1) (princ) ) = width 0.0) (<
;; Optional: Create a polyline border around the grid (initget "Yes No") (if (= (getkword "\nDraw border around grid? [Yes/No] <No>: ") "Yes") (progn (command "_.PLINE" (list (car p1) (cadr p1) (caddr p1)) (list (car p2) (cadr p1) (caddr p1)) (list (car p2) (cadr p2) (caddr p1)) (list (car p1) (cadr p2) (caddr p1)) "_C") (princ "\nBorder drawn.") ) )
;; Ensure width and height are positive (if (or (<= width 0.0) (<= height 0.0)) (progn (princ "\nError: Width and height must be greater than zero.") (exit) ) )