Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chopping a path
#12
Another chopping plugin inspired by denzjos. Download the .zip file (now version 0.3) from

http://kmarkku.arkku.net/Path_chop_files...aster.html

and unzip and place the file chop_path.py in your user's plugin folder and restart Gimp. Then you will find at

Tools > Chopping > ...

three plugins; in addition to the two old ones (with a little reformulated GUIs) there is one new: "Chop path by lengths."

The following picture shows what the new plugin "Chop path by lengths" does. On the top is a path; to have a clear picture, I chose a simple one with only one stroke and only two anchors. Below it you see the result when the plugin is applied with default inputs. Of the stroke there are chopped 4 pieces, each 100 pixels long; those new anchors are indeed end points of new strokes so that the path consists now of 5 strokes.

   


The bottom curve shows what happened when I changed in the GUI the "Action" to "Chop each stroke to equal pieces from start to end": the stroke was cut to 4 equal strokes.

That's that. I feel that the GUI should be self-explanatory enough.

Some notes:

Original anchors are preserved. So in general the pictures are not so clear as in my example, with all the original and the new anchors.

Optionally all pieces can be made to separate paths.

Since the user generally does not know which of the two ends of a stroke is the start, I put there an option to use all strokes reversed. For closed strokes the starting point is even more obscure and I have no good solution to how it should be handled. For the user this means that one anchor is silently chosen to be the starting point and there is no way to control which anchor. (One could try, prior to applying the plugin, to cut any closed stroke at some point to make it open. But do we have a tool for that?)

The lengths are measured along the strokes, following each bend. Here the plugin relies on the procedure pdb.gimp_vectors_stroke_get_point_at_dist().

If the plugin does not work as it should, please tell me.
Reply


Messages In This Thread
Chopping a path - by Ottia Tuota - 10-07-2021, 07:15 AM
RE: Chopping a path - by denzjos - 10-07-2021, 10:48 AM
RE: Chopping a path - by denzjos - 10-08-2021, 08:15 AM
RE: Chopping a path - by Ottia Tuota - 10-08-2021, 01:46 PM
RE: Chopping a path - by denzjos - 10-09-2021, 10:45 AM
RE: Chopping a path - by Ottia Tuota - 10-09-2021, 01:58 PM
RE: Chopping a path - by Ottia Tuota - 10-10-2021, 02:23 PM
RE: Chopping a path - by denzjos - 10-10-2021, 03:18 PM
RE: Chopping a path - by Ottia Tuota - 10-10-2021, 03:49 PM
RE: Chopping a path - by denzjos - 10-11-2021, 08:08 AM
RE: Chopping a path - by Krikor - 10-11-2021, 04:16 PM
RE: Chopping a path - by Ottia Tuota - 10-22-2021, 08:37 AM

Forum Jump: