PR #4132: Check if startpoint is not lower than bounds

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
gauna
Posts: 48
Joined: Fri Dec 04, 2015 8:20 pm

PR #4132: Check if startpoint is not lower than bounds

Post by gauna »

Hello,

here is my first pull request PR #4132. Idea is to make sure that starting point for path generation with by Area is not below bound. This could happen, if start point is set to end point of the previous pocket if several pockets are selected for one operation. As end point is below boundary the sorting algorithm decides to start with the lowest plane to start and works from bot to top as described here:

https://forum.freecadweb.org/viewtopic.php?f=15&t=52924

What I did is to check if value of retracting axis is lower that bound. In this case the value is set to the bounds value. It is therefore necessary to always calculate bounds. That's why I rearranged code and removed if-clause if bounds calculation is necessary.

Two point:
- As I'm new to FreeCAD code base I'm not sure about any side effects of the rearrangement
- This is a workaround to rescue "KeepToolDown" feature by suppressing a wrong start point. In my option the basic problem is that the sorting algorithm is wrong implemented. It should not be able to rearrange operations in this way. There must be a priority during sorting to keep the different layers always from top to bot. To root cause of this problem is not fixed by this workaround and still exists.
Post Reply