Message 1 of 3

Not applicable
07-06-2017
11:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm hitting an issue where the bRepCells.item on a BoundaryFill aren't consistently the same array index. The 2 Bodies used are a rectangular box and then a doing an Intersect with a cylinder to produce a rounded top. The intersect produces 3 items, but there doesn't appear to be a way to guarantee that the item index is the right one. It also appears dependent on the order of the adsk.core.ObjectCollection.create.add operations. Is there a way to consistently get the correct item?
code snippet:
circles = sketch.sketchCurves.sketchCircles circle1 = circles.addByCenterRadius(adsk.core.Point3D.create(center, 0, 0), radius) prof = sketch.profiles.item(0) distance = adsk.core.ValueInput.createByReal(length) extrude1 = extrudes.addSimple(prof, distance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation) # BoundaryFill intersect to radius the board tools = adsk.core.ObjectCollection.create() tools.add(rootComp.bRepBodies.item(0)) tools.add(rootComp.bRepBodies.item(1)) # Create input boundaryFillInput = boundaryFills.createInput(tools, adsk.fusion.FeatureOperations.IntersectFeatureOperation) # Specify which cell is kept print(boundaryFillInput.bRepCells.item(1).this) cell = boundaryFillInput.bRepCells.item(1) cell.isSelected = True # Create the boundary fill boundaryFills.add(boundaryFillInput)
Thanks,
Jesse
Solved! Go to Solution.