It is currently 17 Dec 2017, 23:03

GIMP Python Fu ScriptsSelect Area Between Paths Script for GIMP (for Mahvin) (Showcase | Slideshow)

Share your Python Fu scripts for GIMP here
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/11
Posts: 2000
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,288.73 GLP
Bank: 41,331.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1006
x 217
Contact:
Canada

Select Area Between Paths Script for GIMP (for Mahvin)

Post#1 by tim » 05 Nov 2016, 14:46


Mahvin uses ofnuts Generate Intermediate paths to generate a shadow text effect.
But What I think is really wanted is the ability to select Area between the two paths, rather than having to interpolate all the paths in between. We just want to grab the areas, between the surfaces of pairs of points between begin path and end path.
So here's a script that does that. It takes a bit of time to run because it has to create surface paths, but hopefully, it is what Mahvin wants and he doesn't have to do clean up work because the surfaces area between the paths are already clean :D
:download:
Select_Area_Between_Paths.zip #
zipped .py file (unzip, put in your GIMP's /plug-ins/folder)
(1.46 KiB) Downloaded 68 times
Menu Location: Select -> Select Area Between Paths.

Instructions:
Have 2 identical paths (like same number of points/strokes there is no error checking), just different sizes like below
Select_Area_Between_Paths_01.jpg
Have 2 paths with same number of strokes/points of different sizes at different location
Select_Area_Between_Paths_01.jpg # (70.44 KiB) Viewed 721 times (Watermarked | Thumbnail)
Then run script, select begin path, and end path (being the two paths we created).
Select_Area_Between_Paths_02_generated.jpg
Scripts result path
Select_Area_Between_Paths_02_generated.jpg # (37.02 KiB) Viewed 721 times (Watermarked | Thumbnail)
Then with orignal paths and the new generated path you can cleanly create something like this
Select_Area_Between_Paths_03.jpg
Sample of what you can achieve with the created path and your original paths
Select_Area_Between_Paths_03.jpg # (53.92 KiB) Viewed 721 times (Watermarked | Thumbnail)
Alternately, more accurate than this script, you can use ofnuts' ofn-paths-envelope.zip
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
User avatar
mahvin
GIMP Blogger
View: Showcase | Slideshow
Topic Posts: 1/11
Posts: 16
Joined: 23 Oct 2016, 08:44
Cash on hand: 50.00 GLP
Location: Pacific NW
Website: http://www.mahvin.com/
x 1
Contact:
Gimp Nation

Post#2 by mahvin » 05 Nov 2016, 17:31


Awesome sauce! This is one nifty script! Thanks, Tin!


Image
0 x



"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes

User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/11
Posts: 2000
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,288.73 GLP
Bank: 41,331.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1006
x 217
Contact:
Canada

Post#3 by tim » 05 Nov 2016, 18:17


glad it fits your need.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Espermaschine
GIMP Blogger
View: Showcase | Slideshow
Topic Posts: 3/11
Posts: 9
Joined: 05 Nov 2016, 19:27
Cash on hand: 130.13 GLP
Gender: Guy
Location: Germany
Germany

Post#4 by Espermaschine » 05 Nov 2016, 19:30


Great plug-in !
In fact so great i had to register ! :)

Do you think you could write such an extension for Inkscape (in python) ?

I have made a few 3D logos in Inkscape and this plug-in would make everything so much easier.
0 x




User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/11
Posts: 2000
Joined: 25 Sep 2016, 17:16
Cash on hand: 6,288.73 GLP
Bank: 41,331.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1006
x 217
Contact:
Canada

Post#5 by tim » 05 Nov 2016, 19:35


Glad you like the plug-in
Sorry i don't work with inkscape, i don't even have it installed.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
Rod
Forum Member
View: Showcase | Slideshow
Topic Posts: 1/11
Posts: 11
Joined: 18 Oct 2016, 03:42
Cash on hand: 12.34 GLP
Gender: Guy
x 1
United States of America

Post#6 by Rod » 05 Nov 2016, 19:41


Nice one Tran! :D
I selected from path and filled whole selection so i do not know where the jaggies are coming from.
Image
0 x



Image

User avatar
Espermaschine
GIMP Blogger
View: Showcase | Slideshow
Topic Posts: 3/11
Posts: 9
Joined: 05 Nov 2016, 19:27
Cash on hand: 130.13 GLP
Gender: Guy
Location: Germany
Germany

Post#7 by Espermaschine » 05 Nov 2016, 19:48


Rod wrote:I selected from path and filled whole selection so i do not know where the jaggies are coming from.
I noticed jaggy edges as well. As a workaround i stroke the path with a 1px line, only to see that there were tiny gaps between the stroke and the fill.
0 x




Post Reply

Last 20 Members Who Visited This Topic

User avatar tim (7)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Ella
2: gnerd
3: tim
4: oldmangrumpy
5: Issabella
6: oldmangrumpy
7: Pat625

Who is online

Users browsing this forum: No registered users and 3 guests