¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

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


 

Hello comrades!

I use pcb-gcode.ulp for some time now and get decent results, probing the copper surface with OpenCNCPilot.

But I realized, that the edges of the second+ rounds are not as good as the first one.

That is easily explained, since the milling bit is rotating cw and the bit moves in the correct direction for the first run, but in the wrong direction ("climbing") for all sucessive rounds.

Now pcb-gcode.ulp has the option to select ?always climb¡° to change the direction of the bit on its way, but this option changes the behavior for all rounds.

I wanted to implement another option which allows for turning on the ?always climb¡° selection only for the second and all following rounds, but I can¡¯t fiddle out where in the code I may attack.

So my question to all of you:

Can anyone give me a hint, where in the code I can start to look, or even better, where the decision between the first and all successive rounds is made?

Explanation:
I think I observed, that pcb-gcode does one first round in which it surrounds all traces once, so when stopping after this first round, one would have a functioning board with all traces as expected, but with too narrow trenches.
The following rounds only widen the already defined trenches to ease soldering.
All following rounds erode the "other side" of the trenches but this happens in "climb mode", resulting in not so good edges.
So I consider it as good practise to change the moving direction of those following rounds to make them again "normal".


Thanks in advance!

Harry


 

¿ªÔÆÌåÓý

Unfortunately, this is due to the way Eagle creates polygons.
Your best bet is to find some gcode editor that will allow you to reverse the line directions in the files that pcb-gcode creates.

Regards,
JJ

On 30 Jun 2019, at 12:47, harry0099@... wrote:

Hello comrades!

I use pcb-gcode.ulp for some time now and get decent results, probing the copper surface with OpenCNCPilot.

But I realized, that the edges of the second+ rounds are not as good as the first one.

That is easily explained, since the milling bit is rotating cw and the bit moves in the correct direction for the first run, but in the wrong direction ("climbing") for all sucessive rounds.

Now pcb-gcode.ulp has the option to select ?always climb¡° to change the direction of the bit on its way, but this option changes the behavior for *all* rounds.

I wanted to implement another option which allows for turning on the ?always climb¡° selection only for the second and all following rounds, but I can¡¯t fiddle out where in the code I may attack.

So my question to all of you:

Can anyone give me a hint, where in the code I can start to look, or even better, where the decision between the first and all successive rounds is made?

Explanation:
I think I observed, that pcb-gcode does one first round in which it surrounds all traces once, so when stopping after this first round, one would have a functioning board with all traces as expected, but with too narrow trenches.
The following rounds only widen the already defined trenches to ease soldering.
All following rounds erode the "other side" of the trenches but this happens in "climb mode", resulting in not so good edges.
So I consider it as good practise to change the moving direction of those following rounds to make them again "normal".

Thanks in advance!

Harry


 

¿ªÔÆÌåÓý

If you are use V bit cutters a far easier way might be to reverse the direction of your cutter after the first round.

?

Regards

Ken

?

From: [email protected] <[email protected]> On Behalf Of John Johnson via Groups.Io
Sent: Monday, 1 July 2019 11:46 AM
To: [email protected]
Subject: Re: [pcbgcode] changing "allway climb" and "normal" in midst of the job #pcbgcode #development

?

Unfortunately, this is due to the way Eagle creates polygons.
Your best bet is to find some gcode editor that will allow you to reverse the line directions in the files that pcb-gcode creates.

Regards,
JJ

On 30 Jun 2019, at 12:47, harry0099@... wrote:

Hello comrades!

I use pcb-gcode.ulp for some time now and get decent results, probing the copper surface with OpenCNCPilot.

But I realized, that the edges of the second+ rounds are not as good as the first one.

That is easily explained, since the milling bit is rotating cw and the bit moves in the correct direction for the first run, but in the wrong direction ("climbing") for all sucessive rounds.

Now pcb-gcode.ulp has the option to select ?always climb¡° to change the direction of the bit on its way, but this option changes the behavior for *all* rounds.

I wanted to implement another option which allows for turning on the ?always climb¡° selection only for the second and all following rounds, but I can¡¯t fiddle out where in the code I may attack.

So my question to all of you:

Can anyone give me a hint, where in the code I can start to look, or even better, where the decision between the first and all successive rounds is made?

Explanation:
I think I observed, that pcb-gcode does one first round in which it surrounds all traces once, so when stopping after this first round, one would have a functioning board with all traces as expected, but with too narrow trenches.
The following rounds only widen the already defined trenches to ease soldering.
All following rounds erode the "other side" of the trenches but this happens in "climb mode", resulting in not so good edges.
So I consider it as good practise to change the moving direction of those following rounds to make them again "normal".

Thanks in advance!

Harry


 

Hi John,

ok, then I got something wrong.
I thought, your code crawls along the polygons of EAGLE and set up some sort of array or list with coordinates or verctors which then is iterated in this or that direction (having in mind that one can alter the direction via "Climb always").

Since the mentioned "bad edges" are only a visual concern, I can surely live with that, it's definitely no killer for me.
Thanks anyway!

Harry


 

Hi Ken,
interesting idea :-)
Sadly my mill doesn't support ccw rotation of the spindle.
Thanks anyway for the hint.

Harry


 

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