TimPaterson / Fusion360-Batch-Post

Fusion add-in to post all CAM setups at once, optionally dividing them into folders.
The Unlicense
128 stars 25 forks source link

Linuxcnc G53 #27

Closed alkabal closed 2 years ago

alkabal commented 3 years ago

Hi

First : many thanks for sharing this tool.

I get a error message trying to use your plugin with linuxcnc lathe post :

0 files were written. 1 Setups were skipped due to error: Failed on setup Configuration4: Fusion 360 reported an exception: 3 : ReferenceError: G53 is not defined Error at line: 1

Can you help for that ?

Best regards

TimPaterson commented 3 years ago

I assume you're using individual operations for the free version of Fusion 360. Do you know what operation within the setup it failed on? Can you post process that operation with the native command? What G-code to you get?

alkabal commented 3 years ago

Yes you are right i try to use "individual operations for the free version"

It seem directly related to the use of G53 because i just do a test with G28 setting in post pro config and that work fine.

The problem with G28 on a lathe is the post pro output G28 U0. W0. so no other choice than using G53 G0 X0 Z0.

Thanks for reply, Br

alkabal commented 3 years ago

Here is attached the outputed file with wrong G28 1 Configuration4.txt

TimPaterson commented 3 years ago

You did not answer any of my questions - what happens using the native post process command.

I guess you're using a lathe, which I know nothing about. Another lathe user told me the "Restore rapid moves" option does not work with a lathe. He forked the repository and added something that worked for him at:

https://github.com/arielnh56/Fusion360-Batch-Post

You can read his comments at the end of Issue #23.

alkabal commented 3 years ago

Hi

I'm sorry if i have answear incorrectly.

Well difficult for me to explain this in english.

Doing the post pro one by one with regular command produce good working file. (with G28 setting the result contain U W but nothing related to this discution)

Doing the "post pro all" with your addon using the setting G53 for retract fail with error mentionned Doing the "post pro all" with your addon using the setting G28 for retract produce a working ngc file

Thanks for pointing to this fork, i have also try with it but produce the same error.

For now i haven't check in detail the difference for restoring rapid move.

Here you have the file output with native function using G53 : finishing.txt ebauche.txt face.txt tronconnnage.txt filletage.txt

Here you have the file outputed with both plugin but using G28 : process all G28 lathe fork.txt process all G28 original plugin.txt

Br, thanks

TimPaterson commented 3 years ago

Now I realize this may be the same as Issue #24. I don't understand how Fusion 360 can throw an exception when using their API but it works when using their built-in command. There is info about how to debug it there, but there was no response on that and I'm not sure it would lead to a solution anyway. I suspect a problem with the post processor itself or how it gets initialized.

A possible work-around would be for PostProcessAll to take the individual output files and stitch them together, but I'm not sure that's worth effort over just running them one at a time.

alkabal commented 3 years ago

Thanks for this answear.

For my own this is a lathe with automatic tool changer so this is really better to produce some all in one file. off course i can stitch myself but is better to have this automatically created like you have done with this plugin.

At first i have hoped than this is only a little patch needed in your application, now i sadly understand : problem is from api.

Thanks, best regards

enricobono commented 3 years ago

Hello. I have the same issue with Mach3mill. Weird part is that I'm not using G53 (nor G28), so it's nowhere in the generated .nc files.

How can I help you to figure out what's wrong with F360?

TimPaterson commented 3 years ago

I can't reproduce the problem, so it's up to someone who can to debug it. From Issue #24:

Debugging is pretty good using Visual Studio Code, as described here: https://modthemachine.typepad.com/my_weblog/2019/09/debug-fusion-360-add-ins.html

I think the call to the Fusion 360 API that threw this exception would have occurred on line 951 of PostProcessAll, assuming you've selected "Use individual operations".

enricobono commented 3 years ago

Thanks, Tim. I'll try to debug it using some JetBrains IDE, let's see if it works. But I was looking around on the internet, and found this: https://forums.autodesk.com/t5/fusion-360-manufacture/bizarre-problem-trying-and-failing-to-duplicate-a-post-file/td-p/7385460

So, maybe it's related to some issue on the post processor per se?