Exporting svg sets fill to unset/undefined paint instead of no paint as intended causing problems when laser cutting

As you can see from the image, the fill is set to unset paint instead of blank as intended. I have to open the file in inkscape and manually set it to no paint in order to cut it with the laser.

I would very much like to remove the need for inkscape as it’s very tedious and time consuming.

Thank you

Are those curves I’m looking at in the picture? If so, I’m not sure how fill is involved at all.

can you post a file with steps to repeat?

Yes, those are curves. When I click on them in inkscape it says paint is undefined. If I load the file in the laser software it also cuts inside the curves not only the border as intended. For it to work correctly I have to set fill to no paint (clicking the x you see in the screenshot I posted).

I would like to avoid that step as it’s time consuming.

EDIT: from looking at the files before and after the modification in inkscape, it looks like inkscape adds style=“fill:none” when working with closed curves and style=“stroke:none” when working with hatches/fills.

Tested in Rhino 6 and 7, draw a rectangle, select it and export selected as svg.

A closed curve in Rhino results in a closed curve with stoke paint as intended and with fill undefined in inkscape. If I cut it with the laser it cuts inside the closed curve too.

A hatch in Rhino results in a closed curve with stroke paint as undefined and fill as intended in inkscape. I haven’t tested if the second example doesn’t produce the desired result when cutting with the laser but I’d assume it won’t.

thanks for that info- the dev team is looking into this.

1 Like

Thank you very much! Even though this most likely is a problem my laser software is causing I appreciate you looking at it from your end instead. I’m probably one of a handful of people with this particular problem, sorry about that.

It should be interesting you post the screen capture of the part of the file that causes problem and what doesn’t cause problem.
I wrote an exporter for Rh5 and RH6 just to lasercut objects to Sculpteo, people that uses it doesn’t complain about that.

It also output layers (in group) what Rhino is apparently not doing. This is something very strange as it is as simple as just putting a group!!!

Here a Nurbs curve that I output

Rhino output

The differences are the units, fill=“none” vs " fill-opacity=“0”

1 Like

Yeah, that’s the problem, fill opacity=0 is not enough for my laser software.

I tried your plug-in in Rhino 6 but I couldn’t get the fills to work properly, I don’t remember what the problem was. I was probably messing up some options when exporting.

Any chance you can get it to work in Rhino 7? I don’t use Rhino 6 anymore as I was having some issues with grasshopper.

Apparently your plugin works for Rhino 7 too, the problem is I can’t seem to figure out how to have a filled shape inside a non filled one. Am I missing something?

I spent 2 and a half hours today messing around with the laser software and finally managed to get it to work. The options were way too obscure, unclear and had to change the way it works in 2 different places for it to actually work. What a mess.

I still believe the way Rhino exports svgs does more harm than good, can’t think of a valid reason why opacity 0 would be prefered to setting the color to none. Maybe it’s actually useful for someone but I have no idea.

Thank you once again for looking into this.

EDIT: Nope, scratch that, for it to work correctly with svg directly from rhino it takes longer to cut the same thing. I’m pretty lost here, hate that laser software.

it is not very simple to follow you. I quite understand but as the whole subject is to tune SVG to your laser cutter. Laser Cutter you didn’t give any specification.

Converting 3d data from Rhino to 2D SVG means making some rules.

I did it to work with Sclupteo laser specification. The main are
One color for cutting
One color for engraving
So here my model in Rhino, you will see 2 different layer colors (black and red)

What I do in my exporter

What I get in Sclupteo,

Per color
I have to choose the style of the border
and the style of filling
So if you want one day options to work with your laser cutter, write some rules a program can follow

1 Like

I use 3 layers in my laser software, black and red are for cutting, with black cutting first, and blue which is for engraving. Doesn’t need anything out of the ordinary, as you can see in the image in the first post. Red and blue are lines which should have 0 fill and blue is just fill with no contour.

The software just doesn’t like anything else being there other than the minimum necessary, opacity 0 doesn’t cut it.

I don’t know what else to say to make it more clear, it just reads a file like your eyes see it (minus the 0 opacity thing).

Making SVG objects different depending on the color doesn’t seem a good option for an SVG exporter. So you could make a script to automate the changes inside your SVG in order to fill blue curves.
The other solution is to use another type of object for “blue” curves.
In Rhino : Hatch or Surface ? Don’t know if it will work
In my exporter I could extract “blue” curve from a surface. So all objects being surfaces could be filled by default and not curves.

Exporting as hatch using the normal Rhino svg exporter works, except for the border having 0 opacity and not 0 fill.

I was actually working on a solution to edit the svg files as text inside grasshopper and just add style=“fill:none” that way, but even that is an extra step that I would like to avoid.

Right now I have some other things to do at work but as soon as I get back to working with the laser that is probably the solution I’ll work towards if nothing better is found by then.

Thank you for your attention on this!

This is on our bug list to investigate the possibility of using fill=‘none’ at

1 Like

Thank you very much for looking into this. style=“stroke:none” when working with exported hatches should also be looked at, same concept.

1 Like