https://www.cadtutor.net/forum/attachment.php?attachmentid=55483&cid=1&stc=1
至于DTR函数,我将其添加到EXTDOOR3和4中:
;; Added DTR function
(defun dtr (x)
;define degrees to radians function
(* pi (/ x 180.0))
;divide the angle by 180 then
;multiply the result by the constant PI
)
我没有访问V14的权限,所以我不知道你的问题的答案,尽管有时我不得不修改旧代码。
这是我添加DTR后的代码。看看它是否适合你。
(警告:我正在使用BricsCAD)
[附件]55484 我刚刚签出了我之前上传的extdoor lsp文件,我看不出你在哪里加载了dtr函数。它工作正常吗?如果可以,是否可以上载extdoor lsp。在你的回复中,以便我以后可以下载? 谢谢你的下载,我会试试,让你知道。 我刚刚测试了外门。lsp单门、双门、带2个侧灯的门都工作,只有带1个侧灯的门停止工作。(外门2) 有什么迹象表明它不起作用?它会抛出错误吗? 然而,当我加载Intdoor时,extdoor2 lsp不会打开。lsp,其书写方式与原始extdoor相同。奇怪的是,所有4个lsp程序都适用于外门和内门。 正如我之前发布的(DTR 180)意味着以另一种方式旋转180度,需要2xPI才能形成一个圆,所以只需将任何(DTR 180)替换为PI即可。这样就不需要任何DTR调用基本几何。
; angles to be used as they are just square can be pre-declared
; or put in a library and autoloaded same as DTR
; preset the ang
(setq a90 (/ pi 2.0)) ; 90 degrees
(setq a180 pi) ; 180 degrees
(setq a270 (+ pi (/ pi 2.0))) ; 270 degrees
删除对(DTR 180)的引用,只需使用PI即可
; my square angle presets
(setq a90 (/ pi 2.0))
; 180 use PI or
(setq a180 pi)
(setq a270 (+ pi (/ pi 2.0))
页:
1
[2]