Raster | Autocad //top\\
;; Loop through rows (Y direction) and columns (X direction) (setq i 0) ; row index (while (< i rows) (setq y-pos (+ (cadr p1) (* i y-spacing))) (setq j 0) ; col index (while (< j cols) (setq x-pos (+ (car p1) (* j x-spacing))) ;; Create point at (x-pos, y-pos, elevation z from p1) (setq point-obj (command "_.POINT" (list x-pos y-pos (caddr p1)))) (setq j (1+ j)) ) (setq i (1+ i)) )
(princ (strcat "\nDone. " (itoa total-points) " points created.")) raster autocad
;; Get number of rows and columns (initget 7) ; Non-zero, non-negative, no enter (setq cols (getint "\nNumber of columns (horizontal divisions): ")) (initget 7) (setq rows (getint "\nNumber of rows (vertical divisions): ")) ;; Loop through rows (Y direction) and columns
;; Calculate spacing (setq x-spacing (/ width (1- cols))) (setq y-spacing (/ height (1- rows))) row index (while (<
;; 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) ) )