Dear Brian,
Many thanks for your detailed code solution, espectially the part on how to identify the smaller surface for offsetting. Very useful.
Just a follow-up question on the use of the splitting tool. I sketched a profile like below with the following code, however, when I want to split a BREP solid body with the sketch, it always raise the following error: RunTimeError 3: Invalid Splitting Tool
I checked in API that it is a closed profile, and when I select the sketch line as split tool in UI, it can be selected as 1 closed loop. But I can't seem to define the correct split tool in API, how do I create the correct split tool for the splitInput?
sketch = rootComp.sketches.add(rootComp.yZConstructionPlane)
lines = sketch.sketchCurves.sketchLines
arcs = sketch.sketchCurves.sketchArcs
arc0 = arcs.addByCenterStartSweep(hole0_pts.item(4), hole0_pts.item(3), math.pi)
line0 = lines.addByTwoPoints(arc0.endSketchPoint, hole0_pts.item(1))
arc1 = arcs.addByCenterStartSweep(hole0_pts.item(5), line0.endSketchPoint, math.pi)
line1 = lines.addByTwoPoints(arc1.endSketchPoint, arc0.startSketchPoint)
#arc = arcs.addByCenterStartSweep(hole0_pts.item(4), hole0_pts.item(3), math.pi)
# split body with the profile
bodies = adsk.core.ObjectCollection.create()
bodies.add(rootComp.bRepBodies.itemByName('Body10'))
tool = adsk.fusion.Path.create(arc0,adsk.fusion.ChainedCurveOptions.connectedChainedCurves)
splitInput = splits.createInput(bodies, tool, True)
splits.add(splitInput)