Re: eggbot & inkscape – how does one clip or mask?

Home Evil Mad Scientist Forums Egg-Bot eggbot & inkscape – how does one clip or mask? Re: eggbot & inkscape – how does one clip or mask?

#21222
Windell Oskay
Keymaster

Hi William, 

You’ve brought up a number of issues here, which I’ll try to address one by one.

First, as the Eggbot is fundamentally a pen plotter, it strives to accurately plot the paths in a drawing. It relies on humans to change the pens and figure out which layer should be drawn in which color. This can lead to some non-WYSIWYG behavior, in the sense that we don’t normally *use* white ink with the Eggbot, but it’s easy to draw white ink on the screen.

Clipping and masking in Inkscape– and as far as I understand in Illustrator and Corel Draw as well –does not modify the underlying vector drawing, but rather changes which part of the vector drawing is rendered to a bitmap display device: either your screen or an exported bitmap image.   That is to say, no vector drawing of the actual clipped shape is ever created, which is why there is no straightforward way for the Eggbot to draw that clipped shape.    
For reference, here are a couple of tutorials on clipping and masking in Inkscape and Illustrator:

http://inkscapetutorials.wordpress.com/2011/02/22/inkscape-faq-how-do-i-crop-in-inkscape/

Now, I understand that you see serious shortfalls in Inkscape, but so far as I can see, this is fundamentally correct behavior, and in fact the same behavior as you would see in Illustrator or Corel Draw.  It just turns out that this method isn’t really helpful for making Eggbot artwork.   In general, I personally prefer Inkscape, and have on more than one occasion transferred files so that I could edit them in Inkscape before returning them to Illustrator or Corel.  So, I suspect that this is mostly a matter of personal preference.
To actually create a vector shape that represents your “clipped” vector, there are a few different approaches, depending on what you want to do.  In Illustrator, there are the “pathfinder” operations.  In Inkscape, there are the “boolean” path operations that perform a similar set of actions. 
In any case, there are actually tools in Inkscape that can cut a complex open-ended path with another: the “Cut Path,” “Difference” and “Division” operations in the Path menu.   Here is an example of how to use it for the “traditional1” pattern.  This is actually a rather unusual example, because we’re trying to cut an open, arbitrary path (rather than a closed object– the more common case) with a second path.
Here’s the starting figure.
* Draw an oval that we will punch out.  
* Duplicate the oval (Edit>Duplicate) to make a second copy, because the oval will be consumed by the Cut Path operation.
* Click on the oval and lower it to the bottom of the drawing. (Object>Lower to bottom)
* Select the background path (that which you wish to cut) and the oval.  (Shift-click to select more than one item.)
* Perform the cut path operation:  Path menu> Cut Path
The Cut Path operation consumes the selected oval, and cuts the background path everywhere that it intersected the oval.  The oval still visible is the one that we created and placed there by using Duplicate and Lower to bottom.  
Select the path bits inside the green oval and delete them.  You can select more than one at a time (using Shift-click) to delete a bunch at once.
All of the inner bits have been removed.  
 
Select and delete the oval.   Done!
Also, here is an easier, but “less exact” method.  This method will result in tracing all of the background “propeller” pattern twice, *but* it will print surprisingly quickly because there are fewer pen lifts:
Begin with the same “traditional1” example pattern, and an oval on top that we wish to punch out.  
Optional step, for skinnier lines: Select the background “propeller” pattern, and change its line width to 0.001″
With the background pattern still selected, choose from the menu “Path>Stroke to path.”  This changes that object from being a single line (defined by its stroke only) to being a closed, filled path that is the width of the original line.  
Now that we have two filled objects to work with, we can use the more common boolean tools.  Select both the oval and the background pattern, and select from the Path menu> Difference.
And we’re done.