From 2763285b4620f61b6e4876fafc414a07a46dc741 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 15 Sep 2020 15:48:49 +0200 Subject: [PATCH] csg2d - fix tutorial --- libsrc/geom2d/csg2d.cpp | 31 +++++++++++++++++++--- py_tutorials/csg2d.py | 57 ++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 39 deletions(-) diff --git a/libsrc/geom2d/csg2d.cpp b/libsrc/geom2d/csg2d.cpp index 0dddf074..e945c586 100644 --- a/libsrc/geom2d/csg2d.cpp +++ b/libsrc/geom2d/csg2d.cpp @@ -345,12 +345,35 @@ bool IsOverlapping( Spline p, Spline s, double & alpha, double & beta, Intersect // Check if s.p0 lies on p and vice versa, also check if tangents are in same direction (TODO: TEST) // If so, assume overlapping splines // TODO: Better checks! False positives could happen here! - IntersectSplineSegment1( p, s.StartPI(), p_mid, lam0, alpha, true ); - IntersectSplineSegment1( s, p.StartPI(), s_mid, lam1, beta, true ); + if(Dist(s.StartPI(), p.StartPI())