From e910eb5613776f6dbd9d08a036200ce50092be0b Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 2 Aug 2017 14:45:03 +0200 Subject: [PATCH] fix splinesurface when points are not given exactly --- libsrc/csg/splinesurface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsrc/csg/splinesurface.cpp b/libsrc/csg/splinesurface.cpp index a6e1124a..e8119db1 100644 --- a/libsrc/csg/splinesurface.cpp +++ b/libsrc/csg/splinesurface.cpp @@ -5,7 +5,8 @@ namespace netgen { void SplineSurface :: AppendPoint(const Point<3> & p, const double reffac, const bool hpref) { - auto pp = Point<3>(p); + auto pp = p; + Project(pp); geompoints.Append(GeomPoint<3>(pp,reffac)); geompoints.Last().hpref = hpref; } @@ -20,13 +21,13 @@ void SplineSurface :: AppendPoint(const Point<3> & p, const double reffac, const string SplineSurface :: GetBCNameOf (Point<3> p1, Point<3> p2) const { - double eps = 1e-5; for(int i=0; i(splines[i]->GetPoint(0)); Project(pp1); auto pp2 = Point<3>(splines[i]->GetPoint(1)); Project(pp2); + double eps = (p1-p2).Length() * 1e-4; if (((pp1-p1).Length()