path edit - can it be done?

Post questions on how to use or achieve an effect in Inkscape.
kjw
Posts: 47
Joined: Wed Oct 14, 2009 10:09 am

path edit - can it be done?

Postby kjw » Fri Feb 05, 2010 10:45 am

I want to join the red line in the first image to the purple line to form a closed path **without** having to break the purple line's path.
Image

I have combined the paths (Ctrl+k), but, of course, the paths were still open.

Using the unite command gave me:
Image
and the exclusion command gave me:
Image

Next, I tried adding one node on each end of the purple line, exactly where the red line's nodes are placed (the green boxes in the first image), and tried to join them. Because the new nodes on the purple line aren't endnodes, it didn't work. I looked through the forum and the help guide and didn't find anything that will let you join NON-endnodes.

The only thing I can think of, but don't really like, is to break the purple path at the additional nodes, join the newly formed endnodes to the red line's endnodes, then select the new shape and the 2 "orphaned" lined and combine with Ctrl+k.
Image Image

Any other suggestions?

KJW

User avatar
syllie
Posts: 48
Joined: Fri Jan 15, 2010 3:51 pm
Location: Sydney, Australia
Contact:

Re: path edit - can it be done?

Postby syllie » Fri Feb 05, 2010 10:55 am

You cannot have branched paths.
Your last solution is probably the best, but I would approach it a bit different:

To make the shape a full vector shape it would be better to have it continue to the end point of your curl.
You could break as you show in the last pictures, then use Path > Stroke to path, Combine and join the end nodes.

Cheers,
Syllie
Life is the art of drawing without an eraser. (John W. Gardner)

http://verysimpledesigns.com - graphics resources
http://syllie.com - personal website

User avatar
c-quel
Posts: 68
Joined: Thu Dec 31, 2009 2:13 am
Contact:

Re: path edit - can it be done?

Postby c-quel » Fri Feb 05, 2010 11:26 am

*flop* >v<

Darn, so in the end, the question you had was really more along the lines of "Can my web browser make me a cup of coffee?". ^___________^;

Fortunately, the answer to both questions CAN be in the affirmative as long as you approach them differently. [in the coffee example, you can certainly ORDER coffee through your web browser and have it delivered to you] . :P

Converting the Strokes to Paths as Syllie mentioned is such an example, if you don't mind these lines being a little tricky to edit after the fact.
I would also offer retracing your shape as one single path, but this time overlapping as many strokes as you need to simulate this unusual appearance.

Attached I have an SVG that redraws your shape in two possible ways.

    CLOSED PATH: In the event you need a closed path, you would have to overlap your strokes in order to simulate your purple line. This is normally a piece of cake with straight lines, but any time bezier curves are required this process can be a touch complicated. Fortunately, the grid can help to position your bezier handles at specific points so the two overlapping nodes are identical -- however, this can be time consuming.

    OPEN PATH: But if you don't mind open-ended paths, you can also simply draw the "purple line" section as a single stroke, then continue on with the red line section up until your line meets up again at the border. There, you simply add one node on top of the first node bordering the "red" and "purple" section, and end your shape there. You get the same effect with less work, but the only disadvantage is that because this is an open path, any fill you add won't stay in the red section like in the Closed Path method. :)

Well, see if it helps. Sorry we couldn't give you what you wanted. ^^
Attachments
finalpiece.svg
My proposal. ^^
(4.95 KiB) Downloaded 216 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: path edit - can it be done?

Postby brynn » Fri Feb 05, 2010 4:13 pm

Yes, I also agree that Stroke to Path IS an adequate solution, but only IF that is the final step in working with that part of your drawing. Because after you do stroke to path, you can no longer edit the stroke easily. Things become way more complicated if you ever need to tweak it later.

I think c-quel's 2nd example is probably the best way to go. Although looking at your original sample images, I think you might want to do this:

Join the very bottom node of the red line in your very 1st image, to the bottom node of the purple line (just select them and click Join selected endnodes). You could then align the node at the other end of the red line to fall directly on top of the purple line, using Snap. It would technically still be an open path, but it would be "closed enough" to fill that void with color, if that's what you want to do.

(This is not much different than c-quel's idea. But c-quel's suggestion breaks the purple line, and it sounded to me like you wanted to avoid that.)

Just yet another idea :D

kjw
Posts: 47
Joined: Wed Oct 14, 2009 10:09 am

Re: path edit - can it be done?

Postby kjw » Sat Feb 06, 2010 5:43 am

Thanks so much for the options! I appreciate your help with this stuff so much!!! I'm going to have a lot similar shapes in my next few projects so I'm going to play around with your options to see which works best.

...the question you had was really more along the lines of "Can my web browser make me a cup of coffee?". ^___________^; Fortunately, the answer to both questions CAN be in the affirmative as long as you approach them differently. [in the coffee example, you can certainly ORDER coffee through your web browser and have it delivered to you] .by c-quel


I'll be laughing over that one for a while! Talk about thinking out of the box! :lol: :lol: :lol:

Have a great weekend!!!

KJW

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: path edit - can it be done?

Postby RobA » Sat Feb 06, 2010 4:29 pm

c-quel wrote:CLOSED PATH: In the event you need a closed path, you would have to overlap your strokes in order to simulate your purple line. This is normally a piece of cake with straight lines, but any time bezier curves are required this process can be a touch complicated. Fortunately, the grid can help to position your bezier handles at specific points so the two overlapping nodes are identical -- however, this can be time consuming.


There is an easier way to do this.

Draw the first curve. Duplicate the curve. Reverse the direction (Path->Reverse). Now use the node editor and click on the curve where you want the fork, inserting a corner node. Now move/edit the other nodes to create the opening. Select both paths and combine. Set the fill.

(The secret is using the path reverse to create the curved "backtrack" path)

-Rob A>


Return to “Help with using Inkscape”