-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
package main
import (
"fmt"
"github.com/akavel/polyclip-go"
)
func main() {
subject := polyclip.Polygon{{{1,1}, {1,2}, {2, 2}, {2, 1}}}
clipping := polyclip.Polygon{{{2,1}, {2,2}, {3, 2}, {3, 1}},
{{1,2}, {1,3}, {2, 3}, {2, 2}},
{{2,2}, {2,3}, {3, 3}, {3, 2}}}
result := subject.Construct(polyclip.UNION, clipping)
fmt.Println(result)
}prints:
[[{2 2} {2 3} {1 3} {1 2} {1 1} {2 1} {3 1} {3 2}]]
which looks incorrect...
(4 touching rectangles, the upper right one is lost after union)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels