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.)
};
/*!
myMesh->AddNodeWithID(coordX, coordY, coordZ, intNumPoint);
}
- fprintf(stdout, "%d noeuds\n", myMesh->NbNodes());
+ fprintf(stdout, "%ld noeuds\n", myMesh->NbNodes());
/****************************************************************************
* LECTURE DES ELEMENTS *
****************************************************************************/
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 *
smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ];
- fprintf(aFileId, "%d ", nodeID );
+ fprintf(aFileId, "%ld ", nodeID );
}
fprintf(aFileId, "\n");
}
smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ];
- fprintf(aFileId, "%d ", nodeID );
+ fprintf(aFileId, "%ld ", nodeID );
}
fprintf(aFileId, "\n");
}
smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ];
- fprintf(aFileId, "%d ", nodeID );
+ fprintf(aFileId, "%ld ", nodeID );
}
fprintf(aFileId, "\n");
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
&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 )
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],
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],
// 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;
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;
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); }
{
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() );
}
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)
// 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);
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);
}
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);
}
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();
#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];
#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];
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();
//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 ];
//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 ];
{
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 ];
//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 ];
//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 ];
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
// 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
//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
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
// 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
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 );
}
}
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 );
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 ];
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();
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();
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;
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();
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();
for ( int i = 1; i <= idMap.Extent(); i++ ) {
myResult.push_back( std::make_pair( (int)idMap(i)[0], (int)idMap(i)[1]) );
- }
+ }
}
};
// 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 )
{
// Fill myBotToColumnMap
- int zSize = myBlock.VerticalSize();
+ size_t zSize = myBlock.VerticalSize();
Prism_3D::TNode prevTNode;
SMDS_NodeIteratorPtr nIt = botSMDS->GetNodes();
while ( nIt->more() )
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
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 );
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]));
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 )))
TopBotTriangles tbTrias;
bool checkUV = true;
- int nbInternalNodes = myIntColumns.size();
+ size_t nbInternalNodes = myIntColumns.size();
myTopBotTriangles.resize( nbInternalNodes );
myBotDelaunay->InitTraversal( nbInternalNodes );
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);
}
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;