X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Gen.cxx;h=d98bb8fc1dbb8734b20e3451ce40ac179de155a7;hp=36e454366a4165396b8da07ba93724a5e0eb7ee6;hb=6d32f944a0a115b6419184c50b57bf7c4eef5786;hpb=7a3ecab720cc517ace17c5c4677fd3c20c0051ee diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 36e454366..d98bb8fc1 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -52,10 +52,9 @@ #include #endif -using namespace std; - -//#include +#include +using namespace std; //============================================================================= /*! @@ -70,9 +69,7 @@ SMESH_Gen::SMESH_Gen() _localId = 0; _hypId = 0; _segmentation = _nbSegments = 10; - SMDS_Mesh::_meshList.clear(); _compute_canceled = false; - //vtkDebugLeaks::SetExitError(0); } namespace @@ -400,8 +397,10 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, } if ( aCompactMesh ) - aMesh.GetMeshDS()->compactMesh(); - + { + aMesh.GetMeshDS()->Modified(); + aMesh.GetMeshDS()->CompactMesh(); + } return ret; } @@ -668,7 +667,7 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh& aMesh, checkConform = false; // no more check conformity INFOS( "ERROR: Local <" << algo->GetName() << "> would produce not conform mesh: " - " hypotesis is missing"); + " hypothesis is missing"); theErrors.push_back( SMESH_Gen::TAlgoStateError() ); theErrors.back().Set( SMESH_Hypothesis::HYP_NOTCONFORM, algo, false ); } @@ -1032,7 +1031,15 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths() xmlPath += sep + plugin + ".xml"; bool fileOK; #ifdef WIN32 - fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES); +#ifdef UNICODE + const wchar_t* path = Kernel_Utils::decode_s(xmlPath); +#else + const char* path = xmlPath.c_str(); +#endif + fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES); +#ifdef UNICODE + delete path; +#endif #else fileOK = (access(xmlPath.c_str(), F_OK) == 0); #endif @@ -1173,7 +1180,7 @@ int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType) //============================================================================= /*! - * Genarate a new id unique within this Gen + * Generate a new id unique within this Gen */ //=============================================================================