CheckInterference Example

```Sub Example_CheckInterference()
' This example creates a box and a cylinder in model space.
' It then finds the interference between the two solids and
' creates a new solid from that interference.

' For ease of viewing, different colors are used for the box, the
' cylinder, and the interference solid.

Dim boxLength As Double, boxWidth As Double, boxHeight As Double
Dim boxCenter(0 To 2) As Double
boxCenter(0) = 5#: boxCenter(1) = 5#: boxCenter(2) = 0
boxLength = 10#: boxWidth = 7: boxHeight = 10#

' Create the box (3DSolid) object in model space
Set boxObj = ThisDrawing.ModelSpace.AddBox(boxCenter, boxLength, boxWidth, boxHeight)
Call color.SetRGB(80, 100, 244)
boxObj.TrueColor = color

' Define the cylinder
Dim cylinderCenter(0 To 2) As Double
Dim cylinderHeight As Double
cylinderCenter(0) = 0#: cylinderCenter(1) = 0#: cylinderCenter(2) = 0#
cylinderHeight = 20#

' Create the Cylinder (3DSolid) object in model space
Call color.SetRGB(244, 150, 50)
cylinderObj.TrueColor = color

' Find the interference between the two solids and create a new solid from it
Set solidObj = boxObj.CheckInterference(cylinderObj, True)
Call color.SetRGB(200, 150, 244)
solidObj.TrueColor = color

' Change the viewing direction of the viewport
Dim NewDirection(0 To 2) As Double
NewDirection(0) = -1: NewDirection(1) = -1: NewDirection(2) = 1
ThisDrawing.ActiveViewport.direction = NewDirection
ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport
ZoomAll

' You can now delete the box and cylinder in AutoCAD to
' see the interference solid more clearly.

End Sub
```