From: Anthony Geay Date: Mon, 26 Jun 2017 08:57:37 +0000 (+0200) Subject: Yeah man ! X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fagy_abn%2FIntersect2DDbg;p=tools%2Fmedcoupling.git Yeah man ! --- 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)