-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "MEDCouplingVoronoi.hxx"
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCouplingCMesh.hxx"
+#include "MEDCouplingFieldDouble.hxx"
#include "MCAuto.txx"
#include "MEDCouplingNormalizedUnstructuredMesh.txx"
throw INTERP_KERNEL::Exception("ComputeBigCellFrom : expected single element !");
MCAuto<MEDCouplingUMesh> ret(sp2->buildPartOfMySelfSlice(ccp[0],ccp[0]+1,1,true));
ret->zipCoords();
+ {
+ MCAuto<MEDCouplingFieldDouble> tmp(ret->getMeasureField(false));
+ if(tmp->getArray()->getIJ(0,0)<0)
+ ret->invertOrientationOfAllCells();
+ }
return ret;
}
newVorCell->zipCoords();
MCAuto<MEDCouplingUMesh> modifiedCell(a->buildPartOfMySelf(part->begin(),part->end()));
modifiedCell->zipCoords();
+ {
+ MCAuto<MEDCouplingFieldDouble> tmp(modifiedCell->getMeasureField(false));
+ if(tmp->getArray()->getIJ(0,0)<0)
+ modifiedCell->invertOrientationOfAllCells();
+ }
l0[poly]=modifiedCell;
//
MCAuto<DataArrayIdType> ids;
}
newVorCells.push_back(newVorCell);
}
- l0.push_back(MergeVorCells(newVorCells,eps));
+ MCAuto<MEDCouplingUMesh> mergedVorCell(MergeVorCells(newVorCells,eps));
+ {
+ MCAuto<MEDCouplingFieldDouble> tmp(mergedVorCell->getMeasureField(false));
+ if(tmp->getArray()->getIJ(0,0)<0)
+ mergedVorCell->invertOrientationOfAllCells();
+ }
+ l0.push_back(mergedVorCell);
}
std::vector< const MEDCouplingUMesh * > l0Bis(VecAutoToVecOfCstPt(l0));
MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::MergeUMeshes(l0Bis));