或者将圆环的坐标导出到txt文件,其中X轴和Y轴是圆环的中心
谢谢 嘿,我为我的问题做了一个新帖子
我希望有人能帮我 我希望任何Lisp程序的大师都能帮助我
非常感谢你 是的,我看到了。你会给我们你已经有的lisp程序吗?就像我说的,也许它可以修改为包括甜甜圈。你说它已经在循环中起作用了,所以看起来你已经达到了95%的目标。如果没有必要,为什么要重新发明轮子? 这是我在你的另一个帖子中提到的lisp。
Donut2Cir。lsp 谢谢你的帮助
那么,我该如何选择要更改的甜甜圈呢?
你能修复Lisp程序吗? 该程序为您实现了这一点。 为了避免混淆,我在这个帖子中添加了其他帖子。 备注:我认为他/她想说,用lisp从圈到甜甜圈很好,但他/她需要相反的过程。
@比恩达:当OverKill成为ExpressTool的一部分时,它用来将“甜甜圈”转换成圆圈,但现在不再了(2014年没有了。我没有2013年的测试)。
^^^^这应该是你的线程的名称^^^^
试试这个:
(defun c:test ( / file_name open_file selected_donuts
center_ocs center_wcs
donut_elist index
first_point second_point z_value normal)
(if
(and
(setq file_name (getfiled "Save text file" (getvar 'dwgprefix)"txt" 1))
(setq selected_donuts (ssget
'((0 . "LWPOLYLINE")
;;; (8 . "0") ; add layer filter
(90 . 2)
(70 . 1)
(-4 . "=")
(42 . 1)
)
)
)
(setq index 0)
)
(progn
(setq open_file (open file_name "w"))
(repeat (sslength selected_donuts)
(setq donut_elist(entget (ssname selected_donuts index))
normal (cdr (assoc 210 donut_elist))
z_value (cdr (assoc38 donut_elist))
first_point(cdr (assoc10 donut_elist))
second_point (cdr (assoc10 (reverse donut_elist)))
center_OCS (mapcar '(lambda (a b) (/ (+ a b) 2.0)) first_point second_point)
center_WCS (trans (append center_OCS (list z_value)) normal 0)
index (1+ index)
)
(princ (rtos (carcenter_WCS) 2 (getvar 'luprec)) open_file); x position
(princ "\t" open_file)
(princ (rtos (cadr center_WCS) 2 (getvar 'luprec)) open_file); y position
;;; (princ "\t" open_file)
;;; (princ (rtos (caddr center_WCS) 2 (getvar 'luprec)) open_file); z position
(princ "\n" open_file)
)
(startapp "notepad" file_name)
(close open_file)
)
)
(princ)
)
页:
1
[2]