Importing SVG's

Hi

I am working to use my Shapeoko to carve woodblocks for colored printing. This means I to carve different patterns into multiple boards and have the patterns register relative to each other for printing.

I am doing the pattern design work in a Java program that I have written myself and it produces SVG files, one .svg file for each of the woodblocks.

I am having trouble understanding who Carbide Create manages the coordinate system when importing .svg files.

It seems to ignore the “width”,”height”, and “viewBox” attributes in the “” tag. It also seems to set the origin to be y=0 and the x to be whatever is needed to get the greatest x coordinate to be at the bottom of the cutting area.

I found in another forum topic that is assumes the units are pixels and they are mapped to 96 dpi.

I work appreciate information on how the SVG import maps the coordinate system.

Mark

Welcome @MarkMoore,

Not to dodge your question, but I think you would be better off importing all those individual SVGs in a “specialized” vector drawing tool (say, Inkscape), and then exporting a single SVG to import back in CC.
That would take less reverse engineering of CC’s SVG import behavior that way :slight_smile:
(and then again, maybe @robgrz will chime in and tell you exactly what CC’s import function does and how)

3 Likes

In my recent experiments with producing .svg files programmatically I’ve found that if I start the file with:

<svg x=“0.000mm” y=“0.000mm” width=“250.000mm” height=“200.000mm” viewBox=“0 0 250 200”>

<!–
add a border rectangle to ensure proper alignment in Carbide Create
–>
<rect x=“0” y=“0” width=“250” height=“200”
style=“stroke:black;stroke-width:0.25;stroke-opacity:0.2;fill:none”/>

<!–
overall outline for cutting the quadrant
–>
<path
d= "M 15.000 195.000
L 18.141 194.973
L 21.282 194.890
L 24.420 194.753 …

The border rectangle seems to make everything work the way I would expect.

1 Like

Hi Julien,

Thanks for your reply. It always great to get help when looking for a solution.

What I think you are saying is that I would import my SVGs into Inkscape and then have Inkscape export as one SVG. Said SVG would have some structure with multiple “sub-somethings” which I could use to create independent toolpaths in Carbide Create, one for each of these sub-somethings. The groupings of geometry of each of the original SVGS would somehow be preserved in the the Inkspace generated SVG. .

If I knew what had to go into the SVG file to create the entries that can get unique toolspaths, I think I likely could just do that myself.

That said, learning Inkscpae is not currently in my todo list and my experience has been that it can be quite a bit of work to install and learn how to use such tools, especially when trying to find a way to use the tool which is NOT the path that its developers imagined. In this case I mean finding a way to munge a set of SVG files into a single SVG file that makes Carbide Create happy. I would guess that its a couple of days for work for me to learn to use this Inkscape. I am hoping it would be an hour or so of the SVG Import software engineer at Carbide create to say “Yep, we ignore the scaling information in a Scaleable Vector Graphics file, we just assume the units are 96 per inch and we chose the origin based as follows on the objects we find in the import……”. That would be useful to me and other makers who what to engage via the SVG standard.

Thanks David, this workaround did indeed work for me and I was able to carve a woodblock this afternoon. I am still hoping for some insights into what’s going on in Carbide Create .svg import. The File Preview in the open dialog seems to conform to the standard so maybe Carbide Create is not far off.

I’m not sure I understand when the “Group Elements” button does, do you know?

Thanks again,

Mark