Dmap2Gcode (image to g-code) Update

I released a new version of the image to g-code conversion program Dmap2Gcode.  The new version is 0.02, the updates to the program are listed below:

  • Added option to disable arcs in the g-code output (useful for GRBL/ShapeOko compatibility)
  • Fixed bug resulting in the selection of columns then rows having no effect
  • Added automatic scaling of all linear dimensions values when changing between units (in/mm)
  • Fixed bug when using a configuration file (“dmap2gcode.ngc”)

A Much Faster F-Engrave (V1.40)

F-Engrave

The latest version of F-Engrave includes major improvements to the v-carve calculation speed.  The first is based on input from geo01005.  He shared his work on his BLOG and in this YouTube Video.  The added code that breaks up the design area into a grid and stores the grid locations that are within the tool diameter.  The v-carve algorithm uses this data to skip over line segments that are farther than the max tool diameter from the current line segment.  F-Engrave had previously skipped some segments but geo01005′s implementation was significantly (2 to 3 times) faster.

In addition to the code changes geo01005 also showed that using Psyco with F-Engrave was of great benefit.  Psyco is no longer supported and is not compatible with the latest (or most commonly used) Python distributions.  However, the speed improvements were significant enough (3 to 4 times faster) to convince me to downgrade to Python 2.5 for the windows executable distribution.  I am sticking with Psyco rather than another JIT compiler (pypy, Jython, IronPython, etc.) because Psyco is easy to implement and compatible with Py2exe.  I use Py2exe to generate the windows executable files.

The final speed improvement, which is turning off plotting, has been available for some time in F-Engrave.  I have not pushed the use of this feature because the savings has only been a small percentage of the total v-carve time (depending on the design).   With the other improvements included in V1.40 plotting has become a significant player in the total calculation time.   Now turning off plotting can make the v-carve calculation 2 to 3 times faster (or significantly more depending on the design).  I have added a check button to the calculation window so the plotting can be turned on/off, on the fly, during the v-carve calculation.

So if you are paying close attention you can see that all of these increases in speed build on each other (multiply not add) and result in a v-carve calculation 12 to 36 times faster than in the previous versions of F-Engrave.

I have also been digging into the code and fixing various minor bugs and adding some features to make aligning multiple v-carve files easier.  Here are the highlights of the other changes:

  • Changed Default Origin behavior (for DXF/Image files) to be the origin of the DXF file or lower left corner of the input image. (“Bot-Left” still provides the same functionality of the old “Default” setting)
  • Added automatic scaling of all linear dimensions values when changing between units (in/mm)
  • Fixed bug in clean up function in the v-carve menu. (the bug resulted in excessive Z motions in some cases)
  • Fixed bug resulting in the last step of v-carving for any given loop to be skipped/incorrect.

Auto Probing With G-Code Ripper

OLYMPUS DIGITAL CAMERA

When g-code is generated by most software it is assumed that the stock material is flat and level. Sometimes the stock material is warped, not mounted level or was never intended to be flat.  One way to overcome the problem of un-level stock material is to machine a flat area onto the stock material or to invert your thinking and cut only what isn’t the design you want.  An extreme example of the second case is illustrated in the bat I modified for my brother (see the “Man Cave” bat below).

Another approach to dealing with stock material that is not level is to measure the existing geometry and account for the un-level geometry.  This can be a tedious task to perform manually and many programs used to generate g-code for CNC machines have no mechanism for accounting for the out of level condition of the workpiece.

G-Code Ripper‘s solution is to read g-code generated for flat stock and modify the code to include probing of points on the stock material using the CNC machine.  The resulting probe data is used to automatically adjust the tool paths in the g-code file.  The probe points are arranged in a grid pattern and the cut depths over the range of the tool path are determined by Bilinear Interpolation.  G-Code ripper keeps track of which points are needed for calculating the interpolated Z positions for the tool paths.  Probe points that are not required during cutting are not measured during the probing process.  G-Code Ripper allows the tool and the probe to be in different locations, the location of the probe relative to the tool is entered into the probe offsets settings in G-Code Ripper.

Using Auto Probe in G-Code Ripper:

You will need to have a working probe and be running either LinuxCNC or Mach3 as your machine controller.  You don’t need anything fancy for a probe.  simple momentary switch will work just fine in most cases.  I have been using a momentary switch I had in my parts box.  You can see what my setup looks like in the embedded video below.  There is good information for setting up MACH3 and LinuxCNC probes on the Autoleveller site.

Get G-Code Ripper Here: G-Code Ripper

1. Open an existing G-code file (if it open properly the tool path will be shown in the display canvas)

2. Select the Auto Probe option from the radio buttons in the lower left corner of the G-code Ripper Window.

3. Set the options on the right side of the window. (Details for each of the options can be found here G-Code Ripper Manual)

4. Save the G-code file using the button on the right side of the window.

G-Code Ripper HAD Mouse

Background:

The basic operation of G-Code Ripper’s auto probe routine is based on the technique that is used by Autoleveller.  In fact G-Code Ripper even uses the same form of the bilinear interpolation equations.  However, Autoleveller is specifically geared toward creating circuit boards.  Since the circuit board has a conductive surface the probing can be performed using an electrical circuit which includes the cutting tool in the collet and the top of the printed circuit board.  Using the cutting tool as the probe has the advantage of ensuring there is no offset between the probe and the tool.  Autoleveller also assumes the workpiece is very close to flat (Autoleveller uses the first probe point to determine a new zero reference) G-Code ripper does not make any such assumption.

Micro Foundry Progress – Crucibles

Casting Group Pic

I have been sporadically experimenting with my electric micro foundry setup for almost a year.  Recently I have been trying different crucibles.  My first crucible was a mini terracotta pot.  (I don’t know where the pot I used came from but I have not been able to find another one the same size without a drainage hole.)   I have also used a porcelain crucible (from Ax-Man) and a ceramic shot glass that I picked up in Las Vegas.  The terracotta pot has some significant cracks and chipping after a couple of furnace runs so it has been retired from use.  The porcelain crucible shows some chipping on the top edge.  Probably from being manhandled by a pair of pliers during the pour.  The ceramic shot glass seems to be holding up the best so far.  I don’t see any structural damage after a couple of runs in the furnace.  Before I used it I was a little concerned about the design on the side of the shot glass being a starting point for a crack but so far so good.

Casting small parts in sand is a little more sensitive that larger parts.  At least it seems that way since the small imperfections are a more significant portion of the end casting.  I tried the small toy airplane (red) in the picture above a couple of times.  both times the plane was only partially formed.  The tails were too short on one and the wingspan was too short on the other.  I will see if I can’t work out some of the bugs in the future.  Below are some pictures of my micro furnace in action and some in process pictures of a Yoda and toy plane.  I am using old aluminum nails, that I was given, for the raw material in my my micro foundry.  Most of my other scrap aluminum would need to be cut down significantly to fit.

Running Furnace Yoda in Sand Yoda W/Sprue

 

Newton’s Cradle

Newtons Cradle GIF

Over the Memorial Day weekend I made this newton’s cradle for my kids.  I used some 5/8 inch ball bearings I had left over from another project.  Instead of trying to drill into the bearings I choose to injection mold a plastic ring around the bearing.  This allowed me to tie the strings to the injection molded plastic part rather than directly to the ball bearing.  Below is a picture of one of the ball bearings with the ring molded around it (and the aluminum mold).  The plastic was molded right onto the bearings inside the mold.

Newtons Cradle Mold

I used fishing line to tie the bearings to the frame.  The fishing lines for each bearing are passed through a small holes in the top board and wrapped around a screw.  Turning the screws on the top board adjusts the length of the strings to fine tuning the alignment of the bearings.  Aligning the bearings is critical to getting good performance from the newton’s cradle.

Newtons Cradle Closeup

The injection molded collar for the bearings was designed on my Android phone using ScorchCAD while I was at one of my kids baseball practices.  I exported and STL file for the mold from ScorchCAD and created the g-code file for my CNC mill using MeshCAM.  So unless someone protests I am claiming I made the first physical part from a part designed from start to finish on a smart phone using ScorchCAD.  A screenshot of the ScorchCAD part is shown below.

Newton ScorchCAD

Hot Glue Injection Molding

Hot Glue Injection Molded Parts

I thought it would be interesting to see how well a simple hot glue gun with standard hot glue could produce injection molded parts.  Although the parts did not all turn out perfect I thought the results were pretty impressive considering the simplicity of the method used.  Here is a video of my trials.

After my initial trials I poked around on the web a bit and found that this is nothing new. There is even a company that sells an “Injection Moulding Pack” Mind Sets Online.   The description of this You Tube Video even talks about polyethylene in the shape of glue sticks.

For more details on the molds I used for these tests and to find out about my homemade plastic injection molding machine see my Home Injection Molding web page.

 

ScorchCAD Released on Google Play

ScorchCAD_444

ScorchCAD (A clone of OpenSCAD for Android devices) is now available on Google Play: ScorchCAD.  There is also a new ScorchCAD webpage here: ScorchCAD Web Page.  I will continue to work on supporting more features in future releases.  below are the details from the Google Play listing.

ScorchCAD is a clone of OpenSCAD written for Android devices.  This program executes OpenSCAD code and displays the resulting 3D model.  ScorchCAD aims to provide the same functions as OpenSCAD but it does not use the same source code. Most of the basic features are currently working. Additional features will be supported in future updates.

Features currently supported (fully or partially):
- Shapes: cube, cylinder, sphere
- Transformations: translate, rotate, scale, color
- Boolean Operations: union, difference and intersection
- File Import: DXF and STL (ASCII and binary)
- User defined variables and special variables : $fa, $fs and $fn
- User defined functions and Math functions

ScorchCAD is still a work in progress here is a partial list of the OpenSCAD features not yet supported:
rands, min, max, multmatrix, hull, minkowski, polygon, polyhedron, intersection_for, assign, projection, surface, render, children, lookup, str, search, version, version_num, norm, cross, parent_module, Modifier Characters (* disable, ! show only, # highlight, % transparent)

shot_000005

ScorchCad Preview (Update 2)

 

This is my second short update of my progress on ScorchCAD (A clone of OpenSCAD for Android devices).  I am slowly adding more features and improving the user interface.  I have also been testing with some of the sample files provided with OpenSCAD (see the animated GIF) Here are some of the recent improvements:

  • Separated the input editor from the viewer screen and added a separate console screen  for messages.
  • Added support for FOR loops
  • Read and write STL files (see the frog in the GIF animation)
  • Read 2D DXF files and extrude 2D shape into 3D shape
  • Zoom and pan support for the viewer window

Using F-Engrave with GRBL

F-Engrave

I have had some feedback from ShapeOko users indicating that there are some issues using the default F-Engrave output with GRBL.  I thought I would take some time and describe the problems that people are having and discuss the F-Engrave settings needed to produce g-code that GRBL can run.

First, F-Engrave defines variables for the feed rate and engraving cut depth that are not compatible with GBRL.  This problem can be solved by checking the “Disable Variables” check box in the F-Engrave Settings window.  This will prevent F-Engrave from writing the incompatible variables to the g-code output file.

Second, F-Engrave uses incremental distance mode for arcs.   In order to ensure that g-code interpreters read the data correctly the code G91.1 is set in the g-code output (setting the arc distance mode to Incremental).  Unfortunately GRBL does not support reading the G91.1 code. To eliminate the incompatible G91.1 code from the F-Engrave output F-Engrave users need to un-check the “Enable Arc Fitting” option in the F-Engrave Settings window.  (Alternatively the G91.1 code can be manually removed from the g-code file.)

Update: Apparently GRBL misreading the G91.1 code also results in the next g-code line, which set the units (in or mm), being skipped/misread.  I also see there is some discussion about fixing the G91.1 g-code problem on the ShapeOko forum.

I recently updated F-Engrave to suppress writing the G91.1 code when arc fitting is disabled so be sure to use F-Engrave version 1.34 or higher to make sure the G91.1 is not written by F-Engrave.

In summary, to generate g-code compatible with GRBL:

  • Select the “Disable Variables” check box in the F-Engrave Settings window
  • un-select the “Enable Arc Fitting” check box in the F-Engrave Settings window
  • Use F-Engrave version 1.34 or higher

These settings (and all of the other settings) can be saved and loaded every time F-Engrave starts up.  See the F-Engrave Manual for more details on the F-Engrave configuration file.