Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
I'm considering repackaging together a bunch of small scripts that perform rather simple operations on paths: delete strokes, decompose the path, splice strokes, etc... to make a simple path edition toolbox.
The goal is to include simple editing steps
- that don't require dialog input
- that perform tasks that are either impossible to do by hand and that can do them significantly faster (cut-off point would be 3-4 clicks without a script)
Candidates so far:
- delete strokes: delete strokes with an end in the selection.
- extract strokes: keep strokes with an end in the selection.
- reverse strokes: swap stroke end to end (no visible result but often useful).
- splice strokes: connect together strokes with end points sufficiently close.
- cut strokes: cut strokes on the anchor point in selection (this is the opposite of the "splice" above, a stroke with thee anchors will produce two strokes of two anchors, where two anchors will coincide)
- intersect strokes: cut and splice two strokes where they intersect. The $64K question is to have a good criterion to determine which of the 4 angles to keep.
- decompose strokes: decomposes a path into its individual strokes. Unlike the rest this one would create additional paths.
- summary: show a summary of the path information (to check that what you got is actually what you see).
A question is whether a new path is generated each time or if the user will duplicate paths explicitly when needed.
Comments? Suggestions? Additions?
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
(11-07-2016, 10:35 PM)Ofnuts Wrote: A question is whether a new path is generated each time or if the user will duplicate paths explicitly when needed.
The more I look into it, the more I think that editing the same path is the way to go.
Posts: 939
Threads: 93
Joined: Oct 2016
Reputation:
36
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
11-11-2016, 12:53 AM
(This post was last modified: 11-11-2016, 12:56 AM by Espermaschine.)
I dont understand about 80% of your list and the terms you use.
So strokes are paths ?
In Gimp-terms, i stroke a path or selection, so the term 'stroke' confuses me.
One of the big problems with all kinds of plug-ins and filters is that i tend to forget what they do and in consequence dont use them.
Often that is because of the way the plug-ins are named. Maybe simplifying the names is a good idea ?
If i have a look at my options in the paths tab, i see:
1) 'Decompose' - not a very intuitive name, 'Break apart' would be better, imo. Also because thats what its called in Inkscape.
2) 'Generate envelope of two paths' - also very technical name. Basically its a tool for making the in between of an extrusion, right ?
3) 'Generate intermediate paths' - i guess, without trying, thats an Interpolation ? Seems like a good name. Interpolation is too technical.
4) 'Mirror path'. Self explanatory, i guess
5) 'Reverse Stroke'. I know what it does, but you have to understand paths to know what its used for. Maybe 'Change Path Direction' would be more intuitive ?
6) 'Text along path'. Good as it is !
7) 'Unclose'. No idea...
Also, quite often its very hard to find the relevant plug-in in the menu.
A lot of your tools are in the paths tab. On the other hand the 'path-grid' plug-in is under Render - Pattern, which makes sense when you know its there, but i wouldnt expect to find it there.
'Stroke or fill visible paths' is under Image. I wouldnt expect it there. Instead i would expect it in the paths menu, because thats where i stroke a path.
Etc.
If you want more suggestions tell me.
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
"Stroke" as a verb is just drawing the thing. "Stroke" as a word is path element, it is an individual line. Strokes are either open (visible distinct ends) or closed (no visible ends, even though technically they are there...). For instance the path for the letter "0" is made of two closed strokes, one for the outline and one for the inner loop. "A" is two strokes, "B" is usually 3 strokes, and "C" is only one. "i" is two, one for the body and one for the dot. Strokes in fonts are always closed.
1) OK
2) The extrusion is one possible use..
5) That would be "Change stroke direction" because it only change strokes
7) Makes closed strokes open ones
Path-grid is in "Render" because it doesn't transform an existing path.
'Stroke or fill visible paths' will be brought back in the <Path> list on its next iteration.
Posts: 939
Threads: 93
Joined: Oct 2016
Reputation:
36
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
11-11-2016, 01:37 AM
(This post was last modified: 11-11-2016, 01:39 AM by Espermaschine.)
I think you have to see this from a casual users point of view.
You are obviously above average intelligence and a coder.
But if you think of Gimp as a "product", you have to make it easily understandable, imo.
I mean you helped a legion of noobs with their first steps on the former forum. You know what im talking about.
So yeah, its true that making 3D text with generate path envelope is only one possible use, but also maybe the most intuitive ?
And once you have done that a few times, you'll know what else could be done with that tool ?
Posts: 7,135
Threads: 155
Joined: Oct 2016
Reputation:
1,005
Operating system(s):
Gimp version: 2.10
11-11-2016, 09:42 AM
(This post was last modified: 11-11-2016, 10:03 AM by rich2005.)
Quote:I'm considering repackaging together a bunch of small scripts that perform rather simple operations on paths...snip... Candidates so far:
delete strokes: delete strokes with an end in the selection.
extract strokes: keep strokes with an end in the selection
reverse strokes: swap stroke end to end (no visible result but often useful).
Use of a selection is a good idea, much used in CAD graphic applications, a 'free' selection as well as a 'box' selection would be good.
edit: although, is a 'free' just a bounding box anyway?
Quote:splice strokes: connect together strokes with end points sufficiently close.
cut strokes: cut strokes on the anchor point in selection (this is the opposite of the "splice" above, a stroke with thee anchors will produce two strokes of two anchors, where two anchors will coincide)
intersect strokes: cut and splice two strokes where they intersect. The $64K question is to have a good criterion to determine which of the 4 angles to keep.
Could a 'free' selection be applied to that last one to determine the remainder.
Quote:decompose strokes: decomposes a path into its individual strokes. Unlike the rest this one would create additional paths.
summary: show a summary of the path information (to check that what you got is actually what you
decompose always useful.
Additions,
While there is already a (compiled) plugin for smoothing paths, maybe a no-dialogue python addition. Say, with angle 60 => angle <= 180
Menus:
I know you use context menus a lot and probably have the paths dock open all the time but in my experience an average user turns to the menu system first. Maybe an option for either included?
No saving in clicks between (unless you need to select a path), assuming choice by selection is used.
Tools -> ofnuts menu -> select option
and
Switch from layers to paths -> right click -> select ofnuts tools -> select option -> back to layers dock
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
Making tools for somewhat advanced users isn't incompatible with helping noobs that drop by
As to your last question, I design my scripts to be part of a process, not to be the full process. I just love it when people find uses for my scripts that I never envisioned.
Posts: 939
Threads: 93
Joined: Oct 2016
Reputation:
36
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
This is your work, you decide how you want to handle it.
Im just giving you my perspective how i think usability could be improved.
Guess i know you well enough from reading your posts, that some of my suggestions are not compatible with your way of approaching things
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
11-11-2016, 01:18 PM
(This post was last modified: 11-11-2016, 01:19 PM by Ofnuts.)
(11-11-2016, 09:42 AM)rich2005 Wrote: Use of a selection is a good idea, much used in CAD graphic applications, a 'free' selection as well as a 'box' selection would be good.
edit: although, is a 'free' just a bounding box anyway?
The selection is whatever the Gimp selection is (rectangle, ellipse, freehand, from alpha...)
(11-11-2016, 09:42 AM)rich2005 Wrote: Could a 'free' selection be applied to that last one to determine the remainder.
How would you apply a selection to an angle?
A possible way is to cut-off the shortest ends, so that people would approximate the cut, and the script would finish it off
(11-11-2016, 09:42 AM)rich2005 Wrote: Additions,
While there is already a (compiled) plugin for smoothing paths, maybe a no-dialogue python addition. Say, with angle 60 => angle <= 180
Yes, it is a very useful plugin... not too trivial to rewrite (the algorithm is quite efficient and would run quickly in Python) and I wonder if I should add that dependency...
(11-11-2016, 09:42 AM)rich2005 Wrote: Menus:
I know you use context menus a lot and probably have the paths dock open all the time but in my experience an average user turns to the menu system first. Maybe an option for either included?
No saving in clicks between (unless you need to select a path), assuming choice by selection is used.
Tools -> ofnuts menu -> select option
and
Switch from layers to paths -> right click -> select ofnuts tools -> select option -> back to layers dock
When I edit paths I do have the path dock open because I will generally work on several paths. And when you create a path, it is made invisible when you exit the Path editor, while my tools are best used while viewing the paths, so you still have to open the paths list to make the path visible.
Otherwise adding these elsewhere in the menu structure is doable but the way the registration works I would need to duplicate entries to keep them in the paths list. Unless I use a .ini file so that users can choose their location.
Posts: 7,135
Threads: 155
Joined: Oct 2016
Reputation:
1,005
Operating system(s):
Gimp version: 2.10
Quote:How would you apply a selection to an angle?
Two legs + the included angle
|