我在 Autolisp 上苦苦挣扎,我找不到我正在寻找的答案。
我有一个空列表,我用已变成字符串的点坐标填充它。生成的列表类似于:
(12.5484,7.6054,0.0000 17.0626,8.1782,0.0000 17.5642,10.7199,0.0000 12.0110,11.4716,0.0000)
是否有任何可能的方式可以垂直进行列表填充并具有如下输出:
(12.5484,7.6054,0.0000
17.0626,8.1782,0.0000
17.5642,10.7199,0.0000
12.0110,11.4716,0.0000)
我正在使用的代码是:
(setq lst()) ;create empty list named lst
(while
(setq a (getpoint "\nTick the Point")) ;select points
(setq x (rtos(car a))) ;get as X the x of a point (as string)
(setq y (rtos(cadr a))) ;get as Y the y of a point (as string)
(setq z (rtos(caddr a))) ;get as Z the z of a point (as string)
(setq pnt (strcat x "," y ","z))
(setq lst (cons pnt lst)) ;start filling the empty list with the coordinates of the points
)