Remove some warnings and fix indentation

This commit is contained in:
eap 2021-03-12 19:14:26 +03:00
parent 7745fdb726
commit bfa9ca6ac6
15 changed files with 101 additions and 100 deletions

View File

@ -230,12 +230,12 @@ module SMESH
enum DriverMED_ReadStatus // in the order of severity
{
DRS_OK,
DRS_EMPTY, // a file contains no mesh with the given name
DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers,
// so the numbers from the file are ignored
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
DRS_EMPTY, // a file contains no mesh with the given name
DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers,
// so the numbers from the file are ignored
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
DRS_FAIL // general failure (exception etc.)
DRS_FAIL // general failure (exception etc.)
};
/*!

View File

@ -76,7 +76,7 @@ Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
myMesh->AddNodeWithID(coordX, coordY, coordZ, intNumPoint);
}
fprintf(stdout, "%d noeuds\n", myMesh->NbNodes());
fprintf(stdout, "%ld noeuds\n", myMesh->NbNodes());
/****************************************************************************
* LECTURE DES ELEMENTS *
****************************************************************************/

View File

@ -70,7 +70,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
SCRUTE(nb_of_volumes);
//fprintf(stdout, "%d %d\n", nbNodes, nbCells);
fprintf(aFileId, "%d %d\n", nbNodes, nbCells);
fprintf(aFileId, "%ld %ld\n", nbNodes, nbCells);
/****************************************************************************
* ECRITURE DES NOEUDS *
@ -107,7 +107,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ];
fprintf(aFileId, "%d ", nodeID );
fprintf(aFileId, "%ld ", nodeID );
}
fprintf(aFileId, "\n");
}
@ -123,7 +123,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ];
fprintf(aFileId, "%d ", nodeID );
fprintf(aFileId, "%ld ", nodeID );
}
fprintf(aFileId, "\n");
}
@ -158,7 +158,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ];
fprintf(aFileId, "%d ", nodeID );
fprintf(aFileId, "%ld ", nodeID );
}
fprintf(aFileId, "\n");

View File

@ -273,14 +273,14 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
for ( int i = 1; i <= nbTet; ++i )
{
GmfGetLin(meshID, GmfTetrahedra, &iN[0], &iN[1], &iN[2], &iN[3], &ref);
std::vector<int>& midN = quadNodesAtTetrahedra[ i ];
std::vector<int>& midN = quadNodesAtTetrahedra[ i ];
if ( midN.size() >= 10-4 ) // TETRA10
{
if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3],
if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3],
midN[2], midN[1], midN[0], midN[3], midN[5], midN[4],
tetIDShift + i ))
status = storeBadNodeIds( "GmfTetrahedra + GmfExtraVerticesAtTetrahedra",i, 10,
iN[0], iN[2], iN[1], iN[3],
iN[0], iN[2], iN[1], iN[3],
midN[2], midN[1], midN[0], midN[3], midN[5], midN[4] );
}
else // TETRA4
@ -321,7 +321,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
&iN[6], &iN[7], &iN[8], &iN[9],
&iN[10], &iN[11], &iN[12], &iN[13], // HEXA20
&iN[14],
&iN[15], &iN[16], &iN[17], &iN[18],
&iN[15], &iN[16], &iN[17], &iN[18],
&iN[19],
&iN[20]); // HEXA27
if ( iN[0] <= nbHex )
@ -347,7 +347,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
midN[7], midN[6], midN[5], midN[4],
midN[8], midN[11], midN[10], midN[9],
hexIDShift + i ))
status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 20,
status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 20,
iN[0], iN[3], iN[2], iN[1],
iN[4], iN[7], iN[6], iN[5],
midN[3], midN[2], midN[1], midN[0],
@ -366,7 +366,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
midN[17],
midN[18],
hexIDShift + i ))
status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 27,
status = storeBadNodeIds( "GmfHexahedra + GmfExtraVerticesAtHexahedra",i, 27,
iN[0], iN[3], iN[2], iN[1],
iN[4], iN[7], iN[6], iN[5],
midN[3], midN[2], midN[1], midN[0],
@ -405,33 +405,33 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
// Read some entities into groups
// see MeshGems/Docs/meshgems_formats_description.pdf
// get ids of existing groups
std::set< int > groupIDs;
const std::set<SMESHDS_GroupBase*>& groups = myMesh->GetGroups();
std::set<SMESHDS_GroupBase*>::const_iterator grIter = groups.begin();
for ( ; grIter != groups.end(); ++grIter )
groupIDs.insert( (*grIter)->GetID() );
if ( groupIDs.empty() ) groupIDs.insert( 0 );
// get ids of existing groups
std::set< int > groupIDs;
const std::set<SMESHDS_GroupBase*>& groups = myMesh->GetGroups();
std::set<SMESHDS_GroupBase*>::const_iterator grIter = groups.begin();
for ( ; grIter != groups.end(); ++grIter )
groupIDs.insert( (*grIter)->GetID() );
if ( groupIDs.empty() ) groupIDs.insert( 0 );
// Read required entities into groups
if ( _makeRequiredGroups )
{
const int kes[4][3] = { { GmfRequiredVertices, SMDSAbs_Node, nodeIDShift },
{ GmfRequiredEdges, SMDSAbs_Edge, edgeIDShift },
{ GmfRequiredTriangles, SMDSAbs_Face, triaIDShift },
{ GmfRequiredQuadrilaterals,SMDSAbs_Face, quadIDShift }
};
const smIdType kes[4][3] = { { GmfRequiredVertices, SMDSAbs_Node, nodeIDShift },
{ GmfRequiredEdges, SMDSAbs_Edge, edgeIDShift },
{ GmfRequiredTriangles, SMDSAbs_Face, triaIDShift },
{ GmfRequiredQuadrilaterals,SMDSAbs_Face, quadIDShift }
};
const char* names[4] = { "_required_Vertices" ,
"_required_Edges" ,
"_required_Triangles" ,
"_required_Quadrilaterals"
};
"_required_Quadrilaterals"
};
for ( int i = 0; i < 4; ++i )
{
int gmfKwd = kes[i][0];
int gmfKwd = FromIdType<int>( kes[i][0] );
SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
int shift = kes[i][2];
smIdType shift = kes[i][2];
if ( int nb = GmfStatKwd(meshID, gmfKwd))
{
const int newID = *groupIDs.rbegin() + 1;
@ -454,27 +454,27 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
if ( _makeFaultGroups )
{
const int kes[7][3] = { { GmfFault_SmallTri, SMDSAbs_Face, triaIDShift },
{ GmfFault_BadShape, SMDSAbs_Face, triaIDShift },
{ GmfFault_Overlap, SMDSAbs_Face, triaIDShift },
{ GmfFault_Inter, SMDSAbs_Face, triaIDShift },
{ GmfFault_NearTri, SMDSAbs_Face, triaIDShift },
{ GmfFault_FreeEdge, SMDSAbs_Face, triaIDShift },
{ GmfFault_MultipleEdge, SMDSAbs_Face, triaIDShift }
};
const smIdType kes[7][3] = { { GmfFault_SmallTri, SMDSAbs_Face, triaIDShift },
{ GmfFault_BadShape, SMDSAbs_Face, triaIDShift },
{ GmfFault_Overlap, SMDSAbs_Face, triaIDShift },
{ GmfFault_Inter, SMDSAbs_Face, triaIDShift },
{ GmfFault_NearTri, SMDSAbs_Face, triaIDShift },
{ GmfFault_FreeEdge, SMDSAbs_Face, triaIDShift },
{ GmfFault_MultipleEdge, SMDSAbs_Face, triaIDShift }
};
const char* names[7] = { "Fault_SmallTri",
"Fault_BadShape",
"Fault_Overlap",
"Fault_Inter",
"Fault_Inter",
"Fault_NearTri",
"Fault_FreeEdge",
"Fault_MultipleEdge"
};
};
for ( int i = 0; i < 7; ++i )
{
int gmfKwd = kes[i][0];
int gmfKwd = FromIdType<int>( kes[i][0] );
SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
int shift = kes[i][2];
smIdType shift = kes[i][2];
if ( int nb = GmfStatKwd(meshID, gmfKwd))
{
const int newID = *groupIDs.rbegin() + 1;

View File

@ -35,7 +35,8 @@ typedef std::list<SMESHDS_GroupBase*> TGroupList;
class MESHDRIVERUNV_EXPORT DriverUNV_W_SMDS_Mesh: public Driver_SMDS_Mesh
{
public:
virtual Status Perform();
virtual Status Perform() override;
void AddGroup(SMESHDS_GroupBase* theGroup) { myGroups.push_back(theGroup); }

View File

@ -145,18 +145,18 @@ void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled)
{
myPointsNumDataSet->ShallowCopy(aGrid);
vtkUnstructuredGrid *aDataSet = myPointsNumDataSet;
vtkIdType aNbElem = aDataSet->GetNumberOfPoints();
vtkIdTypeArray *anArray = vtkIdTypeArray::New();
vtkIdType aNbElem = aDataSet->GetNumberOfPoints();
vtkIdTypeArray *anArray = vtkIdTypeArray::New();
anArray->SetNumberOfValues( aNbElem );
for ( vtkIdType anId = 0; anId < aNbElem; anId++ )
{
vtkIdType aSMDSId = myVisualObj->GetNodeObjId( anId );
vtkIdType aSMDSId = myVisualObj->GetNodeObjId( anId );
anArray->SetValue( anId, aSMDSId );
}
aDataSet->GetPointData()->SetScalars( anArray );
myPtsMaskPoints->SetInputData( aDataSet );
myPointLabels->SetVisibility( GetVisibility() );

View File

@ -135,7 +135,7 @@ SMESH_SVTKActor
}
outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2);
for(vtkIdType ind = 1; ind <= aNbOfParts; ind++){
vtkIdType aPartId = theMapIndex( ind );
vtkIdType aPartId = theMapIndex( ind );
if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
{
if (aCell->GetCellType() != VTK_POLYHEDRON)

View File

@ -2221,11 +2221,11 @@ void SMESHGUI_GroupDlg::onSort()
// QMemArray<int> anArray(k);
// fill the array
for (i = 0; i < k; i++) {
vtkIdType id;
if (sizeof(vtkIdType)==8)
id = myElements->item(i)->text().toLongLong();
else
id = myElements->item(i)->text().toInt();
vtkIdType id;
if (sizeof(vtkIdType)==8)
id = myElements->item(i)->text().toLongLong();
else
id = myElements->item(i)->text().toInt();
anArray[i] = id;
if (myElements->item(i)->isSelected())
aSelected.append(id);

View File

@ -369,9 +369,9 @@ void SMESHGUI_SingleEditDlg::onTextChange (const QString& /*theNewText*/)
if ( findTriangles(aNode1,aNode2,tria1,tria2) )
{
newIndices.push_back( aNode1->GetID() );
newIndices.push_back( aNode2->GetID() );
newIndices.push_back( aNode1->GetID() );
newIndices.push_back( aNode2->GetID() );
myOkBtn->setEnabled(true);
myApplyBtn->setEnabled(true);
}
@ -410,22 +410,22 @@ void SMESHGUI_SingleEditDlg::onSelectionDone()
if(SMDS_Mesh* aMesh = aVisualObj->GetMesh())
{
const SMDS_MeshElement* tria[2];
bool valid = false;
bool valid = false;
SVTK_IndexedMapOfVtkIds anIds;
mySelector->GetCompositeIndex(anIO,anIds);
if( anIds.Extent() == 1 && anIds(1).size() == 2 ) {
anId1 = anIds(1)[0];
anId2 = anIds(1)[1];
valid = true;
anId1 = anIds(1)[0];
anId2 = anIds(1)[1];
valid = true;
}
if( valid &&
findTriangles( aMesh->FindNode( anId1 ), aMesh->FindNode( anId2 ), tria[0],tria[1] ) )
{
QString aText = QString("%1-%2").arg(anId1).arg(anId2);
myEdge->setText(aText);
myOkBtn->setEnabled(true);
myApplyBtn->setEnabled(true);
}

View File

@ -4237,7 +4237,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
if ( grImpl )
{
CORBA::String_var objStr = GetORB()->object_to_string( grImpl->_this() );
smIdType anId = myStudyContext->findId( string( objStr.in() ) );
int anId = myStudyContext->findId( string( objStr.in() ) );
char grpName[ 30 ];
sprintf( grpName, "Group %d %d", anId, grImpl->GetLocalID() );
SMESHDS_GroupBase* aGrpBaseDS = grImpl->GetGroupDS();
@ -4294,7 +4294,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
#endif
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
CORBA::String_var hypdata = myImpl->SaveTo();
smIdType id = myStudyContext->findId( string( objStr.in() ));
int id = myStudyContext->findId( string( objStr.in() ));
// for each hypothesis create HDF group basing on its id
char hypGrpName[30];
@ -4362,7 +4362,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
#endif
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
CORBA::String_var hypdata = myImpl->SaveTo();
smIdType id = myStudyContext->findId( string( objStr.in() ) );
int id = myStudyContext->findId( string( objStr.in() ) );
// for each algorithm create HDF group basing on its id
char hypGrpName[30];
@ -4405,7 +4405,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
SMESH_Mesh_i* myImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( myMesh ).in() );
if ( myImpl ) {
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
smIdType id = myStudyContext->findId( string( objStr.in() ) );
int id = myStudyContext->findId( string( objStr.in() ) );
::SMESH_Mesh& myLocMesh = myImpl->GetImpl();
SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
bool hasShape = myLocMesh.HasShapeToMesh();
@ -4524,7 +4524,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
//string myRefOnObject = myRefOnHyp->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
smIdType id = myStudyContext->findId( string( objStr.in() ) );
int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char hypName[ 30 ], hypId[ 30 ];
@ -4568,7 +4568,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
//string myRefOnObject = myRefOnAlgo->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
smIdType id = myStudyContext->findId( string( objStr.in() ) );
int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char algoName[ 30 ], algoId[ 30 ];
@ -4659,7 +4659,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
{
SMESH::SMESH_subMesh_var mySubMesh = SMESH::SMESH_subMesh::_narrow( anSubObject ) ;
CORBA::String_var objStr = GetORB()->object_to_string( anSubObject );
smIdType subid = myStudyContext->findId( string( objStr.in() ) );
int subid = myStudyContext->findId( string( objStr.in() ) );
// for each mesh open the HDF group basing on its id
char submeshGrpName[ 30 ];
@ -4698,7 +4698,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
//string myRefOnObject = myRefOnHyp->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
smIdType id = myStudyContext->findId( string( objStr.in() ) );
int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char hypName[ 30 ], hypId[ 30 ];
@ -4735,7 +4735,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
//string myRefOnObject = myRefOnAlgo->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
smIdType id = myStudyContext->findId( string( objStr.in() ) );
int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char algoName[ 30 ], algoId[ 30 ];
@ -4864,7 +4864,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
continue;
CORBA::String_var objStr = GetORB()->object_to_string( aSubObject );
smIdType anId = myStudyContext->findId( string( objStr.in() ) );
int anId = myStudyContext->findId( string( objStr.in() ) );
// For each group, create a dataset named "Group <group_persistent_id>"
// and store the group's user name into it
@ -5330,7 +5330,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
// myImpl->LoadFrom( hypdata.c_str() );
hypDataList.push_back( make_pair( myImpl, hypdata ));
CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
smIdType newId = myStudyContext->findId( iorString.in() );
int newId = myStudyContext->findId( iorString.in() );
myStudyContext->mapOldToNew( id, newId );
}
else
@ -5434,7 +5434,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
//myImpl->LoadFrom( hypdata.c_str() );
hypDataList.push_back( make_pair( myImpl, hypdata ));
CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
smIdType newId = myStudyContext->findId( iorString.in() );
int newId = myStudyContext->findId( iorString.in() );
myStudyContext->mapOldToNew( id, newId );
}
else
@ -5475,7 +5475,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
meshGroupList.push_back( make_pair( myNewMeshImpl, aTopGroup ));
CORBA::String_var iorString = GetORB()->object_to_string( myNewMesh );
smIdType newId = myStudyContext->findId( iorString.in() );
int newId = myStudyContext->findId( iorString.in() );
myStudyContext->mapOldToNew( id, newId );
// ouv : NPAL12872
@ -5578,7 +5578,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
// get mesh old id
CORBA::String_var iorString = GetORB()->object_to_string( myNewMeshImpl->_this() );
smIdType newId = myStudyContext->findId( iorString.in() );
int newId = myStudyContext->findId( iorString.in() );
int meshOldId = myStudyContext->getOldId( newId );
// try to find mesh data dataset
@ -5730,7 +5730,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
if ( aSubMesh->_is_nil() )
continue;
string iorSubString = GetORB()->object_to_string( aSubMesh );
smIdType newSubId = myStudyContext->findId( iorSubString );
int newSubId = myStudyContext->findId( iorSubString );
myStudyContext->mapOldToNew( subid, newSubId );
}
}
@ -5923,7 +5923,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
continue;
string iorSubString = GetORB()->object_to_string( aNewGroup );
smIdType newSubId = myStudyContext->findId( iorSubString );
int newSubId = myStudyContext->findId( iorSubString );
myStudyContext->mapOldToNew( subid, newSubId );
SMESH_GroupBase_i* aGroupImpl = SMESH::DownCast< SMESH_GroupBase_i*>( aNewGroup );
@ -6192,7 +6192,7 @@ char* SMESH_Gen_i::IORToLocalPersistentID( SALOMEDS::SObject_ptr /*theSObject*/,
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" );
if ( myStudyContext && strcmp( IORString, "" ) != 0 ) {
smIdType anId = myStudyContext->findId( IORString );
int anId = myStudyContext->findId( IORString );
if ( anId ) {
if(MYDEBUG) MESSAGE( "VSR " << anId )
char strId[ 20 ];

View File

@ -622,7 +622,7 @@ SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedNodes();
myLastCreatedNodes->length( aSeq.size() );
for ( smIdType i = 0; i < aSeq.size(); i++)
for ( size_t i = 0; i < aSeq.size(); i++)
myLastCreatedNodes[i] = aSeq[i]->GetID();
return myLastCreatedNodes._retn();
@ -644,7 +644,7 @@ SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedElems()
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedElems();
myLastCreatedElems->length( aSeq.size() );
for ( smIdType i = 0; i < aSeq.size(); i++ )
for ( size_t i = 0; i < aSeq.size(); i++ )
myLastCreatedElems[i] = aSeq[i]->GetID();
return myLastCreatedElems._retn();
@ -1275,7 +1275,7 @@ SMESH_MeshEditor_i::Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObje
SMESH::smIdType_array_var newElems = new SMESH::smIdType_array;
newElems->length( elems0D.size() );
TIDSortedElemSet::iterator eIt = elems0D.begin();
for ( smIdType i = 0; i < elems0D.size(); ++i, ++eIt )
for ( size_t i = 0; i < elems0D.size(); ++i, ++eIt )
newElems[ i ] = (*eIt)->GetID();
SMESH::SMESH_GroupBase_var groupToFill;
@ -4575,7 +4575,7 @@ SMESH::smIdType_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double
SMDSAbs_ElementType( type ),
foundElems);
res->length( foundElems.size() );
for ( smIdType i = 0; i < foundElems.size(); ++i )
for ( size_t i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID();
return res._retn();
@ -4646,7 +4646,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
SMDSAbs_ElementType( type ),
foundElems);
res->length( foundElems.size() );
for ( smIdType i = 0; i < foundElems.size(); ++i )
for ( size_t i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID();
return res._retn();

View File

@ -2052,7 +2052,7 @@ public:
for ( int i = 1; i <= idMap.Extent(); i++ ) {
myResult.push_back( std::make_pair( (int)idMap(i)[0], (int)idMap(i)[1]) );
}
}
}
};

View File

@ -2483,7 +2483,7 @@ bool StdMeshers_Prism_3D::assocOrProjBottom2Top( const gp_Trsf & bottomToTopTrsf
// Fill myBotToColumnMap
int zSize = myBlock.VerticalSize();
size_t zSize = myBlock.VerticalSize();
TNodeNodeMap::const_iterator bN_tN = n2nMapPtr->begin();
for ( ; bN_tN != n2nMapPtr->end(); ++bN_tN )
{
@ -2555,7 +2555,7 @@ bool StdMeshers_Prism_3D::projectBottomToTop( const gp_Trsf & bottom
// Fill myBotToColumnMap
int zSize = myBlock.VerticalSize();
size_t zSize = myBlock.VerticalSize();
Prism_3D::TNode prevTNode;
SMDS_NodeIteratorPtr nIt = botSMDS->GetNodes();
while ( nIt->more() )
@ -3910,7 +3910,7 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper,
return error(COMPERR_BAD_INPUT_MESH, TCom("Can't find regular quadrangle mesh ")
<< "on a side face #" << MeshDS()->ShapeToIndex( (*quad)->face ));
}
if ( !faceColumns.empty() && (int)faceColumns.begin()->second.size() != VerticalSize() )
if ( !faceColumns.empty() && faceColumns.begin()->second.size() != VerticalSize() )
return error(COMPERR_BAD_INPUT_MESH, "Different 'vertical' discretization");
// edge columns
@ -4226,7 +4226,7 @@ bool StdMeshers_PrismAsBlock::GetLayersTransformation(vector<gp_Trsf> &
const Prism_3D::TPrismTopo& prism) const
{
const bool itTopMeshed = !SubMesh( ID_BOT_FACE )->IsEmpty();
const int zSize = VerticalSize();
const size_t zSize = VerticalSize();
if ( zSize < 3 && !itTopMeshed ) return true;
trsf.resize( zSize - 1 );
@ -4273,7 +4273,7 @@ bool StdMeshers_PrismAsBlock::GetLayersTransformation(vector<gp_Trsf> &
gp_Ax3 cs0 = getLayerCoordSys(0, columns, xCol );
//double dist0 = cs0.Location().Distance( gpXYZ( (*columns[0])[0]));
toCs0.SetTransformation( cs0 );
for ( int z = 1; z < zSize; ++z )
for ( size_t z = 1; z < zSize; ++z )
{
gp_Ax3 csZ = getLayerCoordSys(z, columns, xCol );
//double distZ = csZ.Location().Distance( gpXYZ( (*columns[0])[z]));
@ -5614,7 +5614,7 @@ bool StdMeshers_Sweeper::ComputeNodesOnStraight()
int botTriaNodes[3], topTriaNodes[3];
bool checkUV = true;
int nbInternalNodes = myIntColumns.size();
size_t nbInternalNodes = myIntColumns.size();
myBotDelaunay->InitTraversal( nbInternalNodes );
while (( botNode = myBotDelaunay->NextNode( botBC, botTriaNodes )))
@ -5763,7 +5763,7 @@ bool StdMeshers_Sweeper::findDelaunayTriangles()
TopBotTriangles tbTrias;
bool checkUV = true;
int nbInternalNodes = myIntColumns.size();
size_t nbInternalNodes = myIntColumns.size();
myTopBotTriangles.resize( nbInternalNodes );
myBotDelaunay->InitTraversal( nbInternalNodes );

View File

@ -1531,7 +1531,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace,
if ( theConsiderMesh )
{
const size_t nbSegments = std::max( faceSide.NbPoints()-1, faceSide.NbSegments() );
const smIdType nbSegments = std::max( faceSide.NbPoints()-1, faceSide.NbSegments() );
if ( nbSegments < nbCorners )
return error(COMPERR_BAD_INPUT_MESH, TComm("Too few boundary nodes: ") << nbSegments);
}

View File

@ -1097,7 +1097,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
double parI = par0 + ( par1 - par0 ) * r;
Params.InsertBefore( i, parI );
auto it = nbsegs.begin();
auto incr_it = i - 2 + iDiap;
smIdType incr_it = i - 2 + iDiap;
nbsegs.insert( it + incr_it, nbSegPerDiap );
}
nbsegs[ i-2 + nbDiapason - 1 ] = nbSegPerDiap + nbTot % nbDiapason;