FreeCAD workflow for CAM, stl import, gcode export

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Abc12098
Posts: 6
Joined: Wed Mar 29, 2023 2:46 am

FreeCAD workflow for CAM, stl import, gcode export

Post by Abc12098 »

Can someone please point me to tutorials which advise on how to use FreeCAD for the ollowing sort of process:

1. Import an existing stl file (I do my CAD design in mesh modelling software, it's not great practice as vs procedural CAD but it's what I'm used to and itis natural for me)
2. I somehow provide settings related to how a custom built CNC machine running GRBL will operate
3. FreeCAD generates toolpaths which I can save as gcode files and give to the CNC machine, the same way one gives gcode files from the likes of Cura or PrusaSlicer to a 3d printer

I'm in this situation because I want to get in to CNC machining (hope to build a small mill on which to do small aluminium parts, shaft couplers, gears, brackets, screw hole plates...), and:
A) I'm a Linux user so all Windows sofware is a NO for me, unless Wine compatible
B) I don't want to end up with an "addiction" to cloud dependent things like Fusion360 which try to get you hooked on depending on both a distant corporation and the quality of your internet connection to their servers (companies peddling proprietary software with cloud dependence are about as immoral as can be)

But as I'm so used to a mesh modelling workflow I really need to be able to stl (or obj or dae or other very common mesh format) imports of part designs to whatever CAM platform I use.

I was advised FreeCAD can do this sort of CAM, but have never used it before, the interface is an awful lot to try to get my head around. I'm sure it is great software all around, but for now I want to use it for a CAM step added to an existing workflow, not use it for all its functions, so I'm after tutorials which take me through it from that perspective.

I can guarantee:
A) All stls I would wish to import are properly watertight
B) I'll never want to do things like CNC tapping of screw holes, so I'll never need to have things "defined" like "put an M3 screw hole here" rather than simply some geometric representation of an n sided shape approximating a circle the way mesh files do
C) I'll only ever need 3 axis control, the CNC mill will only be 3 axis
D) I don't need optimum super-quick cutting paths, just adequate ones

Also, I mostly want the experience of CAM toolpath generation to be as much like Cura style gcode generation as possible, enter settings of machine, import model stl, let the compute work out a path, and double check visualisation before putting in to use. Is this achievable, or will gcode generation for CNC milling always be much more involved?

Oh, and one other thing, I really need to understand how CNC toolpath generation will handle the matter of how to keep the thing one is machining out stuck to the rest of the aluminium block until the last possible moment.

Thank you everyone
User avatar
Roy_043
Veteran
Posts: 8409
Joined: Thu Dec 27, 2018 12:28 pm

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by Roy_043 »

Moved to Path/CAM.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by GeneFC »

Abc12098 wrote: Wed Mar 29, 2023 3:04 am Can someone please point me to tutorials which advise on how to use FreeCAD for the ollowing sort of process:

Also, I mostly want the experience of CAM toolpath generation to be as much like Cura style gcode generation as possible, enter settings of machine, import model stl, let the compute work out a path, and double check visualisation before putting in to use. Is this achievable, or will gcode generation for CNC milling always be much more involved?
The FreeCAD wiki has information on the basics of the Path Workbench.

https://wiki.freecad.org/Path_Workbench

The best video tutorials for the Path WB are those made by sliptonic, the longtime lead developer for the Path WB.

https://www.youtube.com/@sliptonic/videos

I do not believe you can expect anything like a Cura style flow. CAM for machining is quite a bit more complex than a layer-by-layer additive process. (I do both.)

Gene
Abc12098
Posts: 6
Joined: Wed Mar 29, 2023 2:46 am

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by Abc12098 »

Thank you. The wiki page seems a bit of an information overload for someone new to FreeCAD.

The sliptonic youtube link looks useful, and his video "Part 3 - CAM Setup and Cutting" might be quite relevant, but it looks a fairly 2D part (as compared to something like a compound straight spur gear), and I'm not sure whether the processes he applies would only work for FreeCAD generated geometry or if they can handle imported meshes too.

Also that video is quite old, has FreeCAD changed a lot since then? His mroe recent videos look mroe focused on specific projects rather than principles for workflows.

Thanks

P.S. Just to note, I have tried PyCAM (python) before for toolpath generation, but it was hideously slow to generate gcode, seem to insist on playing an animation of the processs as it did the slicing. FreeCAD will be more capable and quicker, yes?
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by chrisb »

Abc12098 wrote: Wed Mar 29, 2023 6:30 pm something like a compound straight spur gear
Even if you succeed in managing the process of transforming a mesh into a FreeCAD object and from there into a mill path, there is a serious drawback: Your object may either be of low quality due to the tesselation or you may get a huge number of faces in your mesh. FreeCAD can handle meshes, but there are limits, because the data structure is completely different. Example: a FreeCAD cylinder is made of 3 faces, while a meshed cylinder has hundreds of them.
There isn't a hard limit, but Werner, the core developer of FreeCAD, once recommended to not exceed the 100,000 limit.
You can give it a try and see if such a complicated thing as a gear will work.

If not, you may consider to model such things in FreeCAD from scratch, which means you use a predefined gear and add shaft, cutouts, ...
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Abc12098
Posts: 6
Joined: Wed Mar 29, 2023 2:46 am

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by Abc12098 »

The way I work at present a straight spur gear usually has several tens of faces per tooth, several hundred to a ew thousand faces overall. It certainly gives good enough precision when 3d printed from a mesh model. I pass 100K quite easily on more complex parts, like herringboned gears, but I wouldn't be looking to try to mill herringbone shapes anyway, impossible with 3 axes I suspect.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by GeneFC »

Abc12098 wrote: Wed Mar 29, 2023 6:30 pm Thank you. The wiki page seems a bit of an information overload for someone new to FreeCAD.
Sorry. CAM is complex. :o

The wiki is actually very simplified compared to all the details that can be important in quality generation of g-code.

I do not know of any super-simple method to achieve what you want.

Gene
jbraun
Posts: 252
Joined: Fri Sep 18, 2020 5:41 pm

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by jbraun »

Full disclosure, I only visit the site linked below to admire other peoples work. The software is cross-platform but not open source.
https://www.deskproto.com/
For English help on youtube check out Joko Engineering or Mango Jelly Solutions.
Look for recent videos, this software is updated at a rapid pace.
herbk
Veteran
Posts: 2655
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by herbk »

Hi,
If you attach your FC file someone can loock at it to find a way...
Gruß Herbert
CoderMusashi
Posts: 92
Joined: Mon Nov 19, 2018 8:26 pm

Re: FreeCAD workflow for CAM, stl import, gcode export

Post by CoderMusashi »

I recommend creating your models in FreeCAD from scratch and save them as a FreeCAD file for later use. I would also recommend saving them as .step files and never iges. Stl files are not really usable in CAM software. In MasterCAM I use stl for comparison feature to see where my tool paths cut compared to the solid model (step file) I created the tool paths with. I have yet to find any software that will take an stl and make it a normal solid model. That being said I hope the video tutorial helps.
I created a tutorial for reversing stl files and did a tool path example. Here is the link to that video https://youtu.be/B5ycUk8vQjg . You can find my older videos here https://www.youtube.com/@codermusashi1557 . I do apologize for the quality I need to work on that.
Post Reply