Open
Description
Hi,
I run the following code with two overlapping quadrilaterals:
using Clipper
path1 = Vector{IntPoint}()
mag = 2
pres = 8
push!(path1, IntPoint(0.0, 0.0, mag, pres))
push!(path1, IntPoint(0.0, 1.0, mag, pres))
push!(path1, IntPoint(1.0, 1.0, mag, pres))
push!(path1, IntPoint(1.3, 0.1, mag, pres))
path2 = Vector{IntPoint}()
push!(path2, IntPoint(1.0, 0.0, mag, pres))
push!(path2, IntPoint(1.0, 1.0, mag, pres))
push!(path2, IntPoint(2.0, 1.0, mag, pres))
push!(path2, IntPoint(2.0, 0.0, mag, pres))
c = Clip()
add_path!(c, path1, PolyTypeSubject, true)
add_path!(c, path2, PolyTypeSubject, true)
result, polys = execute(c, ClipTypeUnion, PolyFillTypeEvenOdd, PolyFillTypeEvenOdd)
The output variable polys
consists of two polygons. I would expect this to be a single polygon, the union of the original two.
Perhaps I am misunderstanding how to take a union, that seems more likely than a bug. Either way, any help would be very much appreciated.
Thanks,
Andrew
Metadata
Metadata
Assignees
Labels
No labels