Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chopping a path
(10-11-2021, 08:08 AM)denzjos Wrote: @Ottia Tuota, I just used the 'break path apart' plugin to visualise that the chop is done the right way. Also, I have to break the paths apart to use the 'Render / Mass render / Stroke line on paths'. This way it is easy to choose parts of the path that I want to give a specific color.

Selecting the NO option produces the same effect as using the break path apart plugin (Part of the ofn-path-edit plugin)

[Image: cA6kMEV.png]
Samj PortableGimp 2.10.28 - Win-10 /64.
Another chopping plugin inspired by denzjos. Download the .zip file (now version 0.3) from

and unzip and place the file 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.

Forum Jump: