Separating a self-intersecting curve
Is there a way to take a self-intersecting path or set of paths and dice them up into regions that can be filled? For instance if you draw a sketchy grid, with a set of wavy vertical and wavy horizontal lines, and you want to fill in the squares between the lines with different colors. If not, it seems like this could be a nice script to have.
--bb
Bill Baxter wrote:
Is there a way to take a self-intersecting path or set of paths and dice them up into regions that can be filled? For instance if you draw a sketchy grid, with a set of wavy vertical and wavy horizontal lines, and you want to fill in the squares between the lines with different colors.
Yes there is. Select all of the paths that make up the areas you would like to fill and Union them (Path -> Union works with a single selected path in 0.45 and beyond. Users of prior versions may need to add a helper path to union with.) After Union "uncrosses" the paths Break Apart and fill.
Aaron Spike
On 4/3/07, Aaron Spike <aaron@...476...> wrote:
Bill Baxter wrote:
Is there a way to take a self-intersecting path or set of paths and dice them up into regions that can be filled? For instance if you draw a sketchy grid, with a set of wavy vertical and wavy horizontal lines, and you want to fill in the squares between the lines with different colors.
Yes there is. Select all of the paths that make up the areas you would like to fill and Union them (Path -> Union works with a single selected path in 0.45 and beyond. Users of prior versions may need to add a helper path to union with.) After Union "uncrosses" the paths Break Apart and fill.
Aaron Spike
I don't think the Union command does what Bill is asking. I tried drawing a grid of several wavy lines and I can't seem to get the (wavy) squares they form to be separated objects for filling purposes.
Maybe using a solid filled object underneath the lines and the Path->Division command might be able to generate the squares you're looking for.
On 4/3/07, Richard Querin <rfquerin@...155...> wrote:
Maybe using a solid filled object underneath the lines and the Path->Division command might be able to generate the squares you're looking for.
Actually, the following just worked for me:
1. create a solid rectangle 2. make it a path 3. create a grid of wavy lines 4. combine the wavy lines into a single path object (Path->Combine) 5. place the wavy grid object over (as in above, not underneath) the solid object 6. make sure both objects are selected 7. Path->Division
This cuts the solid object up into separate closed and filled objects matching the interiors of the wavy grid squares. You could then change each piece to be whatever fill and stroke you want.
Thanks for the replies. The Union trick does seem to handle it nicely if you have a single self-intersecting curve. I never would have suspected that Union on a single path would be anything other than a no-op, but cool that it works. :)
For the wavy lines grid, the division applied to a solid block sounds like it will do the trick. Both seem like good tricks to know. Thanks.
--bb
On 4/4/07, Richard Querin <rfquerin@...155...> wrote:
On 4/3/07, Aaron Spike <aaron@...476...> wrote:
Bill Baxter wrote:
Is there a way to take a self-intersecting path or set of paths and dice them up into regions that can be filled? For instance if you draw a sketchy grid, with a set of wavy vertical and wavy horizontal lines, and you want to fill in the squares between the lines with different colors.
Yes there is. Select all of the paths that make up the areas you would like to fill and Union them (Path -> Union works with a single selected path in 0.45 and beyond. Users of prior versions may need to add a helper path to union with.) After Union "uncrosses" the paths Break Apart and fill.
Aaron Spike
I don't think the Union command does what Bill is asking. I tried drawing a grid of several wavy lines and I can't seem to get the (wavy) squares they form to be separated objects for filling purposes.
Maybe using a solid filled object underneath the lines and the Path->Division command might be able to generate the squares you're looking for.
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=D... _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
participants (3)
-
Aaron Spike
-
Bill Baxter
-
Richard Querin