Hacking gcode, who else enjoys it?

I’m learning a lot about CNC operations, CAD/CAM, etc with my new lowrider. I got a wild hair and decided I have to have some cam clamps for use on my spoil board. I chose to use the solution by Adventures in Creation which is a twist on Marius Hornberger’s cam clamps. 3/4" EMT conduit is the ‘dowel’ in this system.

I use Linux with FreeCAD to CAM things up and CAM them to gcode, and the same PC runs CNC.js for running the gcode. I ran a lot of test holes and settled on a pocket and helical drilling operation for accuracy and speed to create a hole that is a snug fit for the conduit.

FreeCAD doesn’t have a concept like EstlCAM of a finishing pass, so I ran two operations. The pocket I ran at higher speed and held it off the diameter by 0.1mm, then ran the helical slower. But the helical wanted to do the entire hole over again, so I cut out all the gcode except for the final helical around the diameter, this is the finish path. There may be other ways, but I’m feeling my way along and learning by trying things.

I then took that gcode and manually edited it to create a single row in the X direction across my spoil board; 11 holes at 750mm spacing, using G91 to switch to relative coordinates after each hole, move right 750mm, then back to absolute with G90 and reset X with G92. Then drill another hole and repeat. At the end of the row, move relative X-750 Y75 and end. Then I can run it again for the next row. Each row takes about 14 minutes.

CNC.js is helpful in that it shows what the gcode will do. My old 'merican brain is calibrated in inches so I make mistakes with mm and it showed me a hack that had me moving 10x too far back to the left side of the board. :smiley:

Anyway, this is just plain fun.

2 Likes

Progress today. Dual endstops means I can pick up another time and run some more rows to finish up :slight_smile:

2 Likes

Not per se, but I think you’re approach of leaving 0.1mm and then adding another operation to remove that is functionally identical. I assume by the above that you’re aware of the “extra offset” parameter, that accomodates leaving that 0.1mm.

I think it is usual to make the finishing pass a “full depth” cut to ensure a clean surface and eliminate any evidence of multiple passes at various depths. I guess this is basically what you did with the manually edited g-code? I have usually used either a contour or profile operation depending on the situation. The helix operation, by definition, is going to screw itself down to the final depth.

I’ll point out that the 0.19 development versions of FreeCAD have incorporated a number of significant improvements to the Path workbench. I think it is well worth using it as opposed to the stable 18.4 version. I have encountered no issues using 0.19 at all.

I downloaded it the other day. But it was 0.18. It seemed good (didn’t try path). Should I be trying 19?

I’m not sure what other changes have been made, but the Path workbench (CAM functionality) has added toolbit “profiles”. This accomodated the addition of V-carve functionality in particular, although I think most any profile should be possible.

I need to investigate the possibility of machining undercuts with something like a dovetail bit. Based on my (so far limited) understanding of the new toolbits system it seems like it should work…

The tool library setup is significantly changed, so probably worth learning the new arrangement right off. Sliptonic has a Youtube video on the new toolbits library.

The 0.19 development releases have been stable for me. They’re available as AppImages so should run on most any Linux distribution.

1 Like

Yes, absolutely. They are very slow to release stable versions from what I can tell, but the daily releases seem very stable and have way more features.

1 Like

Yes, the offset on the pocket is how I’m leaving the 0.1mm. Helix wants to recut the entire hole, so I only use the last ‘screw’ in that gcode. I could use a profile to cut the inside of the hole, that would not require removing some of the helix gcode, but I kind of like the way the helix screws itself down to depth. :slight_smile:

The path workbench doesn’t support Marlin natively, but Adventures in Creation (who has some good FreeCAD tutorials btw) has created a tweak to the post processor so it makes valid Marlin gcode.

1 Like

Here’s a conversation on the FreeCAD forum about the Marlin/mpcnc post processor. Link to Ian’s bitbucket is at the bottom of that thread.

@Paradox_Pete, are you producing Marlin compatible gcode from FreeCAD, and if so, may I ask by what means?

I’m not.

My Lowrider has a tinyG controller, which seems happy with the linuxCNC post processor.

Thanks for the Adventures in Creation link. I hadn’t seen those. It looks like he decided to switch to FreeCAD after Autodesk changed the license on the hobbyist version of Fusion360.

There are a number of good youtube series on FreeCAD. I linked to one of Sliptonic’s above. He has more Path specific content than anyone else I’ve found. I’ve found Joko Engineering good for more advanced modelling tutorials.

1 Like

Yes, agree he switched for that reason and have enjoyed as he learns and shares his knowledge. I continue to be impressed with FreeCAD and it’s capabilities. I’ve seen Sliptonic’s and Joko Engineering’s vids too, very good stuff. I think Sliptonic is an active dev on the project just from what I’ve seen on their forum, but could be wrong on that.