Raster Autocad May 2026
includes an optional Z-axis sine wave pattern – replace the math with your own elevation data (e.g., from a CSV file or formula).
(princ (strcat "\nDone. " (itoa total-points) " points created.")) raster autocad
;; 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.") ) ) includes an optional Z-axis sine wave pattern –
;; --- 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)) [Yes/No] <No>: ") "Yes") (progn (command "_
;; 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) ) )
;; Calculate dimensions (setq width (abs (- (car p2) (car p1))) height (abs (- (cadr p2) (cadr p1))) )
;; Check if spacing is too small (if (or (< x-spacing 0.001) (< y-spacing 0.001)) (progn (princ "\nError: Spacing too small. Increase grid size or reduce rows/columns.") (exit) ) )