A user on the #cam IRC channel had a problem pocketing a shape in HeeksCNC. I’ve been stung by this myself. In the first picture below you can see the six identical pockets have not pocketed the same. The user had designed the oblong shape and copied and was confused why all the copies didn’t pocket the same way.
If we pan the view we see additional geometry below.
The user had designed this part in another package and imported the file to HeeksCNC. The user is designing and building a 3d part in the sense that it has real depth to it, but for all practical purposes, this pocket operation is really a 2d (actually 2.5d) operation. Since both the top edge and bottom edge of the oblong shape are included in the sketch along with the vertical lines connecting them, HeeksCNC was getting confused trying to order the segments to create a closed sketch. After we realized this, the user deleted the lower level of the geometry and reordered the sketch. Everything worked perfectly after that.
The thing to remember is that in pocket operations, the depth of the pocket is controlled by a parameter of the operation and not by the geometry of the drawing.