I want to separate an existing drawing into layers, with each layer containing a single fill color. (This is for use with an Egg-Bot, where I'll print one layer at a time, then change the pen to one of a different color, print the next layer, etc.) For example, all green objects might be in layer "3-green". I have removed all effects, such as shading, so that each object has a single color. I set "blend effect" to "normal" and opacity to 100% in all layers. Each object has a black border, however, and I want to keep that.
I see that when I select an object and move it to a different layer (up or down), its black border does not appear when I display only the layer it is in. That's good, because I only want the fill color to be in that layer (though I don't understand why the black border is not displayed in that layer). However, after I moved all colors other than black, I want all the (black) borders of the objects that I've moved, together with any black outlines that remain, to appear in my black layer. How can I do that?
Cary
Separate objects into layer by color
Re: Separate objects into layer by color
Can you attach the SVG file here? If you had used layer blend modes earlier in the same document, you are possibly affected by the fact that moving an object through (or copying an object from) a layer with one of the blend mode active, adds (or had added) the layer blend mode to the object's style attribute (a filter effect). (Discussed e.g. in «Moving an object through a layer with blending options causes the object to adopt blending options» in the bug tracker)CarySwoveland wrote:(…) removed all effects, such as shading, so that each object has a single color. I set "blend effect" to "normal" and opacity to 100% in all layers. Each object has a black border, however, and I want to keep that. (…) when I select an object and move it to a different layer (up or down), its black border does not appear when I display only the layer it is in. That's good, because I only want the fill color to be in that layer (though I don't understand why the black border is not displayed in that layer).
AFAIU this doesn't work with the current model of fill/stroke of paths in SVG: you would have to create duplicate or clones in the "black layer", of all objects that have already been placed in one of the "color layers", and set their stroke to black, fill to 'None'. It is not possibly to separate the display of one style attribute to be rendered on a different layer (i.e. the object would need to be inside two groups at the same time).CarySwoveland wrote:However, after I moved all colors other than black, I want all the (black) borders of the objects that I've moved, together with any black outlines that remain, to appear in my black layer.
Maybe it could be done with a concept of sub-layers and filter effects involving either Background Image or Background Alpha as input for (layer or object) blend filters, but I don't know if a) the required effect actually could be achieved and more importantly if b) the egg-bot extension does consider filter effects or relies on the geometric path data to plot (ignoring SVG filter effects)
-
- Posts: 2
- Joined: Mon Nov 01, 2010 7:37 am
Re: Separate objects into layer by color
~suv wrote:...Can you attach the SVG file here?...
...AFAIU this doesn't work with the current model of fill/stroke of paths in SVG: you would have to create duplicate or clones in the "black layer",...
I've attached the file. Since posting I discovered Egg-Bot, being a vector printing device, disregards fills. One must draw a dense hatch or other object inside an object to simulate a fill. The Egg-Bot extension helps with this. I understand your explanation about moving duplicates of objects to the "black" layer. That should not be especially time-consuming for the kinds of drawings I'm thinking of.
"AFAIU"?
Thanks for the help.
Cary
- Attachments
-
- Christmas_turtle_for_egg.svg
- (46.22 KiB) Downloaded 300 times
Re: Separate objects into layer by color
SorryCarySwoveland wrote:"AFAIU"?

AFAIU -- As Far As I Understand
Looks fine to me -- I cannot reproduce what you initially described asCarySwoveland wrote:I've attached the file.
CarySwoveland wrote:when I select an object and move it to a different layer (up or down), its black border does not appear when I display only the layer it is in. That's good, because I only want the fill color to be in that layer (though I don't understand why the black border is not displayed in that layer).
Separating stroke and fill (be it as solid filled unstroked paths, or paths filled with the hatching path effect or a vector-based hatch pattern) has one drawback if done just by placing a duplicate of each shape on a layer "Black" and changing the objects' attributes to 'unfilled, black stroke': you'd see unwanted strokes where the shapes overlap. Either you'd have to use a solid white fill for the stroked objects (so that the lower parts don't show through) or use path operations to meld the stroked paths into one single path with the hidden parts omitted.
Using a solid white fill (and making sure that white is not used for plotting) would be the easiest way, but I'm not sure if colors can be omitted via the egg-bit extension or if it assumes that everything with a solid fill color (as opposed to no fill or full transparency/zero opacity) is to be plotted.
Most likely the egg-bot extension is written to intelligently convert the visible strokes to plot commands, else maybe a structure like in the attached file is helpful (done with subtracting (Path > Difference) mostly, copying a shape on top of another and using the copy for the difference with the lower path).
[Edit]oops - I forgot to subtract the fill for the eye from the shape below... file updated[/edit]
- Attachments
-
- Christmas_turtle_for_egg-separated-2.svg
- (67.52 KiB) Downloaded 321 times