On Sun, Mar 13, 2011 at 12:51 PM, Viesturs Lācis <[email protected]>wrote:
> > > Thanks! > I am not sure that I understand correctly all the calculations You > offer, but it gave me an idea, that since I am using circle as the > basic shape, I could paste both contours in polar coordinate system > and the difference of radius between both contours on each theta value > would give me the horizontal distance between them. Adding vertical > distance and I get value of the slope with atan function, theta value > gives direction - they both are position commands for A/B and C axis > respectively. Looks pretty simple on paper, but I do not know, how do > I get proper g-code from it. > > I will spend some more time with Your formulas, maybe I will manage to > understand them completely. Addressing these calcs with parametric > equation approach seems promising to me. > > Viesturs > > (5 axis cut - arc at top, straight line at bottom) (commented code is for max5kins - note, no A axis) (tested on 5axis sim) (assuming table at Z=0) #10 = 1 (material thickness) #11 = 2 (radius, and the square's diagonal) G10 L2 P2 Z[-1*#10] G55 G00 Z[#10] (X[#11] Y0 A0 B0) X[#11] Y0 B0 C0 M3 #1 = 0 (#1 is used as the parameter for the equations) O101 while [#1 lt 1] G1 Z[#10] F10 #21=[cos[#1*90]*#11] (X) #22=[sin[#1*90]*#11] (Y) #24=[atan[[[1-#1]*#11]-#21]/[#10]] (A, for AB) #25=[atan[[#1*#11]-#22]/[#10]] (B, for AB) #26=[#24+#25] (B, for BC **pretty sure this is not right - how do we really calculate this?**) (X[#21] Y[#22] A[#24] B[#25]) X[#21] Y[#22] B[#25] C[#1*90] #1 = [#1+.01] O101 endwhile M2 ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
