Skip to content

[Path] Rest machining from gcode#11939

Merged
sliptonic merged 11 commits intoFreeCAD:mainfrom
davidgilkaufman:restMachiningFromGcode
Jan 18, 2024
Merged

[Path] Rest machining from gcode#11939
sliptonic merged 11 commits intoFreeCAD:mainfrom
davidgilkaufman:restMachiningFromGcode

Conversation

@davidgilkaufman
Copy link
Contributor

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.

Part 1

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.

Part 2

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).

20240108_20h57m23s_grim

Todo:

  • squash commits, and label the full commit with [Path]

@github-actions github-actions bot added the Mod: CAM Related to the CAM Workbench label Jan 9, 2024
@davidgilkaufman
Copy link
Contributor Author

@sliptonic could you review this for me, or assign an alternative reviewer?

@sliptonic sliptonic requested a review from mlampert January 15, 2024 17:50
@sliptonic
Copy link
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.

Copy link
Contributor

@mlampert mlampert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with libarea and don't understand what's going on or what the implications of the change are.

@sliptonic sliptonic merged commit 893238c into FreeCAD:main Jan 18, 2024
@Jaron123
Copy link

Will rest machining also come for Adaptive toolpaths?

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 Workbench

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants