Arc Tolerance
@seb_kuzminski
Please explain to a German, why the arc tolerance for metric and imperial units are different on default.
IMHO it makes no sense to set the metric tolerance wider than the imperial by default.
1 inch = 25,4 mm
so the default imperial tolerance of 0,0028 results in 0,071 for metric. not 0,0282
I would suggest to set a arc tolerance lower than 0,05 mm as default, the suggested 0,0282 mm seems ok, but than imperial should be 0,00111 inch.
Norbert
Please Log in or Create an account to join the conversation.
Please explain to a German, why the arc tolerance for metric and imperial units are different on default.
IMHO it makes no sense to set the metric tolerance wider than the imperial by default.
Hi
Because that is what the developers wanted. I originally set the metric (which I use, I am in the UK) to the same tolerance as the imperial, in the original simple fix of the values.
Seb wrote:
1. The default tolerance (if none is specified in the ini file) should be 2 * 0.001 * sqrt(2) for inch, and 2 * 0.01 * sqrt(2) for mm. This would mean that any valid arc where the endpoints and/or centerpoint got rounded or truncated to 0.001 inch or 0.01 mm precision would be accepted
The rationale I think was to cater for the rounding up of values by CAM programs, the value at which each gets rounded up differs, because of the base is different for both.
I'll let Seb confirm that.
regards
PS I have set the minimum value the same for both metric and imperial, yet to see if that gets through
Please Log in or Create an account to join the conversation.
All other stuff makes no sense!
Norbert
Please Log in or Create an account to join the conversation.
Now sorted the runtests issue for MK and all works.
The default arc tolerance is set to the figures you suggested, which equate to
TOLERANCE_INCH 0.0028
TOLERANCE_MM 0.0282
The minimum has been set to
MIN_TOLERANCE_INCH 0.00004
MIN_TOLERANCE_MM 0.001
which is 1 micron and imperial equivalent +/-
Attempting to go down to 0 will produce errors such as abs_err = 2.2e-16 rel_err = 0.0000% .
1 micron is probably fine enough!
Patch submitted direct also
regards
I don't understand the rational of setting the default to different values and the min to the same value. Seems to me if 0.002" is good then mm should be 0.05, or the other way around if 0.25mm is good then inch should be .001" Maybe I just don't understand the logic of the default setting.
JT
Please Log in or Create an account to join the conversation.
I don't understand the rational of setting the default to different values and the min to the same value. Seems to me if 0.002" is good then mm should be 0.05, or the other way around if 0.25mm is good then inch should be .001" Maybe I just don't understand the logic of the default setting.
I know what you mean, I was happier with the original 0.005" and 0.0127mm and being able to make them looser.
As said, I think the rationale of the formula is to cater for the rounding up effect for each base, rather than give the same tolerance for inch and mm
It strikes me that this presents the same relationship that originally existed, except looser by approx 50%, so maybe that was the reason for the original values?
I have not heard from Seb yet, I will give him a few days and if nothing may put the patch onto the developers list, with a query regards the views of having different values
regards
Please Log in or Create an account to join the conversation.
Just in case it is not clear from the patch, don't lose sight of the fact that the tolerances can be set in the ini file, that is nearly the whole point of it.
Whilst you may not like the defaults, and I have followed the guidance without wholly being convinced, you can set the tolerances you prefer like so in the ini file
[RS274NGC]
TOLERANCE_INCH =0.0011
TOLERANCE_MM =0.0282
In practical terms, to me the tolerance for imperial is completely irrelevant, as I only ever use metric.
For someone in USA, the reverse will probably apply
So long as the tolerance can be set to sufficient to allow CAM arc output to work, the end aim is met.
regards
Please Log in or Create an account to join the conversation.
- seb_kuzminsky
- Offline
- Administrator
- Posts: 64
- Thank you received: 14
The rationale for having different tolerance for imperial and metric arcs came from this thread: www.linuxcnc.org/index.php/english/forum...ounce?start=10#54163
The user (ctrl-freq) has a g-code program written by CAM software, where the coordinates are rounded to the nearest 0.001 inch. This worked fine with a previous controller (not LinuxCNC), but LinuxCNC rejects the arcs as invalid because of the arc tolerance. The most that rounding to 0.001 inch in 2 dimensions can move a point is 0.001 * sqrt(2). If the endpoint and centerpoint of an arc move in opposite directions, that gives a change in radius of 2 * 0.001 * sqrt(2), which is where the suggested new arc tolerance value comes from. In metric, the rounding would typically be to 0.01 mm, for a metric arc tolerance of 2 * 0.01 * sqrt(2).
I opted to make the tolerance in each measurement system make sense in that measurement system, rather than pick one to make sense and have the other be derived from that. I'm hoping this will fix issues like the one ctrl-freq ran into, and make most old technically incorrect but practically workable g-code programs Just Work, no matter what units they're in.
And as ArcEye says, the user can change it in the .ini file if they care.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- seb_kuzminsky
- Offline
- Administrator
- Posts: 64
- Thank you received: 14
By "2.7" and "2.8" we mean the 2.7 branch and the master branch (which may become 2.8 in the future). 2.7 is not released yet -- it has been in an extended stabilization period and is shaping up nicely. We've been making pre-releases from the 2.7 branch, including the 2.7.0~pre3 release in February 2015 that included this arc tolerance fix.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.