G-Code Ripper

G-Code Ripper:
Read, Scale, Rotate, Split, Wrap G-Code.

** Now with "Auto Probe" for cutting on uneven surfaces **

Mouse Pic

Contents

Background
Features
Download
Documentation
Related Links

Background

G-Code Ripper is a g-code reading and manipulation program written in python. The root features of the program were written from scratch. The Graphic User Interface (GUI) is based heavily on the GUIs I wrote for F-Engrave and Dmap2Gcode. G-Code Ripper is a free open source program released under the GNU General Public License (GPL) Version 3.

G-Code Ripper Features

- Scale g-code
- Rotate g-code
- Split g-code
- Map linear axis to rotary axis (Wrap g-code like CNCWrapper)
- Origin selection allows user to select the location of g-code zero position
- Use inches or mm as export units
- Customizable g-code preamble and postamble
- Reads existing g-code
• Reads "Absolute" and "incremental" coordinates
• Evaluates expressions (i.e. [2*3])
• Understands parameters (i.e. #1,#2 and #<feed_rate>)
• Understands and interprets YZ and ZX arcs (converted to linear motions for compatibility with splitting and rotation)

Changes in Version 0.01

- Initial Release

Changes in Version 0.02

- Added feed rate scaling
- Eliminated read abort on N codes (the N code line numbers are simply ignored now)

Changes in Version 0.03

- Added ability to map X or Y axis moves to A or B rotary axis for cutting on a cylindrical surface.
- Added more plot view orientation options

Changes in Version 0.04

- Fixed bug relating to arcs without explicit g-codes (G2,G3) on each line
- Added ability to have zero decimal places on feed rates

Changes in Version 0.05

- Added "Export" to the g-code operations. Now gcode toolpath data can be exported as DXF or CSV (Comma Seperated Values) formated files. With or without rapid motions.

Changes in Version 0.06

- Fixed code to again automatically convert arcs to lines when wraping code (auto-convert was broken in V0.5)
- Fixed evaluation of equations using exponents "**"
- Added Auto Probe to g-code operations

Changes in Version 0.07

- Fixed bug in "Auto Probe" that caused an error when the Z offset is set to zero.
- Modified code to make it compatible with Python 2.5

Changes in Version 0.08

- Fixed bug in g-code wrapping resulting in mapping failure resulting from to zero length tool path.
- Added logic for dealing with ambiguous start positions (when the tool position is not set by G0 commands before a G1, G2 or G3 command)
- Added a warning pop-up message when assumptions are made about the tool starting position.
- Fixed automatic conversion from arcs to lines when required by conversion type selected.

Download:

(Right click on the link and select "Save target as" or "Save link as")
Source files
(zip file)
Windows Executable Files
(zip file)
Python Files Only (zip file)
G-Code_Ripper-0.07_src.zip
G-Code_Ripper-07_win.zip
g-code_ripper-007.zip
G-Code_Ripper-0.08_src.zip
G-Code_Ripper-08_win.zip
g-code_ripper-008.zip

If the windows executable does not work right away install the
“Microsoft Visual C++ 2008 Redistributable Package (x86)”. The program I use to create the Windows executables (py2exe) has a dependency to this package.

Documentation

I have started the manual page for G-Code Ripper here: G-Code Ripper manual

Sample Items Made with Wrapped G-Code

These are lithophanes made from a PVC pipe. The pictures on the left are the lithophanes with backlighting (candle inside pipe). The pictures on the right are the same lithophanes without backlighting.
obx_litho1.jpg
skull_litho1.jpg
skull_litho2.jpg
universal_litho1.jpg
universal_litho2.jpg

Sample G-Code Splitting Workflow

This example shows how I cut a design twice the size of my CNC machine travel.
1. Open Existing g-code file using G-Code Ripper.


eagle_g_code_ripper.jpg
2. Make the origin "Mid-Center". Enable splitting.
Make the split angle 90degrees

eagle_ripper_split.jpg
3. Select "Rotate Black" in G-Code Ripper
to rotate the black cuts 180 degrees.
Save the "white" and "Black" g-code files.
eagle_ripper_rotate.jpg
4. Prepare the CNC machine and work piece.
I used pins to maintain good alignment
when rotating the work piece 180 degrees
eagle_backside_pins.jpg
5. Machine the first of the two CNC file that
were generated ("Black" or "White"). It doesn't
matter which one is first)
eagle_first_half_on_cnc.jpg
6. Remove the work piece from the machine and
remount it rotated 180 degrees from the original
orientation. (My pins made this an easy task)
eagle_first_half.jpg
7. Machine the second of the two CNC file that
were generated ("Black" or "White")

eagle_2nd_cut.jpg
8. Here is the final result of the eagle cut into
a piece of scrap. The smaller eagle is the max
size my machine could do without splitting.

both_eagles.jpg
9. The finished eagle plague with a little paint

eagle_finished.jpg

Related Links

F-Engrave: Used to create the V-Carved text on the lake map plaques shown above.
Dmap2Gcode: Dmap2gcode is a depth map image cutting program
CNCWrapper: CNCWrapper is commercial program (~$25) that maps a g-code linear axis to a rotary axis. CNCWrapper also includes context based g-code editing.

Scorch Works Blog



Scorch's Home
Scorch Works Home
Scorch Works Blog
@scorchworks On Twitter