]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Yeah man ! agy_abn/Intersect2DDbg
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 26 Jun 2017 08:57:37 +0000 (10:57 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 26 Jun 2017 08:57:37 +0000 (10:57 +0200)
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx
src/MEDCoupling/MEDCouplingUMesh_intersection.cxx

index 1ee8e706885ab12851f4872b9985f07856079405..27cd831ecb28380376212380858f94615de7ba40 100644 (file)
@@ -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;
index 9cfb340750b567445054aafd36c8b1c6e81fa309..67bba2b1ee409e41e82c92a02bb636f5dffe3090 100644 (file)
@@ -291,8 +291,8 @@ void QuadraticPolygon::splitAbs(QuadraticPolygon& other,
                                 std::vector< std::vector<int> >& edgesInOtherColinearWithThis, std::vector< std::vector<int> >& subDivOther,
                                 std::vector<double>& addCoo, std::map<int,int>& 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;
index 0af597a3d36afbc272d3f96d620a077cbefe5cbe..d0086abd603ffc7c5ee42c4391b0694eb8f57899 100644 (file)
@@ -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)