Mercurial > gemma
diff pkg/imports/sr.go @ 5429:02a5da2f03b4 marking-single-beam
Fixed clipping.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 11 Jul 2021 15:07:18 +0200 |
parents | b8d5f1cd15fb |
children | aa199f280f64 |
line wrap: on
line diff
--- a/pkg/imports/sr.go Sun Jul 11 13:08:49 2021 +0200 +++ b/pkg/imports/sr.go Sun Jul 11 15:07:18 2021 +0200 @@ -644,12 +644,13 @@ } else { start = time.Now() clippingPolygonBuffered.Indexify() + before := len(xyz) xyz = xyz.Filter(func(v mesh.Vertex) bool { - return clippingPolygonBuffered.IntersectionBox2D(v.Box2D()) == + return clippingPolygonBuffered.IntersectionBox2D(v.Box2D()) != mesh.IntersectionOutSide }) feedback.Info("Clipping took %v.", time.Since(start)) - feedback.Info("Number of points to clip %d.", len(removed)) + feedback.Info("Number of points to clip %d.", before-len(xyz)) } start = time.Now()