Re: changing "allway climb" and "normal" in midst of the job #pcbgcode #development

harry0099@...
 

Hello John,

I'm back again on this topic since I back then had the feeling you misunderstood my idea.
But I couln'd express it better and so retreated.

The topic itself doesn't let me retire of course and I now made an approach on my own.
I inserted on line of code (and several lines of comment, of course ;-)

Starting at line 1288 of "pcb-gcode.ulp", directly after
// set direction of cut around contour
if (((g_side == TOP) && !CLIMB_MILLING) || ((g_side == BOTTOM) && CLIMB_MILLING)) m_fwd = true; else m_fwd = false;
I inserted the following code
////////// Harald added 13 Feb 2020                        
// Provided our tool is rotating clockwise when viewed from the top.
// If we are in the first turn around a trace, we mill it normal (not climbing) since we mill the _inner_ side of the trench,
//   so we move the tool on the right side of the trace counter clock wise around the track.
// If we are in the second or beyond turn, switch to the opposite mode (climbing) since now we mill the _outer_ side of the trench,
//   which results again in "normal" (not climbing) milling for the given side of the trench.
// If the user chose "climbing" in the settings, both cases result in "climbing" milling.
if (m_pass_num == 0) m_fwd ; else m_fwd = !m_fwd;                        
//////////
And guess what.
Yes, the code performs as described above in the commment and as I wanted it to.

I think this is a valuable addition to your wonderfully craftet ULP, but please check that I didn't blast something I overlooked.
Please comment on this addition.

Thanks!

Harald

Join pcbgcode@groups.io to automatically receive all group messages.