Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
make chopped paths batch active
#1
The 'chop' plugin from Ottia Tuota gave me the idea to experiment with gimp paths and animated light. Is there a plugin / script that chop a path in linear calculated pieces or in exponential calculated pieces ? I also want to know if there exist a plugin / script that can set chopped paths as even or uneven numbered paths active. Or is there a plugin / script that set paths active with a given period and starting from a given number ? As example starting from path named 'path1' with a period value 4, then 'path2' with a period value '4' and so on. Thanks for your answer in advance.
Reply
#2
As for your first question: I guess you mean that a path should be chopped in pieces according to the lengths of the pieces, so disregarding all info on existing anchors?

I suppose one could make such plugin that would, for nicely behaving paths, chop them approximately in linear or exponential fashion. But as I now see it, it would mean such big work that currently I am not planning to do it. I have other things going. But perhaps somebody else will try? It would not be the first time when I miss some easy solution.
Reply
#3
(10-02-2021, 11:53 AM)Ottia Tuota Wrote: As for your first question: I guess you mean that a path should be chopped in pieces according to the lengths of the pieces, so disregarding all info on existing anchors?

I suppose one could make such plugin that would, for nicely behaving paths, chop them approximately in linear or exponential fashion. But as I now see it, it would mean such big work that currently I am not planning to do it. I have other things going. But perhaps somebody else will try? It would not be the first time when I miss some easy solution.

I don't think there is an easy solution. Not trivial, but no undoable either. You have to figure out where the next cut would be (it can be in a different spline in the string) and then cut at that point (3rd degree equation) . Too busy right now to start doing this.
Reply
#4
Until the plugins come along. Once upon a time, I used to make a 'broken' path from a broken line then centerline Autotraced it.

A bit easier now  with the crop-path.py plugin. Same drawn ( stroked path) broken line on a path then that to a selection. That path broken twice using crop-path.py Once from selection and again with the selection inverted to get alternating paths.

Apologies for the rubbish animation but looks like this:

   
Reply
#5
Ottia Tuota, Ofnuts, rich thank you for your answers.

Remark, I don't know if there exist a script / plugin to chop a lissajous path (Ottia Tuota script) in combination with a star path (Script-Fu / Shape Paths / Star) : 
   
Reply
#6
(10-02-2021, 03:16 PM)denzjos Wrote: Remark, I don't know if there exist a script / plugin to chop a lissajous path (Ottia Tuota script) in combination with a star path (Script-Fu / Shape Paths / Star) : 

None that I know of, using what I mentioned earlier and the available Gimp tools.

Lots of screenshots, this is the work flow using Ottia Tuota's plug-ins  https://i.imgur.com/91ms3Ce.jpg

1) I have a spiral path. I can stroke the spiral on a temporary transparent layer, as a template.
2) Using a star path, I can stroke that, this time using the eraser paint tool, to introduce breaks in the spiral template.
3) The separated lines in the template now select ( any way you like)
4) The crop-path.py plugin will use that selection to create a new path broken into segments.
5) The broken path.
6) If you want to improve that path, removing any intermediate control points then the simplify-path plugin works.
Reply
#7
To slice the spiral by the star you can also use: Tools > Cropping and slicing > Slice path by lines. See

https://www.gimp-forum.net/Thread-Croppi...6#pid20276

I don't know what the star path is like but I assume the lines are each a 2-anchor stroke. Then this should work well. This creates a large number of paths. Each path is one sector of the spiral and its strokes are the segments of the spiral in that sector.

By merging the paths you get one path where you have all the strokes you need. Or, I remember Ofnuts has a plugin to separate the strokes into different paths. Unfortunately, the ordering will not be the same as along the original spiral. If that is a problem, I am sorry, I have no idea how to fix it.
Reply
#8
Sorry for the late response.
@ rich, I' followed the steps you proposed but I could not do a nice conversion from stroked lines to paths. After the conversion I've got closed paths (flat peculiar form) and after using several plugins to simplify the paths but there are still some closed paths. So rich, thanks for your solution and your effort, but I'm still searching for a solution.
@ Ottia Tuota, thanks for your answer, I still keep chopping paths and now I try to line up the chopped parts.

I wonder if I can name or number the different paths with the help of their length and then arrange a series of paths ? I used the 'Edit / Path summary' to find the lengths. In this case (spiral) the length differs on the chopped items. 
   
Reply
#9
Another way would be to wait a little longer. I am making another plugin that retains the ordering of the strokes along the original path. Perhaps it could solve at least that spiral-and-star example if I guess right what you are trying to do.

I am at the finishing stage now, so it should not take too long, some days perhaps. Unless of course I run again into some bugs in the code - they regularly appear just when I think the work is practically finished.
Reply
#10
(10-04-2021, 03:32 PM)Ottia Tuota Wrote: they regularly appear just when I think the work is practically finished.

Still way better than when they appear after you think the work is finished Smile
Reply


Forum Jump: