Bug in Path/Pocket 0.19

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!
scholli
Posts: 4
Joined: Sun Jan 27, 2019 3:02 pm

Bug in Path/Pocket 0.19

Post by scholli »

I found a strange behaviour in the latest daily (which I could not find described anywhere yet).

When I try to create a pocket operation the basemodel jumps out of it's position (even kind of random as it seems)
Bildschirmfoto von 2019-05-19 13-16-50.png
Bildschirmfoto von 2019-05-19 13-16-50.png (182.46 KiB) Viewed 2352 times
I attached the test file with which I was able to reproduce it...

Hope that helps finding the root cause an fix it.

OS: Ubuntu 18.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.7
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Attachments
testPocket.FCStd
(38 KiB) Downloaded 44 times
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Bug in Path/Pocket 0.19

Post by roerich_64 »

Hi Scholli,

With this version it is ok:

Code: Select all

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16274 (Git)
Build type: Release
Branch: master
Hash: 7c760259a389b38b76da78e4f6e1f9be66714842
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
With the other versions i have tested we have an issue with the pocket operation on faces:
Py2:

Code: Select all

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16784 (Git)
Build type: Release
Branch: master
Hash: ec5720d51c54e6c433cacf207e773aad09dbb25c
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Py3:

Code: Select all

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16624 (Git)
Build type: Release
Branch: master
Hash: 222ae7305fdf1097e4ef3d050f69dff47dbd8786
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

Code: Select all

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16699 (Git)
Build type: Release
Branch: master
Hash: e484a52e9d4ccaa360952cd8755b4a8ee6ad2ea1
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

Code: Select all

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16784 (Git)
Build type: Release
Branch: master
Hash: ec5720d51c54e6c433cacf207e773aad09dbb25c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)


BR
Walter
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Bug in Path/Pocket 0.19

Post by mlampert »

scholli wrote: Sun May 19, 2019 11:27 am When I try to create a pocket operation the basemodel jumps out of it's position (even kind of random as it seems)
Yes, this is currently broken - it happens whenever one repositions or rotates the base model. Unfortunately the fix is not straight forward and will probably take a bit.
chrisb
Veteran
Posts: 54177
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug in Path/Pocket 0.19

Post by chrisb »

scholli wrote: Sun May 19, 2019 11:27 am I attached the test file with which I was able to reproduce it...
Here it is even worse, perhaps due to the fact that openCamlib isn't installed:
After a fresh FreeCAD start and loading the model I get the error in report view

Code: Select all

OpenCamLib is not working!
A recompute shows the message

Code: Select all

PathPocketShape.ERROR: Pocket does not support shape Model-Body001.Face11
and then the path vanishes completely.

OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16790 (Git)
Build type: Release
Branch: master
Hash: 15f440525e59c3caf89f847a490981abf5a45f8f
Python version: 3.7.3
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Russ4262
Posts: 952
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Bug in Path/Pocket 0.19

Post by Russ4262 »

Evening,
I am taking a look at this issue. I have downloaded the model file in the OP. I have identified one problem in the model file. I have not been able to reproduce the result in the model file, yet. I will also test with earlier releases when I have additional time. I will provide more information and solution when it is not so late here.

Stay tuned,
Russell

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16793 +19 (Git)
Build type: Release
Branch: 4th_axis
Hash: 8fd03fd529b1e6ba15aacd4898291b95cfbe09dd
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)
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Bug in Path/Pocket 0.19

Post by roerich_64 »

Hi Russel,

Do you need a step by step to see where the error occurs?

I can reproduce it...

Edit: Wait, i am download the newes version of FreeCAD...

Walter
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: Bug in Path/Pocket 0.19

Post by roerich_64 »

Ok with:

Code: Select all

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16808 (Git)
Build type: Release
Branch: master
Hash: 0e17c22e3995693e1e329ee18af8c972a81fe831
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

Start here:
Test_I.jpg
Test_I.jpg (234.61 KiB) Viewed 2192 times
* Create Path Operation
* Take 'SETUP'
* Click on Face4
* Click on 'Z-Axis
* Click on 'Z=0'
* Click on 'Refresh' to refresh the stock
* Click 'OK' to close Setup

* Click on 'Canvas' to deselect 'Face4'
* Select Face11
* Click on 'Create Path Pocked Object'
* Click 'recompute'
* Click 'OK'
* doubleClick on the 'Job' in the tree

Now we see this:
Test_II.jpg
Test_II.jpg (289.24 KiB) Viewed 2192 times
Error massage translation (Gxxxle): PathPocketShape.ERROR: The bag does not support the form Model-Body.Face11
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
Russ4262
Posts: 952
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Bug in Path/Pocket 0.19

Post by Russ4262 »

Evening,
Thanks for the instructions above, Walter.
roerich_64 wrote: Tue May 21, 2019 8:18 amOk with: ... Start here: ... Now we see this: ... PathPocketShape.ERROR: ...
Using them, I was able to reproduce the error and trouble-shoot the problem.

scholli wrote: Sun May 19, 2019 11:27 am I found a strange behaviour in the latest daily (which I could not find described anywhere yet).
When I try to create a pocket operation the basemodel jumps out of it's position (even kind of random as it seems)
I collaborated with @mlampert and have corrected the issue. ...Well, at least the current model works correctly. However, I have since made additional modifications to the same files to accommodate rotational UI elements. So, I have two options:
  1. wait to present the solution as a part of my next PR
  2. use the current scripts to make patched versions with only the necessary changes to address the issue identified in this topic - then upload to the related topic here on the forum
If I get time, I may opt for making a patched version of the current script. This would help FC users sooner. Besides that, I don't have a time frame for my next PR with 4th-axis UI integration.

Thanks.
Russell
Russ4262
Posts: 952
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Bug in Path/Pocket 0.19

Post by Russ4262 »

Morning,
scholli wrote: Sun May 19, 2019 11:27 am I found a strange behaviour in the latest daily (which I could not find described anywhere yet).

When I try to create a pocket operation the basemodel jumps out of it's position (even kind of random as it seems)
Okay. I reworked the script. So far my tests show this behavior to be eradicated. Further testing will confirm or disprove the fix... lol.
I appreciate the testing and feedback.

Please visit the Path Pocket Shape: 4th-axis Integration topic to download the updated scripts to fix this issue. You will need to re-create your Path Pocket Shape operations because the "Use Rotation" property has been renamed to "Enable Rotation" in preparation for UI integration of rotation settings within the core of the PathWB.

roerich_64 wrote:ping
Thanks Walter for the help in reproducing the error.

mlampert wrote: Sun May 19, 2019 4:21 pm Yes, this is currently broken - it happens whenever one repositions or rotates the base model. Unfortunately the fix is not straight forward and will probably take a bit.
I think it is fixed, unless there is another issue to which you were referrring? I ran a couple tests on the two instances of this problem reported here in the forums and both models and operations behaved correctly with the fix. I have this fix already in my 4th_axis branch - had to edit it in order to remove UI elements I had installed also. Stand-alone version 1k-testing is available now at the topic linked above. Feel free to visit my GH repo and build the 4th_axis branch that has Rotation UI integration for PathWB well started.

Russell
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Bug in Path/Pocket 0.19

Post by RatonLaveur »

Shall we mark as solved based on Russ's new published python scripts?
Post Reply