Creating filled regions

From Evil Mad Scientist Wiki
Revision as of 15:49, 5 October 2010 by Windell (talk | contribs)
Jump to: navigation, search

NOTE: this page is only partially uploaded. Additional content will be added here October 5-7.


The Big Picture

In Inkscape, it's easy to color in any path region (say, a circle) with the paint-bucket tool (or solid fill in the Fill and Stroke pane). However, it isn't actually that easy for the Eggbot to draw a filled region. The reason is simple: Egg-Bot is a vector printer that draws paths, not a raster printer that draws dots. If you ask it to draw a circle, the pen tip actually moves in a circular path on the surface of the object that you're drawing on. This is like an old pen plotter; it's very different from an inkjet or laser printer, where the entire surface is scanned back and forth.

So, what happens if you ask your Eggbot to draw a filled regions? The Eggbot will simply draw the paths that make up the object, like it always does. The "fill" attributes will be ignored. The net result might be something like this:

fill1.png

Starting with the filled shapes on the left, the Eggbot will actually just plot their outlines, shown on the right.


So, what can you do it you actually want to fill a region with the pen? Clearly, you need to construct some path that the pen can follow through the entire filled region. There are many possible approaches to this problem-- brute force rastering, adaptive filling algorithms, cross-hatching, and on and on. In what follows, we'll show a few different ways to create such pen paths, what you might call "toolpaths" in machining terms. There are a number of different approaches that work best in different circumstances.

One final word before we get started: Plots where you fill solid regions can potentially take a long time with all that back-and-forth business. Where possible, design around having to fill regions.


Hatch Method

This method is described in detail in our smiley face tutorial.

In short:

  • Select a single path
  • Open the live path effect editor: Path>Path Effect Editor
  • Apply new effect: Hatches (rough) and click "+Add"
  • Use the extension to set defaults: Extensions>Eggbot>Preset hatch for fills
  • Use the "edit paths by node" tool to set the angle, spacing, and bending of the lines.

You may also need to use the Fill & Stroke panel to set the stroke to be a visible pen and the fill to "none."


This "Hatch" method can handle paths that consist of multiple disjoint regions, for example, a set of stars or non-intersecting circles, but it does not work with "hollow" regions, for example a ring or washer (2D torus) shape.

fill2.png


While it is slightly complicated and does not work in every situation, it's usually the best method in any situation where it can be used. It produces excellent results that plot very smoothly and efficiently, with preset deceleration at each switchback and an absolute bare minimum of pen lifts.


Inset Method

Path > Inset


Interpolation and stitch methods

Interpolation

Generate from path> Interpolate

http://inkscape.org/doc/interpolate/tutorial-interpolate.en.html


Stitch Paths

Combine paths Live path effects> Stitch sub-paths


Combining Interpolation and Stitch Paths