ClipperOffset.Execute returns Polytree #444
Replies: 5 comments 10 replies
-
Hi again Frank. Firstly, I've converted this to a Discussion since I don't consider this an Issue WRT Clipper2. Yes, I could fairly easily reimplement Polytrees for offsetting too.
No, that's not a good idea as it would unnecessarily slow the op for everyone else. |
Beta Was this translation helpful? Give feedback.
-
Try this ... |
Beta Was this translation helpful? Give feedback.
-
I presume you're doing (ie re-doing) a Union op on the offset solution. |
Beta Was this translation helpful? Give feedback.
-
I've attached the source code for a simple Clipper1 - Clipper2 Offset comparison utility. This also contains the latest unpublished changes to the library And the results:
(Edit: the timings for Here's the zip package: |
Beta Was this translation helpful? Give feedback.
-
I've now uploaded into the repository the changes mentioned above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Clipper1 provides an offset interface where you directly get a
Polytree
as result. This interface is unfortunately omitted in Clipper2:-->
Of course, you can make a
Polytree
out of the path again. However, this detour is significantly slower than the direct path in Clipper1. The necessary information is certainly already available within the offset operation.Request: Add a new function to get a
Polytree
from the offset operation. Alternatively, the current function could be replaced, since aPolytree
can be easily converted withPolyTreeToPaths
.Beta Was this translation helpful? Give feedback.
All reactions