The way I have been using GCMC is to not use any unit specifiers after numbers. This way, all I have to do is make sure I include G20 (program in inches) at the top, and everything is treated as inches, since GCMC will not do any conversions when no explicit units are specified (am I correct, Bertho?)
In my example, I failed to mention that I used G20 at the beginning of the program. Tony -----Original Message----- From: John Kasunich Sent: Saturday, November 16, 2013 1:06 PM To: emc-users@lists.sourceforge.net Subject: Re: [Emc-users] gcmc - v1.1.1 On Sat, Nov 16, 2013, at 12:05 PM, Bertho Stultiens wrote: > On 11/16/2013 05:33 PM, Tony Zampini wrote: > > for( x = 0; x <= 10; x += 0.5 ) > > { > > for ( y = 0; y <= 4; y += 0.5 ) > > { > > drill( [x, y, -0.5], 0.1, 0.1); > > } > > } > > Please note that gcmc defaults to mm if no units are specified. The > above will move 0.5mm each step. For inches, you should explicitly > specify it in the code: > > for( x = 0mil; x <= 10000mil; x += 500mil ) > { > for ( y = 0mil; y <= 4000mil; y += 500mil ) > { > drill( [x, y, -500mil], 100mil, 100mil); > } > } > > I am considering to implement "in"-suffix for inches, but there are some > annoying side-effects when doing so because there will be more than one > conversion possibility. Should "1in + 1" be 2in or 1001mil. The former > would be more logical, but has the problem that you no longer can assume > a variable's magnitude. The latter has consistent magnitude, but is a > bit harder to understand/grasp/use. > > Comments welcome. In non-metric countries, "mil" is typically used only when making printed circuit boards. Ordinary mechanical design is done in either inches or mm. In other words, inches and millimeters are the "mainstream" units, and mils are a "niche application". It almost seems like you have it the other way around. -- John Kasunich jmkasun...@fastmail.fm ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users