584,817 active members*
5,140 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > OpenSource Software > G-Code Ripper - Scale, Rotate and Split G-code
Page 1 of 6 123
Results 1 to 20 of 113

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Posts
    226

    G-Code Ripper - Scale, Rotate and Split G-code

    I have posted a new program one my web page called G-Code Ripper that can read an existing g-code file and scale, rotate and split the g-code as needed.

    This program takes an existing g-code file and splits it into two halves. Linear and arc movements are broken into smaller lines and arcs on either side of the parting line. The attached pictures show a design that I cut using the program. I used the splitting and rotation features to allow my small CNC machine to cut a larger image. The smaller eagle in the last picture is the largest eagle I could cut on my machine without splitting the image.

    In addition to the basics the program understands the following g-code features:
    • Reads "Absolute" and "incremental" coordinates
    • Evaluates expressions (i.e. [2*3])
    • Understands parameters (i.e. #1,#2 and #)
    • Understands and interprets YZ and ZX arcs (converted to linear motions for compatibility with splitting and rotation)

    Attachment 196010Attachment 195996Attachment 196004

    Scorch

  2. #2
    Join Date
    Dec 2007
    Posts
    362
    Good to see some open source CNC stuff I can use on Linux.
    As soon as I re-assemble my CNC router (too cold in the shed) , I'll try these out.
    Regards
    Geoff

  3. #3
    Join Date
    Jul 2009
    Posts
    419
    Very cool Scorch!

    I wish I could code as easily as you seem to be able to!
    Sven
    http://www.puresven.com/?q=building-cnc-router

  4. #4
    Join Date
    Jul 2008
    Posts
    340
    FYI, neither of the download links for the zipped executables work. I'm getting 404, page not found.


    Sent from my Xoom using Tapatalk 4
    CRP-4848 CNC Router, CNC G0463 (Sieg X3) Mill, 9"x20" HF CNC Lathe (current project)

  5. #5
    Join Date
    Dec 2010
    Posts
    226
    Thanks, the links are fixed now.

    Scorch
    Scorch
    www.scorchworks.com

  6. #6
    Join Date
    Jul 2008
    Posts
    340
    Quote Originally Posted by scorch View Post
    Thanks, the links are fixed now.

    Scorch
    Thank you. Links confirmed working. I was able to download the window package.

    Sent from my Xoom using Tapatalk 4
    CRP-4848 CNC Router, CNC G0463 (Sieg X3) Mill, 9"x20" HF CNC Lathe (current project)

  7. #7
    Join Date
    Dec 2010
    Posts
    226
    I uploaded a new version of G-Code Ripper based on comments in another thread.

    - G-code Ripper will now ignore line numbers (previously it aborted reading on N codes)
    - Added a option for scaling the feed rate.

    Version 0.02 is available here: G-Code Ripper


    When I have time I think I will add the following features:
    - 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)

    Scorch

  8. #8
    Join Date
    Jan 2011
    Posts
    40
    Quote Originally Posted by scorch View Post
    I uploaded a new version of G-Code Ripper based on comments in another thread.

    - G-code Ripper will now ignore line numbers (previously it aborted reading on N codes)
    - Added a option for scaling the feed rate.

    Version 0.02 is available here: G-Code Ripper


    When I have time I think I will add the following features:
    - 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)

    Scorch
    Thanks Scortch .. posting here as requested. As it turns out, scaling would not be required, but for the fact that this New machine, with an advertised Y axis of 400mm (15.748"), is actually only 379.8mm (14.953"). A quarter inch end mill would have no problem cutting a 15" circle with +/- 7.625 on the Y axis if this machine was built as advertised. I appreciate your efforts .. I was about to just tweak the steps per inch down from it's normal 10,160 on the X and Y steppers, but meanwhile this most serious deficit had come to light. So buyer beware .. it's over 20mm short on the Y axis from that which is advertised. Cheers!

    CNC X6-1500GT ROUTER ENGRAVER DRILLING AND MILLING MACHINE - carving-cnc.com

  9. #9
    Join Date
    Dec 2010
    Posts
    226

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    @Dragonfly, I have run into the same problem. I do plan on adding the ability to read probe data from a file. I have not gotten around to writing the code yet. I am not sure how I am going to implement it.
    Scorch
    www.scorchworks.com

  10. #10
    Join Date
    Oct 2016
    Posts
    25

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    Hello,

    i have a Little Problem with the Output from SolidWorks.
    G-Code Ripper gives me 3 Errors which i have to correct in the G-Code before i can load it into the Ripper.

    1. O Codes are not supported
    2. A Codes are not supported
    3. D Codes are not supported

    After deleting this codes i can finally load the file. Hopefully i did not delete any important Things from the original Code. ( i am new in CNC Milling )

    Also there is a black command window all the time. What is that for and can i start the Ripper without this window?

    Would be great to have an answer...because this is a very great Programm !!!

    Matthias

  11. #11
    Join Date
    Dec 2010
    Posts
    226

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    Quote Originally Posted by mroschk View Post
    i have a Little Problem with the Output from SolidWorks.
    G-Code Ripper gives me 3 Errors which i have to correct in the G-Code before i can load it into the Ripper.

    1. O Codes are not supported
    2. A Codes are not supported
    3. D Codes are not supported

    After deleting this codes i can finally load the file. Hopefully i did not delete any important Things from the original Code. ( i am new in CNC Milling )
    1. I am not clear on what the O code at on the first line of this file is doing. Usually I see O codes with a keyword after them (sub, repeat, etc). This O code does not seem to be doing anything so you are safe deleting it. (Maybe someone smart will tell us why it is there.)
    2. The A codes in the file indicate A-axis movements The code only sets the A-axis to the zero position two time so you are safe deleting these also
    3. The D code sets the tool diameter for the tool that is selected. There is no tool compensation called so you are safe deleting this one also. (The G40 explicitly turns it off)

    I make G-Code Ripper stop processing on these codes to force the user to bypass them if needed. I would rather make the user makes the decision. There might be settings in Solid works to get rid of these unneeded codes.

    Quote Originally Posted by mroschk View Post
    Also there is a black command window all the time. What is that for and can i start the Ripper without this window?
    The extra black window is an artifact of the way I produce the Windows executable. You can pretty much ignore it. You can run without the black window by installing Python on your machine and running the .py file directly. I don't recommend that because I don't want to have to support people getting python running and the way I package the executable files they run faster than a standard Python install would run.
    Scorch
    www.scorchworks.com

  12. #12
    Join Date
    Oct 2012
    Posts
    3

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    Greetings Master

    Do you have the code on the github?

  13. #13
    Join Date
    Dec 2010
    Posts
    226
    Quote Originally Posted by X3msnake View Post
    Greetings Master

    Do you have the code on the github?
    No. The source code is readily available at www.scorchworks.com
    Scorch
    www.scorchworks.com

  14. #14
    Join Date
    Dec 2010
    Posts
    226

    G-Code Wrapping now available in G-Code Ripper

    G-Code Ripper version 0.03 has been posted to the G-Code Ripper Homepage. The new version has more plotting options including more isometric view angles. The big addition in this version is the ability to map g-code from the X or Y axis to a rotary axis A or B. This functionality is very similar to CNCWrapper.

    G-Code Ripper: G-Code Wrapping Features
    -Graphical preview of the resulting g-code.
    -Automatically maps g-code arcs to linear movements prior to conversion to rotary moves.
    -Options for scaling feed rates to make them compatible with the rotary movements.
    -Interpret g-code variables and equations.
    -G-code Rippers basic features can also be used to scale and rotate the g-code before wrapping the code for the rotary axis.
    Scorch
    www.scorchworks.com

  15. #15
    Join Date
    Jun 2012
    Posts
    817
    Hey Scorch, I needed a very simple file wrapped, just a tube with three slots cut into it. I found out that the other popular program is $25, but I stumbled across yours for free. It worked beautifully. Kudos my friend, and thank you.

  16. #16
    Join Date
    Dec 2010
    Posts
    226

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    I just released a new version of G-Code Ripper (V0.6). I added another option to add probing to the G-Code file. Using the "Auto Probe" function you can load a g-code file then G-Code Ripper will define a grid of probe points. Then G-Code Ripper will write a new g-code file with added code for performing probe operation on the stock material and then adjust the tool paths to follow the stock material surface profile. This is great for adding designs to curved surfaces.

    Get the new version here G-Code Ripper

    If you think you need an expensive or complex probe for this to work, think again. I put some links and a video in a BLOG post to help explain the minimum requirements and concept.
    Scorch
    www.scorchworks.com

  17. #17
    Join Date
    Apr 2004
    Posts
    733

    G-Code Ripper - Scale, Rotate and Split G-code

    Software works great!!

    Instead of building a touch probe, I bought a Mitutoyo Touch Signal Inspection Probe model 192-001 on eBay for $7. I cut off the original wire harness and soldered a wire to the circuit board that connects to the internal touch probe switch. The wire then connects to the mach3 probe input pin.

    Here is the setup I used to test cut a circle on a slanted piece of wood.

    Attachment 245656
    Attachment 245658
    Click image for larger version. 

Name:	ImageUploadedByTapatalk1408126788.688601.jpg 
Views:	5 
Size:	215.2 KB 
ID:	245660

    Thanks Scorchworks!!

  18. #18
    Join Date
    Jun 2006
    Posts
    4

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    Hi

    I was hoping someone could shed more light on the preparation of the gcode in gcode ripper please. I used Mach3 and want to do engravings.

    I`m in the dark and having problems with the zero setting of the z-axis. All is going to plan and the probing is working correctly. The machine PAUSE and once i click to proceed, the tool moves to the correct spot , but then it plunges too deep. As i`m doing engravings , i rarely need to drop below .25mm , so its very little drop. I`m presuming a lot of things, so that is propably the problem here on the z-axis.

    Since the cutting tool tip is set to "0" in a small drilled spot , i presume this position will be held as the zero point and all engravings will be made from this point downward. So i set my zero to be just ontop of the wood. Is this assumption correct ?
    I presume i cannot have any offsets or offset plates as this will upset the zero of the cutting tool tip.

    The basic instructions then instructs to put the probing tip where the machine cutting tip was set to x-0 y-0 z-0 . These offsets are then inserted into the gcode ripper.

    My question now. What happens when the probe tool is higher or lower than 0 ..... this offset i assume can be used in the z-offset then ... correct ? My probe and cutting tool will not crash as i have enough spacing around and no clamps standing out.
    Obviously i`m missing something as the cutting tool plunges way to deep as i`m misunderstanding the z-axis zero setting.

    Am i correct to say that in my case i should not make my zero on the z-axis below my cutting board as im` trying to make an engraving ?
    I should not have offset ticked and not be using the zero z-axis plate ?
    Obviously when the z-axis is slightly lower than the cutting tool (so it will have to be raised) ...say bout 2mm this z-axis offset will be calculated correctly once entered into the offset menu in the ripper program ?

    Is my basic understanding correct ?

    The last trial run had my cutter plunges nearly 10mm into the wood. This depth i entered as i had to raise my probe this high so it was atop the wood. Surely this offset should have compensated back to zero ???? or not ? what am i missing

    thanx
    Andre

  19. #19
    Join Date
    Dec 2010
    Posts
    226

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    Quote Originally Posted by Andre007 View Post
    What happens when the probe tool is higher or lower than 0 ..... this offset i assume can be used in the z-offset then ... correct ?
    If the tool is higher or lower than the probe there should be a value other than zero entered in the z offset for G-Code Ripper. If I remember correctly the offset will be negative if the probe is higher than the cutting tool because the offset is the position of the tool relative to the probe.

    Quote Originally Posted by Andre007 View Post
    Am i correct to say that in my case i should not make my zero on the z-axis below my cutting board as im` trying to make an engraving ?
    I should not have offset ticked and not be using the zero z-axis plate ?

    Obviously when the z-axis is slightly lower than the cutting tool (so it will have to be raised) ...say bout 2mm this z-axis offset will be calculated correctly once entered into the offset menu in the ripper program ?

    Is my basic understanding correct ?
    After the relative position of the probe and tool are established the stock to be machined should be positioned and the coordinate system in Mach/LinuxCNC should be reset relative to the stock to be machined. Since you are probing the position of the highest point (or approximately the highest point on your stock should be the new zero position.

    I hope that answered your question. If not keep asking.
    Scorch
    www.scorchworks.com

  20. #20
    Join Date
    Sep 2005
    Posts
    371

    Re: G-Code Ripper - Scale, Rotate and Split G-code

    I'm confused on how you used the probe to cut the circle on the slanted wood. Did you touch off somehow with the probe to determine the angle and somehow modify the existing code for the circle?

Page 1 of 6 123

Similar Threads

  1. Coordinates change and scale when G-code is loaded
    By frare bear in forum DIY CNC Router Table Machines
    Replies: 11
    Last Post: 08-27-2021, 03:23 AM
  2. Replies: 51
    Last Post: 09-16-2020, 01:28 AM
  3. corel.hpgl > sheetcam.tap > pronterface.g-code > slic3r.g.code> ramps 1.4 > H-BOT
    By thesignworks in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 05-25-2014, 02:11 PM
  4. Split G-Code
    By DavidJHolmes in forum Uncategorised CAM Discussion
    Replies: 5
    Last Post: 04-07-2014, 02:33 PM
  5. Cut3d g-code changing "scale" in mach3?
    By LaGrasta in forum Vectric
    Replies: 2
    Last Post: 10-08-2012, 01:10 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
  •