搞定了!我理解了老大说的第三点的意思了,第一次先把gearR(原对象)和cylinder进行交运算,后面在和数组对象进行交运算,成功解决了这个问题!代码都在这: Dim gearR As Acad3DSolid ’geaR是单个齿圈,阵列一周后形成齿轮所有齿圈(所有齿圈就是后面的gearobj) Set gearR = acadApp.ActiveDocument.ModelSpace.AddExtrudedSolidAlongPath(regObj(0), path) '面域是regobj,样条曲线是path Dim gearObj As Variant Dim pnt(0 To 2) As Double pnt(0) = InsertPnt(0): pnt(1) = InsertPnt(1): pnt(2) = InsertPnt(2) + L / 2 ‘L是齿宽 Dim cylinder As Object ’cylinder是齿根圆圆柱,下面与gearobj进行交布尔运算 gearObj = gearR.ArrayPolar(gearZ, 6.28, InsertPnt) 'gearz是齿数 Set cylinder = acadApp.ActiveDocument.ModelSpace.AddCylinder(pnt, Rf, L) cylinder.boolean 0,gearR '先和原对象进行交运算 Dim obj For Each obj In gearObj cylinder.Boolean acUnion, obj Next 两个老大真是我心中的神啊!!感激不尽!! |