作者sjgau (sjgau)
看板Cad_Cae
标题Re: [问题] AutoCAD lisp做subtract
时间Thu May 24 05:44:46 2012
(defun c:test ( / )
; 上面的 / 的左右都要 空一格
(command "sphere" '(0 0 0) 10)
(command "-group" "c" "big" "big" "L" "")
; 执行 test 之前,必须先
; -group
; E
; big, 和 small
(command "sphere" '(5 0 0) 6)
(command "-group" "c" "small" "small" "L" "")
(command "subtract" "G" "big" ""
"G" "small" "")
(princ)
)
;|
指令: -group
输入群组选项
[?/排序(O)/加入(A)/移除(R)/分解(E)/更名(REN)/可选取的(S)/建立(C)] <建立>: e
输入群组名称或 [?]: big
指令:
-GROUP 输入群组选项
[?/排序(O)/加入(A)/移除(R)/分解(E)/更名(REN)/可选取的(S)/建立(C)] <建立>: e
输入群组名称或 [?]: small
指令: (load "test")
C:TEST
指令: test
sphere
指定中心点或 [三点(3P)/两点(2P)/相切、相切、半径(T)]:
指定半径或 [直径(D)] <6.0000>: 10
指令: -group 输入群组选项
[?/排序(O)/加入(A)/移除(R)/分解(E)/更名(REN)/可选取的(S)/建立(C)] <建立>: c
输入群组名称或 [?]: big 输入群组描述: big
选取物件: L 找到 1 个
选取物件:
指令: sphere
指定中心点或 [三点(3P)/两点(2P)/相切、相切、半径(T)]:
指定半径或 [直径(D)] <10.0000>: 6
指令: -group 输入群组选项
[?/排序(O)/加入(A)/移除(R)/分解(E)/更名(REN)/可选取的(S)/建立(C)] <建立>: c
输入群组名称或 [?]: small 输入群组描述: small
选取物件: L 找到 1 个
选取物件:
指令: subtract 选取要从中减去的实体、曲面或面域 ..
选取物件: G
输入群组名称: big 找到 1 个
选取物件: 选取要减去的实体、曲面和面域 ..
选取物件: G
输入群组名称: small 找到 1 个
选取物件:
|;
※ 引述《tn00364361 (小氵斿)》之铭言:
: 小弟我查不到如何在autolisp里面使用subtract这个功能
: 我的程式码:
: (defun c:test (/)
: (command "sphere" '(0 0 0) 10)
: (command "sphere" '(5 0 0) 6)
: (princ)
: )
: 我想用第二个小球让第一个大球有一个空腔
: 是否有哪位高手愿意帮我一下呢 >"<
--
e-mail:
[email protected]
我的课程介绍网页:
http://www.csie.ntu.edu.tw/train/teacher_display.php?num=18
AutoCAD 台湾地区菁英讲师获选
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 123.193.224.204