-
Notifications
You must be signed in to change notification settings - Fork 176
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) - tool 0
35 24 72 nachtblau (22) - tool 1
etc...
Otherwise the default colors 'black', 'red', 'green' and 'blue' will be used and assigned to tool number 0,1,2,3. - Check 'Sort objects by pen index' to sort GCode by ascending tool number (otherwise tool order is same as color occurance in SVG file).
- Check 'Add Tool Change command' to insert
M6 Tx
command to the GCode.
Import SVG file by drag and drop file on GUI (except text editor area) or via file dialog.
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 select a tool nr. for a SVG path.