From f7b4cc602b9a646fbc66f3f17d6bb9c20efc3ead Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 24 Jan 2021 18:44:56 +0100 Subject: Initial commit --- .../ClipperLib/Classes/ClipperOffset/_Body.htm | 136 +++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/_Body.htm (limited to 'upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/_Body.htm') diff --git a/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/_Body.htm b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/_Body.htm new file mode 100644 index 0000000..337ed71 --- /dev/null +++ b/upstream/clipper-6.4.2/Documentation/Docs/Units/ClipperLib/Classes/ClipperOffset/_Body.htm @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + ClipperOffset + + + + + + + + + + + + + + + + + + + + + + + +

ClipperOffset

+
+ +

The ClipperOffset class encapsulates the process of offsetting (inflating/deflating) both open and closed paths using a number of different join types and end types.

(This class replaces the now deprecated OffsetPaths function which was less flexible.)

Preconditions for offsetting:
1. The orientations of closed paths must be consistent such that outer polygons share the same orientation, and any holes have the opposite orientation (ie non-zero filling). Open paths must be oriented with closed outer polygons.
2. Polygons must not self-intersect.

Limitations:
When offsetting, small artefacts may appear where polygons overlap. To avoid these artefacts, offset overlapping polygons separately.


+ + + + + + +
+ +
+#include "clipper.hpp"  
+...
+using namespace ClipperLib;
+
+int main()
+{
+  Path subj;
+  Paths solution;
+  subj << 
+    IntPoint(348,257) << IntPoint(364,148) << IntPoint(362,148) << 
+    IntPoint(326,241) << IntPoint(295,219) << IntPoint(258,88) << 
+    IntPoint(440,129) << IntPoint(370,196) << IntPoint(372,275);
+  ClipperOffset co;
+  co.AddPath(subj, jtRound, etClosedPolygon);
+  co.Execute(solution, -7.0);
+  
+  //draw solution ...
+  DrawPolygons(solution, 0x4000FF00, 0xFF009900);
+}
+          
+ + +

 

+ +

Reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Methods + Properties +
In ClipperOffset: +
AddPath + ArcTolerance +
AddPaths + MiterLimit +
Clear + +
Constructor + +
Execute + +
+ + + + + + \ No newline at end of file -- cgit