\endcode
generates a \a med file named \a myfile.sauv.med
-An optional argument --keep2DOri allows preventing reversion of mesh faces
-in 3D space. If this option is not provided, there is an attempt to orient
-adjacent faces equally.
+An optional argument --fix2DOri enables an attempt to orient adjacent
+faces equally in 3D space.
\section med2sauv med2sauv tool
//================================================================================
/*!
* \brief Makes ParaMEDMEM::MEDFileData from self
- * \param [in] keep2DOri - to keep or not orientation of faces in 3D space
+ * \param [in] fix2DOri - to fix or not orientation of faces in 3D space
* \return ParaMEDMEM::MEDFileData* - conversion result
*/
//================================================================================
-ParaMEDMEM::MEDFileData* IntermediateMED::convertInMEDFileDS(bool keep2DOri)
+ParaMEDMEM::MEDFileData* IntermediateMED::convertInMEDFileDS(bool fix2DOri)
{
- MEDCouplingAutoRefCountObjectPtr< MEDFileUMesh > mesh = makeMEDFileMesh(keep2DOri);
+ MEDCouplingAutoRefCountObjectPtr< MEDFileUMesh > mesh = makeMEDFileMesh(fix2DOri);
MEDCouplingAutoRefCountObjectPtr< MEDFileFields > fields = makeMEDFileFields(mesh);
MEDCouplingAutoRefCountObjectPtr< MEDFileMeshes > meshes = MEDFileMeshes::New();
*/
//================================================================================
-ParaMEDMEM::MEDFileUMesh* IntermediateMED::makeMEDFileMesh(bool keep2DOri)
+ParaMEDMEM::MEDFileUMesh* IntermediateMED::makeMEDFileMesh(bool fix2DOri)
{
// check if all needed piles are present
checkDataAvailability();
if ( _spaceDim == 2 || _spaceDim == 1 )
orientElements2D();
else if ( _spaceDim == 3 )
- orientElements3D( keep2DOri );
+ orientElements3D( fix2DOri );
// process groups
decreaseHierarchicalDepthOfSubgroups();
*/
//================================================================================
-void IntermediateMED::orientElements3D(bool keep2DOri)
+void IntermediateMED::orientElements3D(bool fix2DOri)
{
// set _reverse flags of faces
- if ( !keep2DOri )
+ if ( fix2DOri )
orientFaces3D();
// -----------------
const Cell* insert(TCellType type, const Cell& ma) { return &( *_cellsByType[type].insert( ma ).first ); }
Group* addNewGroup(std::vector<SauvUtilities::Group*>* groupsToFix=0);
- ParaMEDMEM::MEDFileData* convertInMEDFileDS(bool keep2DOri);
+ ParaMEDMEM::MEDFileData* convertInMEDFileDS(bool fix2DOri);
private:
- ParaMEDMEM::MEDFileUMesh* makeMEDFileMesh(bool keep2DOri);
+ ParaMEDMEM::MEDFileUMesh* makeMEDFileMesh(bool fix2DOri);
ParaMEDMEM::DataArrayDouble * getCoords();
void setConnectivity( ParaMEDMEM::MEDFileUMesh* mesh, ParaMEDMEM::DataArrayDouble* coords );
void setGroups( ParaMEDMEM::MEDFileUMesh* mesh );
void eraseUselessGroups();
void detectMixDimGroups();
void orientElements2D();
- void orientElements3D(bool keep2DOri);
+ void orientElements3D(bool fix2DOri);
void orientFaces3D();
void orientVolumes();
void numberElements();
*/
//================================================================================
-ParaMEDMEM::MEDFileData * SauvReader::loadInMEDFileDS(bool keep2DOri)
+ParaMEDMEM::MEDFileData * SauvReader::loadInMEDFileDS(bool fix2DOri)
{
SauvUtilities::IntermediateMED iMed; // intermadiate DS
_iMed = &iMed;
THROW_IK_EXCEPTION("XDR : ENREGISTREMENT DE TYPE " << recordNumber << " not implemented!!!");
}
- ParaMEDMEM::MEDFileData* medFileData = iMed.convertInMEDFileDS( keep2DOri );
+ ParaMEDMEM::MEDFileData* medFileData = iMed.convertInMEDFileDS( fix2DOri );
return medFileData;
}
{
public:
MEDLOADER_EXPORT static SauvReader* New(const std::string& fileName);
- MEDLOADER_EXPORT ParaMEDMEM::MEDFileData * loadInMEDFileDS(bool keep2DOri=false);
+ MEDLOADER_EXPORT ParaMEDMEM::MEDFileData * loadInMEDFileDS(bool fix2DOri=false);
MEDLOADER_EXPORT ~SauvReader();
private:
{
public:
static SauvReader* New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
- MEDFileData * loadInMEDFileDS(bool keep2DOri=false) throw(INTERP_KERNEL::Exception);
+ MEDFileData * loadInMEDFileDS(bool fix2DOri=false) throw(INTERP_KERNEL::Exception);
%extend
{
SauvReader(const std::string& fileName) throw(INTERP_KERNEL::Exception)
raise NotImplementedError("Driver in %s is unknown"%(driver_in))
def sauv2med(*argv):
- keep2DOri = ( "--keep2DOri" in argv )
+ fix2DOri = ( "--fix2DOri" in argv )
for arg in argv:
- if not arg.startswith("--keep"):
- convert(arg, "GIBI", "MED", format = keep2DOri)
+ if not arg.startswith("--fix"):
+ convert(arg, "GIBI", "MED", format = fix2DOri)
pass
return