Glad you can reproduce the error !

Obviously it is important to fix linuxcnc, but do you think the gcode 
generated by qpocket is also a little too close to an edge case 
(programatically and also geometrically :-) )
I mean in the example I gave, if you disable path compensation, the 
entry seems rather awkward, doesn't it ? I would expect a better path 
would be an arc into the middle point of the edge, or some offset from 
the end, not just at the end and thus extremely close to the previous edge.

>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 27 Jan 2014 03:15:39 +0000 (UTC)
> From: Dewey Garrett <[email protected]>
> Subject: Re: [Emc-developers] Emc-developers Digest, Vol 93, Issue 45
> To: [email protected]
> Message-ID: <[email protected]>
>
>
>> ...
>> here is an example, using a 10mm diameter mill
>> o<qpocket> call
>> [5][1000][2][300][5][2.5][0.2][0][-30][-30][-30][30][30][30][30][-30][1][0][0][0][0.01][0.002][0][0]
>> |G0 X [- #<col_boltx> ] Y [ #<col_boltyt> ]
>> it errors with the "Tool radius not less than arc radius with comp"
> ok -- thanks for this info -- i was able to see this error using a mm setup.
> In the ini file:
>    [TRAJ]LINEAR_UNITS = mm
>    [DISPLAY]NGCGUI_PREAMBLE = mm_std.ngc
> Added a tool table entry for tool 5 is:
>    T5 P5 D10 ;added 20140126
>
> None of gcode in qpocket.ngc (nor in the helper subroutines
> that it calls) know anything about mm or inches so i put some
> debugging statements in interpreter files (diffs below)
> and used a qpocket test case with a 60mm square pocket aligned
> with the cartesian axes and a 10mm diameter tool:
>
> o<qpocket> call 
> [5][1000][2][10][0.1][0.02][0.2][0][0][0][0][30][30][30][30][0][1][0][0][0][0.5][0.002][1][0]
> msg: "Tool radius not less than arc radius with comp"
> emc/rs274ngc/interp_arc.cc:119 arc_radius=5.000050 tool_radius=5.000000
> ok
> emc/rs274ngc/interp_convert.cc:695 A_ang=-1.570786 cos=0.000010 
> fabs(cos)=0.000010 TOLERANCE_EQUAL=0.000100
> (fails -- .00001 not less than .0001 == TOLERANCE_EQUAL)
>
> Similar error with iquad using a 30mm square:
> o<iquad> call 
> [5][1][2][10][.1][.02][0.2][0][0][0][0][30][30][30][30][0][1][0][0][0][0]
> msg: "Tool radius not less than arc radius with comp"
> debug output:
> emc/rs274ngc/interp_arc.cc:119 arc_radius=5.000500 tool_radius=5.000000
> ok
> emc/rs274ngc/interp_convert.cc:695 A_ang=-1.570696 cos=0.000100 
> fabs(cos)=0.000100 TOLERANCE_EQUAL=0.000100
> (fails also)
>
> The gode routines fudge the arc_radius so that it is bigger than
> the actual tool_radius (tdelta).  Note that a check in interp_arc.cc
> comparing arc_radius and tool_radius succeeds.
>
> A different test in interp_convert.cc fails comparing
> a fabs(cos) result with the TOLERANCE_EQUAL set to .0001 in
> interp_internal.hh
>
> I'm not sure what modification is required for the failing test.
>
>
> diffs for debug prints:
>
> diff --git a/src/emc/rs274ngc/interp_arc.cc b/src/emc/rs274ngc/interp_arc.cc
> index 5011430..4d3bbdc 100644
> --- a/src/emc/rs274ngc/interp_arc.cc
> +++ b/src/emc/rs274ngc/interp_arc.cc
> @@ -116,9 +116,11 @@ int Interp::arc_data_comp_ijk(int move,  //!<either G_2 
> (cw arc) or G_3 (ccw arc
>          a, end_x, b, end_y, arc_radius, radius2,
>          abs_err, rel_err*100);
>   
> +fprintf(stdout,"%s:%d arc_radius=%f tool_radius=%f\n",__FILE__,__LINE__ 
> ,arc_radius,tool_radius);
>     CHKS(((arc_radius <= tool_radius) && (((side == LEFT) && (move == G_3)) ||
>                                          ((side == RIGHT) && (move == G_2)))),
>         NCE_TOOL_RADIUS_NOT_LESS_THAN_ARC_RADIUS_WITH_COMP);
> +fprintf(stdout,"ok\n");
>   
>     /* This catches an arc too small for the tool, also */
>     if (move == G_2)
> diff --git a/src/emc/rs274ngc/interp_convert.cc 
> b/src/emc/rs274ngc/interp_convert.cc
> index 4319334..d40d589 100644
> --- a/src/emc/rs274ngc/interp_convert.cc
> +++ b/src/emc/rs274ngc/interp_convert.cc
> @@ -692,7 +692,9 @@ int Interp::convert_arc_comp1(int move,  //!< either G_2 
> (cw arc) or G_3 (ccw ar
>       double AB_ang = atan2(center_y - end_y, center_x - end_x);
>       double A_ang = atan2(cy - end_y, cx - end_x) - AB_ang;
>   
> +fprintf(stdout,"%s:%d A_ang=%f cos=%f fabs(cos)=%f TOLERANCE_EQUAL=%f\n" 
> ,__FILE__,__LINE__ ,A_ang,cos(A_ang),fabs(cos(A_ang)),TOLERANCE_EQUAL);
>       CHKS((fabs(cos(A_ang)) < TOLERANCE_EQUAL), 
> NCE_TOOL_RADIUS_NOT_LESS_THAN_ARC_RADIUS_WITH_COMP);
> +fprintf(stdout,"ok\n");
>     
>       double c_len = b_len/cos(A_ang);
>


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to