IPAL52935: "Apply and Close" button is not available in "Make 0D Elements on Element Nodes" dialog box

(SMESHGUI_Add0DElemsOnAllNodesDlg.cxx)

Eliminate compilation warnings (all the rest files)
This commit is contained in:
eap 2015-10-27 20:47:31 +03:00
parent 204ce83e98
commit 3369d458ea
72 changed files with 289 additions and 324 deletions

View File

@ -234,7 +234,7 @@ namespace
dist2 = ( nn1[1] - nn2[1] ).Modulus(); dist2 = ( nn1[1] - nn2[1] ).Modulus();
tol = 1e-5 * ( nn1[0] - nn1[1] ).Modulus(); tol = 1e-5 * ( nn1[0] - nn1[1] ).Modulus();
} }
return ( dist1 < tol & dist2 < tol ); return ( dist1 < tol && dist2 < tol );
} }
return false; return false;
} }
@ -451,7 +451,7 @@ namespace
if ( !_nodeReplacementMap.empty() ) if ( !_nodeReplacementMap.empty() )
{ {
map< int, int >::const_iterator it, end = _nodeReplacementMap.end(); map< int, int >::const_iterator it, end = _nodeReplacementMap.end();
for ( size_t i = 0; i < nbIds; ++i ) for ( int i = 0; i < nbIds; ++i )
if (( it = _nodeReplacementMap.find( ids[i] + idShift)) != end ) if (( it = _nodeReplacementMap.find( ids[i] + idShift)) != end )
ids[i] = it->second; ids[i] = it->second;
else else
@ -459,7 +459,7 @@ namespace
} }
else if ( idShift ) else if ( idShift )
{ {
for ( size_t i = 0; i < nbIds; ++i ) for ( int i = 0; i < nbIds; ++i )
ids[i] += idShift; ids[i] += idShift;
} }
} }
@ -1022,7 +1022,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
if ( zone.IsStructured() ) if ( zone.IsStructured() )
{ {
int axis = 0; // axis perpendiculaire to which boundary elements are oriented int axis = 0; // axis perpendiculaire to which boundary elements are oriented
if ( ids.size() >= meshDim * 2 ) if ( (int) ids.size() >= meshDim * 2 )
{ {
for ( ; axis < meshDim; ++axis ) for ( ; axis < meshDim; ++axis )
if ( ids[axis] - ids[axis+meshDim] == 0 ) if ( ids[axis] - ids[axis+meshDim] == 0 )
@ -1127,7 +1127,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
if ( psType == CGNS_ENUMV( PointRange ) && ids.size() == 2 ) if ( psType == CGNS_ENUMV( PointRange ) && ids.size() == 2 )
{ {
for ( size_t i = ids[0]; i <= ids[1]; ++i ) for ( cgsize_t i = ids[0]; i <= ids[1]; ++i )
if ( const SMDS_MeshElement* e = myMesh->FindElement( i )) if ( const SMDS_MeshElement* e = myMesh->FindElement( i ))
groupDS.Add( e ); groupDS.Add( e );
} }

View File

@ -168,7 +168,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh,
void DriverMED_W_Field::SetCompName(const int iComp, const char* name) void DriverMED_W_Field::SetCompName(const int iComp, const char* name)
{ {
if ( _compNames.size() <= iComp ) if ( (int)_compNames.size() <= iComp )
_compNames.resize( iComp + 1 ); _compNames.resize( iComp + 1 );
_compNames[ iComp ] = name; _compNames[ iComp ] = name;
} }
@ -327,7 +327,7 @@ Driver_Mesh::Status DriverMED_W_Field::Perform()
MED::PIntTimeStampValue timeStampIntVal = timeStampVal; MED::PIntTimeStampValue timeStampIntVal = timeStampVal;
// set values // set values
int iVal = 0, i, nbE; int iVal = 0;
MED::TFloat* ptrDbl = 0; MED::TFloat* ptrDbl = 0;
MED::TInt* ptrInt = 0; MED::TInt* ptrInt = 0;
for ( size_t iG = 1; iG < _nbElemsByGeom.size(); ++iG ) for ( size_t iG = 1; iG < _nbElemsByGeom.size(); ++iG )
@ -354,6 +354,8 @@ Driver_Mesh::Status DriverMED_W_Field::Perform()
_dblValues.clear(); _dblValues.clear();
_intValues.clear(); _intValues.clear();
return DRS_OK;
} }
namespace DriverMED // Implemetation of fuctions declared in DriverMED.hxx namespace DriverMED // Implemetation of fuctions declared in DriverMED.hxx

View File

@ -183,7 +183,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
aRec.fe_descriptor_id = anId; aRec.fe_descriptor_id = anId;
aRec.node_labels.reserve(aNbNodes); aRec.node_labels.reserve(aNbNodes);
SMDS_NodeIteratorPtr aNodesIter = anElem->nodesIteratorToUNV(); SMDS_NodeIteratorPtr aNodesIter = anElem->nodesIteratorToUNV();
while ( aNodesIter->more() && aRec.node_labels.size() < aNbNodes ) while ( aNodesIter->more() && (int)aRec.node_labels.size() < aNbNodes )
{ {
const SMDS_MeshElement* aNode = aNodesIter->next(); const SMDS_MeshElement* aNode = aNodesIter->next();
aRec.node_labels.push_back(aNode->GetID()); aRec.node_labels.push_back(aNode->GetID());

View File

@ -97,10 +97,10 @@ namespace UNV{
* 6th element, to improve speed. * 6th element, to improve speed.
* We dont expect a "D" earlier * We dont expect a "D" earlier
*/ */
const int position = number.find("D",6); const size_t position = number.find("D",6);
if(position != std::string::npos){ if ( position != std::string::npos )
number.replace(position, 1, "e"); number.replace(position, 1, "e");
}
return atof (number.c_str()); return atof (number.c_str());
} }

View File

@ -90,7 +90,7 @@ class SMDS_FaceOfNodes_MyIterator:public SMDS_NodeArrayElemIterator
class _MyEdgeIterator : public SMDS_ElemIterator class _MyEdgeIterator : public SMDS_ElemIterator
{ {
vector< const SMDS_MeshElement* > myElems; vector< const SMDS_MeshElement* > myElems;
int myIndex; size_t myIndex;
public: public:
_MyEdgeIterator(const SMDS_FaceOfNodes* face):myIndex(0) { _MyEdgeIterator(const SMDS_FaceOfNodes* face):myIndex(0) {
myElems.reserve( face->NbNodes() ); myElems.reserve( face->NbNodes() );
@ -108,8 +108,7 @@ public:
virtual const SMDS_MeshElement* next() { return myElems[ myIndex++ ]; } virtual const SMDS_MeshElement* next() { return myElems[ myIndex++ ]; }
}; };
SMDS_ElemIteratorPtr SMDS_FaceOfNodes::elementsIterator SMDS_ElemIteratorPtr SMDS_FaceOfNodes::elementsIterator( SMDSAbs_ElementType type ) const
(SMDSAbs_ElementType type) const
{ {
switch(type) switch(type)
{ {

View File

@ -124,15 +124,15 @@ int SMDS_Mesh::CheckMemory(const bool doNotRaise) throw (std::bad_alloc)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Create a new mesh object /// Create a new mesh object
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
SMDS_Mesh::SMDS_Mesh() SMDS_Mesh::SMDS_Mesh():
:myParent(NULL), myNodePool(0), myVolumePool(0), myFacePool(0), myEdgePool(0), myBallPool(0),
myParent(NULL),
myNodeIDFactory(new SMDS_MeshNodeIDFactory()), myNodeIDFactory(new SMDS_MeshNodeIDFactory()),
myElementIDFactory(new SMDS_MeshElementIDFactory()), myElementIDFactory(new SMDS_MeshElementIDFactory()),
myModified(false), myModifTime(0), myCompactTime(0),
myNodeMin(0), myNodeMax(0),
myHasConstructionEdges(false), myHasConstructionFaces(false), myHasConstructionEdges(false), myHasConstructionFaces(false),
myHasInverseElements(true), myHasInverseElements(true),
myNodeMin(0), myNodeMax(0),
myNodePool(0), myEdgePool(0), myFacePool(0), myVolumePool(0),myBallPool(0),
myModified(false), myModifTime(0), myCompactTime(0),
xmin(0), xmax(0), ymin(0), ymax(0), zmin(0), zmax(0) xmin(0), xmax(0), ymin(0), ymax(0), zmin(0), zmax(0)
{ {
myMeshId = _meshList.size(); // --- index of the mesh to push back in the vector myMeshId = _meshList.size(); // --- index of the mesh to push back in the vector
@ -169,16 +169,16 @@ SMDS_Mesh::SMDS_Mesh()
/// Note that the tree structure of SMDS_Mesh seems to be unused in this version /// Note that the tree structure of SMDS_Mesh seems to be unused in this version
/// (2003-09-08) of SMESH /// (2003-09-08) of SMESH
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
SMDS_Mesh::SMDS_Mesh(SMDS_Mesh * parent) SMDS_Mesh::SMDS_Mesh(SMDS_Mesh * parent):
:myParent(parent), myNodeIDFactory(parent->myNodeIDFactory), myNodePool(parent->myNodePool),
myVolumePool(parent->myVolumePool),
myFacePool(parent->myFacePool),
myEdgePool(parent->myEdgePool),
myBallPool(parent->myBallPool),
myParent(parent), myNodeIDFactory(parent->myNodeIDFactory),
myElementIDFactory(parent->myElementIDFactory), myElementIDFactory(parent->myElementIDFactory),
myHasConstructionEdges(false), myHasConstructionFaces(false), myHasConstructionEdges(false), myHasConstructionFaces(false),
myHasInverseElements(true), myHasInverseElements(true)
myNodePool(parent->myNodePool),
myEdgePool(parent->myEdgePool),
myFacePool(parent->myFacePool),
myVolumePool(parent->myVolumePool),
myBallPool(parent->myBallPool)
{ {
} }
@ -223,7 +223,7 @@ SMDS_MeshNode * SMDS_Mesh::AddNodeWithID(double x, double y, double z, int ID)
SMDS_MeshNode * node = myNodePool->getNew(); SMDS_MeshNode * node = myNodePool->getNew();
node->init(ID, myMeshId, 0, x, y, z); node->init(ID, myMeshId, 0, x, y, z);
if (ID >= myNodes.size()) if (ID >= (int)myNodes.size())
{ {
myNodes.resize(ID+SMDS_Mesh::chunkSize, 0); myNodes.resize(ID+SMDS_Mesh::chunkSize, 0);
// MESSAGE(" ------------------ myNodes resize " << ID << " --> " << ID+SMDS_Mesh::chunkSize); // MESSAGE(" ------------------ myNodes resize " << ID << " --> " << ID+SMDS_Mesh::chunkSize);
@ -1649,7 +1649,7 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceFromVtkIdsWithID(const std::vector<vtkIdType>&
bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element) bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element)
{ {
//MESSAGE("registerElement " << ID); //MESSAGE("registerElement " << ID);
if ((ID >=0) && (ID < myCells.size()) && myCells[ID]) // --- already bound if ((ID >=0) && (ID < (int)myCells.size()) && myCells[ID]) // --- already bound
{ {
MESSAGE(" ------------------ already bound "<< ID << " " << myCells[ID]->getVtkId()); MESSAGE(" ------------------ already bound "<< ID << " " << myCells[ID]->getVtkId());
return false; return false;
@ -1664,7 +1664,7 @@ bool SMDS_Mesh::registerElement(int ID, SMDS_MeshElement* element)
if (vtkId == -1) if (vtkId == -1)
vtkId = myElementIDFactory->SetInVtkGrid(element); vtkId = myElementIDFactory->SetInVtkGrid(element);
if (vtkId >= myCellIdVtkToSmds.size()) // --- resize local vector if (vtkId >= (int)myCellIdVtkToSmds.size()) // --- resize local vector
{ {
// MESSAGE(" --------------------- resize myCellIdVtkToSmds " << vtkId << " --> " << vtkId + SMDS_Mesh::chunkSize); // MESSAGE(" --------------------- resize myCellIdVtkToSmds " << vtkId << " --> " << vtkId + SMDS_Mesh::chunkSize);
myCellIdVtkToSmds.resize(vtkId + SMDS_Mesh::chunkSize, -1); myCellIdVtkToSmds.resize(vtkId + SMDS_Mesh::chunkSize, -1);
@ -1691,7 +1691,7 @@ void SMDS_Mesh::MoveNode(const SMDS_MeshNode *n, double x, double y, double z)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
const SMDS_MeshNode * SMDS_Mesh::FindNode(int ID) const const SMDS_MeshNode * SMDS_Mesh::FindNode(int ID) const
{ {
if (ID < 1 || ID >= myNodes.size()) if (ID < 1 || ID >= (int)myNodes.size())
{ {
// MESSAGE("------------------------------------------------------------------------- "); // MESSAGE("------------------------------------------------------------------------- ");
// MESSAGE("----------------------------------- bad ID " << ID << " " << myNodes.size()); // MESSAGE("----------------------------------- bad ID " << ID << " " << myNodes.size());
@ -1707,7 +1707,7 @@ const SMDS_MeshNode * SMDS_Mesh::FindNode(int ID) const
const SMDS_MeshNode * SMDS_Mesh::FindNodeVtk(int vtkId) const const SMDS_MeshNode * SMDS_Mesh::FindNodeVtk(int vtkId) const
{ {
// TODO if needed use mesh->nodeIdFromVtkToSmds // TODO if needed use mesh->nodeIdFromVtkToSmds
if (vtkId < 0 || vtkId >= (myNodes.size() -1)) if ( vtkId < 0 || vtkId+1 >= (int) myNodes.size() )
{ {
MESSAGE("------------------------------------------------------------------------- "); MESSAGE("------------------------------------------------------------------------- ");
MESSAGE("---------------------------- bad VTK ID " << vtkId << " " << myNodes.size()); MESSAGE("---------------------------- bad VTK ID " << vtkId << " " << myNodes.size());
@ -2426,7 +2426,7 @@ const SMDS_MeshFace* SMDS_Mesh::FindFace(const SMDS_MeshNode *node1,
const SMDS_MeshElement* SMDS_Mesh::FindElement(int IDelem) const const SMDS_MeshElement* SMDS_Mesh::FindElement(int IDelem) const
{ {
if ((IDelem <= 0) || IDelem >= myCells.size()) if ( IDelem <= 0 || IDelem >= (int)myCells.size() )
{ {
MESSAGE("--------------------------------------------------------------------------------- "); MESSAGE("--------------------------------------------------------------------------------- ");
MESSAGE("----------------------------------- bad IDelem " << IDelem << " " << myCells.size()); MESSAGE("----------------------------------- bad IDelem " << IDelem << " " << myCells.size());
@ -2482,7 +2482,7 @@ const SMDS_MeshElement* SMDS_Mesh::FindElement (const vector<const SMDS_MeshNode
{ {
const SMDS_MeshElement* e = itF->next(); const SMDS_MeshElement* e = itF->next();
int nbNodesToCheck = noMedium ? e->NbCornerNodes() : e->NbNodes(); int nbNodesToCheck = noMedium ? e->NbCornerNodes() : e->NbNodes();
if ( nbNodesToCheck == nodes.size() ) if ( nbNodesToCheck == (int)nodes.size() )
{ {
for ( size_t i = 1; e && i < nodes.size(); ++i ) for ( size_t i = 1; e && i < nodes.size(); ++i )
{ {
@ -3110,8 +3110,7 @@ static set<const SMDS_MeshElement*> * getFinitElements(const SMDS_MeshElement *
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Return the list of nodes used only by the given elements /// Return the list of nodes used only by the given elements
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
static set<const SMDS_MeshElement*> * getExclusiveNodes( static set<const SMDS_MeshElement*> * getExclusiveNodes(set<const SMDS_MeshElement*>& elements)
set<const SMDS_MeshElement*>& elements)
{ {
set<const SMDS_MeshElement*> * toReturn=new set<const SMDS_MeshElement*>(); set<const SMDS_MeshElement*> * toReturn=new set<const SMDS_MeshElement*>();
set<const SMDS_MeshElement*>::iterator itElements=elements.begin(); set<const SMDS_MeshElement*>::iterator itElements=elements.begin();
@ -3200,6 +3199,7 @@ void SMDS_Mesh::addChildrenWithNodes(set<const SMDS_MeshElement*>& setOfChildren
addChildrenWithNodes(setOfChildren, ite->next(), nodes); addChildrenWithNodes(setOfChildren, ite->next(), nodes);
} }
} }
case SMDSAbs_All: break;
} }
} }
@ -3347,6 +3347,9 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem,
else else
delete (*it); delete (*it);
break; break;
case SMDSAbs_All:
case SMDSAbs_NbElementTypes: break;
} }
if (vtkid >= 0) if (vtkid >= 0)
{ {
@ -4685,7 +4688,7 @@ void SMDS_Mesh::updateNodeMinMax()
myNodeMax=0; myNodeMax=0;
return; return;
} }
while (!myNodes[myNodeMin] && (myNodeMin<myNodes.size())) while ( !myNodes[myNodeMin] && myNodeMin < (int)myNodes.size() )
myNodeMin++; myNodeMin++;
myNodeMax=myNodes.size()-1; myNodeMax=myNodes.size()-1;
while (!myNodes[myNodeMax] && (myNodeMin>=0)) while (!myNodes[myNodeMax] && (myNodeMin>=0))
@ -4775,7 +4778,7 @@ void SMDS_Mesh::compactMesh()
int SMDS_Mesh::fromVtkToSmds(int vtkid) int SMDS_Mesh::fromVtkToSmds(int vtkid)
{ {
if (vtkid >= 0 && vtkid < myCellIdVtkToSmds.size()) if (vtkid >= 0 && vtkid < (int)myCellIdVtkToSmds.size())
return myCellIdVtkToSmds[vtkid]; return myCellIdVtkToSmds[vtkid];
throw SALOME_Exception(LOCALIZED ("vtk id out of bounds")); throw SALOME_Exception(LOCALIZED ("vtk id out of bounds"));
} }

View File

@ -789,7 +789,7 @@ protected:
{ {
assert(ID >= 0); assert(ID >= 0);
myElementIDFactory->adjustMaxId(ID); myElementIDFactory->adjustMaxId(ID);
if (ID >= myCells.size()) if (ID >= (int)myCells.size())
myCells.resize(ID+SMDS_Mesh::chunkSize,0); myCells.resize(ID+SMDS_Mesh::chunkSize,0);
} }
@ -838,6 +838,8 @@ protected:
SMDS_MeshElementIDFactory *myElementIDFactory; SMDS_MeshElementIDFactory *myElementIDFactory;
SMDS_MeshInfo myInfo; SMDS_MeshInfo myInfo;
//! any add, remove or change of node or cell
bool myModified;
//! use a counter to keep track of modifications //! use a counter to keep track of modifications
unsigned long myModifTime, myCompactTime; unsigned long myModifTime, myCompactTime;
@ -848,9 +850,6 @@ protected:
bool myHasConstructionFaces; bool myHasConstructionFaces;
bool myHasInverseElements; bool myHasInverseElements;
//! any add, remove or change of node or cell
bool myModified;
double xmin; double xmin;
double xmax; double xmax;
double ymin; double ymin;

View File

@ -95,7 +95,7 @@ bool SMDS_MeshElementIDFactory::BindID(int ID, SMDS_MeshElement * elem)
//======================================================================= //=======================================================================
SMDS_MeshElement* SMDS_MeshElementIDFactory::MeshElement(int ID) SMDS_MeshElement* SMDS_MeshElementIDFactory::MeshElement(int ID)
{ {
if ((ID<1) || (ID>=myMesh->myCells.size())) if ( ID<1 || ID >= (int) myMesh->myCells.size() )
return NULL; return NULL;
const SMDS_MeshElement* elem = GetMesh()->FindElement(ID); const SMDS_MeshElement* elem = GetMesh()->FindElement(ID);
return (SMDS_MeshElement*)(elem); return (SMDS_MeshElement*)(elem);
@ -129,7 +129,7 @@ void SMDS_MeshElementIDFactory::ReleaseID(int ID, int vtkId)
//MESSAGE("~~~~~~~~~~~~~~ SMDS_MeshElementIDFactory::ReleaseID smdsId vtkId " << ID << " " << vtkId); //MESSAGE("~~~~~~~~~~~~~~ SMDS_MeshElementIDFactory::ReleaseID smdsId vtkId " << ID << " " << vtkId);
if (vtkId >= 0) if (vtkId >= 0)
{ {
assert(vtkId < myMesh->myCellIdVtkToSmds.size()); assert(vtkId < (int)myMesh->myCellIdVtkToSmds.size());
myMesh->myCellIdVtkToSmds[vtkId] = -1; myMesh->myCellIdVtkToSmds[vtkId] = -1;
myMesh->setMyModified(); myMesh->setMyModified();
} }
@ -149,7 +149,7 @@ void SMDS_MeshElementIDFactory::updateMinMax() const
{ {
myMin = INT_MAX; myMin = INT_MAX;
myMax = 0; myMax = 0;
for (int i = 0; i < myMesh->myCells.size(); i++) for (size_t i = 0; i < myMesh->myCells.size(); i++)
{ {
if (myMesh->myCells[i]) if (myMesh->myCells[i])
{ {

View File

@ -192,7 +192,7 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
inline SMDS_MeshInfo& // operator= inline SMDS_MeshInfo& // operator=
SMDS_MeshInfo::operator=(const SMDS_MeshInfo& other) SMDS_MeshInfo::operator=(const SMDS_MeshInfo& other)
{ for ( int i=0; i<myNb.size(); ++i ) if ( myNb[i] ) (*myNb[i])=(*other.myNb[i]); { for ( size_t i=0; i<myNb.size(); ++i ) if ( myNb[i] ) (*myNb[i])=(*other.myNb[i]);
myNbPolygons = other.myNbPolygons; myNbPolygons = other.myNbPolygons;
myNbQuadPolygons = other.myNbQuadPolygons; myNbQuadPolygons = other.myNbQuadPolygons;
myNbPolyhedrons = other.myNbPolyhedrons; myNbPolyhedrons = other.myNbPolyhedrons;
@ -201,7 +201,7 @@ SMDS_MeshInfo::operator=(const SMDS_MeshInfo& other)
inline void // Clear inline void // Clear
SMDS_MeshInfo::Clear() SMDS_MeshInfo::Clear()
{ for ( int i=0; i<myNb.size(); ++i ) if ( myNb[i] ) (*myNb[i])=0; { for ( size_t i=0; i<myNb.size(); ++i ) if ( myNb[i] ) (*myNb[i])=0;
myNbPolygons=myNbQuadPolygons=myNbPolyhedrons=0; myNbPolygons=myNbQuadPolygons=myNbPolyhedrons=0;
} }
@ -293,7 +293,7 @@ SMDS_MeshInfo::NbElements(SMDSAbs_ElementType type) const
int nb = 0; int nb = 0;
switch (type) { switch (type) {
case SMDSAbs_All: case SMDSAbs_All:
for ( int i=1+index( SMDSAbs_Node,1 ); i<myNb.size(); ++i ) if ( myNb[i] ) nb += *myNb[i]; for ( size_t i=1+index( SMDSAbs_Node,1 ); i<myNb.size(); ++i ) if ( myNb[i] ) nb += *myNb[i];
nb += myNbPolygons + myNbQuadPolygons + myNbPolyhedrons; nb += myNbPolygons + myNbQuadPolygons + myNbPolyhedrons;
break; break;
case SMDSAbs_Volume: case SMDSAbs_Volume:
@ -352,6 +352,7 @@ SMDS_MeshInfo::NbEntities(SMDSAbs_EntityType type) const
case SMDSEntity_Ball: return myNbBalls; case SMDSEntity_Ball: return myNbBalls;
case SMDSEntity_Quad_Polygon: return myNbQuadPolygons; case SMDSEntity_Quad_Polygon: return myNbQuadPolygons;
case SMDSEntity_Quad_Polyhedra: case SMDSEntity_Quad_Polyhedra:
case SMDSEntity_Last:
break; break;
} }
return 0; return 0;
@ -424,6 +425,7 @@ SMDS_MeshInfo::setNb(const SMDSAbs_EntityType geomType, const int nb)
case SMDSEntity_Triangle: myNbTriangles = nb; break; case SMDSEntity_Triangle: myNbTriangles = nb; break;
case SMDSEntity_Quad_Polygon: myNbQuadPolygons = nb; break; case SMDSEntity_Quad_Polygon: myNbQuadPolygons = nb; break;
case SMDSEntity_Quad_Polyhedra: case SMDSEntity_Quad_Polyhedra:
case SMDSEntity_Last:
break; break;
} }
} }

View File

@ -150,7 +150,7 @@ class SMDS_PolygonalFaceOfNodes_MyIterator:public SMDS_NodeVectorElemIterator
class _MyEdgeIterator : public SMDS_ElemIterator class _MyEdgeIterator : public SMDS_ElemIterator
{ {
vector< const SMDS_MeshElement* > myElems; vector< const SMDS_MeshElement* > myElems;
int myIndex; size_t myIndex;
public: public:
_MyEdgeIterator(const SMDS_MeshFace* face):myIndex(0) { _MyEdgeIterator(const SMDS_MeshFace* face):myIndex(0) {
myElems.reserve( face->NbNodes() ); myElems.reserve( face->NbNodes() );

View File

@ -174,7 +174,7 @@ namespace {
class _MyInterlacedNodeIterator:public SMDS_NodeIterator class _MyInterlacedNodeIterator:public SMDS_NodeIterator
{ {
const vector<const SMDS_MeshNode *>& mySet; const vector<const SMDS_MeshNode *>& mySet;
int myIndex; size_t myIndex;
const int * myInterlace; const int * myInterlace;
public: public:
_MyInterlacedNodeIterator(const vector<const SMDS_MeshNode *>& s, _MyInterlacedNodeIterator(const vector<const SMDS_MeshNode *>& s,
@ -228,7 +228,7 @@ SMDS_NodeIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesIterator() const
class _MyEdgeIterator : public SMDS_ElemIterator class _MyEdgeIterator : public SMDS_ElemIterator
{ {
vector< const SMDS_MeshElement* > myElems; vector< const SMDS_MeshElement* > myElems;
int myIndex; size_t myIndex;
public: public:
_MyEdgeIterator(const SMDS_QuadraticFaceOfNodes* face):myIndex(0) { _MyEdgeIterator(const SMDS_QuadraticFaceOfNodes* face):myIndex(0) {
myElems.reserve( face->NbNodes() ); myElems.reserve( face->NbNodes() );

View File

@ -354,7 +354,7 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes,
int SMDS_UnstructuredGrid::CellIdToDownId(int vtkCellId) int SMDS_UnstructuredGrid::CellIdToDownId(int vtkCellId)
{ {
if((vtkCellId < 0) || (vtkCellId >= _cellIdToDownId.size())) if ((vtkCellId < 0) || (vtkCellId >= (int)_cellIdToDownId.size()))
{ {
//MESSAGE("SMDS_UnstructuredGrid::CellIdToDownId structure not up to date: vtkCellId=" //MESSAGE("SMDS_UnstructuredGrid::CellIdToDownId structure not up to date: vtkCellId="
// << vtkCellId << " max="<< _cellIdToDownId.size()); // << vtkCellId << " max="<< _cellIdToDownId.size());
@ -371,7 +371,7 @@ void SMDS_UnstructuredGrid::setCellIdToDownId(int vtkCellId, int downId)
void SMDS_UnstructuredGrid::CleanDownwardConnectivity() void SMDS_UnstructuredGrid::CleanDownwardConnectivity()
{ {
for (int i = 0; i < _downArray.size(); i++) for (size_t i = 0; i < _downArray.size(); i++)
{ {
if (_downArray[i]) if (_downArray[i])
delete _downArray[i]; delete _downArray[i];

View File

@ -191,7 +191,7 @@ class SMDS_VolumeOfNodes_MyIterator:public SMDS_NodeArrayElemIterator
class _MySubIterator : public SMDS_ElemIterator class _MySubIterator : public SMDS_ElemIterator
{ {
vector< const SMDS_MeshElement* > myElems; vector< const SMDS_MeshElement* > myElems;
int myIndex; size_t myIndex;
public: public:
_MySubIterator(const SMDS_VolumeOfNodes* vol, SMDSAbs_ElementType type):myIndex(0) { _MySubIterator(const SMDS_VolumeOfNodes* vol, SMDSAbs_ElementType type):myIndex(0) {
SMDS_VolumeTool vTool(vol); SMDS_VolumeTool vTool(vol);

View File

@ -165,7 +165,7 @@ bool SMDS_VtkVolume::vtkOrder(const SMDS_MeshNode* nodes[], const int nbNodes)
const std::vector<int>& interlace = SMDS_MeshCell::toVtkOrder( VTKCellType( aVtkType )); const std::vector<int>& interlace = SMDS_MeshCell::toVtkOrder( VTKCellType( aVtkType ));
if ( !interlace.empty() ) if ( !interlace.empty() )
{ {
ASSERT( interlace.size() == nbNodes ); ASSERT( (int)interlace.size() == nbNodes );
std::vector<const SMDS_MeshNode*> initNodes( nodes, nodes+nbNodes ); std::vector<const SMDS_MeshNode*> initNodes( nodes, nodes+nbNodes );
for ( size_t i = 0; i < interlace.size(); ++i ) for ( size_t i = 0; i < interlace.size(); ++i )
nodes[i] = initNodes[ interlace[i] ]; nodes[i] = initNodes[ interlace[i] ];

View File

@ -449,7 +449,7 @@ bool SMESH_Algo::GetSortedNodesOnEdge(const SMESHDS_Mesh* theM
if ( n2 && ++nbNodes ) if ( n2 && ++nbNodes )
theNodes.insert( make_pair( l, n2 )); theNodes.insert( make_pair( l, n2 ));
return theNodes.size() == nbNodes; return (int)theNodes.size() == nbNodes;
} }
//================================================================================ //================================================================================
@ -469,7 +469,7 @@ SMESH_Algo::GetCompatibleHypoFilter(const bool ignoreAuxiliary) const
{ {
SMESH_HypoFilter* filter = new SMESH_HypoFilter(); SMESH_HypoFilter* filter = new SMESH_HypoFilter();
filter->Init( filter->HasName( _compatibleHypothesis[0] )); filter->Init( filter->HasName( _compatibleHypothesis[0] ));
for ( int i = 1; i < _compatibleHypothesis.size(); ++i ) for ( size_t i = 1; i < _compatibleHypothesis.size(); ++i )
filter->Or( filter->HasName( _compatibleHypothesis[ i ] )); filter->Or( filter->HasName( _compatibleHypothesis[ i ] ));
SMESH_HypoFilter* filterNoAux = new SMESH_HypoFilter( filter ); SMESH_HypoFilter* filterNoAux = new SMESH_HypoFilter( filter );

View File

@ -125,7 +125,7 @@ public:
int _algoDim; int _algoDim;
bool _isGlobalAlgo; bool _isGlobalAlgo;
TAlgoStateError(): _algoDim(0),_algo(0),_name(SMESH_Hypothesis::HYP_OK) {} TAlgoStateError(): _name(SMESH_Hypothesis::HYP_OK), _algo(0), _algoDim(0) {}
void Set(TAlgoStateErrorName name, const SMESH_Algo* algo, bool isGlobal) void Set(TAlgoStateErrorName name, const SMESH_Algo* algo, bool isGlobal)
{ _name = name; _algo = algo; _algoDim = algo->GetDim(); _isGlobalAlgo = isGlobal; } { _name = name; _algo = algo; _algoDim = algo->GetDim(); _isGlobalAlgo = isGlobal; }
void Set(TAlgoStateErrorName name, const int algoDim, bool isGlobal) void Set(TAlgoStateErrorName name, const int algoDim, bool isGlobal)

View File

@ -139,11 +139,14 @@ void SMESH_HypoFilter::IsMoreLocalThanPredicate::findPreferable()
std::find( idList.begin(), idList.end(), shapeID ); std::find( idList.begin(), idList.end(), shapeID );
if ( idIt != idList.end() && *idIt != idList.front() ) if ( idIt != idList.end() && *idIt != idList.front() )
{ {
for ( ; idIt != idList.end(); --idIt ) for ( --idIt; true; --idIt )
{ {
const TopoDS_Shape& shape = _mesh.GetMeshDS()->IndexToShape( *idIt ); const TopoDS_Shape& shape = _mesh.GetMeshDS()->IndexToShape( *idIt );
if ( !shape.IsNull()) if ( !shape.IsNull())
_preferableShapes.Add( shape ); _preferableShapes.Add( shape );
if ( idIt == idList.begin() )
break;
} }
} }
} }

View File

@ -78,6 +78,7 @@ int SMESH_Hypothesis::GetDim() const
case ALGO_1D: dim = 1; break; case ALGO_1D: dim = 1; break;
case ALGO_2D: dim = 2; break; case ALGO_2D: dim = 2; break;
case ALGO_3D: dim = 3; break; case ALGO_3D: dim = 3; break;
case ALGO_0D: dim = 0; break;
case PARAM_ALGO: case PARAM_ALGO:
dim = ( _param_algo_dim < 0 ) ? -_param_algo_dim : _param_algo_dim; break; dim = ( _param_algo_dim < 0 ) ? -_param_algo_dim : _param_algo_dim; break;
} }
@ -159,7 +160,7 @@ void SMESH_Hypothesis::SetLibName(const char* theLibName)
SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id) SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id)
{ {
StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
map<int, SMESH_Mesh*>::iterator itm = itm = myStudyContext->mapMesh.begin(); map<int, SMESH_Mesh*>::iterator itm = myStudyContext->mapMesh.begin();
for ( ; itm != myStudyContext->mapMesh.end(); itm++) for ( ; itm != myStudyContext->mapMesh.end(); itm++)
{ {
SMESH_Mesh* mesh = (*itm).second; SMESH_Mesh* mesh = (*itm).second;

View File

@ -2010,7 +2010,7 @@ SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exce
bool SMESH_Mesh::SynchronizeGroups() bool SMESH_Mesh::SynchronizeGroups()
{ {
int nbGroups = _mapGroup.size(); size_t nbGroups = _mapGroup.size();
const set<SMESHDS_GroupBase*>& groups = _myMeshDS->GetGroups(); const set<SMESHDS_GroupBase*>& groups = _myMeshDS->GetGroups();
set<SMESHDS_GroupBase*>::const_iterator gIt = groups.begin(); set<SMESHDS_GroupBase*>::const_iterator gIt = groups.begin();
for ( ; gIt != groups.end(); ++gIt ) for ( ; gIt != groups.end(); ++gIt )

View File

@ -130,7 +130,7 @@ const SMESHDS_SubMesh* SMESH_ProxyMesh::GetSubMesh(const TopoDS_Shape& shape) co
{ {
const SMESHDS_SubMesh* sm = 0; const SMESHDS_SubMesh* sm = 0;
int i = shapeIndex(shape); size_t i = shapeIndex(shape);
if ( i < _subMeshes.size() ) if ( i < _subMeshes.size() )
sm = _subMeshes[i]; sm = _subMeshes[i];
if ( !sm ) if ( !sm )
@ -148,7 +148,7 @@ const SMESHDS_SubMesh* SMESH_ProxyMesh::GetSubMesh(const TopoDS_Shape& shape) co
const SMESH_ProxyMesh::SubMesh* const SMESH_ProxyMesh::SubMesh*
SMESH_ProxyMesh::GetProxySubMesh(const TopoDS_Shape& shape) const SMESH_ProxyMesh::GetProxySubMesh(const TopoDS_Shape& shape) const
{ {
int i = shapeIndex(shape); size_t i = shapeIndex(shape);
return i < _subMeshes.size() ? _subMeshes[i] : 0; return i < _subMeshes.size() ? _subMeshes[i] : 0;
} }

View File

@ -1093,8 +1093,6 @@ bool SMESH_subMesh::IsConform(const SMESH_Algo* theAlgo)
!theAlgo->OnlyUnaryInput() ) // all adjacent shapes will be meshed by this algo? !theAlgo->OnlyUnaryInput() ) // all adjacent shapes will be meshed by this algo?
return true; return true;
SMESH_Gen* gen =_father->GetGen();
// only local algo is to be checked // only local algo is to be checked
//if ( gen->IsGlobalHypothesis( theAlgo, *_father )) //if ( gen->IsGlobalHypothesis( theAlgo, *_father ))
if ( _subShape.ShapeType() == _father->GetMeshDS()->ShapeToMesh().ShapeType() ) if ( _subShape.ShapeType() == _father->GetMeshDS()->ShapeToMesh().ShapeType() )
@ -2465,7 +2463,7 @@ namespace {
{ {
_Iterator(SMDS_Iterator<SMESH_subMesh*>* subIt, _Iterator(SMDS_Iterator<SMESH_subMesh*>* subIt,
SMESH_subMesh* prepend, SMESH_subMesh* prepend,
SMESH_subMesh* append): myIt(subIt),myAppend(append) SMESH_subMesh* append): myAppend(append), myIt(subIt)
{ {
myCur = prepend ? prepend : myIt->more() ? myIt->next() : append; myCur = prepend ? prepend : myIt->more() ? myIt->next() : append;
if ( myCur == append ) append = 0; if ( myCur == append ) append = 0;
@ -2570,7 +2568,7 @@ void SMESH_subMesh::ClearAncestors()
bool SMESH_subMesh::FindIntersection(const SMESH_subMesh* theOther, bool SMESH_subMesh::FindIntersection(const SMESH_subMesh* theOther,
std::set<const SMESH_subMesh*>& theSetOfCommon ) const std::set<const SMESH_subMesh*>& theSetOfCommon ) const
{ {
int oldNb = theSetOfCommon.size(); size_t oldNb = theSetOfCommon.size();
// check main submeshes // check main submeshes
const map <int, SMESH_subMesh*>::const_iterator otherEnd = theOther->_mapDepend.end(); const map <int, SMESH_subMesh*>::const_iterator otherEnd = theOther->_mapDepend.end();

View File

@ -54,7 +54,7 @@ public:
} }
else else
{ {
if ( myVec.size() <= id ) if ( (int)myVec.size() <= id )
myVec.resize( id+1, (SUBMESH*) NULL ); myVec.resize( id+1, (SUBMESH*) NULL );
myVec[ id ] = sm; myVec[ id ] = sm;
} }
@ -68,7 +68,7 @@ public:
} }
else else
{ {
return (SUBMESH*) ( id >= myVec.size() ? NULL : myVec[ id ]); return (SUBMESH*) ( id >= (int)myVec.size() ? NULL : myVec[ id ]);
} }
} }
void DeleteAll() void DeleteAll()

View File

@ -497,6 +497,9 @@ void SMESHGUI_Add0DElemsOnAllNodesOp::onSelTypeChange(int selType)
disconnect( myDlg, SIGNAL( objectChanged( int, const QStringList& )), disconnect( myDlg, SIGNAL( objectChanged( int, const QStringList& )),
this, SLOT ( onTextChanged( int, const QStringList& ))); this, SLOT ( onTextChanged( int, const QStringList& )));
connect( myDlg->myGroupListCmBox, SIGNAL( editTextChanged(const QString & )),
this, SLOT( updateButtons() ));
selectionDone(); selectionDone();
} }

View File

@ -109,8 +109,8 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule )
: QDialog( SMESH::GetDesktop( theModule ) ), : QDialog( SMESH::GetDesktop( theModule ) ),
mySMESHGUI( theModule ), mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
myFilterDlg(0),
mySelectedObject(SMESH::SMESH_IDSource::_nil()), mySelectedObject(SMESH::SMESH_IDSource::_nil()),
myFilterDlg(0),
myIsApplyAndClose( false ) myIsApplyAndClose( false )
{ {
QPixmap image (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_COPY_MESH"))); QPixmap image (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_COPY_MESH")));

View File

@ -73,8 +73,8 @@
//================================================================================= //=================================================================================
SMESHGUI_DeleteGroupDlg::SMESHGUI_DeleteGroupDlg (SMESHGUI* theModule): SMESHGUI_DeleteGroupDlg::SMESHGUI_DeleteGroupDlg (SMESHGUI* theModule):
QDialog(SMESH::GetDesktop(theModule)), QDialog(SMESH::GetDesktop(theModule)),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)), mySMESHGUI(theModule),
mySMESHGUI(theModule) mySelectionMgr(SMESH::GetSelectionMgr(theModule))
{ {
setModal(false); setModal(false);
setWindowTitle(tr("CAPTION")); setWindowTitle(tr("CAPTION"));

View File

@ -397,7 +397,7 @@ void SMESHGUI_3TypesSelector::addTmpIdSource( SMESH::long_array_var& ids, int iT
SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource_var idSrc =
aMeshEditor->MakeIDSource( ids, SMESH::ElementType( iType+1 )); aMeshEditor->MakeIDSource( ids, SMESH::ElementType( iType+1 ));
if ( myIDSource[ iType ]->length() <= index ) if ( (int) myIDSource[ iType ]->length() <= index )
myIDSource[ iType ]->length( index + 1 ); myIDSource[ iType ]->length( index + 1 );
myIDSource[ iType ][ index ] = idSrc; myIDSource[ iType ][ index ] = idSrc;

View File

@ -170,7 +170,7 @@ bool SMESHGUI_FieldSelectorWdg::GetSelectedFeilds()
{ {
int nbSelected = 0; int nbSelected = 0;
if ( myTree->isEnabled() ) if ( myTree->isEnabled() )
for ( size_t i = 0; i < myTree->topLevelItemCount(); ++i ) for ( int i = 0; i < myTree->topLevelItemCount(); ++i )
{ {
QTreeWidgetItem* meshItem = myTree->topLevelItem( i ); QTreeWidgetItem* meshItem = myTree->topLevelItem( i );
int iM = meshItem->data( 0, Qt::UserRole ).toInt(); int iM = meshItem->data( 0, Qt::UserRole ).toInt();
@ -202,7 +202,7 @@ bool SMESHGUI_FieldSelectorWdg::GetSelectedFeilds()
} }
else else
{ {
for ( size_t iF = 0; iF < myFields->count(); ++iF ) for ( int iF = 0; iF < myFields->count(); ++iF )
{ {
GEOM::ListOfFields& fields = (*myFields)[ iF ].first.inout(); GEOM::ListOfFields& fields = (*myFields)[ iF ].first.inout();
fields.length( 0 ); fields.length( 0 );

View File

@ -101,7 +101,7 @@ void SMESHGUI_FindElemByPointDlg::setTypes(SMESH::array_of_ElementType_var & typ
myElemTypeCombo->blockSignals(true); myElemTypeCombo->blockSignals(true);
myElemTypeCombo->clear(); myElemTypeCombo->clear();
int nbTypes = 0, hasNodes = 0; int nbTypes = 0, hasNodes = 0;
for ( int i = 0; i < types->length(); ++i ) for ( int i = 0; i < (int) types->length(); ++i )
{ {
switch ( types[i] ) { switch ( types[i] ) {
case SMESH::NODE: case SMESH::NODE:
@ -449,7 +449,7 @@ void SMESHGUI_FindElemByPointOp::onFind()
myDlg->myZ->GetValue(), myDlg->myZ->GetValue(),
SMESH::ElementType( myDlg->myElemTypeCombo->currentId())); SMESH::ElementType( myDlg->myElemTypeCombo->currentId()));
myDlg->myFoundList->clear(); myDlg->myFoundList->clear();
for ( int i = 0; i < foundIds->length(); ++i ) for ( int i = 0; i < (int) foundIds->length(); ++i )
myDlg->myFoundList->addItem( QString::number( foundIds[i] )); myDlg->myFoundList->addItem( QString::number( foundIds[i] ));
if ( foundIds->length() > 0 ) if ( foundIds->length() > 0 )

View File

@ -629,7 +629,7 @@ namespace SMESH
{ {
SMESH_Hypothesis_var hypo = SMESH_Hypothesis::_narrow( SObjectToObject( aHypObj ) ); SMESH_Hypothesis_var hypo = SMESH_Hypothesis::_narrow( SObjectToObject( aHypObj ) );
SObjectList meshList = GetMeshesUsingAlgoOrHypothesis( hypo ); SObjectList meshList = GetMeshesUsingAlgoOrHypothesis( hypo );
for( int i = 0; i < meshList.size(); i++ ) for( size_t i = 0; i < meshList.size(); i++ )
RemoveHypothesisOrAlgorithmOnMesh( meshList[ i ], hypo ); RemoveHypothesisOrAlgorithmOnMesh( meshList[ i ], hypo );
} }
} }
@ -729,7 +729,7 @@ namespace SMESH
QString GetMessageOnAlgoStateErrors(const algo_error_array& errors) QString GetMessageOnAlgoStateErrors(const algo_error_array& errors)
{ {
QString resMsg; // PAL14861 = QObject::tr("SMESH_WRN_MISSING_PARAMETERS") + ":\n"; QString resMsg; // PAL14861 = QObject::tr("SMESH_WRN_MISSING_PARAMETERS") + ":\n";
for ( int i = 0; i < errors.length(); ++i ) { for ( size_t i = 0; i < errors.length(); ++i ) {
const SMESH::AlgoStateError & error = errors[ i ]; const SMESH::AlgoStateError & error = errors[ i ];
const bool hasAlgo = ( strlen( error.algoName ) != 0 ); const bool hasAlgo = ( strlen( error.algoName ) != 0 );
QString msg; QString msg;

View File

@ -797,11 +797,11 @@ void SMESHGUI_MergeDlg::onDetect()
break; break;
} }
for (int i = 0; i < aGroupsArray->length(); i++) { for (int i = 0; i < (int)aGroupsArray->length(); i++) {
SMESH::long_array& aGroup = aGroupsArray[i]; SMESH::long_array& aGroup = aGroupsArray[i];
QStringList anIDs; QStringList anIDs;
for (int j = 0; j < aGroup.length(); j++) for (int j = 0; j < (int)aGroup.length(); j++)
anIDs.append(QString::number(aGroup[j])); anIDs.append(QString::number(aGroup[j]));
ListCoincident->addItem(anIDs.join(" ")); ListCoincident->addItem(anIDs.join(" "));

View File

@ -173,7 +173,7 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD
vtkPoints* aPoints = vtkPoints::New(); vtkPoints* aPoints = vtkPoints::New();
aPoints->SetNumberOfPoints(aNodesXYZ.length()); aPoints->SetNumberOfPoints(aNodesXYZ.length());
for ( int i = 0; i < aNodesXYZ.length(); i++ ) { for ( size_t i = 0; i < aNodesXYZ.length(); i++ ) {
aPoints->SetPoint( i, aNodesXYZ[i].x, aNodesXYZ[i].y, aNodesXYZ[i].z ); aPoints->SetPoint( i, aNodesXYZ[i].x, aNodesXYZ[i].y, aNodesXYZ[i].z );
} }
myGrid->SetPoints(aPoints); myGrid->SetPoints(aPoints);
@ -197,7 +197,7 @@ void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewD
vtkIdList *anIdList = vtkIdList::New(); vtkIdList *anIdList = vtkIdList::New();
int aNodePos = 0; int aNodePos = 0;
for ( int i = 0; i < anElemTypes.length(); i++ ) { for ( size_t i = 0; i < anElemTypes.length(); i++ ) {
const SMESH::ElementSubType& anElementSubType = anElemTypes[i]; const SMESH::ElementSubType& anElementSubType = anElemTypes[i];
SMDSAbs_ElementType aType = SMDSAbs_ElementType(anElementSubType.SMDS_ElementType); SMDSAbs_ElementType aType = SMDSAbs_ElementType(anElementSubType.SMDS_ElementType);
vtkIdType aNbNodes = anElementSubType.nbNodesInElement; vtkIdType aNbNodes = anElementSubType.nbNodesInElement;
@ -299,7 +299,7 @@ void SMESHGUI_MeshEditPreview::SetArrowShapeAndNb( int nbArrows,
myLabelActors.resize( nbArrows, ( vtkTextActor*) NULL ); myLabelActors.resize( nbArrows, ( vtkTextActor*) NULL );
char label[] = "X"; char label[] = "X";
if ( labels ) if ( labels )
for ( int iP = 0, iA = 0; iA < nbArrows; ++iA ) for ( int iA = 0; iA < nbArrows; ++iA )
{ {
label[0] = labels[iA]; label[0] = labels[iA];
vtkTextMapper* text = vtkTextMapper::New(); vtkTextMapper* text = vtkTextMapper::New();
@ -333,7 +333,7 @@ void SMESHGUI_MeshEditPreview::SetArrows( const gp_Ax1* axes,
{ {
vtkPoints* aPoints = myGrid->GetPoints(); vtkPoints* aPoints = myGrid->GetPoints();
for ( int iP = 0, iA = 0; iA < myLabelActors.size(); ++iA ) for ( int iP = 0, iA = 0; iA < (int) myLabelActors.size(); ++iA )
{ {
gp_Trsf trsf; gp_Trsf trsf;
trsf.SetTransformation( gp_Ax3( axes[iA].Location(), axes[iA].Direction() ), gp::XOY() ); trsf.SetTransformation( gp_Ax3( axes[iA].Location(), axes[iA].Direction() ), gp::XOY() );

View File

@ -112,8 +112,8 @@ SMESHGUI_MultiEditDlg
const bool the3d2d, const bool the3d2d,
bool theDoInit): bool theDoInit):
SMESHGUI_PreviewDlg(theModule), SMESHGUI_PreviewDlg(theModule),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)), mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySMESHGUI(theModule) mySMESHGUI(theModule)
{ {
setModal(false); setModal(false);
@ -1572,7 +1572,6 @@ SMESHGUI_SplitVolumesDlg::SMESHGUI_SplitVolumesDlg(SMESHGUI* theModule)
QLabel* dXLbl = new QLabel( tr("SMESH_DX"), myFacetSelGrp); QLabel* dXLbl = new QLabel( tr("SMESH_DX"), myFacetSelGrp);
QLabel* dYLbl = new QLabel( tr("SMESH_DY"), myFacetSelGrp); QLabel* dYLbl = new QLabel( tr("SMESH_DY"), myFacetSelGrp);
QLabel* dZLbl = new QLabel( tr("SMESH_DZ"), myFacetSelGrp); QLabel* dZLbl = new QLabel( tr("SMESH_DZ"), myFacetSelGrp);
QPushButton* axisBtn[3];
for ( int i = 0; i < 3; ++i ) for ( int i = 0; i < 3; ++i )
{ {
myPointSpin[i] = new SMESHGUI_SpinBox( myFacetSelGrp ); myPointSpin[i] = new SMESHGUI_SpinBox( myFacetSelGrp );
@ -1983,7 +1982,7 @@ void SMESHGUI_SplitVolumesDlg::onSetDir()
if ( sender() == myAxisBtn[i] ) if ( sender() == myAxisBtn[i] )
break; break;
if ( i == 3 ) if ( i == 3 )
i == 0; i = 0;
myDirSpin[i]->SetValue(1.); myDirSpin[i]->SetValue(1.);
if ( myActor && !myMesh->_is_nil() && myMesh->NbNodes() > 0 ) if ( myActor && !myMesh->_is_nil() && myMesh->NbNodes() > 0 )

View File

@ -230,8 +230,8 @@ namespace SMESH
//================================================================================= //=================================================================================
SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ): SMESHGUI_NodesDlg::SMESHGUI_NodesDlg( SMESHGUI* theModule ):
QDialog( SMESH::GetDesktop( theModule ) ), QDialog( SMESH::GetDesktop( theModule ) ),
mySelector( SMESH::GetViewWindow( theModule )->GetSelector() ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
mySelector( SMESH::GetViewWindow( theModule )->GetSelector() ),
mySMESHGUI( theModule ) mySMESHGUI( theModule )
{ {
setModal( false ); setModal( false );

View File

@ -45,8 +45,8 @@
// purpose : // purpose :
//================================================================================= //=================================================================================
SMESHGUI_PreviewDlg::SMESHGUI_PreviewDlg(SMESHGUI* theModule) : SMESHGUI_PreviewDlg::SMESHGUI_PreviewDlg(SMESHGUI* theModule) :
mySMESHGUI(theModule),
QDialog(SMESH::GetDesktop( theModule )), QDialog(SMESH::GetDesktop( theModule )),
mySMESHGUI(theModule),
myIsApplyAndClose( false ) myIsApplyAndClose( false )
{ {
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI )); mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
@ -151,8 +151,8 @@ void SMESHGUI_PreviewDlg::onOpenView()
// purpose : // purpose :
//================================================================================= //=================================================================================
SMESHGUI_MultiPreviewDlg::SMESHGUI_MultiPreviewDlg( SMESHGUI* theModule ) : SMESHGUI_MultiPreviewDlg::SMESHGUI_MultiPreviewDlg( SMESHGUI* theModule ) :
mySMESHGUI( theModule ),
QDialog( SMESH::GetDesktop( theModule ) ), QDialog( SMESH::GetDesktop( theModule ) ),
mySMESHGUI( theModule ),
myIsApplyAndClose( false ) myIsApplyAndClose( false )
{ {
mySimulationList.clear(); mySimulationList.clear();

View File

@ -80,8 +80,8 @@
SMESHGUI_RemoveElementsDlg SMESHGUI_RemoveElementsDlg
::SMESHGUI_RemoveElementsDlg(SMESHGUI* theModule) ::SMESHGUI_RemoveElementsDlg(SMESHGUI* theModule)
: QDialog(SMESH::GetDesktop(theModule)), : QDialog(SMESH::GetDesktop(theModule)),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)), mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySMESHGUI(theModule), mySMESHGUI(theModule),
myBusy(false), myBusy(false),
myFilterDlg(0) myFilterDlg(0)

View File

@ -81,8 +81,8 @@
SMESHGUI_RemoveNodesDlg SMESHGUI_RemoveNodesDlg
::SMESHGUI_RemoveNodesDlg(SMESHGUI* theModule) ::SMESHGUI_RemoveNodesDlg(SMESHGUI* theModule)
: QDialog(SMESH::GetDesktop(theModule)), : QDialog(SMESH::GetDesktop(theModule)),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)), mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySMESHGUI(theModule), mySMESHGUI(theModule),
myBusy(false), myBusy(false),
myFilterDlg(0) myFilterDlg(0)

View File

@ -612,9 +612,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
if ( !aMesh ) if ( !aMesh )
return; return;
int aNbUnits = 0; bool isNodeSelected = ((myEditCurrentArgument == (QWidget*)SpinBox_X ) ||
bool isNodeSelected = (myEditCurrentArgument == (QWidget*)SpinBox_X ||
(myEditCurrentArgument == (QWidget*)SpinBox_DX && (myEditCurrentArgument == (QWidget*)SpinBox_DX &&
myVectorDefinition==POINT_SELECT)); myVectorDefinition==POINT_SELECT));

View File

@ -474,7 +474,7 @@ int SMESHGUI_Selection::dim( int ind ) const
if ( !CORBA::is_nil( idSrc ) ) if ( !CORBA::is_nil( idSrc ) )
{ {
SMESH::array_of_ElementType_var types = idSrc->GetTypes(); SMESH::array_of_ElementType_var types = idSrc->GetTypes();
for ( int i = 0; i < types->length(); ++ i) { for ( size_t i = 0; i < types->length(); ++ i) {
switch ( types[i] ) { switch ( types[i] ) {
case SMESH::EDGE : dim = std::max( dim, 1 ); break; case SMESH::EDGE : dim = std::max( dim, 1 ); break;
case SMESH::FACE : dim = std::max( dim, 2 ); break; case SMESH::FACE : dim = std::max( dim, 2 ); break;

View File

@ -93,8 +93,8 @@ private:
SMESHGUI_SingleEditDlg SMESHGUI_SingleEditDlg
::SMESHGUI_SingleEditDlg(SMESHGUI* theModule) ::SMESHGUI_SingleEditDlg(SMESHGUI* theModule)
: QDialog(SMESH::GetDesktop(theModule)), : QDialog(SMESH::GetDesktop(theModule)),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySelectionMgr(SMESH::GetSelectionMgr(theModule)), mySelectionMgr(SMESH::GetSelectionMgr(theModule)),
mySelector(SMESH::GetViewWindow(theModule)->GetSelector()),
mySMESHGUI(theModule) mySMESHGUI(theModule)
{ {
setModal(false); setModal(false);

View File

@ -111,8 +111,8 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
: QDialog( SMESH::GetDesktop( theModule ) ), : QDialog( SMESH::GetDesktop( theModule ) ),
mySMESHGUI( theModule ), mySMESHGUI( theModule ),
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
myFilterDlg(0), mySelectedObject(SMESH::SMESH_IDSource::_nil()),
mySelectedObject(SMESH::SMESH_IDSource::_nil()) myFilterDlg(0)
{ {
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_SMOOTHING"))); QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_SMOOTHING")));
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT"))); QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));

View File

@ -815,46 +815,8 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
if ( myObjects.isEmpty() ) if ( myObjects.isEmpty() )
return; return;
// get IDs from mesh // get IDs from mesh
/*
SMDS_Mesh* aSMDSMesh = myActor->GetObject()->GetMesh();
if (!aSMDSMesh)
return;
for (int i = aSMDSMesh->MinElementID(); i <= aSMDSMesh->MaxElementID(); i++) {
const SMDS_MeshElement * e = aSMDSMesh->FindElement(i);
if (e) {
myElementsId += QString(" %1").arg(i);
aNbUnits++;
}
}
} else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
// get submesh
SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
// get IDs from submesh // get IDs from submesh
/*
SMESH::long_array_var anElementsIds = new SMESH::long_array;
anElementsIds = aSubMesh->GetElementsId();
for (int i = 0; i < anElementsIds->length(); i++) {
myElementsId += QString(" %1").arg(anElementsIds[i]);
}
aNbUnits = anElementsIds->length();
} else { // GROUP
// get smesh group
SMESH::SMESH_GroupBase_var aGroup =
SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(IO);
if (aGroup->_is_nil())
return;
// get IDs from smesh group // get IDs from smesh group
SMESH::long_array_var anElementsIds = new SMESH::long_array;
anElementsIds = aGroup->GetListOfID();
for (int i = 0; i < anElementsIds->length(); i++) {
myElementsId += QString(" %1").arg(anElementsIds[i]);
}
aNbUnits = anElementsIds->length();
}
*/
} else { } else {
aNbUnits = SMESH::GetNameOfSelectedElements( mySelector, aList.First(), aString); aNbUnits = SMESH::GetNameOfSelectedElements( mySelector, aList.First(), aString);
myElementsId = aString; myElementsId = aString;

View File

@ -195,7 +195,7 @@ SMESHGUI_EXPORT
class toStrT : public _STRING { class toStrT : public _STRING {
CORBA::String_var myStr; CORBA::String_var myStr;
public: public:
toStrT( char* s ): myStr(s), _STRING( s ) toStrT( char* s ): _STRING( s ), myStr(s)
{} {}
operator const char*() const operator const char*() const
{ return myStr.in(); } { return myStr.in(); }

View File

@ -535,7 +535,7 @@ namespace // internal utils
for ( int i = 0; i < 3; ++i ) for ( int i = 0; i < 3; ++i )
{ {
const gp_Pnt& pn = myNodes->Value(n[i]); const gp_Pnt& pn = myNodes->Value(n[i]);
if ( avoidTria = ( pn.SquareDistance( *avoidPnt ) <= tol2 )) if (( avoidTria = ( pn.SquareDistance( *avoidPnt ) <= tol2 )))
break; break;
if ( !projectedOnly ) if ( !projectedOnly )
minD2 = Min( minD2, pn.SquareDistance( p )); minD2 = Min( minD2, pn.SquareDistance( p ));
@ -1505,7 +1505,7 @@ bool AdaptiveAlgo::Evaluate(SMESH_Mesh & theMesh,
for ( ; edExp.More(); edExp.Next() ) for ( ; edExp.More(); edExp.Next() )
{ {
const TopoDS_Edge & edge = TopoDS::Edge( edExp.Current() ); //const TopoDS_Edge & edge = TopoDS::Edge( edExp.Current() );
StdMeshers_Regular_1D::Evaluate( theMesh, theShape, theResMap ); StdMeshers_Regular_1D::Evaluate( theMesh, theShape, theResMap );
} }
return true; return true;

View File

@ -155,7 +155,7 @@ istream & StdMeshers_Arithmetic1D::LoadFrom(istream & load)
isOK = (load >> intVal); isOK = (load >> intVal);
if (isOK && intVal > 0) { if (isOK && intVal > 0) {
_edgeIDs.reserve( intVal ); _edgeIDs.reserve( intVal );
for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
isOK = (load >> intVal); isOK = (load >> intVal);
if ( isOK ) _edgeIDs.push_back( intVal ); if ( isOK ) _edgeIDs.push_back( intVal );
} }

View File

@ -62,9 +62,7 @@
#ifdef _DEBUG_ #ifdef _DEBUG_
// #define DEB_FACES // #define DEB_FACES
// #define DEB_GRID // #define DEB_GRID
// #define DUMP_VERT(msg,V) \ // #define DUMP_VERT(msg,V) { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v); cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl; }
// { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v); \
// cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;}
#endif #endif
#ifndef DUMP_VERT #ifndef DUMP_VERT
@ -1119,7 +1117,7 @@ bool _QuadFaceGrid::LoadGrid( SMESH_Mesh& mesh )
const SMDS_MeshElement* firstQuad = 0; // most left face above the last row of found nodes const SMDS_MeshElement* firstQuad = 0; // most left face above the last row of found nodes
int nbFoundNodes = myIndexer._xSize; int nbFoundNodes = myIndexer._xSize;
while ( nbFoundNodes != myGrid.size() ) while ( nbFoundNodes != (int) myGrid.size() )
{ {
// first and last nodes of the last filled row of nodes // first and last nodes of the last filled row of nodes
const SMDS_MeshNode* n1down = myGrid[ nbFoundNodes - myIndexer._xSize ]; const SMDS_MeshNode* n1down = myGrid[ nbFoundNodes - myIndexer._xSize ];

View File

@ -212,7 +212,7 @@ bool StdMeshers_Deflection1D::SetParametersByMesh(const SMESH_Mesh* theMesh,
if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params )) if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params ))
{ {
nbEdges++; nbEdges++;
for ( int i = 1; i < params.size(); ++i ) for ( size_t i = 1; i < params.size(); ++i )
_value = Max( _value, deflection( AdaptCurve, params[ i-1 ], params[ i ])); _value = Max( _value, deflection( AdaptCurve, params[ i-1 ], params[ i ]));
} }
} }

View File

@ -154,7 +154,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
if (isOK && intVal > 0) { if (isOK && intVal > 0) {
_params.clear(); _params.clear();
_params.reserve( intVal ); _params.reserve( intVal );
for (int i = 0; i < _params.capacity() && isOK; i++) { for ( size_t i = 0; i < _params.capacity() && isOK; i++) {
isOK = (load >> dblVal); isOK = (load >> dblVal);
if ( isOK ) _params.push_back( dblVal ); if ( isOK ) _params.push_back( dblVal );
} }
@ -164,7 +164,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
if (isOK && intVal > 0) { if (isOK && intVal > 0) {
_nbsegs.clear(); _nbsegs.clear();
_nbsegs.reserve( intVal ); _nbsegs.reserve( intVal );
for (int i = 0; i < _nbsegs.capacity() && isOK; i++) { for ( size_t i = 0; i < _nbsegs.capacity() && isOK; i++) {
isOK = (load >> intVal); isOK = (load >> intVal);
if ( isOK ) _nbsegs.push_back( intVal ); if ( isOK ) _nbsegs.push_back( intVal );
} }
@ -174,7 +174,7 @@ istream & StdMeshers_FixedPoints1D::LoadFrom(istream & load)
if (isOK && intVal > 0) { if (isOK && intVal > 0) {
_edgeIDs.clear(); _edgeIDs.clear();
_edgeIDs.reserve( intVal ); _edgeIDs.reserve( intVal );
for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
isOK = (load >> intVal); isOK = (load >> intVal);
if ( isOK ) _edgeIDs.push_back( intVal ); if ( isOK ) _edgeIDs.push_back( intVal );
} }

View File

@ -444,8 +444,8 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
{ {
aCubeSide[i]._columns.resize( aCubeSide[i]._u2nodesMap.size() ); aCubeSide[i]._columns.resize( aCubeSide[i]._u2nodesMap.size() );
int iFwd = 0, iRev = aCubeSide[i]._columns.size()-1; size_t iFwd = 0, iRev = aCubeSide[i]._columns.size()-1;
int* pi = isReverse[i] ? &iRev : &iFwd; size_t* pi = isReverse[i] ? &iRev : &iFwd;
TParam2ColumnMap::iterator u2nn = aCubeSide[i]._u2nodesMap.begin(); TParam2ColumnMap::iterator u2nn = aCubeSide[i]._u2nodesMap.begin();
for ( ; iFwd < aCubeSide[i]._columns.size(); --iRev, ++iFwd, ++u2nn ) for ( ; iFwd < aCubeSide[i]._columns.size(); --iRev, ++iFwd, ++u2nn )
aCubeSide[i]._columns[ *pi ].swap( u2nn->second ); aCubeSide[i]._columns[ *pi ].swap( u2nn->second );

View File

@ -685,7 +685,7 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th
// import edges from groups // import edges from groups
TNodeNodeMap* n2n; TNodeNodeMap* n2n;
TElemElemMap* e2e; TElemElemMap* e2e;
for ( int iG = 0; iG < srcGroups.size(); ++iG ) for ( size_t iG = 0; iG < srcGroups.size(); ++iG )
{ {
const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS(); const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS();
@ -711,7 +711,7 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th
double mytol = a.Distance(edge->GetNode(edge->NbNodes()-1))/25; double mytol = a.Distance(edge->GetNode(edge->NbNodes()-1))/25;
//mytol = max(1.E-5, 10*edgeTol); // too strict and not necessary //mytol = max(1.E-5, 10*edgeTol); // too strict and not necessary
//MESSAGE("mytol = " << mytol); //MESSAGE("mytol = " << mytol);
for ( unsigned i = 0; i < newNodes.size(); ++i, ++node ) for ( size_t i = 0; i < newNodes.size(); ++i, ++node )
{ {
TNodeNodeMap::iterator n2nIt = n2n->insert( make_pair( *node, (SMDS_MeshNode*)0 )).first; TNodeNodeMap::iterator n2nIt = n2n->insert( make_pair( *node, (SMDS_MeshNode*)0 )).first;
if ( n2nIt->second ) if ( n2nIt->second )
@ -810,7 +810,7 @@ bool StdMeshers_Import_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & th
// copy meshes // copy meshes
vector<SMESH_Mesh*> srcMeshes = _sourceHyp->GetSourceMeshes(); vector<SMESH_Mesh*> srcMeshes = _sourceHyp->GetSourceMeshes();
for ( unsigned i = 0; i < srcMeshes.size(); ++i ) for ( size_t i = 0; i < srcMeshes.size(); ++i )
importMesh( srcMeshes[i], theMesh, _sourceHyp, theShape ); importMesh( srcMeshes[i], theMesh, _sourceHyp, theShape );
return true; return true;
@ -873,7 +873,7 @@ void StdMeshers_Import_1D::importMesh(const SMESH_Mesh* srcMesh,
(*e2eIt).second = newElem; (*e2eIt).second = newElem;
} }
// copy free nodes // copy free nodes
if ( srcMeshDS->NbNodes() > n2n->size() ) if ( srcMeshDS->NbNodes() > (int) n2n->size() )
{ {
SMDS_NodeIteratorPtr nIt = srcMeshDS->nodesIterator(); SMDS_NodeIteratorPtr nIt = srcMeshDS->nodesIterator();
while( nIt->more() ) while( nIt->more() )
@ -1028,7 +1028,7 @@ bool StdMeshers_Import_1D::Evaluate(SMESH_Mesh & theMesh,
// count edges imported from groups // count edges imported from groups
int nbEdges = 0, nbQuadEdges = 0; int nbEdges = 0, nbQuadEdges = 0;
for ( int iG = 0; iG < srcGroups.size(); ++iG ) for ( size_t iG = 0; iG < srcGroups.size(); ++iG )
{ {
const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS(); const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS();
SMDS_ElemIteratorPtr srcElems = srcGroup->GetElements(); SMDS_ElemIteratorPtr srcElems = srcGroup->GetElements();

View File

@ -824,7 +824,7 @@ bool StdMeshers_Import_1D2D::Evaluate(SMESH_Mesh & theMesh,
set<const SMDS_MeshNode* > allNodes; set<const SMDS_MeshNode* > allNodes;
gp_XY uv; gp_XY uv;
double minGroupTol = 1e100; double minGroupTol = 1e100;
for ( int iG = 0; iG < srcGroups.size(); ++iG ) for ( size_t iG = 0; iG < srcGroups.size(); ++iG )
{ {
const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS(); const SMESHDS_GroupBase* srcGroup = srcGroups[iG]->GetGroupDS();
const double groupTol = 0.5 * sqrt( getMinElemSize2( srcGroup )); const double groupTol = 0.5 * sqrt( getMinElemSize2( srcGroup ));

View File

@ -224,7 +224,7 @@ bool StdMeshers_LocalLength::SetParametersByMesh(const SMESH_Mesh* theMesh,
SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS(); SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS();
if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params )) if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params ))
{ {
for ( int i = 1; i < params.size(); ++i ) for ( size_t i = 1; i < params.size(); ++i )
_length += GCPnts_AbscissaPoint::Length( AdaptCurve, params[ i-1 ], params[ i ]); _length += GCPnts_AbscissaPoint::Length( AdaptCurve, params[ i-1 ], params[ i ]);
nbEdges += params.size() - 1; nbEdges += params.size() - 1;
} }

View File

@ -587,7 +587,7 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector & wires,
F = TopoDS::Face( _helper->GetSubShape() ); F = TopoDS::Face( _helper->GetSubShape() );
TopExp::MapShapesAndAncestors( F, TopAbs_VERTEX, TopAbs_WIRE, VWMap ); TopExp::MapShapesAndAncestors( F, TopAbs_VERTEX, TopAbs_WIRE, VWMap );
int nbVertices = 0; int nbVertices = 0;
for ( int iW = 0; iW < wires.size(); ++iW ) for ( size_t iW = 0; iW < wires.size(); ++iW )
nbVertices += wires[ iW ]->NbEdges(); nbVertices += wires[ iW ]->NbEdges();
if ( nbVertices == VWMap.Extent() ) if ( nbVertices == VWMap.Extent() )
VWMap.Clear(); // wires have no common vertices VWMap.Clear(); // wires have no common vertices
@ -595,10 +595,10 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector & wires,
int m = 0; int m = 0;
for ( int iW = 0; iW < wires.size(); ++iW ) for ( size_t iW = 0; iW < wires.size(); ++iW )
{ {
const vector<UVPtStruct>& uvPtVec = wires[ iW ]->GetUVPtStruct(); const vector<UVPtStruct>& uvPtVec = wires[ iW ]->GetUVPtStruct();
if ( uvPtVec.size() != wires[ iW ]->NbPoints() ) { if ((int) uvPtVec.size() != wires[ iW ]->NbPoints() ) {
return error(COMPERR_BAD_INPUT_MESH,SMESH_Comment("Unexpected nb of points on wire ") return error(COMPERR_BAD_INPUT_MESH,SMESH_Comment("Unexpected nb of points on wire ")
<< iW << ": " << uvPtVec.size()<<" != "<<wires[ iW ]->NbPoints() << iW << ": " << uvPtVec.size()<<" != "<<wires[ iW ]->NbPoints()
<< ", probably because of invalid node parameters on geom edges"); << ", probably because of invalid node parameters on geom edges");

View File

@ -213,7 +213,7 @@ bool StdMeshers_MaxLength::SetParametersByMesh(const SMESH_Mesh* theMesh,
SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS(); SMESHDS_Mesh* aMeshDS = const_cast< SMESH_Mesh* >( theMesh )->GetMeshDS();
if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params )) if ( SMESH_Algo::GetNodeParamOnEdge( aMeshDS, edge, params ))
{ {
for ( int i = 1; i < params.size(); ++i ) for ( size_t i = 1; i < params.size(); ++i )
_length += GCPnts_AbscissaPoint::Length( AdaptCurve, params[ i-1 ], params[ i ]); _length += GCPnts_AbscissaPoint::Length( AdaptCurve, params[ i-1 ], params[ i ]);
nbEdges += params.size() - 1; nbEdges += params.size() - 1;
} }

View File

@ -674,7 +674,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
int nbFaceNodes = pE0->NbNodes(); int nbFaceNodes = pE0->NbNodes();
if(myCreateQuadratic) if(myCreateQuadratic)
nbFaceNodes = nbFaceNodes/2; nbFaceNodes = nbFaceNodes/2;
if ( aN.size() < nbFaceNodes * 2 ) if ( (int) aN.size() < nbFaceNodes * 2 )
aN.resize( nbFaceNodes * 2 ); aN.resize( nbFaceNodes * 2 );
// //
for ( k=0; k<nbFaceNodes; ++k ) { for ( k=0; k<nbFaceNodes; ++k ) {
@ -806,7 +806,7 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
aNbNodes = pE0->NbNodes(); aNbNodes = pE0->NbNodes();
if(myCreateQuadratic) if(myCreateQuadratic)
aNbNodes = aNbNodes/2; aNbNodes = aNbNodes/2;
if ( aNodes1.size() < aNbNodes ) if ( (int) aNodes1.size() < aNbNodes )
aNodes1.resize( aNbNodes ); aNodes1.resize( aNbNodes );
// //
k = aNbNodes-1; // reverse a face k = aNbNodes-1; // reverse a face
@ -1476,7 +1476,7 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
nVec.resize( vsize, nullNode ); nVec.resize( vsize, nullNode );
loadedNodes.insert( nVec[ 0 ] = node ); loadedNodes.insert( nVec[ 0 ] = node );
} }
if ( theIJNodes.size() != hsize ) { if ( (int) theIJNodes.size() != hsize ) {
MESSAGE( "Wrong node positions on theBaseEdge" ); MESSAGE( "Wrong node positions on theBaseEdge" );
return false; return false;
} }

View File

@ -71,8 +71,7 @@ using namespace std;
#ifdef _DEBUG_ #ifdef _DEBUG_
#define DBGOUT(msg) //cout << msg << endl; #define DBGOUT(msg) //cout << msg << endl;
#define SHOWYXZ(msg, xyz) \ #define SHOWYXZ(msg, xyz) \
// { gp_Pnt p (xyz); \ //{ gp_Pnt p (xyz); cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; }
// cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; }
#else #else
#define DBGOUT(msg) #define DBGOUT(msg)
#define SHOWYXZ(msg, xyz) #define SHOWYXZ(msg, xyz)
@ -3476,10 +3475,8 @@ bool StdMeshers_PrismAsBlock::Init(SMESH_MesherHelper* helper,
} }
} }
// #define SHOWYXZ(msg, xyz) { \ // #define SHOWYXZ(msg, xyz) { gp_Pnt p(xyz); cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; }
// gp_Pnt p (xyz); \
// cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; \
// }
// double _u[]={ 0.1, 0.1, 0.9, 0.9 }; // double _u[]={ 0.1, 0.1, 0.9, 0.9 };
// double _v[]={ 0.1, 0.9, 0.1, 0.9 }; // double _v[]={ 0.1, 0.9, 0.1, 0.9 };
// for ( int z = 0; z < 2; ++z ) // for ( int z = 0; z < 2; ++z )

View File

@ -52,10 +52,8 @@
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; } #define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
#define gpXYZ(n) gp_XYZ(n->X(),n->Y(),n->Z()) #define gpXYZ(n) gp_XYZ(n->X(),n->Y(),n->Z())
#define SHOWYXZ(msg, xyz) // {\ #define SHOWYXZ(msg, xyz) \
// gp_Pnt p (xyz); \ //{gp_Pnt p(xyz); cout<<msg<< " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl; }
// cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl;\
// }
namespace TAssocTool = StdMeshers_ProjectionUtils; namespace TAssocTool = StdMeshers_ProjectionUtils;
@ -295,7 +293,7 @@ bool StdMeshers_Projection_3D::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aS
shape2ShapeMap.Clear(); shape2ShapeMap.Clear();
vector< int > edgeIdVec; vector< int > edgeIdVec;
SMESH_Block::GetFaceEdgesIDs( fId, edgeIdVec ); SMESH_Block::GetFaceEdgesIDs( fId, edgeIdVec );
for ( int i = 0; i < edgeIdVec.size(); ++i ) { for ( size_t i = 0; i < edgeIdVec.size(); ++i ) {
int eID = edgeIdVec[ i ]; int eID = edgeIdVec[ i ];
shape2ShapeMap.Bind( scrShapes( eID ), tgtShapes( eID )); shape2ShapeMap.Bind( scrShapes( eID ), tgtShapes( eID ));
if ( i < 2 ) { if ( i < 2 ) {

View File

@ -304,7 +304,7 @@ namespace {
// Get ordered edges and find index of anE in a sequence // Get ordered edges and find index of anE in a sequence
edges.clear(); edges.clear();
BRepTools_WireExplorer aWE (TopoDS::Wire(itA.Value())); BRepTools_WireExplorer aWE (TopoDS::Wire(itA.Value()));
int edgeIndex = 0; size_t edgeIndex = 0;
for (; aWE.More(); aWE.Next()) { for (; aWE.More(); aWE.Next()) {
TopoDS_Edge edge = aWE.Current(); TopoDS_Edge edge = aWE.Current();
edge.Orientation( aWE.Orientation() ); edge.Orientation( aWE.Orientation() );
@ -325,8 +325,8 @@ namespace {
else { else {
// count nb sides // count nb sides
TopoDS_Edge prevEdge = anE; TopoDS_Edge prevEdge = anE;
int nbSide = 0, eIndex = edgeIndex + 1; size_t nbSide = 0, eIndex = edgeIndex + 1;
for ( int i = 0; i < edges.size(); ++i, ++eIndex ) for ( size_t i = 0; i < edges.size(); ++i, ++eIndex )
{ {
if ( eIndex == edges.size() ) if ( eIndex == edges.size() )
eIndex = 0; eIndex = 0;
@ -633,7 +633,11 @@ namespace {
} }
return; return;
} }
} // switch by SubMeshState case MEANINGLESS_LAST: {
break;
} }
} // switch by SubMeshState
} // ProcessEvent()
} // namespace } // namespace

View File

@ -949,7 +949,7 @@ namespace
{ {
const SMDS_MeshNode* _node; const SMDS_MeshNode* _node;
double _u; double _u;
int _edgeInd; // index in theSinuEdges vector size_t _edgeInd; // index in theSinuEdges vector
NodePoint(): _node(0), _u(0), _edgeInd(-1) {} NodePoint(): _node(0), _u(0), _edgeInd(-1) {}
NodePoint(const SMDS_MeshNode* n, double u, size_t iEdge ): _node(n), _u(u), _edgeInd(iEdge) {} NodePoint(const SMDS_MeshNode* n, double u, size_t iEdge ): _node(n), _u(u), _edgeInd(iEdge) {}
@ -1251,8 +1251,8 @@ namespace
const vector<TopoDS_Edge>& theSinuEdges = theSinuFace._sinuEdges; const vector<TopoDS_Edge>& theSinuEdges = theSinuFace._sinuEdges;
const vector< Handle(Geom_Curve) >& curves = theSinuFace._sinuCurves; const vector< Handle(Geom_Curve) >& curves = theSinuFace._sinuCurves;
SMESH_MAT2d::BoundaryPoint bp[2]; //SMESH_MAT2d::BoundaryPoint bp[2];
const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0); //const SMESH_MAT2d::Branch& branch = *theMA.getBranch(0);
typedef TMAPar2NPoints::iterator TIterator; typedef TMAPar2NPoints::iterator TIterator;
@ -1292,7 +1292,7 @@ namespace
{ {
// find an existing node on VERTEX among sameU2NP and get underlying EDGEs // find an existing node on VERTEX among sameU2NP and get underlying EDGEs
const SMDS_MeshNode* existingNode = 0; const SMDS_MeshNode* existingNode = 0;
set< int > edgeInds; set< size_t > edgeInds;
NodePoint* np; NodePoint* np;
for ( size_t i = 0; i < sameU2NP.size(); ++i ) for ( size_t i = 0; i < sameU2NP.size(); ++i )
{ {
@ -1309,7 +1309,7 @@ namespace
if ( u2NPprev->first < 0. ) ++u2NPprev; if ( u2NPprev->first < 0. ) ++u2NPprev;
if ( u2NPnext->first > 1. ) --u2NPnext; if ( u2NPnext->first > 1. ) --u2NPnext;
set< int >::iterator edgeID = edgeInds.begin(); set< size_t >::iterator edgeID = edgeInds.begin();
for ( ; edgeID != edgeInds.end(); ++edgeID ) for ( ; edgeID != edgeInds.end(); ++edgeID )
{ {
// get U range on iEdge within which the equal points will be distributed // get U range on iEdge within which the equal points will be distributed
@ -1844,12 +1844,12 @@ namespace
const double dksi = 0.5, deta = 0.5; const double dksi = 0.5, deta = 0.5;
const double dksi2 = dksi*dksi, deta2 = deta*deta; const double dksi2 = dksi*dksi, deta2 = deta*deta;
double err = 0., g11, g22, g12; double err = 0., g11, g22, g12;
int nbErr = 0; //int nbErr = 0;
FaceQuadStruct& q = *quad; FaceQuadStruct& q = *quad;
UVPtStruct pNew; UVPtStruct pNew;
double refArea = area( q.UVPt(0,0), q.UVPt(1,0), q.UVPt(1,1) ); //double refArea = area( q.UVPt(0,0), q.UVPt(1,0), q.UVPt(1,1) );
for ( int iLoop = 0; iLoop < nbLoops; ++iLoop ) for ( int iLoop = 0; iLoop < nbLoops; ++iLoop )
{ {

View File

@ -132,7 +132,6 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis
myParams = NULL; myParams = NULL;
myQuadList.clear(); myQuadList.clear();
bool isOk = true;
aStatus = SMESH_Hypothesis::HYP_OK; aStatus = SMESH_Hypothesis::HYP_OK;
const list <const SMESHDS_Hypothesis * >& hyps = const list <const SMESHDS_Hypothesis * >& hyps =
@ -4219,7 +4218,7 @@ bool StdMeshers_Quadrangle_2D::check()
return isOK; return isOK;
} }
/*//================================================================================ //================================================================================
/*! /*!
* \brief Finds vertices at the most sharp face corners * \brief Finds vertices at the most sharp face corners
* \param [in] theFace - the FACE * \param [in] theFace - the FACE
@ -4604,7 +4603,7 @@ int StdMeshers_Quadrangle_2D::getCorners(const TopoDS_Face& theFace,
//================================================================================ //================================================================================
FaceQuadStruct::Side::Side(StdMeshers_FaceSidePtr theGrid) FaceQuadStruct::Side::Side(StdMeshers_FaceSidePtr theGrid)
: grid(theGrid), nbNodeOut(0), from(0), to(theGrid ? theGrid->NbPoints() : 0 ), di(1) : grid(theGrid), from(0), to(theGrid ? theGrid->NbPoints() : 0 ), di(1), nbNodeOut(0)
{ {
} }

View File

@ -713,7 +713,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
size_t iSeg = theReverse ? segLen.size()-1 : 0; size_t iSeg = theReverse ? segLen.size()-1 : 0;
size_t dSeg = theReverse ? -1 : +1; size_t dSeg = theReverse ? -1 : +1;
double param = theFirstU; double param = theFirstU;
int nbParams = 0; size_t nbParams = 0;
for ( int i = 0, nb = segLen.size()-1; i < nb; ++i, iSeg += dSeg ) for ( int i = 0, nb = segLen.size()-1; i < nb; ++i, iSeg += dSeg )
{ {
GCPnts_AbscissaPoint Discret( theC3d, segLen[ iSeg ], param ); GCPnts_AbscissaPoint Discret( theC3d, segLen[ iSeg ], param );
@ -988,9 +988,9 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
case FIXED_POINTS_1D: { case FIXED_POINTS_1D: {
const std::vector<double>& aPnts = _fpHyp->GetPoints(); const std::vector<double>& aPnts = _fpHyp->GetPoints();
const std::vector<int>& nbsegs = _fpHyp->GetNbSegments(); const std::vector<int>& nbsegs = _fpHyp->GetNbSegments();
int i = 0;
TColStd_SequenceOfReal Params; TColStd_SequenceOfReal Params;
for(; i<aPnts.size(); i++) { for ( size_t i = 0; i < aPnts.size(); i++ )
{
if( aPnts[i]<0.0001 || aPnts[i]>0.9999 ) continue; if( aPnts[i]<0.0001 || aPnts[i]>0.9999 ) continue;
int j=1; int j=1;
bool IsExist = false; bool IsExist = false;
@ -1014,8 +1014,9 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
} }
double eltSize, segmentSize = 0.; double eltSize, segmentSize = 0.;
double currAbscissa = 0; double currAbscissa = 0;
for(i=0; i<Params.Length(); i++) { for ( int i = 0; i < Params.Length(); i++ )
int nbseg = ( i > nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i]; {
int nbseg = ( i > (int)nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i];
segmentSize = Params.Value(i+1)*theLength - currAbscissa; segmentSize = Params.Value(i+1)*theLength - currAbscissa;
currAbscissa += segmentSize; currAbscissa += segmentSize;
GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1); GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1);
@ -1052,7 +1053,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
par1 = par2; par1 = par2;
} }
// add for last // add for last
int nbseg = ( nbsegs.size() > Params.Length() ) ? nbsegs[Params.Length()] : nbsegs[0]; int nbseg = ( (int)nbsegs.size() > Params.Length() ) ? nbsegs[Params.Length()] : nbsegs[0];
segmentSize = theLength - currAbscissa; segmentSize = theLength - currAbscissa;
eltSize = segmentSize/nbseg; eltSize = segmentSize/nbseg;
GCPnts_UniformAbscissa Discret; GCPnts_UniformAbscissa Discret;

View File

@ -157,7 +157,7 @@ istream & StdMeshers_StartEndLength::LoadFrom(istream & load)
isOK = (load >> intVal); isOK = (load >> intVal);
if (isOK && intVal > 0) { if (isOK && intVal > 0) {
_edgeIDs.reserve( intVal ); _edgeIDs.reserve( intVal );
for (int i = 0; i < _edgeIDs.capacity() && isOK; i++) { for ( size_t i = 0; i < _edgeIDs.capacity() && isOK; i++) {
isOK = (load >> intVal); isOK = (load >> intVal);
if ( isOK ) _edgeIDs.push_back( intVal ); if ( isOK ) _edgeIDs.push_back( intVal );
} }

View File

@ -817,7 +817,7 @@ bool _ViscousBuilder2D::findEdgesWithLayers()
{ {
hasVL = false; hasVL = false;
for ( hyp = allHyps.begin(); hyp != allHyps.end() && !hasVL; ++hyp ) for ( hyp = allHyps.begin(); hyp != allHyps.end() && !hasVL; ++hyp )
if ( viscHyp = dynamic_cast<const THypVL*>( *hyp )) if (( viscHyp = dynamic_cast<const THypVL*>( *hyp )))
hasVL = viscHyp->IsShapeWithLayers( neighbourID ); hasVL = viscHyp->IsShapeWithLayers( neighbourID );
} }
if ( !hasVL ) if ( !hasVL )
@ -1438,7 +1438,7 @@ bool _ViscousBuilder2D::inflate()
_PolyLine::TEdgeIterator eIt = isR ? L._lEdges.end()-1 : L._lEdges.begin(); _PolyLine::TEdgeIterator eIt = isR ? L._lEdges.end()-1 : L._lEdges.begin();
if ( eIt->_length2D == 0 ) continue; if ( eIt->_length2D == 0 ) continue;
_Segment seg1( eIt->_uvOut, eIt->_uvIn ); _Segment seg1( eIt->_uvOut, eIt->_uvIn );
for ( eIt += deltaIt; nbRemove < L._lEdges.size()-1; eIt += deltaIt ) for ( eIt += deltaIt; nbRemove < (int)L._lEdges.size()-1; eIt += deltaIt )
{ {
_Segment seg2( eIt->_uvOut, eIt->_uvIn ); _Segment seg2( eIt->_uvOut, eIt->_uvIn );
if ( !intersection.Compute( seg1, seg2 )) if ( !intersection.Compute( seg1, seg2 ))
@ -1446,7 +1446,7 @@ bool _ViscousBuilder2D::inflate()
++nbRemove; ++nbRemove;
} }
if ( nbRemove > 0 ) { if ( nbRemove > 0 ) {
if ( nbRemove == L._lEdges.size()-1 ) // 1st and last _LayerEdge's intersect if ( nbRemove == (int)L._lEdges.size()-1 ) // 1st and last _LayerEdge's intersect
{ {
--nbRemove; --nbRemove;
_LayerEdge& L0 = L._lEdges.front(); _LayerEdge& L0 = L._lEdges.front();
@ -2131,7 +2131,7 @@ bool _ViscousBuilder2D::refine()
// store a proxyMesh in a sub-mesh // store a proxyMesh in a sub-mesh
// make faces on each _PolyLine // make faces on each _PolyLine
vector< double > layersHeight; vector< double > layersHeight;
double prevLen2D = -1; //double prevLen2D = -1;
for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL ) for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL )
{ {
_PolyLine& L = _polyLineVec[ iL ]; _PolyLine& L = _polyLineVec[ iL ];
@ -2669,7 +2669,7 @@ _SegmentTree::box_type* _SegmentTree::buildRootBox()
void _SegmentTree::buildChildrenData() void _SegmentTree::buildChildrenData()
{ {
for ( int i = 0; i < _segments.size(); ++i ) for ( size_t i = 0; i < _segments.size(); ++i )
for (int j = 0; j < nbChildren(); j++) for (int j = 0; j < nbChildren(); j++)
if ( !myChildren[j]->getBox()->IsOut( *_segments[i]._seg->_uv[0], if ( !myChildren[j]->getBox()->IsOut( *_segments[i]._seg->_uv[0],
*_segments[i]._seg->_uv[1] )) *_segments[i]._seg->_uv[1] ))
@ -2680,7 +2680,7 @@ void _SegmentTree::buildChildrenData()
for (int j = 0; j < nbChildren(); j++) for (int j = 0; j < nbChildren(); j++)
{ {
_SegmentTree* child = static_cast<_SegmentTree*>( myChildren[j]); _SegmentTree* child = static_cast<_SegmentTree*>( myChildren[j]);
child->myIsLeaf = ( child->_segments.size() <= maxNbSegInLeaf() ); child->myIsLeaf = ((int) child->_segments.size() <= maxNbSegInLeaf() );
} }
} }
@ -2698,7 +2698,7 @@ void _SegmentTree::GetSegmentsNear( const _Segment& seg,
if ( isLeaf() ) if ( isLeaf() )
{ {
for ( int i = 0; i < _segments.size(); ++i ) for ( size_t i = 0; i < _segments.size(); ++i )
if ( !_segments[i].IsOut( seg )) if ( !_segments[i].IsOut( seg ))
found.push_back( _segments[i]._seg ); found.push_back( _segments[i]._seg );
} }
@ -2724,7 +2724,7 @@ void _SegmentTree::GetSegmentsNear( const gp_Ax2d& ray,
if ( isLeaf() ) if ( isLeaf() )
{ {
for ( int i = 0; i < _segments.size(); ++i ) for ( size_t i = 0; i < _segments.size(); ++i )
if ( !_segments[i].IsOut( ray )) if ( !_segments[i].IsOut( ray ))
found.push_back( _segments[i]._seg ); found.push_back( _segments[i]._seg );
} }

View File

@ -300,7 +300,7 @@ QString StdMeshersGUI_NbSegmentsCreator::storeParams() const
case TabFunc : { case TabFunc : {
//valStr += tr("SMESH_TAB_FUNC"); //valStr += tr("SMESH_TAB_FUNC");
bool param = true; bool param = true;
for( int i=0; i < data.myTable.length(); i++, param = !param ) { for( size_t i=0; i < data.myTable.length(); i++, param = !param ) {
if ( param ) if ( param )
valStr += "["; valStr += "[";
valStr += QString::number( data.myTable[ i ]); valStr += QString::number( data.myTable[ i ]);

View File

@ -379,7 +379,7 @@ std::vector< int > * StdMeshersGUI_PropagationHelperWdg::getSelectedChain()
std::vector< int > * chain = 0; std::vector< int > * chain = 0;
if ( QListWidgetItem * item = myListWidget->currentItem() ) if ( QListWidgetItem * item = myListWidget->currentItem() )
{ {
int i = item->data( Qt::UserRole ).toInt(); size_t i = (size_t) item->data( Qt::UserRole ).toInt();
if ( 0 <= i && i < myChains.size() ) if ( 0 <= i && i < myChains.size() )
chain = & myChains[i]; chain = & myChains[i];
} }

View File

@ -215,7 +215,7 @@ void StdMeshersGUI_QuadrangleParamCreator::retrieveParams() const
GEOM::ListOfGO_var shapes; GEOM::ListOfGO_var shapes;
SMESH::nodes_array_var points; SMESH::nodes_array_var points;
h->GetEnforcedNodes( shapes, points ); h->GetEnforcedNodes( shapes, points );
for ( int i = 0; i < shapes->length(); ++i ) for ( size_t i = 0; i < shapes->length(); ++i )
{ {
CORBA::String_var name = shapes[i]->GetName(); CORBA::String_var name = shapes[i]->GetName();
CORBA::String_var entry = shapes[i]->GetStudyEntry(); CORBA::String_var entry = shapes[i]->GetStudyEntry();
@ -223,7 +223,7 @@ void StdMeshersGUI_QuadrangleParamCreator::retrieveParams() const
item->setData( Qt::UserRole, entry.in() ); item->setData( Qt::UserRole, entry.in() );
myShapesList->addItem( item ); myShapesList->addItem( item );
} }
for ( int i = 0; i < points->length(); ++i ) for ( size_t i = 0; i < points->length(); ++i )
{ {
QTreeWidgetItem* item = new QTreeWidgetItem QTreeWidgetItem* item = new QTreeWidgetItem
( QStringList() ( QStringList()

View File

@ -72,8 +72,8 @@
StdMeshersGUI_SubShapeSelectorWdg StdMeshersGUI_SubShapeSelectorWdg
::StdMeshersGUI_SubShapeSelectorWdg( QWidget * parent, TopAbs_ShapeEnum aSubShType ): ::StdMeshersGUI_SubShapeSelectorWdg( QWidget * parent, TopAbs_ShapeEnum aSubShType ):
QWidget( parent ), QWidget( parent ),
myPreviewActor( 0 ), myMaxSize( -1 ),
myMaxSize( -1 ) myPreviewActor( 0 )
{ {
QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) ); QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) );

View File

@ -225,7 +225,7 @@ SMESH::long_array* StdMeshers_Arithmetic1D_i::GetReversedEdges()
SMESH::long_array_var anArray = new SMESH::long_array; SMESH::long_array_var anArray = new SMESH::long_array;
std::vector<int> ids = this->GetImpl()->GetReversedEdges(); std::vector<int> ids = this->GetImpl()->GetReversedEdges();
anArray->length( ids.size() ); anArray->length( ids.size() );
for ( CORBA::Long i = 0; i < ids.size(); i++) for ( CORBA::ULong i = 0; i < ids.size(); i++)
anArray [ i ] = ids [ i ]; anArray [ i ] = ids [ i ];
return anArray._retn(); return anArray._retn();

View File

@ -38,8 +38,8 @@ StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i
(PortableServer::POA_ptr thePOA, (PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl ) ::SMESH_Gen* theGenImpl )
: StdMeshers_LayerDistribution_i(thePOA,theStudyId,theGenImpl), :SMESH_Hypothesis_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) StdMeshers_LayerDistribution_i(thePOA,theStudyId,theGenImpl)
{ {
MESSAGE( "StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i" ); MESSAGE( "StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i" );
myBaseImpl = new ::StdMeshers_LayerDistribution2D(theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_LayerDistribution2D(theGenImpl->GetANewId(),

View File

@ -38,8 +38,8 @@ StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i
(PortableServer::POA_ptr thePOA, (PortableServer::POA_ptr thePOA,
int theStudyId, int theStudyId,
::SMESH_Gen* theGenImpl) ::SMESH_Gen* theGenImpl)
: StdMeshers_NumberOfLayers_i(thePOA,theStudyId,theGenImpl), :SMESH_Hypothesis_i( thePOA ),
SMESH_Hypothesis_i( thePOA ) StdMeshers_NumberOfLayers_i(thePOA,theStudyId,theGenImpl)
{ {
MESSAGE("StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i"); MESSAGE("StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i");
myBaseImpl = new ::StdMeshers_NumberOfLayers2D(theGenImpl->GetANewId(), myBaseImpl = new ::StdMeshers_NumberOfLayers2D(theGenImpl->GetANewId(),

View File

@ -397,8 +397,7 @@ void StdMeshers_NumberOfSegments_i::SetExpressionFunction(const char* expr)
SMESH::TPythonDump() << _this() << ".SetExpressionFunction( '" << expr << "' )"; SMESH::TPythonDump() << _this() << ".SetExpressionFunction( '" << expr << "' )";
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
SALOME::BAD_PARAM );
} }
} }

View File

@ -123,7 +123,7 @@ SMESH::long_array* StdMeshers_Reversible1D_i::GetReversedEdges()
SMESH::long_array_var anArray = new SMESH::long_array; SMESH::long_array_var anArray = new SMESH::long_array;
std::vector<int> ids = this->GetImpl()->GetReversedEdges(); std::vector<int> ids = this->GetImpl()->GetReversedEdges();
anArray->length( ids.size() ); anArray->length( ids.size() );
for ( CORBA::Long i = 0; i < ids.size(); i++) for ( CORBA::ULong i = 0; i < ids.size(); i++)
anArray [ i ] = ids [ i ]; anArray [ i ] = ids [ i ];
return anArray._retn(); return anArray._retn();

View File

@ -223,7 +223,7 @@ SMESH::long_array* StdMeshers_StartEndLength_i::GetReversedEdges()
SMESH::long_array_var anArray = new SMESH::long_array; SMESH::long_array_var anArray = new SMESH::long_array;
std::vector<int> ids = this->GetImpl()->GetReversedEdges(); std::vector<int> ids = this->GetImpl()->GetReversedEdges();
anArray->length( ids.size() ); anArray->length( ids.size() );
for ( CORBA::Long i = 0; i < ids.size(); i++) for ( CORBA::ULong i = 0; i < ids.size(); i++)
anArray [ i ] = ids [ i ]; anArray [ i ] = ids [ i ];
return anArray._retn(); return anArray._retn();