[workaround] How to fill an open shape?

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

[workaround] How to fill an open shape?

Postby Grobe » Wed Apr 06, 2011 2:39 am

Hi.

I start drawing a regular beizer curve and give it stroke width 15 (just as an example). Then I do a "Stroke to path" and set new stroke width to 1.
Then I set yellow fill and set Stroke paint to "Flat color". It looks nice.

But now to the hard part. The ends of the new path also have same stroke as the rest of the object.
Is it possible to remove both end segments and still have background color intact?

Any workaround that can have this effect?

Sample file:
yellowPath.svg
Sample file, must see to understand
(23.09 KiB) Downloaded 183 times
Last edited by Grobe on Wed Apr 06, 2011 5:18 am, edited 1 time in total.
:lol:

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

Re: How to fill an open shape?

Postby RobA » Wed Apr 06, 2011 5:01 am

Just set that object to no stroke, duplicate it and set the duplicate to 1 px stroke and use the node editor to open up those two endcaps ("delete Segment between two non-endpoint nodes")

(Attached)

-Rob A>
Attachments
tellowPath2.svg
(24.38 KiB) Downloaded 173 times

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

workaround provided

Postby Grobe » Wed Apr 06, 2011 5:17 am

RobA wrote:Just set that object to no stroke, duplicate it and set the duplicate to 1 px stroke and use the node editor to open up those two endcaps ("delete Segment between two non-endpoint nodes")

(Attached)

-Rob A>
Hi. That works on a static figure. However, If I want to move it or bend it, I have to repeat the procedure again. But yes, it's a working workaround. Can't imagine I didn't thaught of that myself :oops:
Thanks RobA :D

There should be some extension that could automate this.

Or possible to alter any segments color, thickness or opacity independent of the rest of the figure. That would be nice :mrgreen:
:lol:

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

Re: workaround provided

Postby RobA » Wed Apr 06, 2011 10:12 am

Grobe wrote:
RobA wrote:Or possible to alter any segments color, thickness or opacity independent of the rest of the figure. That would be nice :mrgreen:


AFAIK, that's not supported by the SVG specification, which is what Inkscape is forced to work with.

You can get very similar by using clones (example attached). You just need to remember to select the one on top then use Shift-D to get the original before moving/transforming or adjusting nodes.

(That is how I do my roads)

-Rob A>
Attachments
road.svg
(2.25 KiB) Downloaded 173 times

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: [workaround] How to fill an open shape?

Postby druban » Wed Apr 06, 2011 3:02 pm

These effects are sometimes easier to achieve using the pattern along path extension.

bitmap.png
bitmap.png (19.25 KiB) Viewed 2337 times


If you use the path effect pattern along path you have to use two paths to get the same effect but they remain editable, especially if you link them (but that gets complicated). The node tool lets you move nodes of all selected paths together and that's a quicker solution, perhaps.

g4073.png
g4073.png (25.73 KiB) Viewed 2336 times
Your mind is what you think it is.

User avatar
GAngus
Posts: 83
Joined: Tue Oct 13, 2009 8:41 am
Location: NY

Re: [workaround] How to fill an open shape?

Postby GAngus » Wed Apr 06, 2011 9:13 pm

yellowPath4.svg
Hmmm..
Using the method by Rob A I can't seem to get the same result..
What did I miss ?

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: [workaround] How to fill an open shape?

Postby Grobe » Thu Apr 07, 2011 3:20 am

GAngus wrote:
yellowPath4.svg
Hmmm..
Using the method by Rob A I can't seem to get the same result..
What did I miss ?
Agreed. I gan't get it to work.
Need properly instructions to get it.
:lol:

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

Re: [workaround] How to fill an open shape?

Postby RobA » Thu Apr 07, 2011 6:00 am

Draw a path, set fill n NONE and stroke to Unset. (attributes bust be unset to change them in clones)
Create a clone, set its stroke to the outline, i.e. 12px, black.
Select the original (Shift-D).
Create a second clone, set its stroke to 10px, yellow.

You will have a 10px yello stroke with a 1 px line on each side.

To modify, ensure the original is selected then move the nodes, or use the line/pencil tools to extend the path.

Look at the more complicated rope-3D.svg example provided with inkscape.

-Rob A>

User avatar
GAngus
Posts: 83
Joined: Tue Oct 13, 2009 8:41 am
Location: NY

Re: [workaround] How to fill an open shape?

Postby GAngus » Thu Apr 07, 2011 10:09 am

Thanks Rob..... reviewing rope-3D was quite helpful...

The pattern along path method has become more inviting....
for this sort of thing.


Return to “Help with using Inkscape”