Fixed Fusion360 Post Processor

Hello everyone,

I’ve noticed that when using the supplied Fusion 360 post-processor for the MR-1, the G-code for setting the plane, units, etc., is not always included in the subprograms when using multiple tools with the “Split File” option.

To fix this issue, you can add the following lines to the post-processor script below the call to redirectToFile on line 413:

function onSection() {
    // ... existing code ...

    if (splitHere) {
        // ... existing code ...

        redirectToFile(path);

       // ADDED: Reset modal variables to ensure G-code outputs in new subprograms
       gMotionModal.reset();
       gAbsIncModal.reset();
       gFeedModeModal.reset();
       gPlaneModal.reset();
       gUnitModal.reset();

        // ... existing code ...
    }

    // ... existing code ...
}

For those who prefer not to edit it themselves, you can download the file from my GitHub: Modified PostProcessor for Fusion360 for the MR-1 · GitHub

4 Likes

Is there a way to pass the fusion tool comment (from the tool library) on to CutControl rather than it trying to read the T line? as example, I have many form mills that are custom profiles, and CutControl just displays that it is 0.231" form mill as example. or sometimes it shows a weird fraction, I.E. there 2.25" Fly cutter shows 11/5 face mill.

If I can put the tool setup info directly in the comment, then I could probably avoid having to use the fusion setup sheet.

also, if you have the same tool used at the end of one setup, and is the same tool at the start of the next setup, fusion does not split it. I would like to have that happen, since I need to reposition the workpiece even though there is no actual tool change.

@brian_e You can post each setup individually and that should get you unique files.

I know that I CAN do that but I would someday LIKE to be able to use the split by tool function better. Even having the option to add a send to front command at the end of a tool would be awesome.

For now, I am doing split by tool, but only 1 setup at a time, so still have to post 6 times per part… which helps, a lot of my stuff is 6-10 tools per face., so posting each time would be 40-60 post routines and a LOT more clicks (and opportunities for human error forgetting to select an operation and post it…

There is another plugin for fusion that does it into folders (GitHub - TimPaterson/Fusion360-Batch-Post: Fusion add-in to post all CAM setups at once, optionally dividing them into folders.) that I am playing with to see if that will make it a clean 1 click routine to post all setups at once in a way that cut control can still understand.

Re: tool display in CutControl: You could update the post processor to give a more human readable tool format BUT CutControl is expecting the exact format. Looks like CutControl does render the name of the tool, so you could try putting more info in the name.

Re: Postprocessor splitting by OP rather than tool, this is something I was looking into the other day, still working on it - I am not seeing anything in the f360 api that allows you to detect when you are entering a new setup.

1 Like

so i did get the post updated to use the tool comment (from tool library/postprocessor/comment) and seems to work fine.

I’m also working on changing the “output M6” to be a “Send to Front” option.

1 Like

Alright folks, I’m fairly confident this is good, but as with anything else you get from the interwebz, use at your own risk.

Key Functions:

Removed Output Tool stuff as I don’t see where that is ever going to be used. It’s still there in the backend, just not shown on the front end.

Added options for end of file action: Auto Send to Front, Send to Home, or just Z Up. If nothing is selected, the tool machine just stops motion and stays where it was at, spindle on etc. If multiples are selected, Z Up has priority, then Front, then Home.

Send to Front location is independent of machine send to front macro, you set it in the post, so could be different for different setups.

All programs start with G53 Z0 as well, had a few close calls coming off the tool setter where tool was not high enough to clear something.

Changed the file comments so it displays the Post-Processor Tool Comment in Cut Control. Tool numbers can be whatever you want, there is essentially no upper limit. Fusion does seem (for whatever reason) to have an upper tool limit of 1316134911? A very off the wall number but whatever. If you have more than 1.3B Tools, you aren’t reading this.)

It does NOT split at setup change if the same tool is used at the end of one setup and start of next setup, however I have found that to be a rare use case, so I’m not digging into it.

Has val’s unit fix (above) for split files also.

https://tinyurl.com/ycxbbt4f

4 Likes

Well I have already found my first bug, it is injecting the send to front (or whatever is selected) after each tool path, regardless of split options, even when using same tool from one path to the next. The bigger problem is that it does not call for spindle back on if spindle is same speed as previous path.

1 Like