lanhuazhang 发表于 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

gzy 发表于 2003-9-22 22:36:00

不懂啊!
页: [1]
查看完整版本: 疑问