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: 

Highlighting cut similar to basic UI

5 REPLIES 5
Reply
Message 1 of 6
nnamfoh
316 Views, 5 Replies

Highlighting cut similar to basic UI

Is it possible to recreate the interaction provided by the cutting tool in the regular api through scripting.

The feature I would specifically like is to show a highlighted and semitransparent body created by the interference of two bodies similar to the red section in this picture. Other than creating a body and highlighting it by changing its appearance how can this be done using the api?

Capture.PNG

Tags (2)
5 REPLIES 5
Message 2 of 6
marshaltu
in reply to: nnamfoh

Hello,

 

Unfortunately we didn't have API to do highlight or create a transient body. It would be great if you can describe detailed workflow what you want to support. We will check if there is any workaround for you?

 

Thanks,

Marshal 

 

 



Marshal Tu
Fusion 360 Developer
Autodesk, Inc.

Message 3 of 6
nnamfoh
in reply to: marshaltu

Work Flow:

User imports a component from a library of scripts. These components containa a body that may interfere with their existing model bodies.

I wan't to allow the user to see a highlighted interference body when they click a button. The body would be the resulting body of an InterferenceResult between the user's bodies and the bodies created by the script.

Message 4 of 6
ekinsb
in reply to: nnamfoh

Another option to this is to create the actual result as the preview.  This is what Fusion does internally for most of the previews.  In your command's executePreview event you can do the actual modeling operation(s) to create teh final result.  Each time the executePreview is called, Fusion automatically aborts what was done before so you're starting from scratch each time.  This is demonstrated in the Cutouts sample available on GitHub (https://github.com/brianekins/FusionHackathonSamples).


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 5 of 6
nnamfoh
in reply to: ekinsb

This doesn't quite work for my example. My goal is to highlight bodies that violate a series of constraints, such as but not limitied to intefering bodies. I may be able to inefficiently recreate the highlight style above If there were appearaences in the library that were used to make those colors and transclucent materials. Is it possible to get a list of those?

Message 6 of 6
ekinsb
in reply to: nnamfoh

There are still things missing in the API that are needed to fully do what you're describing.  Primarily the ability to do transient modeling outside of the Fusion design and also to display custom graphics.  We've begun the early design for some of this but I don't know yet when it will be available for you to use.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog

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