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

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

Post by Abc12098 »

Thank you coder musashi, that video looks like it could be exactly what I need.

Edit: I've just finished the video, doesn't look so hopeful afterall.Clearly there is no way to reliably make a mesh in to a solid parametric model, I can see why the principle is effectively impossible.

But surely there can be a way to do CAM directly from a mesh?

Even if this means that when milling your "flat" surface in the ideal world becomes 0.001% off or however else the triangles distort the flat surface, because afterall with a self built milling machine I'm sure there would be mechanical imperfections on the same scale as in consumer 3d printers and therefore if the toolpaths are off by a fraction of a percent (and from what I've seen in my stls the flat surface only ever gets a fraction of a percent worsened) then that is less than the mechanical variability anyway.
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: Fri Mar 31, 2023 5:04 pm Even if this means that when milling your "flat" surface in the ideal world becomes 0.001% off or however else the triangles distort the flat surface, because afterall with a self built milling machine I'm sure there would be mechanical imperfections on the same scale as in consumer 3d printers and therefore if the toolpaths are off by a fraction of a percent (and from what I've seen in my stls the flat surface only ever gets a fraction of a percent worsened) then that is less than the mechanical variability anyway.
I believe you are looking at the wrong aspect of the problem.

3D printers, at least the ordinary consumer-grade models, are raster-scan tools. They "slice" the model into z-layers and then simply scan the printhead back and forth while turning on or off the filament flow as needed. All they care about is finding model boundaries while scanning. Of course there are lots of other complexities such as creating support structures and adhesion promoting pads, but in the end 100% of the printing is scan-based.

3D milling, for example, is quite different. The g-code is created to steer the cutter around the model shape, while never passing through the actual model. Very different from a simple on-off scan behavior.

The problem comes from the fact that 3D milling needs to examine the model shape, often in all directions at the same time, to determine a safe and effective pattern trajectory. When the model consists of many, many thousands of small triangles the computation time and complexity become quite large.

The "fraction of a percent" imperfections are of no real concern. The user can typically adjust the closeness of fit. However, the increased complexity of path generation can become a killer. It is not uncommon to run out of both memory and user patience.

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

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

Post by jbraun »

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
grbl understands arcs. Cam can output arc commands. With a high enough number of facets line segments and arcs are the same but I suspect grbl runs smoother when arcs are defined as arcs . (Feel free to correct my theory grbl users). Eventually eating soup with a fork will grow old.

The objects described in the original post are not difficult to design in FreeCAD but Path workbench doesn't have an 'Easy' button. What it does have is ways to fine tune tool paths and the reasons for this will become clear when trying to cut metal, even a soft metal like aluminum.

CamBam appears to handle stl files differently than FreeCAD. It runs in linux and costs nothing to trial. If you insist on stl it could be worth a look.

Edit//Probably old news to 3D printer folks but new to me:
https://grid.space/kiri/
Last edited by jbraun on Sat Apr 01, 2023 11:30 pm, edited 1 time in total.
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.
user1234
Veteran
Posts: 3261
Joined: Mon Jul 11, 2016 5:08 pm

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

Post by user1234 »

GeneFC wrote: Fri Mar 31, 2023 11:56 pm 3D printers, at least the ordinary consumer-grade models, are raster-scan tools. They "slice" the model into z-layers and then simply scan the printhead back and forth while turning on or off the filament flow as needed. All they care about is finding model boundaries while scanning. Of course there are lots of other complexities such as creating support structures and adhesion promoting pads, but in the end 100% of the printing is scan-based.

3D milling, for example, is quite different. The g-code is created to steer the cutter around the model shape, while never passing through the actual model. Very different from a simple on-off scan behavior.

The problem comes from the fact that 3D milling needs to examine the model shape, often in all directions at the same time, to determine a safe and effective pattern trajectory. When the model consists of many, many thousands of small triangles the computation time and complexity become quite large.

The "fraction of a percent" imperfections are of no real concern. The user can typically adjust the closeness of fit. However, the increased complexity of path generation can become a killer. It is not uncommon to run out of both memory and user patience.
I think this whole quote should be sticked on top of Path subforum, it is a perfect explanation for new users, who came with stl files to mill. See that for a while more frequent here.


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

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

Post by jbraun »

While doing some g-code editing in bCNC I noticed it can do mesh slicing.
A mesh file is sliced on import, the slices are translated to g-code, the g-code can be used as is or used as geometry for bCNC's cam tools.
The aqua lines are slices defined by g-code and the blue lines are tool paths. This is only for 2+half D afaik.
Off-topic for FreeCAD but applies to the topic of CAM from stl.
bCNC_iso_rs.png
bCNC_iso_rs.png (176.83 KiB) Viewed 528 times
bCNC_xy.png
bCNC_xy.png (14.97 KiB) Viewed 528 times
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.
CoderMusashi
Posts: 92
Joined: Mon Nov 19, 2018 8:26 pm

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

Post by CoderMusashi »

Youtube is filled with videos on taking an reversing stl files. https://www.youtube.com/watch?v=KP8dU9tDaSk and https://www.youtube.com/watch?v=ljRd7D5kutM as well as videos about curved surfaces which help you prepare a model for creating toolpaths with Path Workbench. You may also use Mesh Remodel workbench to help in your process. The knowledge you gain from using these techniques is what will set you apart from all the rest.
Post Reply