From f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 24 Jan 2021 18:44:56 +0100 Subject: Initial commit --- .../Docs/Units/ClipperLib/Functions/Area.htm | 72 +++++++++++++++ .../Units/ClipperLib/Functions/CleanPolygon.htm | 88 ++++++++++++++++++ .../Units/ClipperLib/Functions/CleanPolygons.htm | 87 ++++++++++++++++++ .../Functions/ClosedPathsFromPolyTree.htm | 71 +++++++++++++++ .../Units/ClipperLib/Functions/MinkowskiDiff.htm | 74 +++++++++++++++ .../Units/ClipperLib/Functions/MinkowskiSum.htm | 101 +++++++++++++++++++++ .../Units/ClipperLib/Functions/OffsetPaths.htm | 70 ++++++++++++++ .../ClipperLib/Functions/OpenPathsFromPolyTree.htm | 71 +++++++++++++++ .../Units/ClipperLib/Functions/Orientation.htm | 92 +++++++++++++++++++ .../Units/ClipperLib/Functions/PointInPolygon.htm | 72 +++++++++++++++ .../Units/ClipperLib/Functions/PolyTreeToPaths.htm | 71 +++++++++++++++ .../Units/ClipperLib/Functions/ReversePath.htm | 71 +++++++++++++++ .../Units/ClipperLib/Functions/ReversePaths.htm | 70 ++++++++++++++ .../Units/ClipperLib/Functions/SimplifyPolygon.htm | 75 +++++++++++++++ .../ClipperLib/Functions/SimplifyPolygons.htm | 76 ++++++++++++++++ 15 files changed, 1161 insertions(+) create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Area.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygon.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygons.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ClosedPathsFromPolyTree.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiDiff.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiSum.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OffsetPaths.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OpenPathsFromPolyTree.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Orientation.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PointInPolygon.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PolyTreeToPaths.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePath.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePaths.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygon.htm create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygons.htm (limited to 'upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions') diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Area.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Area.htm new file mode 100644 index 0000000..be30baf --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Area.htm @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + Area + + + + + + + + + + + + + + + + + + + + + +

Area

+ + +

Del.» function Area(const pts: TPath): double;

+ +

C++ » double Area(const Path &poly);

+ +

C#  » public static double Area(Path poly);

+ + +

This function returns the area of the supplied polygon. It's assumed that the path is closed and does not self-intersect. Depending on orientation, this value may be positive or negative. If Orientation is true, then the area will be positive and conversely, if Orientation is false, then the area will be negative.

+
+ + +

See Also

+

Orientation, Path

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygon.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygon.htm new file mode 100644 index 0000000..5a857fe --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygon.htm @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + CleanPolygon + + + + + + + + + + + + + + + + + + + + + +

CleanPolygon

+ + +

Del.» function CleanPolygon(const Poly: TPath; Distance: double = 1.415): TPath;

+ +

C++ » void CleanPolygon(const Path &in_poly, Path &out_poly, double distance = 1.415);

+ +

C++ » void CleanPolygon(Path &poly, double distance = 1.415);

+ +

C#  » public static Path CleanPolygon(Path poly, double distance = 1.415);

+
+ + +

Removes vertices: +

+ +

Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter's default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

C++ only: This function is overloaded. In the first definition, the in_poly and out_poly parameters can reference the same Path object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

   

+ + + + + +

See Also

+

CleanPolygons, SimplifyPolygon, Path

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygons.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygons.htm new file mode 100644 index 0000000..7ec56ed --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/CleanPolygons.htm @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + CleanPolygons + + + + + + + + + + + + + + + + + + + + + +

CleanPolygons

+ + +

Del.» function CleanPolygons(const Polys: TPaths; Distance: double = 1.415): TPaths;

+ +

C++ » void CleanPolygons(const Paths &in_polys, Paths &out_polys, double distance = 1.415);

+ +

C++ » void CleanPolygons(Paths &polys, double distance = 1.415);

+ +

C#  » public static Paths CleanPolygons(Paths polys, double distance = 1.415);

+
+ + +

Removes vertices: +

+ +

Vertices are semi-adjacent when they are separated by a single (out-lying) vertex.

The distance parameter's default value is approximately √2 so that a vertex will be removed when adjacent or semi-adjacent vertices having their corresponding X and Y coordinates differing by no more than 1 unit. (If the egdes are semi-adjacent the out-lying vertex will be removed too.)

C++ only: This function is overloaded. In the first definition, the in_polys and out_polys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

   

+ + + + +

See Also

+

CleanPolygon, SimplifyPolygons

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ClosedPathsFromPolyTree.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ClosedPathsFromPolyTree.htm new file mode 100644 index 0000000..e050135 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ClosedPathsFromPolyTree.htm @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + ClosedPathsFromPolyTree + + + + + + + + + + + + + + + + + + + + + +

ClosedPathsFromPolyTree

+ + +

Del.» function ClosedPathsFromPolyTree(PolyTree: TPolyTree): TPaths;

+ +

C++ » void ClosedPathsFromPolyTree(PolyTree& polytree, Paths& paths);

+ +

C#  » public static void ClosedPathsFromPolyTree(PolyTree polytree, Paths paths);

+
+ + +

This function filters out open paths from the PolyTree structure and returns only closed paths in a Paths structure.

+ +

See Also

+

PolyTree, Paths

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiDiff.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiDiff.htm new file mode 100644 index 0000000..0a3ee4b --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiDiff.htm @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + MinkowskiDiff + + + + + + + + + + + + + + + + + + + + + +

MinkowskiDiff

+ + +

Del.» function MinkowskiDiff(const Poly1: TPath; const Poly2: TPath): TPaths;

+ +

C++ » void MinkowskiDiff(const Path& poly1, const Path& poly2, Paths& solution);

+ +

C#  » public static Paths MinkowskiDiff(Path poly1, Path poly2);

+
+ + +

Minkowski Difference is performed by subtracting each point in a polygon from the set of points in an open or closed path. A key feature of Minkowski Difference is that when it's applied to two polygons, the resulting polygon will contain the coordinate space origin whenever the two polygons touch or overlap. (This function is often used to determine when polygons collide.)

In the image on the left the blue polygon is the 'minkowski difference' of the two red boxes. The black dot represents the coordinate space origin.

+ + + + +

See Also

+

MinkowskiSum, Path

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiSum.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiSum.htm new file mode 100644 index 0000000..0d4429d --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiSum.htm @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + MinkowskiSum + + + + + + + + + + + + + + + + + + + + + +

MinkowskiSum

+ + +

Del.» function MinkowskiSum(const Pattern: TPath; const Path: TPath; PathIsClosed: Boolean): TPaths; overload;

+ +

Del.» function MinkowskiSum(const Pattern: TPath; const Paths: TPaths; PathFillType: TPolyFillType; PathIsClosed: Boolean): TPaths; overload;

+ +

C++ » void MinkowskiSum(const Path& pattern, const Path& path, Paths& solution, bool pathIsClosed);

+ +

C++ » void MinkowskiSum(const Path& pattern, const Paths& paths, Paths& solution, PolyFillType pathFillType, bool pathIsClosed);

+ +

C#  » public static Paths MinkowskiSum(Path pattern, Path path, bool pathIsClosed);

+ +

C#  » public static Paths MinkowskiSum(Path pattern, Paths paths, PolyFillType pathFillType, bool pathIsClosed);

+
+ + +

Minkowski Addition is performed by adding each point in a polygon 'pattern' to the set of points in an open or closed path. The resulting polygon (or polygons) defines the region that the 'pattern' would pass over in moving from the beginning to the end of the 'path'.

+ + +

+

+      Path path = new Path();
+      Path pattern = new Path();
+      Paths solution = new Paths();
+
+      //Greek capital sigma (sum sign) ... 
+      Int64[] ints1 = new Int64[] { 300, 400, 100, 400, 200, 300, 100, 200, 300, 200 };
+      path = IntsToPolygon(ints1);
+
+      //diagonal brush pattern ...
+      Int64[] ints2 = new Int64[] { 4, -6, 6, -6, -4, 6, -6, 6 };
+      pattern = IntsToPolygon(ints2);
+
+      solution = Clipper.MinkowskiSum(pattern, path, false);
+      //move 'pattern' to the end of 'path' ...
+      pattern = TranslatePath(pattern, 300, 200);
+
+      //Display solution ± pattern ...
+    

+ + + +

See Also

+

MinkowskiDiff

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OffsetPaths.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OffsetPaths.htm new file mode 100644 index 0000000..a0787b7 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OffsetPaths.htm @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + OffsetPaths + + + + + + + + + + + + + + + + + + + + + +

OffsetPaths

+ + +

Del.» function OffsetPaths(const polys: Paths; const delta: double; JoinType: TJoinType = jtSquare; EndType: TEndType = etClosed; Limit: double = 0.0): TPaths;

+ +

C++ » void OffsetPaths(const Paths &in_polys, Paths &out_polys, double delta, JoinType jointype = jtSquare, EndType endtype = etClosed, double limit = 0.0);

+ +

C#  » public static Paths OffsetPaths(Paths polys, double delta, JoinType jointype = JoinType.jtSquare, EndType endtype = EndType.etClosed, double limit = 0.0);

+
+ +

Deprecated. (See ClipperOffset.)

+ +

See Also

+

ClipperOffset

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OpenPathsFromPolyTree.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OpenPathsFromPolyTree.htm new file mode 100644 index 0000000..3ce9fa9 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/OpenPathsFromPolyTree.htm @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + OpenPathsFromPolyTree + + + + + + + + + + + + + + + + + + + + + +

OpenPathsFromPolyTree

+ + +

Del.» function OpenPathsFromPolyTree(PolyTree: TPolyTree): TPaths;

+ +

C++ » void OpenPathsFromPolyTree(PolyTree& polytree, Paths& paths);

+ +

C#  » public static void OpenPathsFromPolyTree(PolyTree polytree, Paths paths);

+
+ + +

This function filters out closed paths from the PolyTree structure and returns only open paths in a Paths structure.

+ +

See Also

+

PolyTree, Paths

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Orientation.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Orientation.htm new file mode 100644 index 0000000..6dc02c9 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/Orientation.htm @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + Orientation + + + + + + + + + + + + + + + + + + + + + +

Orientation

+ + +

Del.» function Orientation(const poly: TPath): boolean;

+ +

C++ » bool Orientation(const Path &poly); // Function in the ClipperLib namespace.

+ +

C#  » public static bool Orientation(Path poly); // Static method of the Clipper class in the ClipperLib namespace.

+ + +

Orientation is only important to closed paths. Given that vertices are declared in a specific order, orientation refers to the direction (clockwise or counter-clockwise) that these vertices progress around a closed path.

Orientation is also dependent on axis direction:
+

+ + +



Notes:
+

+
+ +

See Also

+

Overview, Clipper.ReverseSolution, Path

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PointInPolygon.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PointInPolygon.htm new file mode 100644 index 0000000..6ae3214 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PointInPolygon.htm @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + PointInPolygon + + + + + + + + + + + + + + + + + + + + + +

PointInPolygon

+ + +

Del.» function PointInPolygon(const Pt: TIntPoint; const poly: TPath): Integer;

+ +

C++ » int PointInPolygon(const IntPoint pt, const Path &poly); // Function in the ClipperLib namespace.

+ +

C#  » public static int PointInPolygon(IntPoint pt, Path poly); // Static method of the Clipper class.

+ + +

Returns 0 when false, -1 when pt is on poly and +1 when pt is in poly.

It's assumed that 'poly' is closed and does not self-intersect.

+ +
+ +

See Also

+

IntPoint, Path

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PolyTreeToPaths.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PolyTreeToPaths.htm new file mode 100644 index 0000000..a4762d2 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/PolyTreeToPaths.htm @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + PolyTreeToPaths + + + + + + + + + + + + + + + + + + + + + +

PolyTreeToPaths

+ + +

Del.» function PolyTreeToPaths(PolyTree: TPolyTree): TPaths;

+ +

C++ » void PolyTreeToPaths(PolyTree& polytree, Paths& paths);

+ +

C#  » public static Paths PolyTreeToPaths(PolyTree polytree);

+
+ + +

This function converts a PolyTree structure into a Paths structure.

+ +

See Also

+

PolyTree, Paths

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePath.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePath.htm new file mode 100644 index 0000000..d0fe8ec --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePath.htm @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + ReversePath + + + + + + + + + + + + + + + + + + + + + +

ReversePath

+ + +

Del.» function ReversePath(const polys: TPath): TPath;

+ +

C++ » void ReversePath(const Path &p);

+ +

C#  » //Call Path.Reverse().

+
+ +

Reverses the vertex order (and hence orientation) in the specified path.

+ + +

See Also

+

Path

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePaths.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePaths.htm new file mode 100644 index 0000000..19ebbad --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/ReversePaths.htm @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + ReversePaths + + + + + + + + + + + + + + + + + + + + + +

ReversePaths

+ + +

Del.» function ReversePaths(const p: TPaths): TPaths;

+ +

C++ » void ReversePaths(const Paths &p);

+ +

C#  » void ReversePaths( Paths p );

+
+ + +

Reverses the vertex order (and hence orientation) in each contained path.

+ + + + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygon.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygon.htm new file mode 100644 index 0000000..3462f82 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygon.htm @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + SimplifyPolygon + + + + + + + + + + + + + + + + + + + + + +

SimplifyPolygon

+ + +

Del.» function SimplifyPolygon(const Poly: TPath; FillType: TPolyFillType = pftEvenOdd): TPaths;

+ +

C++ » void SimplifyPolygon(const Path &in_poly, Paths &out_polys,
        PolyFillType fillType = pftEvenOdd);

+ +

C#  » public static Paths SimplifyPolygon(Path poly,
        PolyFillType fillType = PolyFillType.pftEvenOdd);

+
+ + +

Removes self-intersections from the supplied polygon (by performing a boolean union operation using the nominated PolyFillType).
Polygons with non-contiguous duplicate vertices (ie 'touching') will be split into two polygons.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.


+ + + + + +

See Also

+

Clipper.StrictlySimple, CleanPolygon, Path, PolyFillType

+ + + + + + \ No newline at end of file diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygons.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygons.htm new file mode 100644 index 0000000..69c791b --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/SimplifyPolygons.htm @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + SimplifyPolygons + + + + + + + + + + + + + + + + + + + + + +

SimplifyPolygons

+ + +

Del.» function SimplifyPolygons(const polys: TPaths;
        FillType: TPolyFillType = pftEvenOdd): TPaths;

+ +

C++ » void SimplifyPolygons(const Paths &in_polys, Paths &out_polys,
        PolyFillType fillType = pftEvenOdd);

+ +

C++ » void SimplifyPolygons(Paths &polys, PolyFillType fillType = pftEvenOdd);

+ +

C#  » public static Polygons SimplifyPolygons(Paths polys,
        PolyFillType fillType = PolyFillType.pftEvenOdd);

+
+ + +

Removes self-intersections from the supplied polygons (by performing a boolean union operation using the nominated PolyFillType).
Polygons with non-contiguous duplicate vertices (ie 'vertices are touching') will be split into two polygons.

C++ only: This function is overloaded. In the first definition, the in_polys and out_polys parameters can reference the same Paths object though in that case the calling code might be clearer if the second definition (accepting a single Paths parameter) is used.

Note: There's currently no guarantee that polygons will be strictly simple since 'simplifying' is still a work in progress.


+ + + + +

See Also

+

Clipper.StrictlySimple, CleanPolygons, PolyFillType

+ + + + + + \ No newline at end of file -- cgit