From f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 24 Jan 2021 18:44:56 +0100 Subject: Initial commit --- .../Units/ClipperLib/Functions/MinkowskiSum.htm | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiSum.htm (limited to 'upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Functions/MinkowskiSum.htm') 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 -- cgit