585,597 active members*
3,485 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > OpenSource Software > G-Code Plus .. Metric to Imperial Converter
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2011
    Posts
    40

    G-Code Plus .. Metric to Imperial Converter

    G-Code Plus .. (Graham Waterworth) .. Metric to Imperial Converter .. was apparently compatible with XP/sp2. Is there an updated version floating around for W7/64 .. I hope. Getting errors about missing or unregistered files .. comdlg32.ocx. Perhaps an alternative program that is non-subscription. TIA .. Cheers!

  2. #2
    Join Date
    Dec 2010
    Posts
    226
    I tried the version in this post: G-Code scaling program, mm to Inches and back it worked for me under Windows 7

    If that file does not work you might want to register over there and ask Graham in the same thread. (looks like he is still very active there)

    (If all else fails you can try G-Code Ripper: Open the g-code file and click on "Save G-Code Base". You will need to make sure that the "Plunge Feed" and "Z safe" are set to reasonable values but they will be used sparingly if you are only resizing. The default for G-Code ripper is to save in inches to go back to mm you would need to change the "Units" setting in the "General Settings Window".)

    Scorch

  3. #3
    Join Date
    Jan 2011
    Posts
    40
    Quote Originally Posted by scorch View Post
    I tried the version in this post: G-Code scaling program, mm to Inches and back it worked for me under Windows 7

    If that file does not work you might want to register over there and ask Graham in the same thread. (looks like he is still very active there)

    (If all else fails you can try G-Code Ripper: Open the g-code file and click on "Save G-Code Base". You will need to make sure that the "Plunge Feed" and "Z safe" are set to reasonable values but they will be used sparingly if you are only resizing. The default for G-Code ripper is to save in inches to go back to mm you would need to change the "Units" setting in the "General Settings Window".)

    Scorch
    Thanks for responding, and sharing your programming efforts Scortch. That 32 bit OCX is not native to W7/64 Home Premium OEM apparently. Your program .. I did find that files with Nxxx numbering are not supported .. doesn't like the "N" G-codes I used both 3.937% and 3.93% as scaling conversion factors, and that worked flawlessly .. the latter hoping to eliminate the 0.0001's (tenths) digit. While indeed Mach3 shows "tenths" on the DRO's, as a practical matter those resolutions are not achievable on a router methinks. No harm done .. just perhaps unnecessary overhead for the DSP on the USB breakout, and perhaps Mach3 as well.

    Feeds .. could be a problem though ;-) The mm/minute Feeds are left intact .. that would indeed be some amazing performance even Boeing would aspire too Here is a copy of the first few lines of the original metric file, and of the Scaled version through the first "Z" change..

    %
    G90
    G49
    M3 S18000
    G0 X-42.499 Y-42.499 Z3.000
    G1 Z-3.532 F780
    G1 X-42.472 F21000
    X42.499
    Y-42.474
    Y-42.349
    X42.472
    X-42.499
    Y-42.324
    Y-42.199
    X-42.472
    X42.499
    Y-42.174
    Y-42.049
    X42.472
    X-42.499
    Y-42.024
    Y-41.899
    X-42.472
    X42.499
    Y-41.874
    Y-41.749
    X42.472
    X-42.499
    Y-41.724
    Y-41.600
    X-42.472
    X42.499
    Y-41.575
    Y-41.450
    X42.472
    X-42.499
    Y-41.425
    Y-41.300
    X-42.472
    X42.499
    Y-41.275
    Y-41.150
    X42.472
    X41.170
    X32.851 Z-3.537

    ( Code generated by gcode_spliter.py widget )
    ( by Scorch - 2013 )
    (================================================= ========)
    G90 (set absolute distance mode)
    G90.1 (set absolute distance mode for arc centers)
    G20 (set units to inches)
    G17 (set active plane to XY)
    (G-Code Preamble)
    (================================================= ========)
    (G-Code Postamble)
    G49
    (G-Code Postamble)
    M3 S18000
    G0 Z 0.2500
    G0 X-1.6702 Y-1.6702
    G1 Z 0.1179 F 5.0000
    G1 X-1.6702 Y-1.6702 Z-0.1388 F780.0
    G1 X-1.6691 Y-1.6702 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6702 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6692 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6643 Z-0.1388 F21000.0
    G1 X 1.6691 Y-1.6643 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6643 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6633 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6584 Z-0.1388 F21000.0
    G1 X-1.6691 Y-1.6584 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6584 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6574 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6525 Z-0.1388 F21000.0
    G1 X 1.6691 Y-1.6525 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6525 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6515 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6466 Z-0.1388 F21000.0
    G1 X-1.6691 Y-1.6466 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6466 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6456 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6407 Z-0.1388 F21000.0
    G1 X 1.6691 Y-1.6407 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6407 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6398 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6349 Z-0.1388 F21000.0
    G1 X-1.6691 Y-1.6349 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6349 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6339 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6290 Z-0.1388 F21000.0
    G1 X 1.6691 Y-1.6290 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6290 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6280 Z-0.1388 F21000.0
    G1 X-1.6702 Y-1.6231 Z-0.1388 F21000.0
    G1 X-1.6691 Y-1.6231 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6231 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6221 Z-0.1388 F21000.0
    G1 X 1.6702 Y-1.6172 Z-0.1388 F21000.0
    G1 X 1.6691 Y-1.6172 Z-0.1388 F21000.0
    G1 X 1.6180 Y-1.6172 Z-0.1388 F21000.0
    G1 X 1.2910 Y-1.6172 Z-0.1390 F21000.0

    Cheers!

  4. #4
    Join Date
    Dec 2010
    Posts
    226
    Thanks for the feedback. G-Code Ripper is pretty new so I am really open to improvement suggestions. I think I can fix most of your concerns I just need to think about how I want to implement the changes.

    (A side note: If the original g-code would have had a G21 command to indicate mm, G-Code ripper would have automatically scaled to inches. Including the feed rates)

    Scorch

  5. #5
    Join Date
    Jan 2011
    Posts
    40
    Quote Originally Posted by scorch View Post
    Thanks for the feedback. G-Code Ripper is pretty new so I am really open to improvement suggestions. I think I can fix most of your concerns I just need to think about how I want to implement the changes.

    (A side note: If the original g-code would have had a G21 command to indicate mm, G-Code ripper would have automatically scaled to inches. Including the feed rates)

    Scorch
    Indeed, the "Safety Line" as I called it was lacking .. the program came in a bundle with a new machine from China. I tried to scale down one of Carve1's files to 95% last night, and the "N" line numbers prevented it. 19 years since I did any of this stuff .. Everything was MDI .. slowly coming back

    Just taking a wild guess, maybe the file was for a laser engraver .. what else would use a feed rate of 21,000 mm per minute? 826 IPM .. hmmm. Thanks again Scortch .. hope the "N" thing isn't too much trouble. Cheers!

  6. #6
    Join Date
    Dec 2010
    Posts
    226
    I changed G-Code Ripper so that it will now simply ignore line numbers (N codes) and added a option for scaling the feed rate.

    @jyotti, I think these changes take care of your major concerns.

    The new version is available here: G-Code Ripper

    When I have time I think I will add the following features based on jyotti's comments:
    - Option to set the output precision (number of decimal places)
    - Option to include line numbers in the output (N codes)
    - Option to lock the scaling of Z, XY and Feed so you only need to enter the scale once if they are all the same
    - Only output feed rate and axis positions when they change. (Reduces the output file size)

    For further discussion of G-Code Ripper please reply in the G-Code Ripper thread.

    Scorch

Similar Threads

  1. Convert from Metric to Imperial
    By Rift in forum Solidworks
    Replies: 2
    Last Post: 05-29-2011, 01:57 AM
  2. Metric vs Imperial collets
    By JulianDR in forum CNC Tooling
    Replies: 1
    Last Post: 11-23-2010, 04:03 PM
  3. changing from metric to imperial
    By ashro in forum Mazak, Mitsubishi, Mazatrol
    Replies: 3
    Last Post: 06-19-2010, 01:13 AM
  4. Converting from metric to imperial
    By Pharkas in forum Mastercam
    Replies: 1
    Last Post: 05-04-2007, 04:46 PM
  5. Metric mm or Imperial inches? Please help.
    By alexccmeister in forum Benchtop Machines
    Replies: 14
    Last Post: 02-22-2007, 03:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •