Fusion 360 post processing

gradymorgan
Posts: 3
Joined: Sun Jul 12, 2015 7:06 pm

Re: Fusion 360 post processing

Post by gradymorgan » Sun Aug 23, 2015 7:05 pm

Here's the search string I've used to find bad arcs in my gcode:

Code: Select all

^G[23] [^J\n]*$
Tom, how did you figure out the Js should be 0?

From http://www.cnccookbook.com/CCCNCGCodeArcsG02G03.htm, it sounds like it should be just remembering the last J, though from the sections I've had trouble with, that theory doesn't make sense. I'm going to try adding J0 as you suggest.
- Modal IJK Centers: When IJK are absolute center coordinates, some controllers will remember the last center defined, hence IJK is modal in that case. When using a control set up like this, you can just keep issuing XYZ commands for arcs without having to define a new center each time. It's not clear you'll save much though--how often do you want to do a bunch of arcs with the same center?

Code: Select all

G3 X-1.2274 Y-0.004 I-0.0125 J-0.0004
G1 Y-0.0044
Y-0.1922
Y-0.1926
G3 X-1.2024 Y-0.1931 I0.0125
G1 Y0.1455
G3 X-1.2154 Y0.1576 I-0.0125 J-0.0004

TomDChi
Posts: 184
Joined: Wed Mar 18, 2015 2:36 pm

Re: Fusion 360 post processing

Post by TomDChi » Mon Aug 24, 2015 4:53 am

I had no specific reason to think that the commands *should* use zero for the missing value, I just tried it and figured that as long as it didn't send the spindle crashing off to the side, that was close enough for now. I was just trying to get some funky 3d stuff from Fusion to run, not worrying if it was going to produce accurate geometry. Nothing funky was produced that I noticed, so I'm guessing that it was OK. If I try something specific/precise it might turn out to be wrong.

My goal here is: model in Fusion 360, output g code from Fusion 360, tweak as little as possible (none preferably) and accurately produce stuff on the Shapeoko 3 with the stock, grbl based controller.

1) I'm trying to find out if it's standard/normal with g code to omit values either if they're 0 or if they remain the same from previous commands. I have the problem of knowing so little about it that I don't know the terminology to search for or how to interpret what I find. About the question from CNC Cookbook "how often do you want a bunch of arcs with the same center?" the answer would appear to be, "When you want to do a helical plunge." I turned that off in Fusion 360 to avoid a bunch of those lines in the output, but I'd like to be able to do it without a bunch of hand coding. (Actually, I just created a really simple circular pocket to make it generate a helix, and the resulting g code looks OK. I'll try to load it in Carbide Motion in a little bit to see if it complains.)

2) It's possible that grbl isn't bothered by the missing values, and it's just Carbide Motion being picky and refusing to try running the code because of the missing values. I got ChiliPeppr to connect and jog the SO3 from my Mac, so I'll try running some code that Motion doesn't like and see if the Carbide board+current grbl runs it or barfs. If it runs the output from Fusion 360 via a different control software, that does the trick for me.

3) If that doesn't work, then I'll contact Autodesk and see if things can be readily or easily tweaked to get these values included explicitly.

4) If needed, I'll dig into scripting to address this. I've never been able to break into understanding regular expressions, but this sounds like exactly what its for. I just did a little digging, and I can get GREP to return all the G2 or G3 lines in a .nc file. For each line that starts with G2 or G3, make sure it has both "I" and "J", and if "I" is missing, but "I0 " before the "J" and if "J" is missing put " J0" at the end of the line, and similar for each possible command. I could probably do it in AppleScript, but regular expression sounds like the perfect fit for this. That said, it will result in code that should run but that doesn't mean it's the *right* code to make what I want to make...

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

Re: Fusion 360 post processing

Post by cvoinescu » Mon Aug 24, 2015 1:59 pm

WillAdams wrote:It should be practicable to edit the files using a GREP search-replace.
sed will do just fine, it doesn't need to be a full editor. :)
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

TomDChi
Posts: 184
Joined: Wed Mar 18, 2015 2:36 pm

Re: Fusion 360 post processing

Post by TomDChi » Sun Aug 30, 2015 9:50 pm

I downloaded Java and got Universal G Code Sender working (zero problems, Mac OS X 10.9.5)

I generated some new g code from Fusion 360 using the generic grbl post processor and hit "send" (air cutting at first). It worked with no problems. Helical ramping in, lots of arcing moves in 2d adaptive clearing, curved corners, etc. Didn't hiccup at all.

Code: Select all

G3 X2.3981 Y1.1025 Z0.0337 I-0.0569 J-0.017
X2.5119 Y1.1365 Z0.0174 I0.0569 J0.017
X2.3981 Y1.1025 Z0.001 I-0.0569 J-0.017
...
X2.5144 Y1.1195 Z-0.2096 I0.0569 J0.017
X2.3956 I-0.0594
X2.5144 I0.0594
G1 Y1.1252
Those last two lines (before the G1 command) are still G3 commands, but are "missing" J values. These sorts of things appear all the time in the g code Fusion generates. (I don't know if there's a 'verbose' or similar setting to force everything to be output explicitly.) Grbl on the Carbide board appeared to work fine with this (over and over, in the midst of about 20,000 total lines.)

So now I'm on to asking Carbide why Motion balks at this code?

I'll keep using the generic grbl post processor and see if I find anything that doesn't work.

edit:

In hindsight, I should have included a longer block of code (made up line numbers in this case):

Code: Select all

1	G0 X2.5119 Y1.1365
2	Z0.6
3	Z0.2
4	Z0.0625
5	G1 Z0.05 F30
6	G3 X2.3981 Y1.1025 Z0.0337 I-0.0569 J-0.017
7	X2.5119 Y1.1365 Z0.0174 I0.0569 J0.017
8	X2.3981 Y1.1025 Z0.001 I-0.0569 J-0.017
9	X2.5119 Y1.1365 Z-0.0153 I0.0569 J0.017
10	X2.3981 Y1.1025 Z-0.0316 I-0.0569 J-0.017
11	X2.5119 Y1.1365 Z-0.0479 I0.0569 J0.017
12	X2.3981 Y1.1025 Z-0.0642 I-0.0569 J-0.017
13	X2.5119 Y1.1365 Z-0.0806 I0.0569 J0.017
14	X2.3981 Y1.1025 Z-0.0969 I-0.0569 J-0.017
15	X2.5119 Y1.1365 Z-0.1132 I0.0569 J0.017
16	X2.3981 Y1.1025 Z-0.1295 I-0.0569 J-0.017
17	X2.5119 Y1.1365 Z-0.1458 I0.0569 J0.017
18	X2.3981 Y1.1025 Z-0.1622 I-0.0569 J-0.017
19	X2.5119 Y1.1365 Z-0.1785 I0.0569 J0.017
20	X2.3981 Y1.1025 Z-0.1948 I-0.0569 J-0.017
21	X2.5144 Y1.1195 Z-0.2096 I0.0569 J0.017
22	X2.3956 I-0.0594
23	X2.5144 I0.0594
24	G1 Y1.1252
I bring this up because I noticed that it's excluding "X" or "Y" values from, for instance, G1 commands - clearly the missing "X" on line 24 is '0'. The Motion app opens this sort of thing in g code and passes it t grbl, which seems to process it without a problem. So is there some technical reason/issue that makes it not a bug/problem that Carbide Motion app refuses to load g code with these missing "I", "J" or "K" values?

AnonymousPerson
Posts: 758
Joined: Sun Apr 26, 2015 1:16 pm
Location: 3753 Cruithne

Re: Fusion 360 post processing

Post by AnonymousPerson » Wed Sep 09, 2015 3:43 pm

WillAdams wrote:According to this: http://community.carbide3d.com/t/fusion ... =willadams

It should work:
Just uploaded a new CM V2 beta that works with Autodesk CAM.

Use the Mach3 post
Uncheck "Use Radius" in the post processor
That worked for me just now. Drilling holes, a 2D pocket, and a 2D contour. No errors at all. No idea if it'll keep working for everything, but it's a start (for me!). :D
Shapeoko 3 #516

Fablicator
Posts: 113
Joined: Thu Jul 02, 2015 7:59 pm

Re: Fusion 360 post processing

Post by Fablicator » Wed Sep 09, 2015 6:56 pm

AnonymousPerson wrote:
WillAdams wrote:According to this: http://community.carbide3d.com/t/fusion ... =willadams

It should work:
Just uploaded a new CM V2 beta that works with Autodesk CAM.

Use the Mach3 post
Uncheck "Use Radius" in the post processor
That worked for me just now. Drilling holes, a 2D pocket, and a 2D contour. No errors at all. No idea if it'll keep working for everything, but it's a start (for me!). :D
Where can I download the V2 Beta?

AnonymousPerson
Posts: 758
Joined: Sun Apr 26, 2015 1:16 pm
Location: 3753 Cruithne

Re: Fusion 360 post processing

Post by AnonymousPerson » Wed Sep 09, 2015 7:36 pm

Fablicator wrote:Where can I download the V2 Beta?
I just used the normal Carbide Motion download, and it worked. My assumption was that since the "beta" was such a long time ago, the code would have made it into the released version:

http://carbide3d.com/files/CarbideMotion-Setup.exe
Shapeoko 3 #516

Fablicator
Posts: 113
Joined: Thu Jul 02, 2015 7:59 pm

Re: Fusion 360 post processing

Post by Fablicator » Wed Sep 09, 2015 8:12 pm

AnonymousPerson wrote:
Fablicator wrote:Where can I download the V2 Beta?
I just used the normal Carbide Motion download, and it worked. My assumption was that since the "beta" was such a long time ago, the code would have made it into the released version:

http://carbide3d.com/files/CarbideMotion-Setup.exe
Ok, thanks!

TomDChi
Posts: 184
Joined: Wed Mar 18, 2015 2:36 pm

Re: Fusion 360 post processing

Post by TomDChi » Mon Sep 21, 2015 12:45 pm

I've been using the g code from Fusion 360's generic grbl processor and Universal G Code Sender with no problems. But Fusion 360 just updated, and part of the "what's new" is a comment that they've added a "Carbide3D" post-processor.

http://fusion360.autodesk.com/learning/ ... 06B36D160D

The comment is pretty far down in Fabrication -> Post-Processor

I did some searching, but I haven't been able to find any details about it, and I haven't tried it yet.

AnonymousPerson
Posts: 758
Joined: Sun Apr 26, 2015 1:16 pm
Location: 3753 Cruithne

Re: Fusion 360 post processing

Post by AnonymousPerson » Mon Sep 21, 2015 1:39 pm

Well spotted. :D
Shapeoko 3 #516

Post Reply