Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Replicating a path
#39
The plugin "Replicate path along another path" is now faster. New version 0.7 is in

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

That mouse-and-cat example of denzjos came from 167.688 seconds down to 16.635 seconds. Not bad. (The times were taken on my old and slow machine.)

For anybody interested: The main culprit was the procedure pdb.gimp_vectors_stroke_point_at_dist(). The plugin uses it to find on the Target path points at some given distance x from the start. And it is called veeery many times. Experimenting now a little I noticed that its running time depends on the number of anchors. I did like this: I started with a 2-anchor path. Then I clicked to the path more and more anchors, thus subdividing the path to more and more segments. And I saw that doubling the number of segments almost doubles the running time! That happens even if the curve remains the same, only the number of anchors on it grows. So I believe that the procedure works segment by segment, and not with the curve as a whole.

So, when my plugin got as input a Target path with a large number of anchors, like denzjos' cat, it took a long time to run.

What I did was that now the plugin first chops the Target path at its anchors to shorter paths, each with only 2 anchors. And I arranged things so that it suffices to call that pdb procedure only for one such small piece at a time. And at the same time some other time-consuming routines became by-passed. That's that.

But complicated paths may still mean long running times.

I hope I didn't mess anything up. Please report if the plugin does something odd.

I put here a little playing. The Base is the little red line, precisely one sixth of the width of the Source. Though I have said that the Base should be long enough, it seems that it is not always so very necessary. Then I ran the plugin with suitable parameters, joined the strokes of the resulting path, and deleted some anchors at both ends. Finally path to selection and bucket fill.

   
Reply


Messages In This Thread
Replicating a path - by Ottia Tuota - 12-05-2021, 09:32 AM
RE: Replicating a path - by rich2005 - 12-05-2021, 11:35 AM
RE: Replicating a path - by Ottia Tuota - 12-05-2021, 11:55 AM
RE: Replicating a path - by rich2005 - 12-05-2021, 12:26 PM
RE: Replicating a path - by Ottia Tuota - 12-06-2021, 08:08 AM
RE: Replicating a path - by Ottia Tuota - 12-11-2021, 12:06 PM
RE: Replicating a path - by Krikor - 12-11-2021, 03:22 PM
RE: Replicating a path - by denzjos - 12-12-2021, 07:17 PM
RE: Replicating a path - by Ottia Tuota - 12-12-2021, 08:02 PM
RE: Replicating a path - by nelo - 12-13-2021, 09:38 AM
RE: Replicating a path - by teapot - 12-21-2021, 03:44 AM
RE: Replicating a path - by Ottia Tuota - 12-21-2021, 01:24 PM
RE: Replicating a path - by denzjos - 12-21-2021, 05:33 PM
RE: Replicating a path - by Ottia Tuota - 12-21-2021, 07:37 PM
RE: Replicating a path - by teapot - 12-21-2021, 06:27 PM
RE: Replicating a path - by Krikor - 12-21-2021, 07:05 PM
RE: Replicating a path - by denzjos - 12-22-2021, 09:05 AM
RE: Replicating a path - by Ottia Tuota - 12-22-2021, 10:09 AM
RE: Replicating a path - by rich2005 - 12-22-2021, 10:15 AM
RE: Replicating a path - by Ottia Tuota - 12-22-2021, 11:44 AM
RE: Replicating a path - by rich2005 - 12-22-2021, 02:14 PM
RE: Replicating a path - by Ottia Tuota - 12-22-2021, 04:40 PM
RE: Replicating a path - by denzjos - 12-23-2021, 09:54 AM
RE: Replicating a path - by Ottia Tuota - 12-23-2021, 12:41 PM
RE: Replicating a path - by Ottia Tuota - 01-28-2022, 04:49 PM
RE: Replicating a path - by Ottia Tuota - 01-29-2022, 07:56 AM
RE: Replicating a path - by rich2005 - 01-29-2022, 04:07 PM
RE: Replicating a path - by Ottia Tuota - 01-29-2022, 04:32 PM
RE: Replicating a path - by rich2005 - 01-29-2022, 04:38 PM
RE: Replicating a path - by teapot - 01-30-2022, 03:18 AM
RE: Replicating a path - by Ottia Tuota - 01-30-2022, 07:02 AM
RE: Replicating a path - by Ottia Tuota - 01-30-2022, 08:57 AM
RE: Replicating a path - by denzjos - 01-30-2022, 04:27 PM
RE: Replicating a path - by Ottia Tuota - 01-30-2022, 04:43 PM
RE: Replicating a path - by denzjos - 01-30-2022, 05:34 PM
RE: Replicating a path - by Ottia Tuota - 01-30-2022, 06:18 PM
RE: Replicating a path - by teapot - 02-01-2022, 03:45 AM
RE: Replicating a path - by Ottia Tuota - 02-01-2022, 06:42 AM
RE: Replicating a path - by Ottia Tuota - 02-02-2022, 12:02 PM
RE: Replicating a path - by teapot - 02-03-2022, 04:18 AM
RE: Replicating a path - by Ottia Tuota - 02-03-2022, 04:52 AM
RE: Replicating a path - by teapot - 04-28-2022, 12:20 AM
RE: Replicating a path - by Ottia Tuota - 04-28-2022, 05:30 AM
RE: Replicating a path - by Ottia Tuota - 04-28-2022, 11:15 AM
RE: Replicating a path - by rich2005 - 04-28-2022, 12:18 PM
RE: Replicating a path - by Ottia Tuota - 04-28-2022, 01:58 PM
RE: Replicating a path - by Krikor - 04-28-2022, 03:49 PM
RE: Replicating a path - by rich2005 - 04-28-2022, 03:16 PM
RE: Replicating a path - by teapot - 04-28-2022, 03:58 PM
RE: Replicating a path - by Ottia Tuota - 04-28-2022, 04:17 PM
RE: Replicating a path - by Krikor - 04-28-2022, 04:46 PM
RE: Replicating a path - by teapot - 04-29-2022, 01:36 AM
RE: Replicating a path - by Ottia Tuota - 04-29-2022, 04:28 AM
RE: Replicating a path - by Krikor - 04-29-2022, 01:22 PM
RE: Replicating a path - by teapot - 04-30-2022, 03:05 AM
RE: Replicating a path - by rich2005 - 08-05-2022, 11:00 AM
RE: Replicating a path - by teapot - 08-07-2022, 01:40 AM
RE: Replicating a path - by Zero01 - 04-30-2023, 04:49 PM
RE: Replicating a path - by Krikor - 04-30-2023, 09:20 PM
RE: Replicating a path - by Zero01 - 05-02-2023, 06:32 PM

Forum Jump: