Hi. I do need to extend some pockets only on the edges that are touching the exterior contour and I can’t find an algorithm to do so. Basically I do have the pockets (Green colour) that I do need to extend only the edges that are touching the exterior contour of the shapes (the Blue colour) to result a shape that resembles the Red colour ones.
From the looks of your file it appears that that is a milling tool path?
So I’m assuming you are just trying to extend the tool path to ensure clean edge cuts/material removal?
You had a couple unneeded mid points in the sub curves of your “Initial Pocket” polylines & your “Contour” polylines.
I went ahead and deleted those from the Rhino polylines FYI to simplify the logic.
@michaelvollrath there’s always a lot to learn from your definitions, so I went ahead and lurked also this one but for some reason this pops up when trying to open it:
it seems I’m just not able to get them… Area and Custom Preview look pretty standard ones… no idea what’s going on
@inno oh sorry about that! And I appreciate the kinds words!
I was using Rhino 8 and I forgot that it won’t default to the older version of the area component and I guess Custom Curve Preview isn’t available either.
From the looks of your file it appears that that is a milling tool path?
So I’m assuming you are just trying to extend the tool path to ensure clean edge cuts/material removal?
Yes, this is the intention, to have clear cuts without rounded corners where the pockets are touching the exterior contour.
Your definition it is a good start, but unfortunately it is not perfect. I just tested with another sample file and I do get some funky results.
Those are the issues in your geometry and in the script I provided the issue was that, in the new file you shared, some of the “plates” did not have tool paths, resulting in null branches in the data tree structure which I did not account for.
I added a small update in the script to handle this and with that addition and providing it clean contour and pocket polylines the script is still working as intended.