On Saturday 13 February 2016 04:18:28 Gregg Eshelman wrote:

> Is there a program, preferably for Windows, that can read a G-code
> file and make an altered copy to produce a file that will produce a
> mirror image of the original?
>
> I've done one that took quite a lot of work to get right, now I need
> the code to cut the same part for the other side of the car.
>
In gcode, if Y=0 goes down the centerline, or can be adjusted to make it 
so, its pretty easy using the editors search & replace.  ake a 2nd copy 
of the file, calling it the other side.

Then If the Y is always followed by the # sign beginning a variable 
reference, then search for Y# in the second copy of the file, and 
replace it with a Y-#.

Or for some part like a door handle, just negate as above, all the Y 
values.  If Y values are present in both polarities, you'll need to use 
a dummy axis for a temporary scratchpad, like swapping all the Y# to W#, 
then swap the Y-# to Y#, then swap the W# to Y-#, which will mirror it 
about the Y=0 centerline.

I have used this general idea quite a few times to fix pcb-gcode outputs 
where the mirror for the double sided pcb was mirrored along the wrong 
axis.  That, and using 2 different co-ordinate maps to offset the length 
of the board, thereby resulting in thru holes drilled 55% of the way 
thru the board on one side, meeting perfectly, the same hole drilled 55% 
of the way thru the board from the other side when making a double sided 
pcb.

pcb-gcode's docs could be a bit clearer in describing what an option 
does, and it took quite a few repeats to get it down to just the 
co-ordinate mapping needed to offset the mirrors width.

HTH, Gregg.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to