Freecad Post Processor for CNC jobs - Error messages, no gcode file

Hi
I create my 3D models with Freecad. Now the first CNC job is coming up. On github snapmaker provides a tool library and a Post Processor for this. In this post was asked for tests for this. Unfortunately I had not seen that at the time.

Creating the model and converting it to milling paths via the workbench path worked very well. Unfortunately the Post Processor generates an error message, which I also reported via a github issue in detail. The error message is

'_TempObject' object has no attribute 'InList'

My freecad configuration is

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * LCInterlocking

Does anyone here have experience with other postprocessors such as the freecad marlin postprocessor? Can this also be used?

How do you create your gcodes for CNC milling?

Thanks a lot!

Many greetings
Sepp

Hi,

I post here to help people who would like to find a working FreeCAD post-processor for the CNC module.

Facing the same issues as @spitzlbergerj, I created a FreeCAD post-processor. It is avalaible on GitHub and has been tested by several people so far without issue. Feedback and ideas are welcome.

Hope it may help!

Hi
I tried the above post and get these errors on FreeCad 0.20.2

14:41:19 Running the Python command ‘Path_Post’ failed:
Traceback (most recent call last):
File “C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathPost.py”, line 437, in Activated
(fail, rc, filename) = self.exportObjectsWith(slist, job)
File “C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathPost.py”, line 215, in exportObjectsWith
processor = PostProcessor.load(postname)
File “C:\Program Files\FreeCAD 0.20\Mod\Path\PathScripts\PathPostProcessor.py”, line 47, in load
exec(“import %s as current_post” % postname, namespace)
File “”, line 1, in
File “C:\Program Files\FreeCAD 0.20\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport_feature_.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “C:\Program Files/FreeCAD 0.20/Mod/Path/PathScripts/post\Snapmaker_2_CNC_post.py”, line 192, in
class Command:
File “C:\Program Files/FreeCAD 0.20/Mod/Path/PathScripts/post\Snapmaker_2_CNC_post.py”, line 211, in Command
def addParameter(self, parameter, value: str | int | float = ‘’):

unsupported operand type(s) for |: ‘type’ and ‘type’

Yet post runs ok if I use marlin or smootie post processor

Will these work with snapmaker?

I think there was a change in the Freecad API, several postprocessors seemed to fail in 0.20.x and 0.21 .
I used the ‘official’ postproc with Freecad 0.19.

I replaced the postprocessor with this implementation:

This worked well for me.

2 Likes

Hi,

I’m very aware I’m six months late, but I thought I would be notified if someone replied to my post, which did not happen…
Better to reply later than never, so:

I fixed your error recently (update on Github), which was related to your Python version being older than 3.10.
Currently the postprocessor works with FreeCAD 0.20 to 0.22, and on Windows, macOS and Linux (as far as I know).
If you encounter another bug, the best would be to open an issue on Github, but I will also try to check the Snapmaker forum more often (and activate notifications!).