Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git]
/
src
/
DriverUNV
/
DriverUNV_W_SMDS_Mesh.cxx
diff --git
a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
index 6b507b00e84a3ec8c0a6ad1c79065cd9c0119431..2263c1530def44f1c9c789ff663ab28d6f19ca01 100644
(file)
--- a/
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
+++ b/
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-202
0
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-202
1
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-45,6
+45,10
@@
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
{
Kernel_Utils::Localizer loc;
Status aResult = DRS_OK;
{
Kernel_Utils::Localizer loc;
Status aResult = DRS_OK;
+
+ if ( Driver_Mesh::IsMeshTooLarge< int >( myMesh, /*checkIDs =*/ false))
+ return DRS_TOO_LARGE_MESH;
+
#if defined(WIN32) && defined(UNICODE)
std::wstring aFile = Kernel_Utils::utf8_decode_s(myFile);
std::ofstream out_stream(aFile.c_str());
#if defined(WIN32) && defined(UNICODE)
std::wstring aFile = Kernel_Utils::utf8_decode_s(myFile);
std::ofstream out_stream(aFile.c_str());
@@
-113,7
+117,7
@@
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
{
const SMDS_MeshNode* aNode = aNodesIter->next();
if ( nodeLabelByID.empty() )
{
const SMDS_MeshNode* aNode = aNodesIter->next();
if ( nodeLabelByID.empty() )
- aRec.node_labels.push_back(
aNode->GetID(
) );
+ aRec.node_labels.push_back(
FromSmIdType<int>(aNode->GetID()
) );
else
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
}
else
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
}
@@
-137,7
+141,7
@@
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
for ( aRec.node_labels.clear(); aNodesIter->more(); ) {
const SMDS_MeshNode* aNode = aNodesIter->next();
if ( nodeLabelByID.empty() )
for ( aRec.node_labels.clear(); aNodesIter->more(); ) {
const SMDS_MeshNode* aNode = aNodesIter->next();
if ( nodeLabelByID.empty() )
- aRec.node_labels.push_back(
aNode->GetID(
) );
+ aRec.node_labels.push_back(
FromSmIdType<int>(aNode->GetID()
) );
else
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
}
else
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
}
@@
-195,7
+199,7
@@
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
{
const SMDS_MeshElement* aNode = aNodesIter->next();
if ( nodeLabelByID.empty() )
{
const SMDS_MeshElement* aNode = aNodesIter->next();
if ( nodeLabelByID.empty() )
- aRec.node_labels.push_back(
aNode->GetID(
) );
+ aRec.node_labels.push_back(
FromSmIdType<int>(aNode->GetID()
) );
else
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
}
else
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
}
@@
-226,7
+230,7
@@
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
while ( aIter->more() ) {
const SMDS_MeshElement* aNode = aIter->next();
if ( nodeLabelByID.empty() )
while ( aIter->more() ) {
const SMDS_MeshElement* aNode = aIter->next();
if ( nodeLabelByID.empty() )
- aRec.NodeList.push_back(
aNode->GetID(
) );
+ aRec.NodeList.push_back(
FromSmIdType<int>(aNode->GetID()
) );
else
aRec.NodeList.push_back( nodeLabelByID[ aNode->GetID() ]);
}
else
aRec.NodeList.push_back( nodeLabelByID[ aNode->GetID() ]);
}
@@
-236,7
+240,7
@@
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
while ( aIter->more() ) {
const SMDS_MeshElement* aElem = aIter->next();
if ( elemLabelByID.empty() )
while ( aIter->more() ) {
const SMDS_MeshElement* aElem = aIter->next();
if ( elemLabelByID.empty() )
- aRec.ElementList.push_back(
aElem->GetID(
) );
+ aRec.ElementList.push_back(
FromSmIdType<int>(aElem->GetID()
) );
else
aRec.ElementList.push_back( elemLabelByID[ aElem->GetID() ]);
}
else
aRec.ElementList.push_back( elemLabelByID[ aElem->GetID() ]);
}
@@
-256,11
+260,11
@@
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
EXCEPTION(runtime_error,"ERROR: Output file not good.");
}
catch(const std::exception& exc){
EXCEPTION(runtime_error,"ERROR: Output file not good.");
}
catch(const std::exception& exc){
- INFOS("Follow exception was c
o
ught:\n\t"<<exc.what());
+ INFOS("Follow exception was c
a
ught:\n\t"<<exc.what());
throw;
}
catch(...){
throw;
}
catch(...){
- INFOS("Unknown exception was c
o
ught !!!");
+ INFOS("Unknown exception was c
a
ught !!!");
throw;
}
return aResult;
throw;
}
return aResult;