if(c1->getInfoOnComponent(0)!="")
throw INTERP_KERNEL::Exception("Nodal connectivity index array is expected to have no info on its single component !");
int f=c1->front(),ll=c1->back();
- if(f<0 || f>=sz2)
+ if(f<0 || (sz2>0 && f>=sz2))
{
std::ostringstream oss; oss << "Nodal connectivity index array first value (" << f << ") is expected to be exactly in [0," << sz2 << ") !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
/*!
- * This method aggregate the bbox of each cell and put it into bbox parameter.
+ * This method aggregate the bbox of each cell and put it into bbox parameter (xmin,xmax,ymin,ymax,zmin,zmax).
*
* \param [in] arcDetEps - a parameter specifying in case of 2D quadratic polygon cell the detection limit between linear and arc circle. (By default 1e-12)
* For all other cases this input parameter is ignored.
self.assertEqual(a,3.2,12)
pass
+ def testNoThrowOn1DGTU2UOnNullCells(self):
+ """ Non regression test : no throw when trying to convert 1DGTUMesh to UMesh on an empty mesh"""
+ m=MEDCoupling1DGTUMesh("",NORM_POLYGON) ; m.setCoords(DataArrayDouble([],0,3))
+ m.setNodalConnectivity(DataArrayInt([]),DataArrayInt([0]))
+ m=m.buildUnstructured()
+ pass
+
pass
if __name__ == '__main__':