Fix compilation errors using gcc-5.X relating to explicit stream::operator bool()
+ Fix compilation warnings
This commit is contained in:
parent
92b0965b56
commit
a6ff10e23f
@ -361,13 +361,13 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
|
|||||||
int is;
|
int is;
|
||||||
double val;
|
double val;
|
||||||
|
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_maxSize = val;
|
_maxSize = val;
|
||||||
else
|
else
|
||||||
load.clear(ios::badbit | load.rdstate());
|
load.clear(ios::badbit | load.rdstate());
|
||||||
|
|
||||||
isOK = (load >> is);
|
isOK = static_cast<bool>(load >> is);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
SetFineness((Fineness) is);
|
SetFineness((Fineness) is);
|
||||||
else
|
else
|
||||||
@ -375,32 +375,32 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
|
|||||||
|
|
||||||
if (_fineness == UserDefined)
|
if (_fineness == UserDefined)
|
||||||
{
|
{
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_growthRate = val;
|
_growthRate = val;
|
||||||
else
|
else
|
||||||
load.clear(ios::badbit | load.rdstate());
|
load.clear(ios::badbit | load.rdstate());
|
||||||
|
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_nbSegPerEdge = val;
|
_nbSegPerEdge = val;
|
||||||
else
|
else
|
||||||
load.clear(ios::badbit | load.rdstate());
|
load.clear(ios::badbit | load.rdstate());
|
||||||
|
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_nbSegPerRadius = val;
|
_nbSegPerRadius = val;
|
||||||
else
|
else
|
||||||
load.clear(ios::badbit | load.rdstate());
|
load.clear(ios::badbit | load.rdstate());
|
||||||
}
|
}
|
||||||
|
|
||||||
isOK = (load >> is);
|
isOK = static_cast<bool>(load >> is);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_secondOrder = (bool) is;
|
_secondOrder = (bool) is;
|
||||||
else
|
else
|
||||||
load.clear(ios::badbit | load.rdstate());
|
load.clear(ios::badbit | load.rdstate());
|
||||||
|
|
||||||
isOK = (load >> is);
|
isOK = static_cast<bool>(load >> is);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_optimize = (bool) is;
|
_optimize = (bool) is;
|
||||||
else
|
else
|
||||||
@ -409,18 +409,18 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
|
|||||||
std::string option_or_sm;
|
std::string option_or_sm;
|
||||||
bool hasLocalSize = false;
|
bool hasLocalSize = false;
|
||||||
|
|
||||||
isOK = (load >> option_or_sm);
|
isOK = static_cast<bool>(load >> option_or_sm);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
if (option_or_sm == "__LOCALSIZE_BEGIN__")
|
if (option_or_sm == "__LOCALSIZE_BEGIN__")
|
||||||
hasLocalSize = true;
|
hasLocalSize = true;
|
||||||
|
|
||||||
std::string smEntry, smValue;
|
std::string smEntry, smValue;
|
||||||
while (isOK && hasLocalSize) {
|
while (isOK && hasLocalSize) {
|
||||||
isOK = (load >> smEntry);
|
isOK = static_cast<bool>(load >> smEntry);
|
||||||
if (isOK) {
|
if (isOK) {
|
||||||
if (smEntry == "__LOCALSIZE_END__")
|
if (smEntry == "__LOCALSIZE_END__")
|
||||||
break;
|
break;
|
||||||
isOK = (load >> smValue);
|
isOK = static_cast<bool>(load >> smValue);
|
||||||
}
|
}
|
||||||
if (isOK) {
|
if (isOK) {
|
||||||
std::istringstream tmp(smValue);
|
std::istringstream tmp(smValue);
|
||||||
@ -433,15 +433,15 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load)
|
|||||||
if ( !hasLocalSize && !option_or_sm.empty() )
|
if ( !hasLocalSize && !option_or_sm.empty() )
|
||||||
_minSize = atof( option_or_sm.c_str() );
|
_minSize = atof( option_or_sm.c_str() );
|
||||||
|
|
||||||
isOK = ( load >> _quadAllowed );
|
isOK = static_cast<bool>( load >> _quadAllowed );
|
||||||
if ( !isOK )
|
if ( !isOK )
|
||||||
_quadAllowed = GetDefaultQuadAllowed();
|
_quadAllowed = GetDefaultQuadAllowed();
|
||||||
|
|
||||||
isOK = ( load >> _surfaceCurvature );
|
isOK = static_cast<bool>( load >> _surfaceCurvature );
|
||||||
if ( !isOK )
|
if ( !isOK )
|
||||||
_surfaceCurvature = GetDefaultSurfaceCurvature();
|
_surfaceCurvature = GetDefaultSurfaceCurvature();
|
||||||
|
|
||||||
isOK = ( load >> _fuseEdges );
|
isOK = static_cast<bool>( load >> _fuseEdges );
|
||||||
if ( !isOK )
|
if ( !isOK )
|
||||||
_fuseEdges = GetDefaultFuseEdges();
|
_fuseEdges = GetDefaultFuseEdges();
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ void NETGENPlugin_Mesher::SetParameters(const NETGENPlugin_Hypothesis* hyp)
|
|||||||
|
|
||||||
const NETGENPlugin_Hypothesis::TLocalSize localSizes = hyp->GetLocalSizesAndEntries();
|
const NETGENPlugin_Hypothesis::TLocalSize localSizes = hyp->GetLocalSizesAndEntries();
|
||||||
NETGENPlugin_Hypothesis::TLocalSize::const_iterator it = localSizes.begin();
|
NETGENPlugin_Hypothesis::TLocalSize::const_iterator it = localSizes.begin();
|
||||||
for (it ; it != localSizes.end() ; it++)
|
for ( ; it != localSizes.end() ; it++)
|
||||||
{
|
{
|
||||||
std::string entry = (*it).first;
|
std::string entry = (*it).first;
|
||||||
double val = (*it).second;
|
double val = (*it).second;
|
||||||
@ -334,8 +334,8 @@ int HashCode(const Link& aLink, int aLimit)
|
|||||||
|
|
||||||
Standard_Boolean IsEqual(const Link& aLink1, const Link& aLink2)
|
Standard_Boolean IsEqual(const Link& aLink1, const Link& aLink2)
|
||||||
{
|
{
|
||||||
return (aLink1.n1 == aLink2.n1 && aLink1.n2 == aLink2.n2 ||
|
return (( aLink1.n1 == aLink2.n1 && aLink1.n2 == aLink2.n2 ) ||
|
||||||
aLink1.n1 == aLink2.n2 && aLink1.n2 == aLink2.n1);
|
( aLink1.n1 == aLink2.n2 && aLink1.n2 == aLink2.n1 ));
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@ -381,7 +381,7 @@ namespace
|
|||||||
// get ordered EDGEs
|
// get ordered EDGEs
|
||||||
list< TopoDS_Edge > edges;
|
list< TopoDS_Edge > edges;
|
||||||
list< int > nbEdgesInWire;
|
list< int > nbEdgesInWire;
|
||||||
int nbWires = SMESH_Block::GetOrderedEdges( face, edges, nbEdgesInWire);
|
/*int nbWires =*/ SMESH_Block::GetOrderedEdges( face, edges, nbEdgesInWire);
|
||||||
|
|
||||||
// find <edge> within <edges>
|
// find <edge> within <edges>
|
||||||
list< TopoDS_Edge >::iterator eItFwd = edges.begin();
|
list< TopoDS_Edge >::iterator eItFwd = edges.begin();
|
||||||
@ -735,7 +735,7 @@ bool NETGENPlugin_Mesher::FillNgMesh(netgen::OCCGeometry& occgeom,
|
|||||||
SMESH_ProxyMesh::Ptr proxyMesh)
|
SMESH_ProxyMesh::Ptr proxyMesh)
|
||||||
{
|
{
|
||||||
TNode2IdMap nodeNgIdMap;
|
TNode2IdMap nodeNgIdMap;
|
||||||
for ( int i = 1; i < nodeVec.size(); ++i )
|
for ( size_t i = 1; i < nodeVec.size(); ++i )
|
||||||
nodeNgIdMap.insert( make_pair( nodeVec[i], i ));
|
nodeNgIdMap.insert( make_pair( nodeVec[i], i ));
|
||||||
|
|
||||||
TopTools_MapOfShape visitedShapes;
|
TopTools_MapOfShape visitedShapes;
|
||||||
@ -1116,7 +1116,7 @@ void NETGENPlugin_Mesher::FixIntFaces(const netgen::OCCGeometry& occgeom,
|
|||||||
{
|
{
|
||||||
// duplicate faces
|
// duplicate faces
|
||||||
int i, nbFaces = ngMesh.GetNSE();
|
int i, nbFaces = ngMesh.GetNSE();
|
||||||
for (int i = 1; i <= nbFaces; ++i)
|
for ( i = 1; i <= nbFaces; ++i)
|
||||||
{
|
{
|
||||||
netgen::Element2d elem = ngMesh.SurfaceElement(i);
|
netgen::Element2d elem = ngMesh.SurfaceElement(i);
|
||||||
if ( ngFaceIds.count( elem.GetIndex() ))
|
if ( ngFaceIds.count( elem.GetIndex() ))
|
||||||
@ -1155,7 +1155,7 @@ bool NETGENPlugin_Mesher::FixFaceMesh(const netgen::OCCGeometry& occgeom,
|
|||||||
|
|
||||||
if ( occgeom.fmap.Extent() < faceID )
|
if ( occgeom.fmap.Extent() < faceID )
|
||||||
return false;
|
return false;
|
||||||
const TopoDS_Face& face = TopoDS::Face( occgeom.fmap( faceID ));
|
//const TopoDS_Face& face = TopoDS::Face( occgeom.fmap( faceID ));
|
||||||
|
|
||||||
// find free links on the FACE
|
// find free links on the FACE
|
||||||
NCollection_Map<Link> linkMap;
|
NCollection_Map<Link> linkMap;
|
||||||
@ -1319,7 +1319,7 @@ void NETGENPlugin_Mesher::AddIntVerticesInFaces(const netgen::OCCGeometry& o
|
|||||||
vector<const SMDS_MeshNode*>& nodeVec,
|
vector<const SMDS_MeshNode*>& nodeVec,
|
||||||
NETGENPlugin_Internals& internalShapes)
|
NETGENPlugin_Internals& internalShapes)
|
||||||
{
|
{
|
||||||
if ( nodeVec.size() < ngMesh.GetNP() )
|
if ((int) nodeVec.size() < ngMesh.GetNP() )
|
||||||
nodeVec.resize( ngMesh.GetNP(), 0 );
|
nodeVec.resize( ngMesh.GetNP(), 0 );
|
||||||
|
|
||||||
SMESHDS_Mesh* meshDS = internalShapes.getMesh().GetMeshDS();
|
SMESHDS_Mesh* meshDS = internalShapes.getMesh().GetMeshDS();
|
||||||
@ -1513,7 +1513,7 @@ void NETGENPlugin_Mesher::AddIntVerticesInSolids(const netgen::OCCGeometry&
|
|||||||
<< "smesh = smeshBuilder.New(salome.myStudy)"<<endl
|
<< "smesh = smeshBuilder.New(salome.myStudy)"<<endl
|
||||||
<< "m = smesh.Mesh(name='triangles')" << endl;
|
<< "m = smesh.Mesh(name='triangles')" << endl;
|
||||||
#endif
|
#endif
|
||||||
if ( nodeVec.size() < ngMesh.GetNP() )
|
if ((int) nodeVec.size() < ngMesh.GetNP() )
|
||||||
nodeVec.resize( ngMesh.GetNP(), 0 );
|
nodeVec.resize( ngMesh.GetNP(), 0 );
|
||||||
|
|
||||||
SMESHDS_Mesh* meshDS = internalShapes.getMesh().GetMeshDS();
|
SMESHDS_Mesh* meshDS = internalShapes.getMesh().GetMeshDS();
|
||||||
@ -1658,7 +1658,7 @@ void NETGENPlugin_Mesher::AddIntVerticesInSolids(const netgen::OCCGeometry&
|
|||||||
// decide whether to use the closest node and the node with best angle or to create new ones
|
// decide whether to use the closest node and the node with best angle or to create new ones
|
||||||
for ( int isBestAngleN = 0; isBestAngleN < 2; ++isBestAngleN )
|
for ( int isBestAngleN = 0; isBestAngleN < 2; ++isBestAngleN )
|
||||||
{
|
{
|
||||||
bool createNew = !angleOK, distOK = true;
|
bool createNew = !angleOK; //, distOK = true;
|
||||||
double distFromV;
|
double distFromV;
|
||||||
int triInd = isBestAngleN ? 2 : 1;
|
int triInd = isBestAngleN ? 2 : 1;
|
||||||
mp[isBestAngleN] = ngMesh.Point( tri[triInd] );
|
mp[isBestAngleN] = ngMesh.Point( tri[triInd] );
|
||||||
@ -1743,7 +1743,7 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
|||||||
// Check wires and count nodes
|
// Check wires and count nodes
|
||||||
// ----------------------------
|
// ----------------------------
|
||||||
int nbNodes = 0;
|
int nbNodes = 0;
|
||||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
for ( size_t iW = 0; iW < wires.size(); ++iW )
|
||||||
{
|
{
|
||||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||||
if ( wire->MissVertexNode() )
|
if ( wire->MissVertexNode() )
|
||||||
@ -1754,7 +1754,7 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
|||||||
// (new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH, "Missing nodes on vertices"));
|
// (new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH, "Missing nodes on vertices"));
|
||||||
}
|
}
|
||||||
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
||||||
if ( uvPtVec.size() != wire->NbPoints() )
|
if ((int) uvPtVec.size() != wire->NbPoints() )
|
||||||
return SMESH_ComputeError::New(COMPERR_BAD_INPUT_MESH,
|
return SMESH_ComputeError::New(COMPERR_BAD_INPUT_MESH,
|
||||||
SMESH_Comment("Unexpected nb of points on wire ") << iW
|
SMESH_Comment("Unexpected nb of points on wire ") << iW
|
||||||
<< ": " << uvPtVec.size()<<" != "<<wire->NbPoints());
|
<< ": " << uvPtVec.size()<<" != "<<wire->NbPoints());
|
||||||
@ -1777,7 +1777,7 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
|||||||
if ( !wasNgMeshEmpty ) // fill node2ngID with nodes built by NETGEN
|
if ( !wasNgMeshEmpty ) // fill node2ngID with nodes built by NETGEN
|
||||||
{
|
{
|
||||||
set< int > subIDs; // ids of sub-shapes of the FACE
|
set< int > subIDs; // ids of sub-shapes of the FACE
|
||||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
for ( size_t iW = 0; iW < wires.size(); ++iW )
|
||||||
{
|
{
|
||||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||||
for ( int iE = 0, nbE = wire->NbEdges(); iE < nbE; ++iE )
|
for ( int iE = 0, nbE = wire->NbEdges(); iE < nbE; ++iE )
|
||||||
@ -1795,7 +1795,7 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
|||||||
if ( ngMesh.GetNFD() < 1 )
|
if ( ngMesh.GetNFD() < 1 )
|
||||||
ngMesh.AddFaceDescriptor (netgen::FaceDescriptor(faceID, solidID, solidID, 0));
|
ngMesh.AddFaceDescriptor (netgen::FaceDescriptor(faceID, solidID, solidID, 0));
|
||||||
|
|
||||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
for ( size_t iW = 0; iW < wires.size(); ++iW )
|
||||||
{
|
{
|
||||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||||
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
||||||
@ -1814,7 +1814,7 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
|||||||
int edgeID = 1, posID = -2;
|
int edgeID = 1, posID = -2;
|
||||||
bool isInternalWire = false;
|
bool isInternalWire = false;
|
||||||
double vertexNormPar = 0;
|
double vertexNormPar = 0;
|
||||||
const int prevNbNGSeg = ngMesh.GetNSeg();
|
//const int prevNbNGSeg = ngMesh.GetNSeg();
|
||||||
for ( int i = 0; i < nbSegments; ++i ) // loop on segments
|
for ( int i = 0; i < nbSegments; ++i ) // loop on segments
|
||||||
{
|
{
|
||||||
// Add the first point of a segment
|
// Add the first point of a segment
|
||||||
@ -2137,7 +2137,7 @@ int NETGENPlugin_Mesher::FillSMesh(const netgen::OCCGeometry& occgeo,
|
|||||||
for (int j=1; j <= elem.GetNP(); ++j)
|
for (int j=1; j <= elem.GetNP(); ++j)
|
||||||
{
|
{
|
||||||
int pind = elem.PNum(j);
|
int pind = elem.PNum(j);
|
||||||
if ( pind < 1 || pind >= nodeVec.size() )
|
if ( pind < 1 || pind >= (int) nodeVec.size() )
|
||||||
break;
|
break;
|
||||||
if ( SMDS_MeshNode* node = nodeVec_ACCESS(pind))
|
if ( SMDS_MeshNode* node = nodeVec_ACCESS(pind))
|
||||||
{
|
{
|
||||||
@ -2149,7 +2149,7 @@ int NETGENPlugin_Mesher::FillSMesh(const netgen::OCCGeometry& occgeo,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( nodes.size() != elem.GetNP() )
|
if ((int) nodes.size() != elem.GetNP() )
|
||||||
{
|
{
|
||||||
if ( comment.empty() )
|
if ( comment.empty() )
|
||||||
comment << "Invalid netgen 2d element #" << i;
|
comment << "Invalid netgen 2d element #" << i;
|
||||||
@ -2218,7 +2218,7 @@ int NETGENPlugin_Mesher::FillSMesh(const netgen::OCCGeometry& occgeo,
|
|||||||
for (int j=1; j <= elem.GetNP(); ++j)
|
for (int j=1; j <= elem.GetNP(); ++j)
|
||||||
{
|
{
|
||||||
int pind = elem.PNum(j);
|
int pind = elem.PNum(j);
|
||||||
if ( pind < 1 || pind >= nodeVec.size() )
|
if ( pind < 1 || pind >= (int)nodeVec.size() )
|
||||||
break;
|
break;
|
||||||
if ( SMDS_MeshNode* node = nodeVec_ACCESS(pind) )
|
if ( SMDS_MeshNode* node = nodeVec_ACCESS(pind) )
|
||||||
{
|
{
|
||||||
@ -2227,7 +2227,7 @@ int NETGENPlugin_Mesher::FillSMesh(const netgen::OCCGeometry& occgeo,
|
|||||||
meshDS->SetNodeInVolume(node, aSolid);
|
meshDS->SetNodeInVolume(node, aSolid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( nodes.size() != elem.GetNP() )
|
if ((int) nodes.size() != elem.GetNP() )
|
||||||
{
|
{
|
||||||
if ( comment.empty() )
|
if ( comment.empty() )
|
||||||
comment << "Invalid netgen 3d element #" << i;
|
comment << "Invalid netgen 3d element #" << i;
|
||||||
@ -3398,13 +3398,14 @@ NETGENPlugin_Mesher::ReadErrors(const vector<const SMDS_MeshNode* >& nodeVec)
|
|||||||
vector<int> three1(3), three2(3);
|
vector<int> three1(3), three2(3);
|
||||||
const char* badEdgeStr = " multiple times in surface mesh";
|
const char* badEdgeStr = " multiple times in surface mesh";
|
||||||
const int badEdgeStrLen = strlen( badEdgeStr );
|
const int badEdgeStrLen = strlen( badEdgeStr );
|
||||||
|
const int nbNodes = nodeVec.size();
|
||||||
|
|
||||||
while( !file.eof() )
|
while( !file.eof() )
|
||||||
{
|
{
|
||||||
if ( strncmp( file, "Edge ", 5 ) == 0 &&
|
if ( strncmp( file, "Edge ", 5 ) == 0 &&
|
||||||
file.getInts( two ) &&
|
file.getInts( two ) &&
|
||||||
strncmp( file, badEdgeStr, badEdgeStrLen ) == 0 &&
|
strncmp( file, badEdgeStr, badEdgeStrLen ) == 0 &&
|
||||||
two[0] < nodeVec.size() && two[1] < nodeVec.size())
|
two[0] < nbNodes && two[1] < nbNodes )
|
||||||
{
|
{
|
||||||
err->myBadElements.push_back( new SMDS_LinearEdge( nodeVec[ two[0]], nodeVec[ two[1]] ));
|
err->myBadElements.push_back( new SMDS_LinearEdge( nodeVec[ two[0]], nodeVec[ two[1]] ));
|
||||||
file += badEdgeStrLen;
|
file += badEdgeStrLen;
|
||||||
@ -3422,9 +3423,9 @@ NETGENPlugin_Mesher::ReadErrors(const vector<const SMDS_MeshNode* >& nodeVec)
|
|||||||
ok = ok && file.getInts( three1 );
|
ok = ok && file.getInts( three1 );
|
||||||
ok = ok && file.getInts( three2 );
|
ok = ok && file.getInts( three2 );
|
||||||
for ( int i = 0; ok && i < 3; ++i )
|
for ( int i = 0; ok && i < 3; ++i )
|
||||||
ok = ( three1[i] < nodeVec.size() && nodeVec[ three1[i]]);
|
ok = ( three1[i] < nbNodes && nodeVec[ three1[i]]);
|
||||||
for ( int i = 0; ok && i < 3; ++i )
|
for ( int i = 0; ok && i < 3; ++i )
|
||||||
ok = ( three2[i] < nodeVec.size() && nodeVec[ three2[i]]);
|
ok = ( three2[i] < nbNodes && nodeVec[ three2[i]]);
|
||||||
if ( ok )
|
if ( ok )
|
||||||
{
|
{
|
||||||
err->myBadElements.push_back( new SMDS_FaceOfNodes( nodeVec[ three1[0]],
|
err->myBadElements.push_back( new SMDS_FaceOfNodes( nodeVec[ three1[0]],
|
||||||
|
@ -504,7 +504,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
|||||||
{
|
{
|
||||||
netgen::mparam.minh = netgen::mparam.maxh;
|
netgen::mparam.minh = netgen::mparam.maxh;
|
||||||
netgen::mparam.maxh = 0;
|
netgen::mparam.maxh = 0;
|
||||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
for ( size_t iW = 0; iW < wires.size(); ++iW )
|
||||||
{
|
{
|
||||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||||
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
||||||
@ -668,7 +668,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Evaluate(SMESH_Mesh& aMesh,
|
|||||||
|
|
||||||
// compute edge length
|
// compute edge length
|
||||||
double ELen = 0;
|
double ELen = 0;
|
||||||
if (_hypLengthFromEdges || !_hypLengthFromEdges && !_hypMaxElementArea) {
|
if (( _hypLengthFromEdges ) || ( !_hypLengthFromEdges && !_hypMaxElementArea )) {
|
||||||
if ( nb1d > 0 )
|
if ( nb1d > 0 )
|
||||||
ELen = fullLen / nb1d;
|
ELen = fullLen / nb1d;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh,
|
|||||||
_progressByTic = -1.;
|
_progressByTic = -1.;
|
||||||
|
|
||||||
list<const SMESHDS_Hypothesis*>::const_iterator itl;
|
list<const SMESHDS_Hypothesis*>::const_iterator itl;
|
||||||
const SMESHDS_Hypothesis* theHyp;
|
//const SMESHDS_Hypothesis* theHyp;
|
||||||
|
|
||||||
const list<const SMESHDS_Hypothesis*>& hyps =
|
const list<const SMESHDS_Hypothesis*>& hyps =
|
||||||
GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliary=*/false);
|
GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliary=*/false);
|
||||||
@ -200,7 +200,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||||
|
|
||||||
SMESH_MesherHelper helper(aMesh);
|
SMESH_MesherHelper helper(aMesh);
|
||||||
bool _quadraticMesh = helper.IsQuadraticSubMesh(aShape);
|
_quadraticMesh = helper.IsQuadraticSubMesh(aShape);
|
||||||
helper.SetElementsOnShape( true );
|
helper.SetElementsOnShape( true );
|
||||||
|
|
||||||
int Netgen_NbOfNodes = 0;
|
int Netgen_NbOfNodes = 0;
|
||||||
@ -586,13 +586,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
|
|
||||||
int Netgen_NbOfNodes = 0;
|
int Netgen_NbOfNodes = 0;
|
||||||
int Netgen_param2ndOrder = 0;
|
|
||||||
double Netgen_paramFine = 1.;
|
|
||||||
double Netgen_paramSize = pow( 72, 1/6. ) * pow( _maxElementVolume, 1/3. );
|
|
||||||
|
|
||||||
double Netgen_point[3];
|
double Netgen_point[3];
|
||||||
int Netgen_triangle[3];
|
int Netgen_triangle[3];
|
||||||
int Netgen_tetrahedron[4];
|
|
||||||
|
|
||||||
NETGENPlugin_NetgenLibWrapper ngLib;
|
NETGENPlugin_NetgenLibWrapper ngLib;
|
||||||
Ng_Mesh * Netgen_mesh = ngLib._ngMesh;
|
Ng_Mesh * Netgen_mesh = ngLib._ngMesh;
|
||||||
|
@ -165,19 +165,19 @@ istream & NETGENPlugin_SimpleHypothesis_2D::LoadFrom(istream & load)
|
|||||||
bool isOK = true;
|
bool isOK = true;
|
||||||
double val;
|
double val;
|
||||||
|
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_nbSegments = (int) val;
|
_nbSegments = (int) val;
|
||||||
else
|
else
|
||||||
load.clear(ios::badbit | load.rdstate());
|
load.clear(ios::badbit | load.rdstate());
|
||||||
|
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_segmentLength = val;
|
_segmentLength = val;
|
||||||
else
|
else
|
||||||
load.clear(ios::badbit | load.rdstate());
|
load.clear(ios::badbit | load.rdstate());
|
||||||
|
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_area = val;
|
_area = val;
|
||||||
else
|
else
|
||||||
|
@ -106,7 +106,7 @@ istream & NETGENPlugin_SimpleHypothesis_3D::LoadFrom(istream & load)
|
|||||||
bool isOK = true;
|
bool isOK = true;
|
||||||
double val;
|
double val;
|
||||||
|
|
||||||
isOK = (load >> val);
|
isOK = static_cast<bool>(load >> val);
|
||||||
if (isOK)
|
if (isOK)
|
||||||
_volume = val;
|
_volume = val;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user