[Path] Rest machining from gcode#11939
Merged
sliptonic merged 11 commits intoFreeCAD:mainfrom Jan 18, 2024
Merged
Conversation
…ally, not en masse
Contributor
Author
|
@sliptonic could you review this for me, or assign an alternative reviewer? |
Member
|
I've compiled and tested. I'm inclined to merge as it seems to work as expected. I'm requesting someone else to review code since my c++ is so weak. |
mlampert
approved these changes
Jan 17, 2024
Contributor
mlampert
left a comment
There was a problem hiding this comment.
I'm not familiar with libarea and don't understand what's going on or what the implications of the change are.
|
Will rest machining also come for Adaptive toolpaths? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Forum post
This PR is my next iteration of rest machining for FreeCAD. It discards the old approach of using internals of the Area class to determine previously cleared regions, and instead computes those regions by processing the gcode from earlier operations. This is trickier, but comes with the advantage of being more flexible: in this version of the rest machining feature, any operation (most notably Adaptive operations) can be the source tool path for rest machining.
Even with the improvements from this iteration, only Area operations (Pocket, Pocket3D, Profile) can take advantage of rest machining. I hope to implement rest machining for Adaptive tool paths in my next pass improving this feature.
Here is the FreeCAD file I've been using to test this feature. It contains 3 parts with test tool paths:
The first part is the part I used to test my initial implementation of rest machining. There are 3 operations. The first operation is a Pocket on the right side, 6mm tool, with no special features. The second operation is a Pocket covering the full top area with a 1.5mm tool, with rest machining enabled. The third operation is a Pocket3D on the entire volume with the same 1.5mm tool, with rest machining enabled. The implementation producing these results is new, but this functionality already exists in the version of rest machining currently in FreeCAD.
The second part tests rest machining after an adaptive operation. The first operation is an Adaptive operation in the top region with a 6mm tool. The second operation is a Pocket3D on the full volume with a 1.5mm tool.
The third part tests speed optimizations and drilling. It has an absurdly dense Adaptive operation on the left region (visibility limited to the first 50k segments as a necessity to improve rendering performance). After that there is a drilling operation on the right side, then a Pocket operation on the right side with rest machining enabled. In addition to demonstrating that rest machining can process drilling gcode commands, this part demonstrates that bounding box filtering of far-away gcode commands works correctly (without that, generating the Pocket would be very slow).
Todo: