南印虎坛

南印虎坛 - 传递梵境之音(゜-゜)つロ~

Raster Autocad !!exclusive!! -

;; Calculate spacing (setq x-spacing (/ width (1- cols))) (setq y-spacing (/ height (1- rows)))

(princ (strcat "\nDone. " (itoa total-points) " points created."))

includes an optional Z-axis sine wave pattern – replace the math with your own elevation data (e.g., from a CSV file or formula). 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): "))

(command "_.UNDO" "_END") (setvar "cmdecho" 1) (princ) ) ;; Calculate spacing (setq x-spacing (/ width (1-

;; 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)) )

(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") from a CSV file or formula).

;; --- Generate Raster Points --- (setq pt-list '()) (setq total-points (* rows cols)) (princ (strcat "\nGenerating " (itoa total-points) " points..."))

手机版|小黑屋|南印虎坛 |网站地图

GMT+8, 2025-12-14 17:22 , Processed in 0.080429 second(s), 35 queries .

Powered by Jrntr.net X3.4

© 2013-2021 南印虎坛

快速回复 返回顶部 返回列表