Arc Tolerance

More
11 years 10 months ago #54186 by ArcEye
Arc Tolerance was created by ArcEye
This thread was inspired by the experiences of ctrl-frq in this thread
www.linuxcnc.org/index.php/english/forum...ounce?start=10#54172
trying to get the arcs generated by his CAM program accepted by Linuxcnc.

Anyone who has done any amount of work involving arcs will be familiar with the error message as per below



In this particular case the variation is pretty small, but enough to prevent usage of the code.

This started me looking at the code the interpreter uses to test if the divergence is within tolerances.

src/emc/rs274ngc/interp_internal.hh has the definition for tolerances
Code:
#define TOLERANCE_INCH 0.0005 #define TOLERANCE_MM 0.005

Immediate thought, why on earth is the tolerance for mm so much tighter than imperial?
Probable answer, programmer uses imperial and is not really interested in metric.
No wonder I have had so much difficulty in the past with some arcs ( especially on the lathe ), when it is not practical to use a simple R parameter

Next thought, why are the tolerances so tight overall?
5 thousandths of a mm = 0.000196850394 inch or 5 microns !

I can't machine to that spec, so why would I want calculations to be done to it?
Even the imperial tolerance is pretty tight at 12.7 microns.

So what if the tolerance could be varied, how much real effect would it have on quality and would it allow CAM code which currently fails to run.

Below same code run through a build with imperial tolerance set to 0.002"



Runs quite happily and given the arcs in question are used in script on a sign, is there actually any point in having the tolerances so tight that
3rd party code is not accepted?

Perhaps an .ini file setting for tolerances would be the way forward, not to mention a fix for the inch / metric conversion of 0.1!

This is just open for discussion, I have changed the development RIP I am using at present, but not an option for most users.

regards
Attachments:
The following user(s) said Thank You: BigJohnT

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

More
11 years 10 months ago #54198 by BigJohnT
Replied by BigJohnT on topic Arc Tolerance
That makes no sense that the tolerance for MM is different than Inch. I agree an ini setting would be ideal.

JT

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

More
11 years 10 months ago #54209 by BigJohnT
Replied by BigJohnT on topic Arc Tolerance
And like magic Dewey has come up with a patch for 2.7 that adds arc tolerance to the ini file.

Hi JT,

I've attached a patch (against today's 2.7 commit 4fee078,
but it probably applies on master too)

It uses;
[RS274NGC]
TOLERANCE_INCH =
TOLERANCE_MM =

I'm not sure if [RS274NGC] is the right section.

I only tested with some prints in the code which are now gone of course
so it needs real testing.

I just changed the code mechanically -- like a typing monkey.

So -- i don't understand if:
1) it works like you want
2) what side-effects there are

So someone like cradek or seb should review.

It does seem you could do some stupid things by
making the tolerances too big -- maybe there should
be a sanity check on the values from the ini file too.

Attachments:
The following user(s) said Thank You: ArcEye

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

More
11 years 10 months ago #54210 by ArcEye
Replied by ArcEye on topic Arc Tolerance

And like magic Dewey has come up with a patch for 2.7 that adds arc tolerance to the ini file.


Excellent, you were obviously hitting the IRC last night!
That was my project for this afternoon. :P

I'm not sure if [RS274NGC] is the right section.


I'm sure it is, it is that sections code that is changed and the interpreter behavior that is modified.

It does seem you could do some stupid things by
making the tolerances too big -- maybe there should
be a sanity check on the values from the ini file too.


There do need to be some basic top and bottom figures and sanity checks that the .ini file figure does no go outside them

As the hard coded #define needs changing anyway, I will look at adding further defined values.
Then the value can be a default or the ini file value, if that is within sane defined parameters.

Quick work JT and Dewey

regards

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

More
11 years 10 months ago - 11 years 10 months ago #54211 by BigJohnT
Replied by BigJohnT on topic Arc Tolerance
Well I emailed Dewey and asked him to look at it if he had time then found the patch this morning when I got up.

Edit: I think the default of 0.0005" is ok but the metric should be the same at 0.0127mm IMHO.

JT
Last edit: 11 years 10 months ago by BigJohnT.

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

More
11 years 10 months ago #54215 by ArcEye
Replied by ArcEye on topic Arc Tolerance

BigJohnT wrote: Well I emailed Dewey and asked him to look at it if he had time then found the patch this morning when I got up.

Edit: I think the default of 0.0005" is ok but the metric should be the same at 0.0127mm IMHO.

JT


Good man!

Yes our calculators obviously agree, that was the figure I had for metric too

regards

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

Time to create page: 1.866 seconds
Powered by Kunena Forum