Fusion 360 changes

David,

Shout if you want a hand :slight_smile:

I have spent a significant amount of my professional liife crafting regular expressions in Perl, sed, YACC and Lex. If you have a UNIX type box, I’d recommend Perl as you can just do so much more than sed using the pattern below. This allows you to look at previous lines, very useful for pattern matching, which is a pain in sed and awk. I know you can do it and have done it, but whilst in the same way I could theoretically do my own brain surgery, it’s kinda hard.

#!/bin/perl -w 

while(<>)
{
    if (/someregexp here/)
    {

    }
}

The ultimate pattern matcher would be YACC and Lex, which might be overkill for this. This is of interest to me for gcode generation.

Rob

If you want to put rapids back in, it is going to take more than regular expressions. I ran a quick test. Rapids sections are no longer identified, but they appear to cutting sections sandwiched between a lead out section and a lead in section. So assuming this always holds true, the sections will be easy to identify. If it does not hold true, then the code will likely have to be aware of the clearance height.

So assuming rapid XY is 2000 and rapid Z is 480, and the cutting feedrate is 1080. A section like this:

; MOVEMENT_CUTTING
G1 Z5 F1080
G1 X50.237 Y4.365
G1 Z2

…would need to be converted into something like:

; MOVEMENT_CUTTING
G1 Z5 F480
G1 X50.237 Y4.365 F2000
G1 Z2 F480
G1 F1080

I’m more of a fan of python, but only because I know it.

In the case of what I was referring to, my plan was to simply look for negative Z movements and put them at one feed rate, and then look for positive Z movements, and set the F speed to another.

Rapids around the board would be a different feat and not something I’ve even looked at yet.

I don’t have any CNC projects right now, but I could throw something together to play with.

Rapids around the board are generally at clearance height, so z=‘fixedValue’
IMO seems like a lot of gymnastics just to use fusion. I’d suggest just dealing with the freecad sketches at that point, since the sketch tools are really the biggest advantage of fusion over freecad, s far as I can tell for the stuff most of us do.

It would be pretty awesome to have a true “post processor” that could take gcode from any number of uncooperative sources and generate gcode that would be MPCNC friendly. I know @jamiek was considering making a gcode checking website at one point. But having a big fat button to fix Z moves would be pretty neat.

It would be 50x the work, but a nice javascript web site for this would get it a ton more use. Most people don’t have linux available and even many people who own a pi don’t use the command line.

1 Like

Said g-code checker is partly implemented (mostly the things I cared about at the time) and is implemented in javascript precisely because it makes it shareable: https://vector76.github.io/gcode_tpgen/checker.html

I would say it’s stalled in the sense that I’m not likely to add more in the near future but anyone could fork it and extend it.

1 Like

Sorry if any of this duplicates something already in this long thread…

I’ve been playing with engraving in F360 and discovered that some of corner cuts, when it moves x, y and z at the same time we’re violating z max cut speed of the MPCNC.

I believe @jeffeb3 suggested that setting the max speed in Marlin would be a possible work around. While this may work it started me on a path to understand the post processor and the F360 API that drives the post processor. In the process I also discovered Autodesk’s extension for VSCode specially for building and testing post processors.

I now have a post processor that understands its current position and where it is moving to. With this information I can understand the type of move being made. If these moves are vertical retractions or horizontal moves above a safe height (a parameter zSafe) I turn these back into rapids. This corrects for most rapids and make the GCode much cleaner and faster. Since Marlin’s handling of G0 rapids is hit and miss I output the G0s with explicit feedrates.

While I was in the code I’ve reviewed the G1 code and how it handled feedrate. I found if you were moving in x, y and z at the same time (like during an engrave corner cut or any 3D cut) the feedrate for z was greater then the MPCNC max. Nothing I did in F360 solved this, except limiting all feedrates to be limited by max z.

I’ve now added code that takes every G1 cut and projects the federate into its x, y and z component and then scales these not to exceed the axis’s max feedrate then recalculated the resulting G1 vector’s feedrate.

The result is that a G1 can move in x, y and z at the same time and have a high feedrate when z is changing only a little relative to x and y. It z is changing a lot relative to x and y, like a corner engrave cut, then the feedrate gets scaled more heavily so not to exceed z max. These calculation seem to work well.

Originally I had hoped to do a pull request to add these changes back to guffy’s post processor but when I started to use Autodesk’s VSCode extension it required all the code to be one file. From that point the changes just started to increase and I now plan to just put this up on GitHub as a fork of guffy’s.

I still have cleanup work to do. Probing or any commands where the post processor outputs gcode that changes x, y, z position currently happens without F360 knowing this which messes up F360’s understanding of current position. The F360 API does have calls to tell F360 about these changes - I just need to insert these in the correct places when commands like probing are added to the GCode.

I’m busy a work currently so my time is limited in finishing what was a Xmas project. The reality is it will be several weeks more to complete this. Once it’s ready I’ll post more info.

4 Likes

Very cool. I look forward to your release.

This seems great. There are some really good things in there.

Keep in mind, creating the code is the easy part of an open source project. Supporting users and dealing with issues and maintenance is the tricky part. I think Guffy has done a great job on the side of really maintaining it. I would strongly suggest trying to work with @guffy to see if there’s a way to absorb the lessons you’ve both learned into one place.

This is an excellent solution and if every CAM did this, we would have a lot more CAM programs compatible with Marlin. The Z speed is the biggest source of trouble.

I haven’t even used fusion cam. But I know there are a lot of fans of fusion, so I would be very happy to see it return to useful.

This sounds like some really great ideas for the post-processor. Definitely looking forward to your release :+1:

1 Like

Here is a post related to an updated Post Processor https://forum.v1e.com/t/problem-with-fusion-and-z-feedrate/21487/14?u=flyfisher604

???

I found the fix here:


I just had to register to get the personal hobbyist subscription, which is free.

But for professionals - 500$/yr isn’t THAT bad. But it’s not for me, I don’t make much on this at all.

IDK, I spend less than that on the whole computer (I buy a new one maybe every 3-4 years). If you were using it 40 hours/week it would be more reasonable. But I still don’t like spending that much on software. And software as a service just drives me nuts.

That’s like one MPCNC per year, for a piece of software :crazy_face:

2 Likes

We pay for Adobe licensing. Even with the teacher’s discount, I think it’s $33/month :frowning:

But between the wife and I, we use 4 of their apps, so it ends up worth it.

It’s a lot, by all means. But comparing to a friend of mine who bought a full Solidworks license, 500usd is quite affordable for his firm.

Boo!!!

Oh well, it was a short but fun ride with f360 hobby. I squirted out several designs in less than a year since I switched from free cad .18 to f360. I have always been averse to “subscription plans” and this probably won’t change that. Looks like my Cnc work will be paused for a while as I learn cam on free cad 0.19.

I’m using the free version of solidworks now.

I think I was a little imprecise with the language. The personal version is free, I was just suprised that I suddenly had to registrer anew. Nothing drastic has changed, but they are continuously tightening the rope…

1 Like

Seems like they make you register it once a year. Has it been a year since you registered?

Agreed.

The ‘free’ registration only lasts 1 year. Each year you have to click a few buttons to renew the license.