bool fileOK;
#ifdef WIN32
#ifdef UNICODE
- const wchar_t* path = Kernel_Utils::decode_s(xmlPath);
+ const wchar_t* path = Kernel_Utils::decode_s(xmlPath);
#else
- const char* path = xmlPath.c_str();
+ const char* path = xmlPath.c_str();
#endif
fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
#ifdef UNICODE
- delete path;
+ delete path;
#endif
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
{
TPosInList smPos = find( smBeg, smEnd, smVec[i] );
if ( smPos != smEnd ) {
- onlyOrderedList.push_back( smVec[i] );
sortedPos[ distance( smBeg, smPos )] = smPos;
+ if ( sortedPos.size() > onlyOrderedList.size() )
+ onlyOrderedList.push_back( smVec[i] );
}
}
}
TEPairVec& theNew2OldFaces,
TNPairVec& theNew2OldNodes)
{
+ if ( theSrcMesh.GetMeshInfo().NbFaces( ORDER_QUADRATIC ) > 0 )
+ throw SALOME_Exception( "Offset of quadratic mesh not supported" );
+ if ( theSrcMesh.GetMeshInfo().NbFaces() > theSrcMesh.GetMeshInfo().NbTriangles() )
+ throw SALOME_Exception( "Offset of non-triangular mesh not supported" );
+
SMDS_Mesh* newMesh = new SMDS_Mesh;
theNew2OldFaces.clear();
theNew2OldNodes.clear();
( std::make_pair(( const SMDS_MeshElement*) 0,
( const SMDS_MeshElement*) 0)); // to have index == face->GetID()
- if ( theSrcMesh.GetMeshInfo().NbFaces( ORDER_QUADRATIC ) > 0 )
- throw SALOME_Exception( "Offset of quadratic mesh not supported" );
- if ( theSrcMesh.GetMeshInfo().NbFaces() > theSrcMesh.GetMeshInfo().NbTriangles() )
- throw SALOME_Exception( "Offset of non-triangular mesh not supported" );
-
// copy input faces to the newMesh keeping IDs of nodes
double minNodeDist = 1e100;