From 48c1c1266dfb9d949be22d89b9f829ac74d1bbb4 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 26 Jun 2017 10:57:37 +0200 Subject: [PATCH] Yeah man ! --- src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx | 2 ++ .../Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx | 4 ++-- src/MEDCoupling/MEDCouplingUMesh_intersection.cxx | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx index 1ee8e7068..27cd831ec 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx @@ -120,6 +120,7 @@ bool SegSegIntersector::areColinears() const */ void SegSegIntersector::areOverlappedOrOnlyColinears(const Bounds *whereToFind, bool& colinearity, bool& areOverlapped) { + static int oooo=0; double determinant=_matrix[0]*_matrix[3]-_matrix[1]*_matrix[2]; if(fabs(determinant)>2.*QUADRATIC_PLANAR::_precision)//2*_precision due to max of offset on _start and _end { @@ -128,6 +129,7 @@ void SegSegIntersector::areOverlappedOrOnlyColinears(const Bounds *whereToFind, } else { + std::cerr << oooo++ << "****" << std::endl; colinearity=true; //retrieving initial matrix double tmp=_matrix[0]; _matrix[0]=_matrix[3]; _matrix[3]=tmp; diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index 9cfb34075..67bba2b1e 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -291,8 +291,8 @@ void QuadraticPolygon::splitAbs(QuadraticPolygon& other, std::vector< std::vector >& edgesInOtherColinearWithThis, std::vector< std::vector >& subDivOther, std::vector& addCoo, std::map& mergedNodes) { - double xBaryBB, yBaryBB; - double fact=normalizeExt(&other, xBaryBB, yBaryBB); + double xBaryBB=0., yBaryBB=0.; + double fact=1.;//normalizeExt(&other, xBaryBB, yBaryBB); // IteratorOnComposedEdge it1(this),it3(&other); MergePoints merge; diff --git a/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx b/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx index 0af597a3d..d0086abd6 100644 --- a/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx @@ -1207,6 +1207,8 @@ void MEDCouplingUMesh::Intersect1DMeshes(const MEDCouplingUMesh *m1Desc, const M { (*itt)->incrRef(); nodesSafe[iii]=*itt; } // end of protection // Performs egde cutting: + INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps; + INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps; pol1->splitAbs(*pol2,map1,map2,offset1,offset2,candidates2,intersectEdge1[i],i,colinear2,subDiv2,addCoo,mergedNodes); delete pol2; delete pol1; @@ -1323,6 +1325,9 @@ void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCo { try { + INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps; + INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps; + INTERP_KERNEL::QuadraticPolygon::ComputeResidual(pol1,edges1,edgesBoundary2,mapp,offset3,i,addCoordsQuadratic,cr,crI,cNb1,cNb2); } catch(INTERP_KERNEL::Exception& e) -- 2.39.2