Pocket path generated only on face depth if object is reversed or origin moved

Here's the place for discussion related to CAM/CNC and the development of the Path module.
PavloT
Posts: 2
Joined: Mon Aug 17, 2020 10:31 am

Pocket path generated only on face depth if object is reversed or origin moved

Postby PavloT » Mon Aug 17, 2020 11:06 am

I faced with quite annoying issue: in case if pad object created as reversed, pocket path will be generated only on depth of pocket face:

This pad has normal direction
normal_path.png
normal_path.png (69.07 KiB) Viewed 877 times
This was created as reversed
reversed_path.png
reversed_path.png (45.89 KiB) Viewed 877 times

The same if JOB origin moved to top of the PAD

I use such configuration because for my CNC I set Z0 to material top, so I expect all operations will be in negative depth (material pieces have variable thickness, so it is more easy to set 0 to top and find it with sensor, otherwise each peace must be measured, next this value added)

Freecad version: 0.19~pre2~202008100051~ubuntu18.04.1;
Current MASTER build (I have rebuild it on my host)

Not reproduces for FreeCad 18.4
Attachments
reversed_pocket.FCStd
(31.89 KiB) Downloaded 30 times
normal_pocket.FCStd
(33.61 KiB) Downloaded 28 times
Last edited by PavloT on Mon Aug 17, 2020 2:31 pm, edited 1 time in total.
jmaustpc
Posts: 10375
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby jmaustpc » Mon Aug 17, 2020 11:23 am

PavloT wrote:
Mon Aug 17, 2020 11:06 am
Freecad version: 0.19~pre2~202008100051~ubuntu18.04.1;
Current MASTER build (I have rebuild it on my host)
Welcome to FreeCAD. :)

Probably make no difference but I wonder if the problem is there in the FreeCAD 0.19 from the daily PPA?

Could you attach a simple as possible file that demonstrates the matter?
GeneFC
Posts: 1654
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby GeneFC » Mon Aug 17, 2020 2:27 pm

PavloT wrote:
Mon Aug 17, 2020 11:06 am
use such configuration because for my CNC I set Z0 to material top,
I do this also, and I never see that type of problem. I suspect it is merely a case of incorrect height parameters in the Pocket operation. FreeCAD provides defaults, but they are not always correct. It is easy to override the default parameters with correct parameters.

We need an FCStd file.

Gene
PavloT
Posts: 2
Joined: Mon Aug 17, 2020 10:31 am

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby PavloT » Mon Aug 17, 2020 2:42 pm

Here are two files.
reversed_pocket.FCStd
(32.43 KiB) Downloaded 31 times


contains issue.

This is only for daily PPA or latest sources. Issue does not exists in stable version.

I test daily version because I really like "Profile open edges" and "Pocket extensions" features implemented in FreeCad 19.

I think it is related to issue #4411, but cannot find root cause yet (still new with FreeCad code). If anyone have idea what should I check - I can try to debug it.
Attachments
normal_pocket.FCStd
(33.61 KiB) Downloaded 28 times
GeneFC
Posts: 1654
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby GeneFC » Mon Aug 17, 2020 3:26 pm

I tried your files, and yes, there is a problem. If I set the start height to 20 mm without changing anything else the pocket works correctly.

Of course that should not happen. It does not appear related to bug #4411.

[Edit] Works OK with

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22111 (Git)
Build type: Release
Branch: master
Hash: cb2099aa6bb287a8d7843eb70684cce79bdef26b
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)


Incorrect with

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22261 (Git)
Build type: Release
Branch: master
Hash: 1c432fd6170b7904592a224194e42d3c566707a6
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

Gene
GeneFC
Posts: 1654
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby GeneFC » Mon Aug 17, 2020 4:36 pm

I have done a bit more digging, and it appears the problem came from the "fix" to bug #4411.

In particular,

Code: Select all

Merge pull request #3763 from Russ4262/PocketShape_fix_t4411
merged on August 4.

I have not worked through the exact error, probably a typo or reversed sign.

Gene
umill
Posts: 12
Joined: Tue Feb 11, 2020 4:32 pm

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby umill » Thu Sep 10, 2020 9:38 pm

Hello,
I would also like this bug fixed for my projects as well.
I noticed that the bug persists for version FreeCAD_0.19.22366-Win-Conda_vc14.x-x86_64 and would like to pitch in to fix it.
Unfortunately, I am having an error compiling from source with Cmake not finding Boost and am in the process of figuring this out. But any guidance on how to help out would be appreciated.
chrisb
Posts: 29010
Joined: Tue Mar 17, 2015 9:14 am

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby chrisb » Thu Sep 10, 2020 10:54 pm

Great to see a helping hand. Much of Path is written Python, so you don't necessarily have to compile FreeCAD.
A Sketcher Lecture with in-depth information is available in English, auf deutsch, en français, en español.
GeneFC
Posts: 1654
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby GeneFC » Thu Sep 10, 2020 11:16 pm

I am pretty sure this is 100% Python. I tried to dig into the problem, but I quickly got lost in all the imports and links to other files.

I suspect this is a very simple error, if only one can find it.

Gene
umill
Posts: 12
Joined: Tue Feb 11, 2020 4:32 pm

Re: Pocket path generated only on face depth if object is reversed or origin moved

Postby umill » Sat Sep 12, 2020 1:46 am

Thanks! I didn't realize we didn't need to compile the code for this.
I finally managed to get the Cmake errors figured out and it is compiling at the moment.

Sorry for the newbie question(first time contributing :D ), but for the python files are all changes to the source loaded if we just restart Freecad?