Topsolid online Help Index
This example shows how to create an associative boolean operation on a shape.
Dim TopDoc As TopSolid.DocumentDesign
...
Dim cv As TopSolid.Curve
Dim shpart As TopSolid.ShapePart
Dim shtool As TopSolid.Shape
' make basic extruded shape
Set cv = doc.Curves.AddBasicCircle(0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, 0)
Set shpart = doc.Shapes.AddBasicExtruded(cv, 0, 0, 1, 0.05, 0, 0, False, True)
cv.Element.Delete
Set cv = Nothing
' make basic tool extruded shape
Set cv = doc.Curves.AddBasicCircle(0, 0, 0, 1, 0, 0, 0, 1, 0, 0.01, 0)
Set shtool = doc.Shapes.AddBasicExtruded(cv, 0, 0, 1, 0.05, 0, 0, False, True)
cv.Element.Delete
Set cv = Nothing
' make intersection operation
Call shpart.Operations.AddIntersection(shtool)
...
Topsolid online Help Index