X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_CartesianParameters3D.cxx;h=be2a1955699adcfbe1a6022373e2bf4620045b4d;hp=5717f0a2c07ea7d7f0edfdd113d97ccbe1246a96;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hpb=0fc0831670e27a5611b941c52dc152fd63964515 diff --git a/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx b/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx index 5717f0a2c..be2a19556 100644 --- a/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx +++ b/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -133,7 +133,6 @@ namespace void checkGridSpacing(std::vector& spaceFunctions, std::vector& internalPoints, const std::string& axis) - throw ( SALOME_Exception ) { if ( spaceFunctions.empty() ) throw SALOME_Exception(SMESH_Comment("Empty space function for ") << axis ); @@ -170,7 +169,6 @@ namespace //======================================================================= void StdMeshers_CartesianParameters3D::SetGrid(std::vector& coords, int axis) - throw ( SALOME_Exception ) { checkAxis( axis ); @@ -198,7 +196,6 @@ void StdMeshers_CartesianParameters3D::SetGrid(std::vector& coords, int void StdMeshers_CartesianParameters3D::SetGridSpacing(std::vector& xSpaceFuns, std::vector& xInternalPoints, const int axis) - throw ( SALOME_Exception ) { checkAxis( axis ); @@ -252,7 +249,6 @@ bool StdMeshers_CartesianParameters3D::GetFixedPoint(double p[3]) const //======================================================================= void StdMeshers_CartesianParameters3D::SetSizeThreshold(const double threshold) - throw ( SALOME_Exception ) { if ( threshold <= 1.0 ) throw SALOME_Exception(LOCALIZED("threshold must be > 1.0")); @@ -272,7 +268,6 @@ void StdMeshers_CartesianParameters3D::SetSizeThreshold(const double threshold) void StdMeshers_CartesianParameters3D::GetGridSpacing(std::vector& spaceFunctions, std::vector& internalPoints, const int axis) const - throw ( SALOME_Exception ) { if ( !IsGridBySpacing(axis) ) throw SALOME_Exception(LOCALIZED("The grid is defined by coordinates and not by spacing")); @@ -286,7 +281,6 @@ void StdMeshers_CartesianParameters3D::GetGridSpacing(std::vector& //======================================================================= bool StdMeshers_CartesianParameters3D::IsGridBySpacing(const int axis) const - throw ( SALOME_Exception ) { checkAxis(axis); return !_spaceFunctions[axis].empty(); @@ -305,7 +299,6 @@ void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double x0, vector& coords, const string& axis, const double* xForced ) - throw ( SALOME_Exception ) { checkGridSpacing( theSpaceFuns, thePoints, axis ); @@ -338,13 +331,13 @@ void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double x0, const double p1 = x0 * ( 1. - points[i+1]) + x1 * points[i+1]; const double length = p1 - p0; - const size_t nbSections = 1000; + const int nbSections = 1000; const double sectionLen = ( p1 - p0 ) / nbSections; vector< double > nbSegments( nbSections + 1 ); nbSegments[ 0 ] = 0.; double t, spacing = 0; - for ( size_t i = 1; i <= nbSections; ++i ) + for ( int i = 1; i <= nbSections; ++i ) { t = double( i ) / nbSections; if ( !fun.value( t, spacing ) || spacing < std::numeric_limits::min() ) @@ -357,11 +350,11 @@ void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double x0, if ( coords.empty() ) coords.push_back( p0 ); - for ( size_t iCell = 1, i = 1; i <= nbSections; ++i ) + for ( int iCell = 1, j = 1; j <= nbSections; ++j ) { - if ( nbSegments[i]*corr >= iCell ) + if ( nbSegments[j]*corr >= iCell ) { - t = (i - ( nbSegments[i] - iCell/corr )/( nbSegments[i] - nbSegments[i-1] )) / nbSections; + t = (j - ( nbSegments[j] - iCell/corr )/( nbSegments[j] - nbSegments[j-1] )) / nbSections; coords.push_back( p0 + t * length ); ++iCell; } @@ -386,9 +379,9 @@ void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double x0, const double tol = minLen * 1e-3; int iRem = -1; if (( iF > 1 ) && ( coords[iF] - coords[iF-1] < tol )) - iRem = iF-1; + iRem = (int) iF-1; else if (( iF < coords.size()-2 ) && ( coords[iF+1] - coords[iF] < tol )) - iRem = iF+1; + iRem = (int) iF+1; if ( iRem > 0 ) coords.erase( coords.begin() + iRem ); } @@ -404,7 +397,6 @@ void StdMeshers_CartesianParameters3D::GetCoordinates(std::vector& xNode std::vector& yNodes, std::vector& zNodes, const Bnd_Box& bndBox) const - throw ( SALOME_Exception ) { double x0,y0,z0, x1,y1,z1; if ( IsGridBySpacing(0) || IsGridBySpacing(1) || IsGridBySpacing(2)) @@ -655,7 +647,6 @@ ComputeOptimalAxesDirs(const TopoDS_Shape& shape, //======================================================================= void StdMeshers_CartesianParameters3D::SetAxisDirs(const double* the9DirComps) - throw ( SALOME_Exception ) { gp_Vec x( the9DirComps[0], the9DirComps[1], @@ -697,7 +688,6 @@ void StdMeshers_CartesianParameters3D::SetAxisDirs(const double* the9DirComps) //======================================================================= void StdMeshers_CartesianParameters3D::GetGrid(std::vector& coords, int axis) const - throw ( SALOME_Exception ) { if ( IsGridBySpacing(axis) ) throw SALOME_Exception(LOCALIZED("The grid is defined by spacing and not by coordinates"));