Forum Index > Projects > Egg-Bot
 Hollow Fill Frustration/Documentation Requests
 |  Printable Version
By: linuxwrangler (offline) on Sunday, January 02 2011 @ 12:52 PM PST (Read 7613 times)  
linuxwrangler

While I've been having fun with the new toy, I will admit to becoming very frustrated trying to deal with hollow geometry fills. I've had some successes but every one has only come after many attempts and I have yet to determine a repeatable successful method. I have a couple comments and questions.

First the comments (Yes, I know it's a wiki and I can edit things myself but if I felt qualified, I wouldn't be asking for help here. Also, the new-user processes aren't integrated for the forum and wiki and in my current frustrated state, I don't have the energy to create yet another login):

The sample diagrams on the http://wiki.evilmadscience.com/Creating_filled_regions page are confusing to view. I recommend reorienting them into rows and columns - i.e. in the various examples that have the squares/stars, put all like-colored examples into columns and the various methods into rows so my eye can scan down a column of methods for the same shape rather than jumping around.

It would also be helpful for me to have some example tutorials that start with a blank page and cover the exact steps to create some sample hollow fills: select rectangle tool, draw rectangle, select star tool, draw star inside rectangle, ????. It is unclear if we are starting with separate objects or combined paths and whether I need to do several sequential operations in a specific order or if there were several equally appropriate single operations that would work.

In my case I tried using the "obvious" method whereby "You can do this by drawing a rectangle that covers half of the object, and alternately subtracting it from or intersecting it with the initial shape." I found a "difference" option under path which I assume is somehow used for "subtracting" but it is unclear what is being subtracted from what and if order of object selection or object layer is important. In either case, neither the path -> difference nor the path -> intersection tool yield useful results - all that happens is that part of the picture disappears. I tried combining the inner and outer paths, intersecting with just the inner and just the outer path. No joy. It's clear that there is some missing mystery step or assumption.

I've also noticed that applying the hatch-fill removes the stroke from the filled object. Do people usually duplicate then fill the object to preserve the stroke?


Egg-Bot driven by Ubuntu 10.10/InkScape 0.48


Forum Henchperson
Henchperson


Status: offline

Registered: 12/27/10
Posts: 20

Profile Email    
   
By: dnewman (offline) on Sunday, January 02 2011 @ 01:10 PM PST  
dnewman

Have you tried using the new hatch fill extension which ships with the v2.1 Eggbot software kit? It's under Extensions > EggBot Contributed > Hatch fill. I'm assuming that you haven't, especially since it wouldn't remove any strokes from the object being filled.

This new, contributed (i.e., not yet supported) extension is documented at

http://wiki.evilmadscience.com/Hatch_fill

It may or may not do what you want. It all depends upon what sorts of expectations you have. It fills using an odd/even intersection rule. For some tasks, you may need to work on subsets of your drawing.

Regards,
Dan


Cow Canyon Saddle Clear Sky Chart


Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 09/08/10
Posts: 149
Mt. Baldy,
California

Profile Email    
   
By: linuxwrangler (offline) on Sunday, January 02 2011 @ 01:21 PM PST  
linuxwrangler

I hadn't because it does lots of little segments instead of a continuous line. I just tried it. It is easier but leaves the edges more jagged and does lots more pen dropping.


Egg-Bot driven by Ubuntu 10.10/InkScape 0.48


Forum Henchperson
Henchperson

Status: offline

Registered: 12/27/10
Posts: 20

Profile Email    
   
By: dnewman (offline) on Sunday, January 02 2011 @ 04:55 PM PST  
dnewman

Yes, that extension is not very forgiving of slight plotting precision issues and hence the jagged edges. It groups the hatches with the object itself so as to reduce issues with plotting precision (on the theory that between drawing the object and then immediately the hatches, not too much alignment error should creep in). But, for large objects or fast plotting speeds, you can still experience issues: issues which "Hatches (rough)" is much more forgiving of.

Dan


Cow Canyon Saddle Clear Sky Chart


Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 09/08/10
Posts: 149
Mt. Baldy,
California

Profile Email    
   
By: Windell (offline) on Sunday, January 02 2011 @ 06:28 PM PST  
Windell

While I've been having fun with the new toy, I will admit to becoming very frustrated trying to deal with hollow geometry fills.


As of last summer, when we were prepping the first kits for release, we had exactly zero methods of making filled regions that we could recommend. We eventually stumbled across the hatches (rough) fill method, which was great, except that it just doesn't work on hollow regions. We have since added on several other methods that we can recommend in different circumstances. The basic problem, of course, is that creating optimal toolpaths for an arbitrary region isn't trivial. Our fill methods are actually more reliable than those those provided by Gcodetools, which are in turn being used for actual machining.

If this is all too frustrating, I'd genuinely suggest that you either (1) use Dan's Hatch Fill extension (which does work with hollow regions) or (2) avoid trying to fill hollow regions. These tutorials are filed under "Advanced topics and tips" for a reason-- most of them require you to be up and running with Eggbot and Inkscape, and beyond that to have a some level of experience with them, or at least that you are willing and able to search the tutorials and other documentation to find the relevant background information.

The sample diagrams on the http://wiki.evilmadscience.com/Creating_filled_regions page are confusing to view. I recommend reorienting them into rows and columns - i.e. in the various examples that have the squares/stars, put all like-colored examples into columns and the various methods into rows so my eye can scan down a column of methods for the same shape rather than jumping around.


This isn't meant to be a visual reference guide to make artistic decisions from. It's meant to explain, in detail, how to execute the different methods that are available. Yes, we can take away the step-by-step instructions and put everything in a table, but I don't think that it improves the situation. It really sounds like you were frustrated that you couldn't understand our instructions without reading through them slowly and carefully.

It would also be helpful for me to have some example tutorials that start with a blank page and cover the exact steps to create some sample hollow fills: select rectangle tool, draw rectangle, select star tool, draw star inside rectangle, ????. It is unclear if we are starting with separate objects or combined paths and whether I need to do several sequential operations in a specific order or if there were several equally appropriate single operations that would work.


Our documentation strives to illustrate certain methods that are particular to the Eggbot; we are not trying to make a general-purpose "how to use Inkscape" guide-- there are *lots* of those already (books, even). Besides that, your complaint doesn't sound like an issue with our instructions, but rather just that you'd like to learn about basic constructive geometry operations in Inkscape.

In any case, it is (again) necessary to read carefully for our explanation of how the shapes were made-- and they are just as we described: "A star, a square, a square with a star punched out-- essentially a hollow, ring-shaped fill region -- and a smaller square with a star punched out (a set of multiple disjoint regions)." To make them we drew a star (with the "stars and polygons" tool) and a square (with the "rectangles and squares" tool). Then, we used the Path>Difference menu selection to take the difference, with either larger or smaller stars.

Frankly, if you have managed to create hollow regions that you want to fill, it is *usually* the case that you had already used Path>Difference to create those regions. Now, we are willing to provide some assistance with basics, as well as additional pointers to the relevant tutorials, but it would be very kind of you to ask for help about these kinds of basics in separate threads asking for help, rather than forming them as a complaint about our instructions.

In my case I tried using the "obvious" method whereby "You can do this by drawing a rectangle that covers half of the object, and alternately subtracting it from or intersecting it with the initial shape." I found a "difference" option under path which I assume is somehow used for "subtracting" but it is unclear what is being subtracted from what and if order of object selection or object layer is important. In either case, neither the path -> difference nor the path -> intersection tool yield useful results - all that happens is that part of the picture disappears. I tried combining the inner and outer paths, intersecting with just the inner and just the outer path. No joy. It's clear that there is some missing mystery step or assumption.



Again, it sounds like you may want to read up on constructive geometry in Inkscape. See here, for example: http://kalaalog.com/2007/11/01/inkscape-path-operations-basic-tutorial/

Once you've tried them once, you should be able to remember how the different path operations work by looking at the tiny icons in the Path menu, where the icon by "break apart" is the key-- the circle is the one on top.

Also, the "cut" method is not only better, but is also easier to implement than the "obvious" method-- I'd suggest that you start there instead.

I've also noticed that applying the hatch-fill removes the stroke from the filled object. Do people usually duplicate then fill the object to preserve the stroke?


I don't know what people "usually" do, but that is one of the things that we did suggest there. The version with combined inset and hatch often gives a very good looking result.







Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: linuxwrangler (offline) on Sunday, January 02 2011 @ 09:30 PM PST  
linuxwrangler

I'm sorry if I came across as complaining - I tried to preface my comments by saying I was enjoying the toy and was in a frustrated mood. I was hoping to both try to solve my problem and point out a couple areas of potential documentation improvement to help people like me. I suspect I'm not too unusual in not starting out as a graphic artist with extensive experience with Inkscape. In fact, I would hardly call myself an artist at all though I do occasionally grab Gimp/Inkscape/Scribus/etc. as required to solve specific needs.

As to my rows/columns comment, I wasn't expecting artistic advice, I was merely suggesting a different arrangement of the example graphics. For me, it would be more clear at a glance to see the graphics arranged to keep similar examples adjacent in some way. For example, under "Big Picture", one row labelled "Filled shapes as viewed in Inkscape" and one row labeled "Shapes as plotted by Egg-Bot" with the four example shapes shown left-to-right. Of course that was before I discovered that the examples are single graphics, not individual graphics in a table which makes altering it more of a chore. Similarly, rearranging into 3-rows and 4-columns would reduce the amount of eye-jumping required to look at similar examples. And I certainly wasn't suggesting removing the step-by-step instructions - if anything, I'd like the steps to be more explicit.

I was so eager to get the Egg-Bot on Christmas that I had been going through the tutorials well in advance. The Smiley Face tutorial is excellent. A similar one showing the steps for one or two hollow-fill examples would be greatly appreciated. I had not punched out any shapes since I started with some existing svg graphics that I was editing for plotting on the egg-bot and the shapes are far more complex than the square/star so perhaps I'm getting ahead of myself and need to start with a blank page and punch some shapes myself.

I also guess that I missed that this is an "advanced"topic since fills are covered in the smiley tutorial and so many of the other topics listed in that category seemed more in the "tips" category (pens, blowing eggs, etc.).

In any case, I stopped, had a beer, set-aside the more complex drawing and made a few successful basic filled designs. I'll get back to trying to figure out reliable hollow-fill methods later.


Egg-Bot driven by Ubuntu 10.10/InkScape 0.48


Forum Henchperson
Henchperson


Status: offline

Registered: 12/27/10
Posts: 20

Profile Email    
   
By: linuxwrangler (offline) on Sunday, January 02 2011 @ 09:38 PM PST  
linuxwrangler

OK, for whatever reason the file upload didn't work. The forum says things posted successfully but if I try to edit the post I get "File Upload Error: Specified upload directory, forum/media is not a valid directory". An issue for another day...


Egg-Bot driven by Ubuntu 10.10/InkScape 0.48


Forum Henchperson
Henchperson

Status: offline

Registered: 12/27/10
Posts: 20

Profile Email    
   
By: linuxwrangler (offline) on Tuesday, January 04 2011 @ 02:32 PM PST  
linuxwrangler

I went back and read the tutorial I had overlooked at http://kalaalog.com/2007/11/01/inkscape-path-operations-basic-tutorial/ which clarified my one question about object ordering then I started with a blank page instead of an existing drawing.

I started by what I presume are the correct steps for duplicating the punched out star example by:

  1. Creating a rectangle (filled only to show the punch-out later) with the rectangle tool
  2. Creating an overlapping star with the star tool (empty with black outline to show punch out)
  3. Selecting the star and moving it to the top with "raise selection to top" button
  4. Shift-clicking the rectangle so both objects are selected
  5. Selecting Path -> Difference to punch out the star
I now have a single object on my page - the rectangle with star-shape "punched out".

I have now also managed to split it in half so it can be hatch filled. The method I used was:

  1. Selected rectangle/star object and duplicated it with Ctrl-D
  2. Used rectangle tool to draw rectangle covering half the object
  3. Selected rectangle and raised it to the top
  4. Additionally selected a rectangle/square object via shift-click
  5. Selected Path->Difference to cut away half of the selected rectangle/star
  6. Selected the resulting "half-rectangle-star" and duplicated it
  7. Selected and raised a "half-rectangle-star" to the top then additionally selected the whole rectangle-star
  8. Selected Path->Difference to cut away the first half-rectangle-star from the whole-rectangle-star
This does leave me with two objects I can independently fill with the hatch-fill method or can optionally, as suggested, combine with the Path -> Combine tool and fill at one time.

However I have the nagging feeling that I am doing things the hard way. The guide on the wiki says "You can do this by drawing a rectangle that covers half of the object, and alternately subtracting it from or intersecting it with the initial shape" which I read to be a single-step process with a couple of alternative options: either subtraction or intersection. Duplication of the original or intermediate objects is not suggested. I'm either misreading things again or the method as described does not fully describe the process.

Can somebody sanity-check my steps and let me know if this is, indeed, the correct method or if I am overly complicating the process.


Egg-Bot driven by Ubuntu 10.10/InkScape 0.48


Forum Henchperson
Henchperson


Status: offline

Registered: 12/27/10
Posts: 20

Profile Email    
   
By: Windell (offline) on Tuesday, January 04 2011 @ 03:11 PM PST  
Windell

Quote by: linuxwrangler

I started by what I presume are the correct steps for duplicating the punched out star example by:

  1. Creating a rectangle (filled only to show the punch-out later) with the rectangle tool
  2. Creating an overlapping star with the star tool (empty with black outline to show punch out)
  3. Selecting the star and moving it to the top with "raise selection to top" button
  4. Shift-clicking the rectangle so both objects are selected
  5. Selecting Path -> Difference to punch out the star


Omit step 3; the star, if drawn second, is already on top. To select things faster, you can also use ctrl-A (if that's everything on the page) or drag a rectangle around both, using the Select tool (standard arrow cursor).

  1. Selected rectangle/star object and duplicated it with Ctrl-D
  2. Used rectangle tool to draw rectangle covering half the object
  3. Selected rectangle and raised it to the top
  4. Additionally selected a rectangle/square object via shift-click
  5. Selected Path->Difference to cut away half of the selected rectangle/star
  6. Selected the resulting "half-rectangle-star" and duplicated it
  7. Selected and raised a "half-rectangle-star" to the top then additionally selected the whole rectangle-star
  8. Selected Path->Difference to cut away the first half-rectangle-star from the whole-rectangle-star


Again, skip step 3 (and, I think, the raise-to-top operation in step 7). Also, suspect that you mean rectangle/star in step 4, not square.

But basically, yes, that's a fine method. I would describe this method as "You can do this by first duplicating the initial shape. Then, draw a rectangle that covers half of the object, and subtract it from the initial shape. Then duplicate the resulting shape and subtract it from the initial shape." I don't think that it is an easier method than the one that we suggested.


The guide on the wiki says "You can do this by drawing a rectangle that covers half of the object, and alternately subtracting it from or intersecting it with the initial shape" which I read to be a single-step process with a couple of alternative options: either subtraction or intersection.

This is not a single-step operation; it's two steps that you need to perform with the initial set of objects. Alternately in this case means alternating between them, i.e., one and then the other. We alternately subtract it (the rectangle) from the initial shape or intersect it (the rectangle) with the initial shape to produce the two halves.

In gory detail (that probably does not belong in that tutorial), that's:

  1. Use rectangle tool to draw rectangle covering half the object
  2. Drag a rectangle to select both objects (or Ctrl-A, if those are the only two objects)
  3. Edit>copy (Ctrl-C)
  4. Path>Difference (Ctrl-Shift- "-" )
  5. Edit>Paste in place (Ctrl-Alt-V)
  6. Path>Intersection (Ctrl-Shift-8, i.e., Ctrl-*)


This is perhaps overly complicated, which is one of the reasons that we recommend the "cut" method (that follows it) as better.

Duplication of the original or intermediate objects is not suggested. I'm either misreading things again or the method as described does not fully describe the process.

That one line was not intended to be a tutorial that fully describes using boolean operations. Just to show that splitting an object in half is one way to create hollow objects that can be filled in that particular way.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: linuxwrangler (offline) on Tuesday, January 04 2011 @ 03:39 PM PST  
linuxwrangler

Thank you for your (as always) prompt response - I'm feeling better that my basic method is correct

Quote by: Windell


Omit step 3; the star, if drawn second, is already on top. To select things faster, you can also use ctrl-A (if that's everything on the page) or drag a rectangle around both, using the Select tool (standard arrow cursor).

Thanks. I was actually familiar with both but wanted to explicitly indicate which object was on top.


Quote by: Windell

Again, skip step 3 (and, I think, the raise-to-top operation in step 7). Also, suspect that you mean rectangle/star in step 4, not square.

You are correct


Quote by: Windell

But basically, yes, that's a fine method. I would describe this method as "You can do this by first duplicating the initial shape. Then, draw a rectangle that covers half of the object, and subtract it from the initial shape. Then duplicate the resulting shape and subtract it from the initial shape." I don't think that it is an easier method than the one that we suggested.



I'll play with both - they each seem to get to the same endpoint and neither one seems significantly more difficult. I'm just happy that I understand the missing steps.


Quote by: Windell

In gory detail (that probably does not belong in that tutorial)...


From the new-user's perspective, I would have found the inclusion of those couple hundred characters extremely useful - if not here perhaps as an advanced continuation of the smiley-face tutorial. Bits are cheap.


I understand that there is no desire to rewrite the Inkscape documentation but fills and hollow-fills are pretty fundamental to drawings and require special handling due to the vector-drawing nature of the Egg-Bot (to the extent that there are special extensions included to assist with the process).

Quote by: Windell

This is perhaps overly complicated, which is one of the reasons that we recommend the "cut" method (that follows it) as better.



I've used that one, too, and prefer it but have encountered a couple cases where the cut-in-half may be better. But mostly I wanted to be sure I understood all the methods so I can more fully exploit the new toy. Gotta keep studying/practicing before my gross of ping-pong balls arrives. Smile


Egg-Bot driven by Ubuntu 10.10/InkScape 0.48


Forum Henchperson
Henchperson


Status: offline

Registered: 12/27/10
Posts: 20

Profile Email    
   



 All times are PDT. The time is now 09:18 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?