Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extrude Objects to Cut

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
commonmandan
694 Views, 3 Replies

Extrude Objects to Cut

I've made an add-in which creates a new component which has 2 sketches and a body from an extrusion of the first sketch. I'd like to cut into the body with a profile from the second sketch without cutting into any other bodies that may or may not exist and may or may not be visible. I've looked through the API documentation for something similar to the "objects to cut" without any success.

 

cuts = newComp.features.extrudeFeatures
extInput = cuts.createInput(frontSketch.profiles.item(0), adsk.fusion.FeatureOperations.CutFeatureOperation)
extent_all_ne = adsk.fusion.ThroughAllExtentDefinition.create(False)
extInput.setOneSideExtent(extent_all_ne, adsk.fusion.ExtentDirections.NegativeExtentDirection)
ext2 = cuts.add(extInput)

The code above cuts through everything.

3 REPLIES 3
Message 2 of 4
MaxJeblick
in reply to: commonmandan

I faced the same issue. One workaround for this problem is to turn the visibility of all bodies but the ones you want to cut off. This is the same procedure you did in Fusion to exclude certain bodies from being cut prior they modified the extrude command. This workaround seems not to be optimal, but I'm not aware of an method equivalent to the objects-to-cut functionality within the API. 

Message 3 of 4
ekinsb
in reply to: MaxJeblick

What's been said is correct; to control which bodies participate in the extrusion you need to set their visibility.  The new capability to select which bodies participate is coming to the API in the next major update in January.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 4 of 4
MaxJeblick
in reply to: ekinsb

That sounds great! Looking forward for the new features.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report