Trouble installing Path Post Processor

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!
Post Reply
NukeJets
Posts: 2
Joined: Tue Mar 02, 2021 9:27 pm

Trouble installing Path Post Processor

Post by NukeJets »

I downloaded "snapmaker_freecad_post.py" and installed it to the "C:\Program Files\FreeCAD 0.18\Mod\Path\PathScripts" folder. I then started FreeCAD. The post processor still does not show up in the list when I set up a new job.

What else do I need to do?

Thanks
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Trouble installing Path Post Processor

Post by chrisb »

Hi and welcome to the forum!

Wrong directory. A working but still inferior solution would be to place it in the "post" subdirectory. If you upgrade your post processor would be lost.
A better solution is to place it in your personal FreeCAD macro directory.

The best solution is to additionally provide it to the FreeCAD community.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
NukeJets
Posts: 2
Joined: Tue Mar 02, 2021 9:27 pm

Re: Trouble installing Path Post Processor

Post by NukeJets »

Thanks for the response. I still haven't been able to get it to work. I copied the .py file to c:\\user\AppData\Roaming\FreeCAD\Macro. Are there any other installation steps required?

The link to the post processor is:

https://github.com/Snapmaker/snapmaker_cnc_post_process

It would be nice if it was added to the distribution program.

Thanks again
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Trouble installing Path Post Processor

Post by GeneFC »

NukeJets wrote: Wed Mar 03, 2021 8:00 pm I copied the .py file to c:\\user\AppData\Roaming\FreeCAD\Macro
I have no idea what a snapmaker is, but I downloaded the post processor, added it to my macro folder, and it showed up in FreeCAD just as described above.

The folder you show is not quite correct. It should be C:\\Users\#####\ AppData\Roaming\FreeCAD\Macro, where ##### is your Windows user ID.

If you copied the file exactly as you show, then that is the problem.

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24219 (Git)
Build type: Release
Branch: master
Hash: 8c26baebab320b8c1c3279bc8eb34a1eb6c7a363
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

Gene
SaazyPants
Posts: 10
Joined: Wed Nov 24, 2021 4:07 pm

Re: Trouble installing Path Post Processor

Post by SaazyPants »

I struggled with the same issue while trying to install a new post. I did get it to work properly by placing the '_post.py' file in the:

Code: Select all

$HOME/.FreeCAD/Macro

directory as suggested by @chrisb. I needed to create the directory as it wasn't there by default.

The FreeCAD Wiki may need to be updated to reflect this though. The documentation indicates that the '_post.py' files are saved in the:

Code: Select all

/usr/share/freecad/Mod/Path/PathScripts/Post

location by default. This directory, at least on Manjaro and EndeavorOS, did not exist by default. I'm not sure where FreeCAD is pulling the current list of included post processors from. If I create the location and move the '_post.py' files there, FreeCAD is unable to find them. The same is true if the folder is created in the user's $HOME/.FreeCAD directory. While attempting this to see if it'd work, it broke the Path workbench in FreeCAD completely for me.

Cheers!

OS: Manjaro 64-Bit & EndeavorOS 64-Bit
FreeCAD Version: 0.19.24219 (Git)
Build Type: Release
Branch: master
Python version: 3.9.7
Qt Version: 5.15.2
DE: LeftWM
Locale: English/United States (en_US)

Code: Select all

if ($hungry) { eat(); } else { sleep(); }
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Trouble installing Path Post Processor

Post by onekk »

SaazyPants wrote: Sun Nov 28, 2021 7:01 pm I struggled with the same issue while trying to install a new post. I did get it to work properly by placing the '_post.py' file in the:

Code: Select all

/usr/share/freecad/Mod/Path/PathScripts/Post

Maybe they are not installing FreeCAD in this way, some distribution tend to move around and "override" standard path, maybe putting something under /opt/ or /usr/local/ instead of /usr/.

For similar things you have not to blame distributions packagers, that change "--installdir"

Documentation is usually referring to the "standard location" of a file, if distribution packagers will modify this location, obviously the path is not the same you will find in documentation.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Trouble installing Path Post Processor

Post by chrisb »

SaazyPants wrote: Sun Nov 28, 2021 7:01 pm The FreeCAD Wiki may need to be updated to reflect this though. The documentation indicates that the '_post.py' files are saved in the:
Please give a link to the wiki. Makes it easier if we want to change the text to something more generic.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
SaazyPants
Posts: 10
Joined: Wed Nov 24, 2021 4:07 pm

Re: Trouble installing Path Post Processor

Post by SaazyPants »

Maybe they are not installing FreeCAD in this way, some distribution tend to move around and "override" standard path, maybe putting something under /opt/ or /usr/local/ instead of /usr/.
The thought didn't cross my mind until a week later that it might be related to Manjaro / Endeavor choosing a non-standard install location. Your post reminded me to just run "whereis freecad" on both systems and see where they tossed it... apparently both distributions place the post files in:

Code: Select all

/usr/lib/freecad/Mod/Path/PathScripts/post
It looks like the standard install path and folders are created though. Hopefully this helps the next person trying to get the post file installed.

@chrisb - Here's the specific section of the wiki just in case additional clarity or information should be deemed needed. The standard path is described under Other Post Processors (https://wiki.freecadweb.org/Path_Postpr ... tomization)

Thanks for the feedback!

Cheers,
Saazy

Code: Select all

if ($hungry) { eat(); } else { sleep(); }
SaazyPants
Posts: 10
Joined: Wed Nov 24, 2021 4:07 pm

Re: Trouble installing Path Post Processor

Post by SaazyPants »

Recently I've been using the Flatpak version of FreeCAD. Finding the location to place the post.py file was kind of a chore as I'm not terribly familiar with Flatpaks overall. I figured someone else may struggle with this and wanted to add to this post the file path that worked for me on Arch-Based distros (Endeavor / Manjaro).

Code: Select all

/var/lib/flatpak/app/org.freecadweb.FreeCAD/current/active/files/freecad/Mod/Path/PathScripts/post/

Code: Select all

if ($hungry) { eat(); } else { sleep(); }
Post Reply