Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cropping and slicing a path
#3
(10-09-2020, 08:09 PM)Ofnuts Wrote:
(10-09-2020, 11:31 AM)Ottia Tuota Wrote: A word of warning: The running time grows fast with the number of slicing lines (or guides). That is why I prevented the usage of more than 8 lines. Another advantage of this is that the number of created new paths also grows fast, and it is good to have some limit. If you want to change that number 8, find and edit in the code the line

MAX_SLICE_LINES = 8 # Maximum number of slicing lines allowed

But please, do not go over 10.

If you find some case where the plugins act strangely, please report. The code is a little messy, I admit, and I may have missed something.

I'm surprised. All that would be required is solving 3rd degree equations which is pretty fast. Your warning seems to indicate that the computing time is somehow quadratic or worse?

I don't even try to pretend that I understand this problem. But I believe the difficulty comes from the number of the generated new paths, the slices.

Imagine a path. Imagine its bounding box. Then imagine that we put there a large number of slicing lines, criss-crossing the bounding box. They slice the bounding box into a large number of small regions, and the path becomes sliced accordingly into small slices. The number of the slices grows fast with the number of the slicing lines. I don't know how fast it grows, but it could be quadratic(??). I seem to remember vaguely that I have seen a theorem about this years ago, but I don't remember the exact result.

And it is not only the solving equations. It is also Gimp drawing the generated paths, and their number also grows fast. I have not done any systematic testing, only some experiments, but in one case there were 43 new paths. (I don't remember how many slicing lines there were.)

So, I think the problem comes from the nature of the task, the number of the generated slices.
Reply


Messages In This Thread
Cropping and slicing a path - by Ottia Tuota - 10-09-2020, 11:31 AM
RE: Cropping and slicing a path - by Ofnuts - 10-09-2020, 08:09 PM
RE: Cropping and slicing a path - by Ottia Tuota - 10-09-2020, 08:55 PM
RE: Cropping and slicing a path - by Krikor - 10-09-2020, 10:51 PM
RE: Cropping and slicing a path - by Ottia Tuota - 10-10-2020, 04:27 AM
RE: Cropping and slicing a path - by Ottia Tuota - 01-01-2021, 11:08 AM
RE: Cropping and slicing a path - by Ottia Tuota - 01-17-2021, 04:08 PM
RE: Cropping and slicing a path - by denzjos - 01-19-2021, 08:51 AM
RE: Cropping and slicing a path - by Krikor - 01-19-2021, 01:22 PM
RE: Cropping and slicing a path - by Ottia Tuota - 01-19-2021, 02:08 PM
RE: Cropping and slicing a path - by Krikor - 01-19-2021, 02:37 PM
RE: Cropping and slicing a path - by Ottia Tuota - 01-21-2021, 12:30 PM
RE: Cropping and slicing a path - by Krikor - 01-21-2021, 04:10 PM
RE: Cropping and slicing a path - by denzjos - 01-21-2021, 02:30 PM
RE: Cropping and slicing a path - by Ottia Tuota - 03-30-2021, 01:38 PM
RE: Cropping and slicing a path - by Ofnuts - 03-30-2021, 03:07 PM
RE: Cropping and slicing a path - by Ottia Tuota - 03-30-2021, 04:49 PM
RE: Cropping and slicing a path - by Krikor - 03-30-2021, 06:45 PM
RE: Cropping and slicing a path - by Ottia Tuota - 03-30-2021, 08:32 PM
RE: Cropping and slicing a path - by Krikor - 03-30-2021, 09:34 PM
RE: Cropping and slicing a path - by Ottia Tuota - 03-31-2021, 07:03 AM
RE: Cropping and slicing a path - by Ottia Tuota - 03-31-2021, 12:28 PM
RE: Cropping and slicing a path - by denzjos - 03-31-2021, 03:27 PM
RE: Cropping and slicing a path - by Ofnuts - 03-31-2021, 04:00 PM
RE: Cropping and slicing a path - by denzjos - 03-31-2021, 04:16 PM
RE: Cropping and slicing a path - by Krikor - 03-31-2021, 05:41 PM
RE: Cropping and slicing a path - by Krikor - 04-01-2021, 12:33 AM
RE: Cropping and slicing a path - by Ottia Tuota - 04-01-2021, 06:23 AM
RE: Cropping and slicing a path - by Krikor - 04-01-2021, 08:47 AM
RE: Cropping and slicing a path - by Ofnuts - 04-01-2021, 11:54 AM

Forum Jump: