Transitions between regions

Here's the place for discussion related to CAM/CNC and the development of the Path module.

How should freecad perform region transisitons?

At clearance height.
2
33%
At safe height.
4
67%
At the height of a new property, which defaults to clarence height.
0
No votes
At the height of a new property, which defaults to safe height.
0
No votes
 
Total votes: 6
User avatar
sliptonic
Posts: 1561
Joined: Tue Oct 25, 2011 10:46 pm

Re: Transitions between regions

Postby sliptonic » Sat Aug 03, 2019 4:54 pm

In my mind, that's two different things. I can see wisdom in adding an 'engagement height' as a new concept and using it to generate safer gcode. But until we add such a thing, we don't have it. It seems wrong to misinterpret existing data to force it to fit an entirely different concept.
IMback!
Posts: 69
Joined: Sat Jul 13, 2019 9:40 pm

Re: Transitions between regions

Postby IMback! » Sat Aug 03, 2019 6:17 pm

Ok so you agree an 'engagement height' is a useful concept. Now lets look at how the paramter "safe height" is currently used in some operations:

i have set opStartDepth and the top of the stock to 10mm, Safe Height to 15mm and Clearance height to 30mm



2D pocket:

Start of operation:

Code: Select all

G0 Z30.000000
G0 X103.492754 Y27.695628
G0 Z15.000000
G1 F4.166670 X103.492754 Y27.695628 Z9.365000
  • Safe Height is used as the engagement height; that is g1 is used to go from Safe Height to opStartDepth
Region change:

Code: Select all

G0 Z30.000000
G0 X126.862665 Y26.933566
G0 Z15.000000
G1 F4.166670 X126.862665 Y26.933566 Z9.365000
  • Region is switched at Clearance height
  • Safe Height is used as the engagement height; that is g1 is used to go from Safe Height to opStartDepth
  • Safe height is used in no other capacity in this operation


Profile by face:

Start of operation:

Code: Select all

G0 Z30.000000
G0 X106.202786 Y36.248394
G0 Z15.000000
G1 F4.166670 X106.202786 Y36.248394 Z9.365000
  • same as 2D pocket
  • Safe Height is used as the engagement height; that is g1 is used to go from Safe Height to opStartDepth
Region change:

Code: Select all

G0 X129.446713 Y35.980569 Z30.000000
G0 X106.666778 Y35.181513 Z30.000000
G0 X106.666778 Y35.181513 Z24.365000 (this is strange)
G1 F4.166670 X106.666778 Y35.181513 Z9.365000
  • Region is switched at Clearance height
  • some strange value (Z24.365000) is used as engagement height
  • maybe bug?
  • Safe height is used in no other capacity in this operation


Engrave:

Start of operation:

Code: Select all

G0 F4.166667 Z30.000000
G0 F30.000000 X89.203964 Y35.125862 Z30.000000
G0 F4.166667 X89.203964 Y35.125862 Z15.000000
  • same as 2D pocket
  • Safe Height is used as the engagement height; that is g1 is used to go from Safe Height to opStartDepth
Region change:

Code: Select all

G0 F4.166667 Z30.000000
G0 F30.000000 X113.589951 Y34.744831 Z30.000000
G0 F4.166667 X113.589951 Y34.744831 Z15.000000
  • Region is switched at Clearance height
  • Safe Height is used as the engagement height; that is g1 is used to go from Safe Height to opStartDepth
  • Safe height is used in no other capacity in this operation


Drill:

Code: Select all

G0 F4.166667 Z30.000000
G90
G98
G81 F4.166670 R10.000000 X91.010078 Y44.464409 Z0.000000
G80
G81 F4.166670 R10.000000 X114.593117 Y44.208996 Z0.000000
G80
G0 Z30.000000

Start of operation:
  • Unique property 'Retract height' is used as the engagement height; g0 is used to go from Safe Height to Retract height
Region change:
  • Region is switched at Clearance height if operation is set to G98 mode
  • Region is switched at unique property 'Retract height' if operation is set to G99 mode
  • Safe height is used in no capacity in this operation

Fixture (automatically inserted opertaion):

Code: Select all

G54
G0 Z10.000
  • top of stock is used as engagement height
  • Safe height is used in no capacity in this operation
Last edited by IMback! on Sat Aug 03, 2019 6:44 pm, edited 2 times in total.
IMback!
Posts: 69
Joined: Sat Jul 13, 2019 9:40 pm

Re: Transitions between regions

Postby IMback! » Sat Aug 03, 2019 6:27 pm

so i propose this:
Attachments
Path-DepthsAndHeights.gif
Path-DepthsAndHeights.gif (30.35 KiB) Viewed 264 times
IMback!
Posts: 69
Joined: Sat Jul 13, 2019 9:40 pm

Re: Transitions between regions

Postby IMback! » Sat Aug 03, 2019 6:37 pm

Im willing to start implementing this - if i know that there is consensus that this desirable and will be merged.
User avatar
sliptonic
Posts: 1561
Joined: Tue Oct 25, 2011 10:46 pm

Re: Transitions between regions

Postby sliptonic » Sat Aug 03, 2019 7:37 pm

Slow down and talk it through. The current implementation has served us well for a couple years so there's no emergency. Get it right and get some buy-in before changing things. The devil is always in the details and changes like this ALWAYS have unintended consequences. They are also way more work then you think. It means changing wiki, help files, translation strings, tool tips, op algorithms. It also means two years of forum posts, video tutorials, and books that explain heights/depths are suddenly obsolete.

Just in this thread you've introduced a boat-load of new words and ideas that need discussing.

First, just because I said I could see the wisdom doesn't mean it should happen. I'm just one guy with one idea and this is a group project. Let's see what others think.

Second, (IMHO) if we were going to think about a separate property to control engagement distance, I'd prefer that was a relative distance configured at the job or even user preference level. Configuring heights/depths already causes tons of confusion so adding another property to every operation is bad. A small enagement distance specifically to avoid the issues you raised could be introduced almost silently into the depth calculations without causing all kinds of confusion.

Third, the existing concepts, even if not correctly implemented, at least have the benefit of consensus of meaning. Changing the meaning of Safe height to 'engagement' and then adding a new 'operation clearance' is asking for trouble. The terms 'clearance height' and 'safe height' have a meaning now. changing those should be an absolute last resort.
IMback!
Posts: 69
Joined: Sat Jul 13, 2019 9:40 pm

Re: Transitions between regions

Postby IMback! » Sat Aug 03, 2019 7:53 pm

A small enagement distance specifically to avoid the issues you raised could be introduced almost silently into the depth calculations without causing all kinds of confusion.
i would like to avoid hiding things from the user.

configuring heights/depths already causes tons of confusion so adding another property to every operation is bad.
i would argue that it causes confusion because how it currently is is confusing because it is inconstant.
Second, (IMHO) if we were going to think about a separate property to control engagement distance, I'd prefer that was a relative distance configured at the job or even user preference level. Configuring heights/depths already causes tons of confusion so adding another property to every operation is bad.
We would not be adding another property to every operation, safe height would just become engage height. Or we can leave the name as is with "safe height" and just formalize how things are already done (safe hight is used only as an engage height) in every operation except drilling.

The only new property would be the job-clarence height, and this would only be at job level, and would default to the same thing as the operation clearance height that exists currently.

The implementation effort would therefore be pretty minimal. The documentation effort too if we don't change the name of the safe hight, just formalize how it is used already.

The drilling op would be changed so that the R parameter (even in g83) is taken directly from the engage height, or safe height if we avoid renaming, so that direct user control over the R parameter is retained.

EDIT:
Third, the existing concepts, even if not correctly implemented, at least have the benefit of consensus of meaning. Changing the meaning of Safe height to 'engagement' and then adding a new 'operation clearance' is asking for trouble. The terms 'clearance height' and 'safe height' have a meaning now. changing those should be an absolute last resort.
it can be clearly seen in the way they are implemented now that they did not even have the benefit of consensus of meaning among the creators of the operations and the area-lib. I highly doubt many users knew what they are supposed to mean and what they do mean in freecad.
Last edited by IMback! on Sat Aug 03, 2019 8:09 pm, edited 3 times in total.
mlampert
Posts: 1326
Joined: Fri Sep 16, 2016 9:28 pm

Re: Transitions between regions

Postby mlampert » Sat Aug 03, 2019 7:54 pm

I saw this poll last night before going to bed and didn't feel like I can cast a vote because the question was too generic for me. So I figured I'ld sleep over it and maybe find some clarity.

looking at it today it looks more like a post war than a poll. I presume we're done with the poll and continue the conversation from github?
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Transitions between regions

Postby GeneFC » Sat Aug 03, 2019 9:07 pm

IMback! wrote:
Sat Aug 03, 2019 3:01 pm
also even when the stock is touched off perfectly, that is to at least 0.01mm precision, rapiding to the stock with g0 will cause issues because the tool may not be spinning yet! the fixture operation, among others, dose this!
Your machine controller must take care of that issue, not FreeCAD. I know linuxcnc has methods to wait until the tool is at speed, and I would guess that many or most other controllers do as well.

Gene
IMback!
Posts: 69
Joined: Sat Jul 13, 2019 9:40 pm

Re: Transitions between regions

Postby IMback! » Sat Aug 03, 2019 9:33 pm

GeneFC wrote:
Sat Aug 03, 2019 9:07 pm

I know linuxcnc has methods to wait until the tool is at speed, and I would guess that many or most other controllers do as well.

Gene
yes it does, for g1 moves not g0 moves. spindel-at-speed dose not pause g0 moves in linuxcnc. the use of g0 to go to stock-top is a freecad issue
User avatar
sliptonic
Posts: 1561
Joined: Tue Oct 25, 2011 10:46 pm

Re: Transitions between regions

Postby sliptonic » Sat Aug 03, 2019 10:38 pm

IMback! wrote:
Sat Aug 03, 2019 7:53 pm
A small enagement distance specifically to avoid the issues you raised could be introduced almost silently into the depth calculations without causing all kinds of confusion.
i would like to avoid hiding things from the user.
We're programmers. Hiding details from users is what we do. If we weren't hiding details, we'd just let them write gcode by hand.

But I don't mean to be deceitful or keep anything from them. I just mean it isn't the sort of thing they need to constantly consider. You want to make sure a feed move starts a little bit above the actual material so the spindle is at speed. Fair enough. Why can't the user configure his preferred 'engagement distance' at 0.1 mm or something and we add that to the Start depth silently? Done.
configuring heights/depths already causes tons of confusion so adding another property to every operation is bad.
i would argue that it causes confusion because how it currently is is confusing because it is inconstant.
consistency might be a problem but we have that handy graphic you referenced specifically BECAUSE people were confused about all the heights/depths settings.
Second, (IMHO) if we were going to think about a separate property to control engagement distance, I'd prefer that was a relative distance configured at the job or even user preference level. Configuring heights/depths already causes tons of confusion so adding another property to every operation is bad.
We would not be adding another property to every operation, safe height would just become engage height. Or we can leave the name as is with "safe height" and just formalize how things are already done (safe hight is used only as an engage height) in every operation except drilling.
safe height was never intended to be used as an engagement height. You're reading that into it. Never happened. It was intended more as you are using the term 'operation clearance' It was intended to be the height at which movement within an operation was safe, like moving from one recess to another while avoiding an island. It was always expected that rapid down from that level to start depth would be possible.

Now you've raised a good point about needing to start feed slightly before the actual material but I wouldn't go so far to say no rapid rate below safe height is allowed.. That's a step too far. it's only meant to block horizontal rapid.
The only new property would be the job-clarence height, and this would only be at job level, and would default to the same thing as the operation clearance height that exists currently.
I can be convinced that clearance height should be at the job level. There were implementation reasons why it was done at the op level early. Basically we wanted all ops to be able to be posted independently and the job structure wasn't formalized yet. We could talk about moving it but it's a question of whether it buys us anything to move it.
it can be clearly seen in the way they are implemented now that they did not even have the benefit of consensus of meaning among the creators of the operations and the area-lib. I highly doubt many users knew what they are supposed to mean and what they do mean in freecad.
Sorry. We didn't have the benefit of your clear-eyed vision and ability to rally consensus at the time. We did the best we could integrating legacy code from HeeksCNC and libarea and adapting things to the FreeCAD model as we went.