Prizma və silindr.
SubFindInterferenceBetweenSolids()
Dim boxObj As Acad3DSolid
Dim length As Double,width As Double,height As Double
Dim center(0 To 2) As Double
center(0) = 5: center(1) = 5: center(2) = 0
length = 5: width = 7: height = 10
Set boxObj = ThisDrawing.ModelSpace.AddBox(center, length, width, height)
boxObj.Color = acWhite
' indi isə silindr
Dim CylObj As Acad3DSolid
Dim CylRadius As Double
Dim CylHeight As Double
center(0) = 0: center(1) = 0: center(2) = 0
CylRadius = 5: CylHeight = 20
Set CylObj = ThisDrawing.ModelSpace.AddCylinder(center, CylRadius, CylHeight)
CylObj.Color = acCyan
' Kəsişmə
Dim solidObj As Acad3DSolid
Set solidObj = boxObj.CheckInterference(CylObj, True)
solidObj.Color = acRed
ZoomExtents
End Sub
Dostları ilə paylaş: |