mnesarco / MarzWorkbench

FreeCAD Workbench for guitar design
GNU General Public License v3.0
82 stars 19 forks source link

Import of SVG not possible #18

Closed Roycinger closed 2 years ago

Roycinger commented 2 years ago

Hi,

I'm trying to import an SVG as the headstock shape. However, when I import it, I'll get the error that there's no contour path in the SVG: image However, I made sure that the path is indeed named "contour": image I counter-checked that with one of the sample files where the path is labeled the same way.

Is there anything that I miss? Thanks in advance!

mnesarco commented 2 years ago

You need to set the "id" not the "label" of the path object. image

Roycinger commented 2 years ago

Thanks for the fast response! Is there a piece of documentation on the required id's? I added a midline (as requested by another error message) and get this now: image image

mnesarco commented 2 years ago

https://github.com/mnesarco/MarzWorkbench/wiki/Custom-Shapes

FreeCAD's SVG import function is not perfect. Some paths just break it. What I suggest is that you start with the provided example file, and do some modifications for experimenting. Soon you will understand what works and what doesn't.

Also some parameter values lead to impossible geometries, for example if you set nut string distance too wide or too narrow, or too extreme scales. Do change parameter values incrementally in small values to avoid edge cases.

Roycinger commented 2 years ago

Thanks for the swift help! I'll read up on the document you linked. As the initial issue is resolved, I'm going to close this issue