CNC g-code stuck at 5% with transparent PNG

Hi,

I’m trying to generate a relief g-code for a png image with a transparent background. Everything works fine creating the tool path, but when I try to generate the g-code and preview, it gets stuck at 5% and never advances. I have to close Luban down.

The same file as a jpg or bmp works (but then I have a square around it that will also be cnc’ed). I tried to same the png with different settings (from gimp), but nothing helped. I tried different tool path setting, but that also didn’t help.

Is there a problem with png files with transparent backgrounds? I can provide the file. I have not yet tried another png with transparency, but will try it in a bit.

(This is the latest Luban 4.0.1)

Thanks

What operating system do you use luban on?
What pc components do you have?

Try older luban versions to double check it didn’t work in the past.

Share the file.

All in all, i would say luban is not the best way to cnc. Fusion or so is a better way to go.

If you can share your file we can check it out.

What is probably happening is that you have an extra layer in your image file that’s causing problems and showing up as a square.

Not sure if these threads will help:

-S

I generated a random simple .png image with a transparent background (basically, one black square filling about a quarter of the image) in GIMP and tested it on the most recent version of Luban I have installed, which happens to be 3.15.1 (Linux). I had no problems generating gcode. So the problem is not Luban + transparent .png in general.

That means that it’s something with Luban 4.x, or with your OS, or with the specific image you’re using.

(Since PNG is a non-layered raster format, the problem is unlikely to be a rogue layer.)

1 Like

Hi

Windows 10 for the OS
A HP laptop (intel)

I’m using gimp 2.10.14 to generate the png (Relief grayscale image, used gimp to remove a circle around the image to make it round). So I’ve tried a few things:

  1. Gimp : Relief bird picture in png : STUCK
  2. Gimp : Simple circle in gray with transparent background - WORKS
  3. Paint 3D (windows) : Load the image in 1 that doesn’t work and save again as png : WORKS

So it seems to be a combination of gimp and the specific image with a transparent background.

I’ll attach the image in a separate post below.

Here is the image that gets stuck in Luban 4, I will download 3.15.1 and try it in there.

@xchrisd I am also trying to use Fusion 360 … but the learning curve is quite a bit steeper :slight_smile: I’ve installed the plugin that converts an image to a mesh for relieve engraving … but going from there to the tool paths and the post processing is still a couple of videos and articles away for me!

I was hoping to do a fast first test with CNC on a flat surface (did the rotary module test and that came out pretty good)

I downloaded the picture, used GIMP to re-remove the white bits outside the circle, saved as a PNG, and pulled it into Luban again. Still no serious problems (I had to turn Preview on and then off again to unstick things once), although the image is complex enough that it took a few seconds to generate gcode and toolpaths even at A150 sizes.

One thing I didn’t test is translucency—I do pixel art sometimes, so I have things like “Antialiasing” and “Feather edges” unchecked for most tools. So the image I produced had only fully transparent or fully opaque pixels, no in-betweens.

Note: I’m also a few GIMP minor versions ahead of you (2.10.22) and on a much more powerful machine (Threadripper-based desktop).

1 Like