Dog bones for milling inside corners

As already stated in the build problems thread, I was trying insert my dog bone generation code in LW4. Dog bones are used to circumvent the ‘inside corner problem’.
The code is not limited to only 90 degree angles, but should be able to handle any arbitrary angle under any rotation (as a sanity check, the code is limited to 160 degree turns). It tries to minimize the amount of additional material being cut.
image
Most of the heavy lifting was performed by the already existing offset functionality. The problem being that in the above image, figures a, d, e and f all have the same offset shape. My algorithm can cope with straight corners and fillets. However corner cases like f cannot be handled by the current algorithm. (Probaby some skeletonizing algorithm is needed). In general features that are too small to be handled by the offset algorithm itself will be ignored.
Have a look at the patch here: https://pastebin.com/AS51mTLX. BTW, this is my first js code, so my code might not be the proper programming style for this language.

3 Likes

If anybody cares, just updated the pastebin (sorry not convident enough for branching git):

  • bugfix for climb cuts
  • prevent dogbones < 0.1mm (to stop jittering mill on arcs)
  • minor efficiency update for calculating compensation for nearest segment.
    image

Apart from the dogbones, also discovered that the ‘segment’ option (a.k.a. op.segmentLength) needs some fixing for better accuracy.

2 Likes

Need any git help?

Cool, can hardly wait to test the dogbone function. :slight_smile:

@Kire_Pudsje Sorry, we don’t have the ressources to manually pull over your code changes, but we would be happy to accept a pull request on github.

1 Like

I’ve helped a lot of people with git. Happy to help out here. Let me know.

1 Like

Hi @Kire_Pudsje

Your addon looks promising. :slight_smile: What must I do to test this function?