PathSanity - Job not recognized

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
User avatar
Petert
Posts: 124
Joined: Tue Dec 01, 2015 9:27 pm

PathSanity - Job not recognized

Post by Petert »

There is something wrong with the Path workbench I guess.
I made a very simple file that works with the Path Sanity command in the official FC version 0.19 (appimage). My home compiled version of LinkStage3 doesn't work and gives errors. It does not work in the official 0.20 appimage either (same error).

@RealThunder confirmed that the LinkStage3 daily version uses Path from 0.20

Error message in LinkStage3 and official 0.20:

Code: Select all

PathJobGui.INFO: Expected a specific object to edit - Job not recognized
Running the Python command 'Path_Sanity' failed:
Traceback (most recent call last):
  File "/home/ton/FREECAD/daily/freecad/Mod/Path/PathScripts/PathSanity.py", line 119, in Activated
    html = self.__report(data)
  File "/home/ton/FREECAD/daily/freecad/Mod/Path/PathScripts/PathSanity.py", line 407, in __report
    reportraw = self.outputpath + job.PostProcessorOutputFile + '.asciidoc'

Code: Select all

10:10:09  PathJobGui.INFO: Expected a specific object to edit - Job not recognized
10:10:09  Running the Python command 'Path_Sanity' failed:
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAfQTni0/usr/Mod/Path/PathScripts/PathSanity.py", line 119, in Activated
    html = self.__report(data)
  File "/tmp/.mount_FreeCAfQTni0/usr/Mod/Path/PathScripts/PathSanity.py", line 407, in __report
    reportraw = self.outputpath + job.PostProcessorOutputFile + '.asciidoc'

name 'job' is not defined

It works in :

Code: Select all

 OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.19.2)
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
LinkStage3 version not working:

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.28504 (Git)
Build type: Unknown
Branch: LinkDaily
Hash: dbf51658a4f8f175dba82d350b3fc0a96ae7c332
Python version: 3.9.2
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)
official 0.20 version, not working:

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (X-Cinnamon/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.20.25844 (Git) AppImage
Build type: Release
Branch: master
Hash: 1b20118dfa3fb9f127f0e4fb122701f7fcdaa9fc
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
I started both versions with a clean .Freecad directory. After that I tried the LinkStage3 version with the .Freecad dir from the official appimage and that didn't solve the problem either.
Would be real nice if this would work, I can import the Sanity html files into LinuxCNC so the operator can see what the steps for fabrication are.
testSanityAgain.FCStd
(30.85 KiB) Downloaded 45 times
sanityTest.zip
(27.22 KiB) Downloaded 43 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: PathSanity - Job not recognized

Post by GeneFC »

I don't typically use PathSanity, but I just tried and I got the same error. It worked in the past.

OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.20.25824 (Git)
Build type: Release
Branch: Master
Hash: 00bb1d0b58aaba641c271e705d4324ae06a5b117
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

Gene
User avatar
Petert
Posts: 124
Joined: Tue Dec 01, 2015 9:27 pm

Re: PathSanity - Job not recognized

Post by Petert »

Great! I will make the changes and let you know if it works.
Thanks for making such great software!
I am a refugee from Fusion 360. Switched over to FreeCAD and am spreading the word. After years of very little progress I switched again to another solution. I wish you all the best!
jescombe
Posts: 90
Joined: Tue Mar 09, 2021 4:19 pm

Re: PathSanity - Job not recognized

Post by jescombe »

Thanks, can confirm this is working for me in the latest 25943 AppImage.

One quick question if I may - the report shows the feed rate for each tool in mm/s, is it possible to get this in mm/min instead?

Cheers,
Jon
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: PathSanity - Job not recognized

Post by sliptonic »

jescombe wrote: Tue Oct 05, 2021 6:53 pm One quick question if I may - the report shows the feed rate for each tool in mm/s, is it possible to get this in mm/min instead?
That's not good enough because some parts of the world still use 'in/min'. What we need to do is return the feed rate in the user's preferred unit schema.

Try this and report back. If it works for you, I'll make a PR to incorporate it.

In PathSanity.py file, line 609:
change it from:

Code: Select all

tooldata["feedrate"] = str(TC.HorizFeed)
to

Code: Select all

tooldata["feedrate"] = str(TC.HorizFeed.getUserPreferred()[0])
make the same change on line 638

You'll need to restart FreeCAD to test it.
User avatar
Petert
Posts: 124
Joined: Tue Dec 01, 2015 9:27 pm

Re: PathSanity - Job not recognized

Post by Petert »

sliptonic wrote: Tue Oct 05, 2021 9:59 pm Try this and report back. If it works for you, I'll make a PR to incorporate it.
This is such a nice way of improving FC and at the same time listening to the users. Very gratifying to be involved in the development.
I have been using Path WB for a few months now and I am very pleased with it. A big thank you to you @sliptonic and all the others that are constantly improving and extending this workbench.
I am a refugee from Fusion 360. Switched over to FreeCAD and am spreading the word. After years of very little progress I switched again to another solution. I wish you all the best!
jescombe
Posts: 90
Joined: Tue Mar 09, 2021 4:19 pm

Re: PathSanity - Job not recognized

Post by jescombe »

sliptonic wrote: Tue Oct 05, 2021 9:59 pm Try this and report back. If it works for you, I'll make a PR to incorporate it.
Brilliant. Have tested with those two lines changed, can confirm I get mm/min in metric units, and changing my preferences to imperial gives in/min.

Can only echo the thanks from Peter above, your efforts are much appreciated!

Regards,
Jon
Post Reply