Proposed cut pattern updates: PR #4965

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Russ4262
Posts: 952
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Proposed cut pattern updates: PR #4965

Post by Russ4262 »

Afternoon.
I have just pushed the next round of updates and changes to the PR. The large change is based on a comment that @Sliptonic
sliptonic wrote: Tue Aug 10, 2021 7:55 pmping

mentioned to me a few weeks back about developing in parallel to current capability and structure. I have implemented many of the big changes I have been working on in a separate dev branch into this PR by creating a new experimental Clearing operation.


The change I just pushed today creates a new experimental Clearing operation that combines current PocketShape, MillFace, 3D Pocket, and Adaptive operations. All four of these existing ops do the same thing: clear material from a 3D envelope. Now instead of four separate operations, users will be able to use a single Clearing op, if they have Experimental Features enabled. The new cut pattern fixes in this PR are now implemented in this new Clearing op, rather than the current PocketShape, MillFace, and 3D Pocket ops as originally presented. This change has the added benefit of leaving current ops alone so as to not introduce new bugs.

GeneFC wrote: Thu Aug 19, 2021 1:29 pm
Russ4262 wrote: Thu Aug 19, 2021 2:25 am I believe this is already taken care of. :) The current property is `Start At` and has `Edge` and `Center` as options.
... The problem with either the Edge/Center or Start At is that the selection is not honored after the first layer.
... I just ran a very simple pocket test, with "Start at Center" set, and "Min Travel False". The alternating inside/outside behavior for successive depth layers is still present. ...
Sorry for my miscommunication earlier. When I stated, "I believe this is already taken care of," I was referring to this new PR, not existing Path capabilities. My testing does show layer fidelity to current "StartAt" (named `CutPatternReversed` in new Clearing op) feature in this PR. Since existing ops are unchanged now (except for very minor fixes as found), this alternating start location will still exist in the PocketShape, MillFace, and 3D Pocket ops, but fixed in the new Clearing op that makes use of the new path generation class.


As for the KeepToolDown feature, I have made some progress on some of the patterns in the new Clearing op proposed. Looking at the Offset pattern, I need to fix a bug related to this KeepToolDown feature as of this post. Some of the rapids are cutting through raised portions of the model. I will look at this when I get some more time.


I have not touched the `MinTravel` feature as it relates to this PR and the new cut pattern generation class. If the `MinTravel` simply alternates layer start points depending on where previous layer ends and current layer begins, such an algorithm could be added and the paths adjusted accordingly. For now, I am not working on this feature.


Because of the major changes to this PR (the implementation of the new Clearing op to showcase the new cut pattern fixes), I updated the cut pattern test macro file in the OP. That model file posted in the OP is still the valid base file for the test macro.


I have attached screenshots from the new Clearing op. The op combines the current Heights and Depths task panels. It includes the Extensions feature. It organizes the properties in the Operations tab and includes settings for Adaptive clearing only when needed. There is a new `Visualize` button to visualize the target removal shape based on Base Geometry, Extensions, and settings in the `Selection Options` portion of the Operations tab.

Fun and exciting stuff happening! Thanks a million those offering feedback and conducting testing of this PR.

This PR is still in Draft phase.

Have a great week.
Russell
Attachments
Use of new `Visualize` feature for visualizing the target removal shape based on Base Geometry, Extensions, and Operation options.  The paths seen are not part of the visualization, only the blue box.
Use of new `Visualize` feature for visualizing the target removal shape based on Base Geometry, Extensions, and Operation options. The paths seen are not part of the visualization, only the blue box.
Snip macro screenshot-11ca9a.png (143.46 KiB) Viewed 2975 times
Display of the `Adaptive Options` that only appear when working with the `Adaptive` cut pattern.  Otherwise, they are hidden in the Operations tab of the task panel.
Display of the `Adaptive Options` that only appear when working with the `Adaptive` cut pattern. Otherwise, they are hidden in the Operations tab of the task panel.
Snip macro screenshot-253a69.png (43.48 KiB) Viewed 2975 times
The proposed reworking of the Operations tab.  This is only for the proposed `Clearing` operation.
The proposed reworking of the Operations tab. This is only for the proposed `Clearing` operation.
Snip macro screenshot-e180a1.png (38.99 KiB) Viewed 2975 times
The combined `Depths and Heights` tab for the Clearing op.
The combined `Depths and Heights` tab for the Clearing op.
Snip macro screenshot-5d17ee.png (48.69 KiB) Viewed 2975 times
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Proposed cut pattern updates: PR #4965

Post by RatonLaveur »

Ok now, I have to come out of hiding to say that this looks really great!
As soon as I have a machine I'll test this.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Proposed cut pattern updates: PR #4965

Post by GeneFC »

This certainly looks very promising. Combining similar operations should greatly improve the ease of use, especially for the less experienced.

The current Path WB is very capable already, and these new additions should make it more polished as well.

Gene
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Proposed cut pattern updates: PR #4965

Post by Kunda1 »

Shiny!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Steveco
Posts: 58
Joined: Wed Aug 29, 2018 11:19 pm
Location: San Diego, CA, USA

Re: Proposed cut pattern updates: PR #4965

Post by Steveco »

The way the image in the last screenshot shows the meaning of the various heights and depths right in the same dialog where you set the heights and depths is really nice. That would eliminate a lot of confusion and needing to check the documentation.
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Proposed cut pattern updates: PR #4965

Post by herbk »

Steveco wrote: Mon Aug 23, 2021 3:40 am The way the image in the last screenshot shows the meaning of the various heights and depths right in the same dialog where you set the heights and depths is really nice. That would eliminate a lot of confusion and needing to check the documentation.
and it reminds me to look for the .svg file for it... :roll:

@russ:
The first pic shows a lot of unneeded and time consuming (and tool "eating") ups and downs of the tool. Gene ponted this out a few posts above...
If Keep Tool Down is still availible its OK, - may be Keep Tool Down should be the default...
Gruß Herbert
memfis
Posts: 589
Joined: Tue Nov 15, 2016 7:58 pm

Re: Proposed cut pattern updates: PR #4965

Post by memfis »

I'm looking forward to PR4965 showing up here https://github.com/FreeCAD/FreeCAD/commits/master and then in appimage in order to take the Mod/Path from there and put it in the link version.
But give me, date me (no, not fault), but could there be a Mod/Path archive with this functionality here?
Russ4262
Posts: 952
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Proposed cut pattern updates: PR #4965

Post by Russ4262 »

Afternoon.
Found some time this week to work on this project a bit more.

I decided to add the updated Profile operation to this PR, but again I am following @Sliptonics advice to develop in parallel, so it is in the same new operations folder as the new clearing operation.

The new operation is called Perimeter for now, just so there is no issues with the existing Profile operation. Again, this PR is leaving existing operations in tact and adding new. As a result, there is some code duplication due to refactored and improved versions of existing code that are used with the new operations.

One of the numerous improvements to the Profile operation (the new Perimeter operation in this PR) is the use of the same PathSelectionProcessing module and its 2D target shape builder, and open edge shape builder classes. This means that whether the user is using the new Perimeter or Clearing operations, selections and options should produce identical target shapes.

More improvements in the Perimeter op include the availability of the Extensions feature, as well as improvements to the OpenEdge profiling algorithm.

With improvements found in the new PathSelectionProcessing module, Clearing op selections can be made using edges. As with the current Adaptive op, some use cases will allow for edge selections that are physically not closed, but closed when viewed as from above.

Another benefit of having a single 2D target shape building class is that all ops that use it can have access to the same capabilities for building target shapes from user inputs that include Base Geometry, Extensions, and op property settings.

On the `KeepToolDown` topic, I have begun some work on the feature in this PR with some success. I think I have a few more issues to address as far as application to specific cut patterns, and then I will be at a point where I will need some assistance with testing on various models to identify problematic paths where a path is kept down when it should be raised to avoid collision. We might also need to add a property or two related to `KeepToolDown` that will provide for a threshold and other common use case differences.

For those able to build this PR from source, I think you might be able to use it as a daily driver if you so desire since the new ops are both experimental and the code is isolated from existing operations. Feel free to give it a try. Feedback is very much appreciated.

Cheers,
Russell
memfis
Posts: 589
Joined: Tue Nov 15, 2016 7:58 pm

Re: Proposed cut pattern updates: PR #4965

Post by memfis »

I'm constantly building a build from source at https://github.com/realthunder/FreeCAD/ ... /LinkDaily. And almost every day I do something in Path. I would like to see this PR there. The easy way is to slip the Mod/Path I take from the unpacked appimage. What other ways are there "right now"? I'd like a link?
Russ4262
Posts: 952
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Proposed cut pattern updates: PR #4965

Post by Russ4262 »

memfis wrote: Wed Sep 08, 2021 11:57 am I'm constantly building a build from source at https://github.com/realthunder/FreeCAD/ ... /LinkDaily. And almost every day I do something in Path. I would like to see this PR there. The easy way is to slip the Mod/Path I take from the unpacked appimage. What other ways are there "right now"? I'd like a link?
Anyone may build from source branch, fix/clearing_patterns.

DISCLAIMERS: This PR and the branch upon which it is based are not part of master yet. This PR and the branch upon which it is based are in draft phase. This PR and the branch upon which it is based can and will be broken on occasion by me as I develop the features therein. Consequently, my "customer support" for this PR is much less than that of FreeCAD master. This PR is very much a work in progress (very slow progress due to life's overriding responsibilities).

That said, I welcome the testing feedback. Have fun.

Russell
Post Reply