Polygon and line clipping and offsetting library (C++, C#, Delphi)
Questions tagged [clipperlib]
56 questions
2
votes
0 answers
Have Clipper Merge Polygon's (with hole) into One instead of Two Polygons
I am merging a number of polygon's using the clipper library and am having one main issue. When a polygon exists with a hole in it, I would like one single closed path to represent the polygon including the hole. What the tool is giving me is two…

Maria
- 31
- 5
2
votes
2 answers
ClipperLib Clip multiple squares with rectangle produces 1 result
I'm using v6.4.2 of the C# version of the ClipperLib.
I have a lot of squares making up a fishnet. I also have a rectangle.
I want to get a result where only the squares that are inside the rectangle are returned and partially overlapped get…

Paul Meems
- 3,002
- 4
- 35
- 66
2
votes
1 answer
Line and Polygon clipping returns empty Paths using Clipper library (c++)
I am trying to split a polygon by a line using the Clipper library. After the execution of clipping, it returns empty path. Can someone suggest the right way to do the same.
Paths clip(2),soln;
clip[0] << IntPoint(-264,-210) <<…

saitej
- 53
- 1
- 8
2
votes
1 answer
How do I determine if two polygons intersect using Clipper?
I am using Clipper and want to determine if two (multi-)polygons intersect.
My expectation was that the library would have a nice, abstract way of asking this question, but it does not seem to.
I thought that the Area() method might be useful, but…

Richard
- 56,349
- 34
- 180
- 251
2
votes
1 answer
Clipping Open Paths in Clipper Library
In Clipper, given an open path (black) and a closed polygon (blue), how can I clip the open path such that the clipped parts get completed using the polygon contours and, when possible, a single path remains instead of disjoint segments?
What…

Adi Shavit
- 16,743
- 5
- 67
- 137
2
votes
1 answer
Spikes when offsetting with C# clipper
I am getting quite a few spikes when offsetting Polygons with the clipper library, this is unfortunately not acceptable in my use case and I have no idea how to get rid of it. I have tried all type of join type settings but could not achieve…

Gerharddc
- 3,921
- 8
- 45
- 83
2
votes
1 answer
How clip works in polygon union in Clipper library
I use clipper library. In the figure, red and black are clips and and green are polygons. The code is listed below. However, I do not understand why the resulting union polygon is (7 3 4 14 9 1 2 6). I assume it should be (1 4 14 9)? The number is…

Sean
- 4,267
- 10
- 36
- 50
1
vote
0 answers
Clip hollow polygons using the clipper library
I wrote the following function according to the usage of the clipper library, but the printed result is not the coordinates of the clipped polygon I want。I want to know where the main problem of this code is, or that the clipper library cannot give…

start all over again
- 11
- 1
1
vote
1 answer
What is the meaning of open path "orientation" in clipperlib?
ClipperLib documentation about offset operation says among preconditions:
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).…

6502
- 112,025
- 15
- 165
- 265
1
vote
1 answer
Is that possible to give floating values to the clipper Paths
Clipper takes integer input but I want to pass floating values without losing the precision.
Clipper struct for Integer and double value.
struct IntPoint {
cInt X;
cInt Y;
#ifdef use_xyz
cInt Z;
IntPoint(cInt x = 0, cInt y = 0, cInt z = 0):…

AravindK
- 151
- 8
1
vote
1 answer
Intersection between line and Polygon using clipper library
I tried all the possibilities. But I am not getting an intersection point between line and polygon.
Paths clip(1), soln , pol(1);
clip[0] << IntPoint(1,1) << IntPoint(30,30) ;
pol[0] << IntPoint(10,10) << IntPoint(20, 10) << IntPoint(20,20) <<…

AravindK
- 151
- 8
1
vote
0 answers
Pyclipper/Clipper: Intersection of Polylines with Polygon Edge
If I want to clip the intersections between evenly spaced Polylines and a closed rectangle Polygon, the outermost Polylines coincide with the edges of the Rectangle.
Polylines Intersection with Rectangle Polygon(Green: Clip, Black: Subject, Red:…

Christoph Breuning
- 23
- 4
1
vote
0 answers
Concentric offset on polygon
I am using the Angus Johnson's Clipper Library in .NET/C# and I would like to do several concentric offset on a Polygon with the ClipperOffset class.…

lebanese03
- 11
- 1
1
vote
1 answer
Confused on Clipper in C#
I'm creating a 2D game in Unity which has procedurally placed tiles. I want to simplify the collision geometry using Angus Johnson's Clipper library (specifically the union function), but I'm running into an issue with the library returning empty…

GReusch
- 51
- 1
- 4
1
vote
1 answer
Clipper: Crashing When Clipping Open Polygons
I am trying to use Clipper, an open source polygon clipping library, to clip an open polygon with a closed polygon.
I am using the python wrapper of pyclipper. My code is as follows:
import pyclipper
subj = [[-10, 5], [20, 5]]
clip = [[0, 0], [0,…

Adam C
- 167
- 1
- 7