-
Notifications
You must be signed in to change notification settings - Fork 187
How to import a SVG drawing
If the color information of a SVG drawing should be used to select a tool number, the SVG Color should match a Color in the given Palette.
###Preset in Inkscape:
Copy my individual GIMP-palette "Stabilo_25sort.gpl" (Stabilo Fineliner colors) to the Inkscape folder e.g. C:\Program Files\Inkscape\share\palettes
Open Inkscape and load the new Palette (Little black triangle on right side of Palette-color-bar)
Load a SVG drawing and change color of objects to a Color, given in the Palette, or make a new drawing.
###Preset in GRBL-Plotter:
Inside the Setup Dialog 'SVG Import'
Check 'Get pen index from Color palette' to handle stroke-color of SVG object.
Apply a valid GIMP Palette file (which is readable by Inkscape) to assign SVG Colors to tool numbers. Palette Color 1 results to tool number 0.
Example:
<GIMP Palette
Name: STABILO 88
Columns: 3
108 194 227 eisgrün (13) 35 24 72 nachtblau (22)>
Import SVG by drag and drop file on GUI (except text editor area)
Color difference will be calculated via Distance in RGB-Space:
Math.Sqrt((c1.R - c2.R) * (c1.R - c2.R) + (c1.G - c2.G) * (c1.G - c2.G) + (c1.B - c2.B)*(c1.B - c2.B)); }
palette-color (= tool nr) with lowest difference will be taken to draw a SVG path
Tools are sorted by tool nr in ascending order (Tool with lowest number first)