Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CAM] Adaptive roughing/overhang detection #18880

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dbtayl
Copy link
Contributor

@dbtayl dbtayl commented Jan 5, 2025

This pull request was initially going to be an implementation of adaptive roughing (click one button, creates adaptive toolpaths for roughing the entire model), but there's an argument to be made for approaching it slightly differently as a starting point.

Part of an "adaptive roughing" algorithm is automatically adjusting the machining area as Z changes- due to overhangs, steps, and/or sloped walls, you obviously can't just take the pocket openings at the top of the model and project down. That's what's partially/jankily implemented in the branch attached to this pull request- automatically finding all areas that can be machined at a given Z height, accounting for steps, slopes, overhangs, etc. More details below for those that want to test. The basic algorithm is to slice the model at the Z cutting height, then subtractively project all of the faces above the cut down onto the outside profile of the model. The resulting areas are deemed machinable.

I'm thinking that's a good amount for a pull request on its own- add an option/checkbox to the adaptive operation that causes it to take the curves provided as bounding boxes and adjusting the area to be machined at every stepdown so it neither cuts into the model at that depth nor attempts to machine areas that are unreachable due to (eg) overhangs.

Generally looking for dev feedback that I'm on the right track before spending a bunch more time on this. Some specific questions I'm wondering a bit on:

  1. Does it make sense to limit this to adaptive operations, or should it be an option universally?
  2. Do we need some option for "flat-land detection" or other way to make sure we somewhat align cuts to (eg) steps in pockets for this to be useful?
  3. Do we need some option to stay some amount off the model in Z for this to be useful, like the XY stock to leave option? Right now you can kind of achieve that by setting the final depth.
  4. Anything else I haven't thought of?
  5. Am I incorrect in thinking this is a better approach than trying to do this and full adaptive roughing in a single pull request?

Relevant feature request: #6607

Details for testing:
The code is currently very much proof of concept (also a ton of false starts and TODOs in there if you actually look at it- would all be fixed prior to an actual pull request). To use it:

  1. Create an adaptive operation
  2. Do NOT select any faces/wires- if you do, the current adaptive behavior is applied.
  3. Set a final depth that you want to test at

The result should generate a toolpath for all pockets in the model at the final depth selected. I haven't implemented iterating over the different depths yet, so right now it's just showing one "step" of the process. Currently it only works for pockets (inside cut region), not the outside of the model.

Example- you can see the pocket on the left is cut out to the area that can be machined at that depth, and the pocket on the right is restricted by the overhangs:
example_toolpath

Same thing, but with a lower cut height- note how the left pocket shrunk with the tapered sides, right pocket is exactly the same boundary:
example_toolpath1

… rough internal geometry at the ending depth when no geometry is selected, accounting for overhangs and whatnot.
@github-actions github-actions bot added the Mod: CAM Related to the CAM/Path Workbench label Jan 5, 2025
@dbtayl dbtayl changed the title Adaptive roughing/overhang detection [CAM] Adaptive roughing/overhang detection Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: CAM Related to the CAM/Path Workbench
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant