newConnIPtr[1]=newConnIPtr[0]+3;
}
}
- if(addCoo.empty() && ((int)newConn.size())==_nodal_connec->getNumberOfTuples())//nothing happens during tasselation : no update needed
+ if(addCoo.empty() && ((int)newConn.size())==_nodal_connec->getNumberOfTuples())//nothing happens during tessellation : no update needed
return ;
_types=types;
DataArrayInt::SetArrayIn(newConnI,_nodal_connec_index);
m1->decrRef();
}
+void MEDCouplingBasicsTest5::testUMeshTessellate2DCurve1()
+{
+ // A quarter of circle:
+ double mcoords[6] = {0.4,0.0, 0.0,-0.4, 0.283,-0.283};
+ int mconnec[3] = {0,1,2};
+
+ MEDCouplingUMesh *m1 = MEDCouplingUMesh::New();
+ m1->setMeshDimension(1);
+ m1->allocateCells(1);
+ m1->insertNextCell(INTERP_KERNEL::NORM_SEG3, 3, mconnec);
+
+ DataArrayDouble *myCoords = DataArrayDouble::New();
+ myCoords->alloc(3,2);
+ std::copy(mcoords,mcoords+6,myCoords->getPointer());
+ m1->setCoords(myCoords);
+ myCoords->decrRef();
+
+ MEDCouplingUMesh *m2 = static_cast<MEDCouplingUMesh *>(m1->deepCpy());
+ m2->tessellate2DCurve(0.1);
+ CPPUNIT_ASSERT_NO_THROW(m2->checkCoherency1(0.0)); // eps param not used
+}
+
/*!
* idem MEDCouplingBasicsTest4::testIntersect2DMeshesTmp3 except that m1 and m2 are permuted on call to MEDCouplingUMesh::Intersect2DMeshes
*/
{
CPPUNIT_TEST_SUITE(MEDCouplingBasicsTest5);
CPPUNIT_TEST( testUMeshTessellate2D1 );
+ CPPUNIT_TEST( testUMeshTessellate2DCurve1 );
CPPUNIT_TEST( testIntersect2DMeshesTmp4 );
CPPUNIT_TEST( testGetCellIdsCrossingPlane1 );
CPPUNIT_TEST( testBuildSlice3D1 );
CPPUNIT_TEST_SUITE_END();
public:
void testUMeshTessellate2D1();
+ void testUMeshTessellate2DCurve1();
void testIntersect2DMeshesTmp4();
void testGetCellIdsCrossingPlane1();
void testBuildSlice3D1();