Ticket #4411 - Can only generate pocket once for this shape, then it fails.

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Syres
Posts: 720
Joined: Thu Aug 09, 2018 11:14 am

Re: Can only generate pocket once for this shape, then it fails.

Postby Syres » Thu Jul 30, 2020 9:47 am

This is the best but poor effort fix I can come up with for now, replacement PathPocketShape.py and test file attached. Those who use 4th Axis regularly are encouraged to test that it's not caused other regressions. Tested only on Linux for now, will verify on Windows later.
Attachments
PathPocketShapeTest.FCStd
(122.88 KiB) Downloaded 4 times
PathPocketShape.py
(43.83 KiB) Downloaded 3 times
Syres
Posts: 720
Joined: Thu Aug 09, 2018 11:14 am

Re: Ticket #4411 - Can only generate pocket once for this shape, then it fails.

Postby Syres » Fri Jul 31, 2020 5:23 pm

Russ4262 wrote:
Fri Jul 31, 2020 3:46 pm
PR #3763: Path: PocketShape - Fixes ticket #4411
Thanks for the efforts Russ, tested almost successfully by backing out my hack and implementing your proper PR on top of:

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22193 (Git)
Build type: Unknown
Branch: master
Hash: 488419cd73895b305283270e643683b12b1fe8d5
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

If you delete all the existing Operations from PathPocketshapeTest.FCStd file above and create Pocket Shape on Face 22 using defaults except for Rotation on A and then subsequently change the Stepover from 100 to say 75 the path flips to the other side but I thought the Reverse Direction was supposed to bring it back to the correct side, this no longer works for me?
Russ4262
Posts: 466
Joined: Sat Jun 30, 2018 3:22 pm

Re: Ticket #4411 - Can only generate pocket once for this shape, then it fails.

Postby Russ4262 » Sun Aug 02, 2020 6:39 pm

PR #3763: Path: PocketShape - Fixes ticket #4411

Updated:
- Fixes rotational `LimitDepthToFace` feature
- Fixes `InverseAngle` feature when identifying necessary rotational needs for model. This fix hides the `ReverseDirection` property, as it should be superseded by recent implementation of `isFaceUp()` method. The hidden property is left in-tact in case testing reveals a need for restored user accessibility.
- Fixes reference to undefined `ns` variable. This fix might need additional attention with more rotational testing.
- Updates initial fix to include rounding per suggestion by @vocx on PR review