Can I use floating point coordinates with Clipper?
Yes you can. The Clipper Library has two classes which perform clipping operations - Clipper64 and ClipperD. The former class accepts Int64 coordinates, whereas the latter class accepts double coordinates.
If I have a choice, does it make any difference whether I use integer or floating point coordinates when doing clipping operations?
Yes there will be a small difference. The Clipper Library uses integer coordinates internally in order to preserve numerical robustness, so floating point coordinates will be converted to and from integers before and after clipping respectively. By using integer coordinates you'll avoid the small overhead of these conversions.
How does Clipper handle polygons with holes?
Polygon regions are defined by associating specific fill rules with paths. Inner paths, that outline holes, generally wind in the opposite direction to outer paths.
Sometimes polygons in solutions share a common edge.
Are these a bugs?
No, though this should be fairly uncommon. (See notes on touching polygons here.)
I have lots of polygons that I want to 'union'. Can I do this in one operation?
Yes, see Union.
The polygons produced by InflatePaths and / or ClipperOffset have tiny artefacts?
Are these bugs?
No. Sometimes very small segments in offset paths are at unexpected angles due to integer rounding. When these offset paths are themselves offset several times, this can exaggerate these angled segments. So perhaps the best way to remove these tiny artefacts is by using the library's SimplifyPaths function.
Is there an easy way to reverse polygon orientations?
Yes, see ReversePath, Clipper64.ReverseSolution and ClipperOffset.ReverseSolution
Overview, Clipper64, Clipper64.ReverseSolution, ClipperD, ClipperOffset, ClipperOffset.ReverseSolution, InflatePaths, ReversePath, SimplifyPaths, Union, FillRule
Copyright © 2010-2024 Angus Johnson - Clipper2 1.3.0 - Help file built on 14 Jan 2024