I can’t tell if I’m missing something here. Is there a way to cut solids? I thought SolidSolidCutUtils Class would have it covered but it takes elements. Are solids elements? It doesn’t appear so, when I use AddCutBetweenSolids I get “TypeError: expected Element, got Solid”
This is just testing code.
areas = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Areas).WhereElementIsNotElementType().ToElements()
sEBO = SpatialElementBoundaryOptions()
sEBO.SpatialElementBoundaryLocation = SpatialElementBoundaryLocation.Center
zones = []
for a in areas:
print(a)
ab = a.GetBoundarySegments(sEBO)
curveLoop = CurveLoop()
for l in ab:
# print(l)
for c in l:
# print(c)
curveLoop.Append(c.GetCurve())
zones.append(GeometryCreationUtilities.CreateExtrusionGeometry([curveLoop],XYZ.BasisZ,100))
SolidSolidCutUtils.AddCutBetweenSolids(doc, zones[0], zones[1])