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: 

Need some help in create a new addin to simulation the Additive manufacturing processing.

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
YanxiangGao
447 Views, 10 Replies

Need some help in create a new addin to simulation the Additive manufacturing processing.

Hello, community. I'm a software developer who wants to write a simulation tool for additive manufacturing processing. I have read a lot of examples and gone through the official help doc, but still have some difficulties for now.

I have created a sample component and generated a toolpath for it as shown below. And here is my question.

mishanyo1001_0-1714964440117.png

 

1. What does the toolpath mean here? Is it equal to G-Code or it is only a path and only combined with a particular machine would make it convert into a G-Code file?

2. I had successfully read the machine info here (ie, the Ender 3), But how can I extract the material info here (ie. PLA) in the example?

3. How can I get the G-Code directly in my adding? I know that I can generate a Gcode file through postprocessing. But is there any method to get the contents of the file without saving it to disk? Or maybe I should make a post-processing library, instead of a Fusion 360 adding?

 

Thank you.

Yours.

 

Labels (3)
10 REPLIES 10
Message 2 of 11
YanxiangGao
in reply to: YanxiangGao

Hello, community any advises for me?

Message 3 of 11
thomas.stock
in reply to: YanxiangGao

Hi @YanxiangGao ,

 

Apologies that we haven't responded sooner! I shall try answer your questions the best I can below, but I might need to also ask the wider Fusion Additive team to input on this also.

 

1. What does the toolpath mean here? Is it equal to G-Code or it is only a path and only combined with a particular machine would make it convert into a G-Code file?

 

The toolpath you see is simply a vector representation of the paths a printer will take to print the body. Therefore, the toolpath is postprocessed by the post engine using information supplied in the machine's postprocessor. 
I can put you in contact with out Additive postprocessing expert if you require?

 

2. I had successfully read the machine info here (ie, the Ender 3), But how can I extract the material info here (ie. PLA) in the example?

 

This is a good question, I am sure the name of the machine and printsetting can both be read via the Fusion API, but I am not sure about the information contained within them. Again, I would have to put you in contact with an expert for more information on this. 

 

3. How can I get the G-Code directly in my add-in? I know that I can generate a Gcode file through postprocessing. But is there any method to get the contents of the file without saving it to disk? Or maybe I should make a post-processing library, instead of a Fusion 360 add-in?

I am not certain on this either, I shall get an expert to respond to your 2nd and 3rd question.

 

 

Sorry I couldn't give you a full answer straight away, but I will ask the relevant experts to respond to the questions I could not answer - please bear with us!

 

If my answer has helped you, then please click "Accept Solution"
If not, feel free to reply back and tag me

Thanks,

Tom
Fusion 360 Additive Team


Message 4 of 11
YanxiangGao
in reply to: thomas.stock

Thanks for your reply, Thomas.

 

> The toolpath you see is simply a vector representation of the paths a printer will take to print the body. Therefore, the toolpath is postprocessed by the post engine using information supplied in the machine's postprocessor. 

> I can put you in contact with out Additive postprocessing expert if you require?

 

So, this means that the toolpath is only vectors and this is already the last output we can directly get in a Fusion 360's adding. And a GCode file/text should be finished in the postprocess, if so, I guess that I need some help from the postprocessing expert because I hadn't found enough info in doing a postprocess job.

 

> This is a good question, I am sure the name of the machine and printsetting can both be read via the Fusion API, but I am not sure about the information contained within them. Again, I would have to put you in contact with an expert for more information on this. 

>  I am not certain on this either, I shall get an expert to respond to your 2nd and 3rd question.

 

> Sorry I couldn't give you a full answer straight away, but I will ask the relevant experts to respond to the questions I could not answer - please bear with us!

 

Thank you for your response and for your efforts to provide assistance. I understand, and I'm happy to wait for a complete answer. Please let me know if there's anything else I can provide to help clarify the questions.

 

Yours,

Yanxiang Gao

 
Message 5 of 11
thomas.stock
in reply to: YanxiangGao

Hi @YanxiangGao ,

 

I'm glad that I was a little bit helpful!

 

I have reached out to the FFF postprocessing expert and he will reply to your message here.

If my answer has helped you, then please click "Accept Solution"
If not, feel free to reply back and tag me

Thanks,

Tom
Fusion 360 Additive Team


Message 6 of 11

Hello @YanxiangGao 

 

1 - As Thomas said, the toolpath does not contains the gcode.

It's just a list of coordinates and technical informations (fan speed, temperature....) that will be later used to generate the gcode.

It's only after creating an NC program, and posting it, with the post linked to the machine definition, or forcing another one if needed, that a gcode will be created.

It will be done in two steps, Fusion will create a binary cutter location file.

That will be passed as arguments, like the post properties, the path to the post processor, and the result file, as parameters when running the post engine executable.

Then the post engine executable will interpret the cutter location file and call the corresponding functions inside the post processor to generate the gcode.

So, the toolpath is not an object that can be accessed via the API to interrogate or manipulate it.

 

2 - Inside the post processor, we can access this information, as a comment when we are posting the gcode. I have no idea if it can be accessed via the API.

 

3 - You cannot get the gcode directly, an NC program must be created, eventually via the API, then posted on the disk. What you do with the resulting file is up to you.

You cannot post to a memory buffer, or request the gcode to Fusion.

An example for nc program creation can be found in the API help : https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7F3F9D48-ED88-451A-907C-82EAE67DEA93


______________________________________________________________

If my post answers your question, please click the "Accept Solution" button. This helps everyone find answers more quickly!



Serge.Q
Technical Consultant
cam.autodesk.com
Message 7 of 11

Dear Serge,

Thank you so much for your prompt and helpful response to my previous question. Your assistance in explaining the doubt in my mind is greatly appreciated!

I have one additional question that has come up as I continue to work on my project:

 

> We will create a simulation based on the GCode uploaded, and return the results to the Fusion 360 side. The question is about the visualization of the result, it would be a 3D model of the same shape as the GCode and with different colors . Of course, we can show the result in a browser or somewhere else, but it would be more user-friendly if we could show the result in the user's Fusion 360 workspace or at least not make the user go out of Fusion 360. So the question here is that is what would be the best practice if I want to show a 3D model in which different parts will have different values in the Fusion 360 platform?

 

I would be grateful if you could provide some guidance on these topics as well. Thank you once again for your support!

 

Best regards,

Yanxiang

Message 8 of 11

Hi @YanxiangGao ,

 

I am not an API specialist, nor a Design expert.

I am a post author, so anwering questions related to post is easy for me.

 

But for your last question, I am not an expert.

 

I can suggest two ways, one is creating several bodies, for each colors, and importing them in Fusion. Placement and orientation might be tricky.

Another solution might be using a decal, i.e. texture for coloring the solid. But finding the right scale and placement will not be easy either.

 

Maybe someone will give you better suggestions.

 

Regards



Serge.Q
Technical Consultant
cam.autodesk.com
Message 9 of 11
YanxiangGao
in reply to: YanxiangGao

Hello @serge.quiblier,


Thank you again for your advice.

 

Best regards.

Message 10 of 11
thomas.stock
in reply to: YanxiangGao

Hi @YanxiangGao ,

 

I will see if I can get a Fusion API expert to answer your final question on here.

 

Also, just in case you are not aware, we do have an additive manufacturing process simulation in Fusion, but unfortunately, this is only for Metal Powderbed Fusion (MPBF).
Please see a blog post I wrote here about it:

How To Run a Metal Powder Bed Fusion Simulation in Autodesk Fusion 

 

If my answer has helped you, then please click "Accept Solution"
If not, feel free to reply back and tag me

Thanks,

Tom
Fusion 360 Additive Team


Message 11 of 11

Hi @YanxiangGao,

 

you can add custom graphics to the scene by populating the CustomGraphicsGroup with various graphics entities like curves or bodies. Here's the sample file from the online help: https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-fb436dae-65fd-11e7-ac2f-3417ebc87622.
Just be aware that each separate drawing action may result in a new undo/redo state (i.e. each time an event is raised that you use for drawing new geometry), you might need to wrap all of the drawing steps into one command to accomodate for that.

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

Post to forums