# union_11 (Solid/Solid - with trim)
# written by John Dannenhoffer

# generate box and cylinder SolidBodys
BOX       0  0  0  3  2  1
STORE     theBox

CYLINDER  3/2  -1  1/2  3/2  3  1/2  1/4
STORE     theCylinder

# show outlines of theBox and theCylinder
RESTORE   theBox
ATTRIBUTE _name  $theBox
ATTRIBUTE _viz   $off

RESTORE   theCylinder
ATTRIBUTE _name  $theCylinder
ATTRIBUTE _viz   $off

# perform the UNION (SolidBody), keeping only the part of theCylinder
#    containing (3/2;5/2;1/2), and theBox can be found by looking
#    in the (0;-.0001;0) direction from that point
RESTORE   theCylinder
RESTORE   theBox
UNION     0  3/2;5/2;1/2;0;-.0001;0
ASSERT    @itype 3

END
