Attached is a very simple shape: a square, and within it a smaller square. This is part of a large QR code generated by Inkscape.
The problem is that when I import this into FreeCAD I get three squares, instead of two squares with a gap between them. The reason for this is that the shape is actually made from a single path:
d="M 0,0 V 12.444202 H 12.444202 V 0 Z m 1.777669,1.7776693 h 8.888863 V 10.666532 H 1.777669 Z m 1.7776687,1.7776689 v 5.3335255 h 5.333525 V 3.5553382 Z"
You can see this in Inkscape if you select the shape and invoke Path > Break Apart. Then it looks just like in FreeCAD.
Allegedly FreeCAD supports only the SVG Tiny specification, so the shape needs to be simplified somehow to look correct.
My question is, how can I "bake" this shape so that it is all made from separate paths? There must be some automated way, so that you can apply it to large, complicated (but simple) shapes like QR codes.
@Polygon yes, that seems to work. How do you convert a QR code generated by Inkscape into that?
@Paddy_CAD the goal is to pad/extrude a QR code generated by Inkscape in FreeCAD. It is also to learn how to "bake" any shape in Inkscape, e.g. a logo or a traced bitmap, so that "gaps" are preserved when importing into FreeCAD. How would you convert the svg_test image I attached above into that 2-shapes solution in an automated way?
As a test sample, attached is a full QR code which includes a few "holes" (for argument's sake, image it is 1000 times more complicated so that manually doing something to each hole is not realistic).
Polygon - my 3D CAD will import Inkscape documents directly. No need to export out as generic SVG. More accurate than exporting out as DXF.
Guess what? Mine will also accept rectangle, spiral, ellipse, star/polygons without having to convert them to paths first.
Guess what again? Mine will accept "most" fonts without converting to paths first. If it is on the system - it will use it. Overlapping scipt fonts will have to be converted to paths though. Darn it!
Oh - did I mention mine will also accept Inkscape symbols?
Path effects have to finalized - of course.
Only thing missing is fill patterns and since patterns are defined in SVG specifications, I expect my CAD will eventually include that.
Moral of the story? Some CAD software takes SVG seriously. Some don't.
I found that I get correct results in FreeCAD by selecting the imported parts and performing Part > Boolean XOR. The question still remains how to "bake" this SVG in the first place.
Poly - Inkscape is SVG but with extra elements and definitions that are not part of SVG specifications as opposed to exporting out as plain vanilla SVG.
If all software would import Inkscape SVG documents directly, Inkscape would not have the need for that export option. Save some unnecessary code there huh?
Attached is a very simple shape: a square, and within it a smaller square. This is part of a large QR code generated by Inkscape.
The problem is that when I import this into FreeCAD I get three squares, instead of two squares with a gap between them. The reason for this is that the shape is actually made from a single path:
You can see this in Inkscape if you select the shape and invoke Path > Break Apart. Then it looks just like in FreeCAD.
Allegedly FreeCAD supports only the SVG Tiny specification, so the shape needs to be simplified somehow to look correct.
My question is, how can I "bake" this shape so that it is all made from separate paths? There must be some automated way, so that you can apply it to large, complicated (but simple) shapes like QR codes.
Something like this?
Can you describe your goal in more detail? There are many ways to illustrate a QR code. Here are three options, each requiring a different workflow.
@Polygon yes, that seems to work. How do you convert a QR code generated by Inkscape into that?
@Paddy_CAD the goal is to pad/extrude a QR code generated by Inkscape in FreeCAD. It is also to learn how to "bake" any shape in Inkscape, e.g. a logo or a traced bitmap, so that "gaps" are preserved when importing into FreeCAD. How would you convert the svg_test image I attached above into that 2-shapes solution in an automated way?
As a test sample, attached is a full QR code which includes a few "holes" (for argument's sake, image it is 1000 times more complicated so that manually doing something to each hole is not realistic).
I´m still not sure about it.
Will this work?
@Polygon it partially works:
I still don´t get why CAD needs all segmented. My Subdivsion Surface Modeller can handle the SVG or PDF straight away:
Polygon - my 3D CAD will import Inkscape documents directly. No need to export out as generic SVG. More accurate than exporting out as DXF.
Guess what? Mine will also accept rectangle, spiral, ellipse, star/polygons without having to convert them to paths first.
Guess what again? Mine will accept "most" fonts without converting to paths first. If it is on the system - it will use it. Overlapping scipt fonts will have to be converted to paths though. Darn it!
Oh - did I mention mine will also accept Inkscape symbols?
Path effects have to finalized - of course.
Only thing missing is fill patterns and since patterns are defined in SVG specifications, I expect my CAD will eventually include that.
Moral of the story? Some CAD software takes SVG seriously. Some don't.
What is „Inkscape documents directly“ other than an SVG file?
I found that I get correct results in FreeCAD by selecting the imported parts and performing Part > Boolean XOR. The question still remains how to "bake" this SVG in the first place.
Poly - Inkscape is SVG but with extra elements and definitions that are not part of SVG specifications as opposed to exporting out as plain vanilla SVG.
If all software would import Inkscape SVG documents directly, Inkscape would not have the need for that export option. Save some unnecessary code there huh?
Path effects is a good example.