]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message ***
authorageay <ageay>
Thu, 18 Sep 2008 13:30:04 +0000 (13:30 +0000)
committerageay <ageay>
Thu, 18 Sep 2008 13:30:04 +0000 (13:30 +0000)
src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.cxx
src/INTERP_KERNEL/Test/QuadraticPlanarInterpTest3.cxx

index 783543d25f4ff8d241b8e6c3ffae00708ae0ef8b..614e112fcde965dce13f71fe8926db96d97b61ed 100644 (file)
@@ -202,7 +202,7 @@ void QuadraticPolygon::splitPolygonsEachOther(QuadraticPolygon& pol1, QuadraticP
               it2.insertElemEdges(c2,false);// <-- 2nd param is false to avoid to go next.
               curE2=it2.current();
               //
-              //it1.assignMySelfToAllElems(c2);//To avoid that others
+              it1.assignMySelfToAllElems(c2);//To avoid that others
               SoftDelete(c1);
               SoftDelete(c2);
               c1=new ComposedEdge;
index 0b1d13178e2bed4a5da2399146ff08361fb5c8ec..6f51ea0f19e3d1e7af2e2a399854c8d9fe46a449 100644 (file)
@@ -159,7 +159,7 @@ void QuadraticPlanarInterpTest::checkAssemblingBases1()
 void QuadraticPlanarInterpTest::checkAssemblingBases2()
 {
   //The "most" basic test1
-  /*Node *n1=new Node(0.,0.);                Node *n4=new Node(0.,-0.3);   
+  Node *n1=new Node(0.,0.);                Node *n4=new Node(0.,-0.3);   
   Node *n2=new Node(1.,0.);                Node *n5=new Node(1.,-0.3);
   Node *n3=new Node(0.5,1.);               Node *n6=new Node(0.5,0.7);
   EdgeLin *e1_2=new EdgeLin(n1,n2);        EdgeLin *e4_5=new EdgeLin(n4,n5);
@@ -174,21 +174,21 @@ void QuadraticPlanarInterpTest::checkAssemblingBases2()
   CPPUNIT_ASSERT_EQUAL(5,pol1.recursiveSize());
   CPPUNIT_ASSERT_EQUAL(5,pol2.recursiveSize());CPPUNIT_ASSERT_EQUAL(15,nbOfSplits);
   checkBasicsOfPolygons(pol1,pol2,true);
-  CPPUNIT_ASSERT((*pol2[1])[0]->getEndNode()==(*(*pol1[0])[0])[1]->getEndNode());
-  CPPUNIT_ASSERT((*pol2[1])[0]->getEndNode()->getLoc()==ON_1);
-  CPPUNIT_ASSERT((*pol2[2])[0]->getEndNode()==(*(*pol1[0])[0])[0]->getEndNode());
-  CPPUNIT_ASSERT((*pol2[2])[0]->getEndNode()->getLoc()==ON_1);
+  CPPUNIT_ASSERT(pol2[1]->getEndNode()==pol1[1]->getEndNode());
+  CPPUNIT_ASSERT(pol2[1]->getEndNode()->getLoc()==ON_1);
+  CPPUNIT_ASSERT(pol2[3]->getEndNode()==pol1[0]->getEndNode());
+  CPPUNIT_ASSERT(pol2[3]->getEndNode()->getLoc()==ON_1);
   cpyPol1.performLocatingOperation(pol2);
   ElementaryEdge *tmp=dynamic_cast<ElementaryEdge *>(pol2[0]); CPPUNIT_ASSERT(tmp); CPPUNIT_ASSERT(tmp->getPtr()==e4_5);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_OUT_1);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_OUT_1);
-  tmp=dynamic_cast<ElementaryEdge *>((*pol2[1])[0]); CPPUNIT_ASSERT(tmp);
+  tmp=dynamic_cast<ElementaryEdge *>(pol2[1]); CPPUNIT_ASSERT(tmp);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_OUT_1);
-  tmp=dynamic_cast<ElementaryEdge *>((*pol2[1])[1]); CPPUNIT_ASSERT(tmp);
+  tmp=dynamic_cast<ElementaryEdge *>(pol2[2]); CPPUNIT_ASSERT(tmp);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_IN_1);
-  tmp=dynamic_cast<ElementaryEdge *>((*pol2[2])[0]); CPPUNIT_ASSERT(tmp);
+  tmp=dynamic_cast<ElementaryEdge *>(pol2[3]); CPPUNIT_ASSERT(tmp);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_IN_1);
-  tmp=dynamic_cast<ElementaryEdge *>((*pol2[2])[1]); CPPUNIT_ASSERT(tmp);
+  tmp=dynamic_cast<ElementaryEdge *>(pol2[4]); CPPUNIT_ASSERT(tmp);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_OUT_1);
   //clean-up for test1
   e1_2->decrRef(); e2_3->decrRef(); e3_1->decrRef(); e4_5->decrRef(); e5_6->decrRef(); e6_4->decrRef();
@@ -210,9 +210,9 @@ void QuadraticPlanarInterpTest::checkAssemblingBases2()
   CPPUNIT_ASSERT_EQUAL(5,pol3.recursiveSize());
   CPPUNIT_ASSERT_EQUAL(4,pol4.recursiveSize());CPPUNIT_ASSERT_EQUAL(16,nbOfSplits);
   checkBasicsOfPolygons(pol3,pol4,true);
-  CPPUNIT_ASSERT(pol4[0]->getStartNode()==(*pol3[0])[0]->getEndNode()); CPPUNIT_ASSERT(pol4[0]->getStartNode()==n5);
+  CPPUNIT_ASSERT(pol4[0]->getStartNode()==pol3[0]->getEndNode()); CPPUNIT_ASSERT(pol4[0]->getStartNode()==n5);
   CPPUNIT_ASSERT(n5->getLoc()==ON_LIM_1);
-  CPPUNIT_ASSERT(pol4[2]->getEndNode()==(*pol3[1])[0]->getEndNode()); CPPUNIT_ASSERT(pol4[2]->getEndNode()==n6);
+  CPPUNIT_ASSERT(pol4[2]->getEndNode()==pol3[2]->getEndNode()); CPPUNIT_ASSERT(pol4[2]->getEndNode()==n6);
   CPPUNIT_ASSERT(n6->getLoc()==ON_LIM_1);
   cpyPol3.performLocatingOperation(pol4);
   tmp=dynamic_cast<ElementaryEdge *>(pol4[1]); CPPUNIT_ASSERT(tmp); CPPUNIT_ASSERT(tmp->getPtr()==e4_7);
@@ -243,18 +243,18 @@ void QuadraticPlanarInterpTest::checkAssemblingBases2()
   CPPUNIT_ASSERT_EQUAL(4,pol5.recursiveSize());
   CPPUNIT_ASSERT_EQUAL(4,pol6.recursiveSize()); CPPUNIT_ASSERT_EQUAL(13,nbOfSplits);
   checkBasicsOfPolygons(pol5,pol6,false);
-  CPPUNIT_ASSERT((*pol6[2])[0]->getStartNode()==(*pol5[0])[0]->getEndNode()); CPPUNIT_ASSERT((*pol6[2])[0]->getStartNode()==n6);
+  CPPUNIT_ASSERT(pol6[2]->getStartNode()==pol5[0]->getEndNode()); CPPUNIT_ASSERT(pol6[2]->getStartNode()==n6);
   CPPUNIT_ASSERT(n6->getLoc()==ON_LIM_1);
-  CPPUNIT_ASSERT((*pol6[2])[0]->getEndNode()==(*pol5[0])[0]->getStartNode()); CPPUNIT_ASSERT((*pol5[0])[0]->getStartNode()==n1);
+  CPPUNIT_ASSERT(pol6[2]->getEndNode()==pol5[0]->getStartNode()); CPPUNIT_ASSERT(pol5[0]->getStartNode()==n1);
   CPPUNIT_ASSERT(n1->getLoc()==ON_LIM_1);
   cpyPol5.performLocatingOperation(pol6);
   tmp=dynamic_cast<ElementaryEdge *>(pol6[0]); CPPUNIT_ASSERT(tmp); CPPUNIT_ASSERT(tmp->getPtr()==e4_5);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_OUT_1);
   tmp=dynamic_cast<ElementaryEdge *>(pol6[1]); CPPUNIT_ASSERT(tmp); CPPUNIT_ASSERT(tmp->getPtr()==e5_6);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_OUT_1);
-  tmp=dynamic_cast<ElementaryEdge *>((*pol6[2])[0]); CPPUNIT_ASSERT(tmp);
+  tmp=dynamic_cast<ElementaryEdge *>(pol6[2]); CPPUNIT_ASSERT(tmp);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_ON_1);
-  tmp=dynamic_cast<ElementaryEdge *>((*pol6[2])[1]); CPPUNIT_ASSERT(tmp);
+  tmp=dynamic_cast<ElementaryEdge *>(pol6[3]); CPPUNIT_ASSERT(tmp);
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_OUT_1);
   //clean-up test3
   e1_2->decrRef(); e2_3->decrRef(); e3_1->decrRef(); e4_5->decrRef(); e5_6->decrRef(); e6_4->decrRef();
@@ -280,7 +280,7 @@ void QuadraticPlanarInterpTest::checkAssemblingBases2()
   CPPUNIT_ASSERT(tmp->getLoc()==FULL_ON_1);
   //clean-up test4
   e1_2->decrRef(); e2_3->decrRef(); e3_1->decrRef(); e4_5->decrRef(); e5_6->decrRef(); e6_4->decrRef();
-  n1->decrRef(); n2->decrRef(); n3->decrRef(); n4->decrRef(); n5->decrRef(); n6->decrRef();*/
+  n1->decrRef(); n2->decrRef(); n3->decrRef(); n4->decrRef(); n5->decrRef(); n6->decrRef();
 }
 
 void QuadraticPlanarInterpTest::checkBasicsOfPolygons(QuadraticPolygon& pol1, QuadraticPolygon& pol2, bool checkDirection)