Arc Tolerance

More
04 Jan 2015 23:02 - 04 Jan 2015 23:03 #54548 by newbynobi
Replied by newbynobi on topic Arc Tolerance
@ArcEye
@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
Last edit: 04 Jan 2015 23:03 by newbynobi. Reason: typos

Please Log in or Create an account to join the conversation.

More
04 Jan 2015 23:38 - 04 Jan 2015 23:40 #54551 by ArcEye
Replied by ArcEye on topic Arc Tolerance

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 :)
Last edit: 04 Jan 2015 23:40 by ArcEye.

Please Log in or Create an account to join the conversation.

More
04 Jan 2015 23:45 #54552 by newbynobi
Replied by newbynobi on topic Arc Tolerance
Thanks for setting them to the same values.
All other stuff makes no sense!

Norbert

Please Log in or Create an account to join the conversation.

More
05 Jan 2015 20:59 #54572 by BigJohnT
Replied by BigJohnT on topic Arc Tolerance

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.

More
05 Jan 2015 21:17 #54575 by ArcEye
Replied by ArcEye on topic Arc Tolerance

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.

More
05 Jan 2015 23:17 #54582 by ArcEye
Replied by ArcEye on topic Arc Tolerance
PS

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.

More
06 Jan 2015 00:31 #54590 by seb_kuzminsky
Replied by seb_kuzminsky on topic Arc Tolerance
Thanks for the updated patch, ArcEye. I'll look at it this week and merge it with Rob Ellenberg's updated spiral-arc handling code.

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.

More
09 Aug 2015 21:52 #61241 by IndyColts
Replied by IndyColts on topic Arc Tolerance
Hi all. I am new to this so please excuse my level of knowledge. I am trying to understand how the patch is to be applied and have a few questions. When mentioning the 2.7 and 2.8, is that actually refering to 2.6.7 and 2.6.8? As for the patch itself, are all the commands in the patch supposed to be entered line by line in a terminal window, or is it an executable file that can install it. And last, would just editing the tollerances values in the /rs274ngc/interp_internal.hh file work. Thanks again for any info.

Please Log in or Create an account to join the conversation.

More
09 Aug 2015 22:59 #61244 by seb_kuzminsky
Replied by seb_kuzminsky on topic Arc Tolerance
Hi IndyColts, the patch has been applied in our source code repo (git.linuxcnc.org). It went into the 2.7 branch and has been part of LinuxCNC starting with 2.7.0~pre3. No action is needed on part of users to include it.

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.
The following user(s) said Thank You: IndyColts

Please Log in or Create an account to join the conversation.

More
10 Aug 2015 01:17 #61246 by IndyColts
Replied by IndyColts on topic Arc Tolerance
Thanks for the explaination seb! I only saw the 2.6.8 rel and I never thought to do a search for 2.7.

Please Log in or Create an account to join the conversation.

Time to create page: 0.242 seconds
Powered by Kunena Forum