# HG changeset patch # User Sascha L. Teichmann # Date 1626008838 -7200 # Node ID 02a5da2f03b4c20b51e48493954ca538ebac0058 # Parent b8d5f1cd15fb1bce091557b7ec81d725ace02ba3 Fixed clipping. diff -r b8d5f1cd15fb -r 02a5da2f03b4 pkg/imports/sr.go --- 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()