Rotating a profile - 'flower arranging' !

More
13 years 4 months ago #35509 by grey1beard
Seems to be the method - left the x axis value out of the new g10 line :blush:

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

More
13 years 4 months ago #35510 by grey1beard
Final question on this topic - is it possible to nest the complete g10 instruction 'block' into a repeat loop, so that I can reduce the length of the code for a 54 set matrix ?

John

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

More
13 years 4 months ago #35511 by BigJohnT
Sure, just use a variable for the angle. John your having too much fun...

JT

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

More
13 years 4 months ago #35524 by grey1beard
Yes, JT, but that's the name of the game :)

When this project if finished, I'll post a picture of it, but at the moment I'm still thinking of the commercial possibilities of ekeing out the pension !

John

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

More
13 years 4 months ago - 13 years 4 months ago #35526 by grey1beard
Matrix sorted.

G17 G21 G40 G49 G54 G80 G90 G94
#3= 600
#4 = 0
#5 = 0
#20 = 0
g00 x[0] y[0] z[20]
o100 while [#5 lt 120] (column of six daisies along y axis)
o150 while [#4 lt 180] (line of 9 daisies along x axis)
o200 do
g10 l2 p1 x[#4] y[#5] r#20 (set zero position)
g00 x[10] y[0] (1st petal tip)
z[0] (work surface)
g91 (incremental mode)
g01 x[-2.4] z[-2] F#3 (cut 1st petal)
g01 x[-4.6] z[2] F#3
g90 (absolute mode)
g00 z[5] (clearance)
#20 = [#20 + 30]
o200 while [#20 lt 360] (finish daisy)
#20 = 0
#4 = [#4+20]
o150 endwhile (finish row)
#4 = 0
#5 =[#5+20]
o100 endwhile (finish matrix)
g00 z[20]
g00 x[0] y[0]
m30


So you can nest while/endwhile at least three times !
All that is left is to change tool and add the centres. :)

John
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 #35581 by grey1beard
Added the centre design code, and it runs on the laptop sim OK.
Problem transferring it to the m/c which has still got 2.3x on it !
So now trying to update to 2.5. x and ran into problems.
Might be easier to do a new install ?

Will start a new thread later if I can't sort it out.

Just one thing though. When instructed to change references in the ini file to emc2 into linuxcnc, what to do with references to just emc, as in emc.nml or emc.var ?
John

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

Time to create page: 0.076 seconds
Powered by Kunena Forum