Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Path To Selection
#1
Question 
Hello,

1- Initially I trace some strokes on separate layers.
2- Then I merge these paths in a single layer, but the result that is obtained from the selection of this path does not match the created paths.
3- I would like to be able to get a selection close to what you can see in the illustration below this image (3):

[Image: PSfpfIh.jpg]

Is there any way to achieve this with Gimp?  Huh

I've tried the Join Strokes plugin but no success.

Thx!
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply
#2
One way you could do it:

1. Make a continuous path of the outline, so the ends of the sidelines are connected to the adjacent end of the top or bottom lines.

2. Make a layer filled with black. Select the path and fill with white. (If the path corners weren't connected you may not get the right selection).

3. Make the lines as a second path.

4. Stroke the lines path in black, I used line width 2.

5. If you want the final selection, copy the black and white result into a channel or a layer mask.  Make a selection from that channel or layer mask.


Attached Files Thumbnail(s)
   
Reply
#3
Quote:I've tried the Join Strokes plugin but no success.

You can not have a "T" junction in a path.

My suggestions: Using Ofnuts path-inbetweener and bend-path

(1) A rectangular path, duplicated and spaced to a start and end
(2) Choose a number of steps for the spacing and apply
(3) Use the generated path and a curved paths envelope with bend-path
(4) Gives a set of discrete rectangles for a selection (or a fill)

   

Too many screenshots so all in one. https://i.imgur.com/BS8yr5x.jpg

or The replicate-path-along-path plugin This does distort but might be useful.   https://i.imgur.com/SQBfSCL.jpg
Make a larger than required, and discard the ends
Reply
#4
The selection is done "per stroke", and if the stroke is open it is automatically closed with a straight line from begin to end.
Reply
#5
Lady and Gentlemen,

The techniques presented here are very interesting and instructive.
Both teapote and rich2005's methods (path-inbetweener and bend-path + replicate-path-along-path) gave me more flexibility to deal with this situation.

I always struggled when I needed to produce this type of selection after having the paths created.

My approach was using the Path rungs plugin and in some cases I do:
- Stroke Path (Paint along the path);
- Apha for selection (selecting the created lines);
- Select to path.

This gives "something" close to what I wanted to select. But it doesn't always give something acceptable.


(08-07-2022, 07:59 AM)rich2005 Wrote:
Quote:I've tried the Join Strokes plugin but no success.

You can not have a "T" junction in a path.

(08-07-2022, 07:59 AM)Ofnuts Wrote: The selection is done "per stroke", and if the stroke is open it is automatically closed with a straight line from begin to end.

I thought that creating anchors on the winding path and joining each of them with the anchors of the vertical strokes - at their intersections ("T" junction - as said by rich2005) would produce the desired selection...  Rolleyes

Thank you all for the great help!
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply


Forum Jump: