Rotating a profile - 'flower arranging' !

More
13 years 4 months ago - 13 years 4 months ago #35498 by grey1beard
I want to produce a mold which will be a 9x6 matrix of daisies.

To keep it as simple as possible, consider that I'm cutting the individual petals with a 4mm ball ended cutter.
I'm cutting towards the centre to give me a cleaner cut in the hdpe I'll use.

g00 x[0] y[0] z[5]
g00 x[20] y[20] (1st daisy petal, location of outer tip)
g00 z[0] (work surface)
g91 (incremental mode)
g01 x[2.4] z[-2] F#3 (cut 1st daisy petal)
g01 x[4.6] z[2]
g90
g00 z[5] (clear)

What I should like to do is to be able to rotate the profile cut in lines 5 and 6, by repeating the lines 2 to 8, but rotating 30 degrees, 12 steps in all, and without calculating all the relevant positions.

I did wonder if there was a version of G10 that would allow roration around the z axis, but I suspect not.
I also briefly looked at the bezel g code generator, but not having python at my fingertips, I thought I'd leave that for the time being.
I'm sure there must be a simple approach that only involves trig functions.

John
Last edit: 13 years 4 months ago by grey1beard. Reason: sort out quote

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

More
13 years 4 months ago #35500 by skunkworks
do you mean... The g10l2p1r[whatever] rotates around the current coordinate system zero.

#20 = 0


g00 x[0] y[0] z[5]
o100 do
G10l2p1 r#20
g00 x[20] y[20] (1st daisy petal, location of outer tip)
g00 z[0] (work surface)
g91 (incremental mode)
g01 x[2.4] z[-2] F[10] (cut 1st daisy petal)
g01 x[4.6] z[2]
g90
g00 z[5] (clear)
#20 = [#20 + 30]
o100 while [#20 lt 360]
m30

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

More
13 years 4 months ago #35503 by grey1beard
Thanks skunkworks, that's very close.
I can see the principle, though I'll have to tease it apart to see how to use it, never having come across it before.
The 'petal' is not pointing to the centre, but curing that will teach me how to produce a universal method.
Thanks again, and if I get stuck, I'll give you a shout.
Regards,
John

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

More
13 years 4 months ago - 13 years 4 months ago #35505 by grey1beard
I think I've now got the hang of it, so this is the desired code -


G17 G21 G40 G49 G54 G80 G90 G94

#3= 600
#20 = 0

o100 do
g10l2p1 r#20
g00 x[10] y[0] (1st daisy petal, location of outer tip)
z[0] (work surface)
g91 (incremental mode)
g01 x[-2.4] z[-2] F#3 (cut 1st daisy petal)
g01 x[-4.6] z[2] F#3
g90
g00 z[5] (clearance)
#20 = [#20 + 30]
o100 while [#20 lt 360]
m30

Last edit: 13 years 4 months ago by grey1beard.

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

More
13 years 4 months ago #35507 by skunkworks

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

More
13 years 4 months ago - 13 years 4 months ago #35508 by grey1beard
While you're in a good mood, how do I step the coordinate system in the x axis sideways, so that I can start to build up a matrix of the daisies ?
I thought g92 x- might do it, but doesn't seem to, even after moving the position of the tool first, then setting g92 to the same value.
John

Hang on, I think I've got it.
Last edit: 13 years 4 months ago by grey1beard.

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

Time to create page: 0.351 seconds
Powered by Kunena Forum