明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1415|回复: 1

疑问

[复制链接]
发表于 2003-7-5 00:38:00 | 显示全部楼层 |阅读模式
为何我在以下程序代码中,将剖切参数设为·ture或false画出的·图形没变化呢,知道这可能是个概念问题,请高手解释一下。
Public Sub BooleanResults()
    '本过程演示实体间进行布尔操作的结果
    ThisDrawing.SetVariable "ISOLINES", 20
    Dim cylObj1 As Acad3DSolid
    Dim cylCenter(0 To 2) As Double
    Dim cylRadius As Double
    Dim cylHeight As Double
    cylCenter(0) = 0#: cylCenter(1) = 0#: cylCenter(2) = 0#
    cylRadius = 100#
    cylHeight = 500#
    Set cylObj1 = ThisDrawing.ModelSpace.AddCylinder _
                      (cylCenter, cylRadius, cylHeight)
    Dim cylObj2 As Acad3DSolid
    cylCenter(0) = 0#: cylCenter(1) = 0#: cylCenter(2) = 0#
    cylRadius = 125#
    cylHeight = 500#
    Set cylObj2 = ThisDrawing.ModelSpace.AddCylinder _
                      (cylCenter, cylRadius, cylHeight)'将2个柱体进行布尔运算
    cylObj2.Boolean acSubtraction, cylObj1
    ThisDrawing.Regen True
    ThisDrawing.SendCommand "_hide" & vbCr
   
   
        '声明组成剖切面的3个点数组变量
    Dim slicePt1(0 To 2) As Double
    Dim slicePt2(0 To 2) As Double
    Dim slicePt3(0 To 2) As Double
    '剖切面定义成YZ平面
    slicePt1(0) = 0: slicePt1(1) = 75: slicePt1(2) = 0
    slicePt2(0) = 0: slicePt2(1) = -75: slicePt2(2) = -100
    slicePt3(0) = 0: slicePt3(1) = -75: slicePt3(2) = 100
    '剖切经布尔运算以后的空心圆柱实体
    Dim sliceObj As Acad3DSolid
    Set sliceObj = cylObj2.SliceSolid(slicePt1, slicePt2, slicePt3, ture)

'    sliceObj.Delete                 '保留剖切的Box实体
    ThisDrawing.Regen True

End Sub
发表于 2003-9-22 22:36:00 | 显示全部楼层
不懂啊!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-28 12:36 , Processed in 0.155035 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表