-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 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
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
_edgeLength = 0;
_maxElementArea = 0;
+ if ( !error( StdMeshers_ViscousLayers2D::CheckHypothesis( aMesh, aShape, aStatus )))
+ return false;
+
list <const SMESHDS_Hypothesis * >::const_iterator itl;
const SMESHDS_Hypothesis *theHyp;
F = TopoDS::Face( _helper->GetSubShape() );
TopExp::MapShapesAndAncestors( F, TopAbs_VERTEX, TopAbs_WIRE, VWMap );
int nbVertices = 0;
- for ( int iW = 0; iW < wires.size(); ++iW )
+ for ( size_t iW = 0; iW < wires.size(); ++iW )
nbVertices += wires[ iW ]->NbEdges();
if ( nbVertices == VWMap.Extent() )
VWMap.Clear(); // wires have no common vertices
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();
- 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 ")
<< iW << ": " << uvPtVec.size()<<" != "<<wires[ iW ]->NbPoints()
<< ", probably because of invalid node parameters on geom edges");
double xmax = -1.e300;
double ymin = 1.e300;
double ymax = -1.e300;
- int nbp = 23;
+ const int nbp = 23;
scalex = 1;
scaley = 1;
ymin = p.Y();
if (p.Y() > ymax)
ymax = p.Y();
- // MESSAGE(" "<< f<<" "<<l<<" "<<param<<" "<<xmin<<" "<<xmax<<" "<<ymin<<" "<<ymax);
}
}
- // SCRUTE(xmin);
- // SCRUTE(xmax);
- // SCRUTE(ymin);
- // SCRUTE(ymax);
double xmoy = (xmax + xmin) / 2.;
double ymoy = (ymax + ymin) / 2.;
double xsize = xmax - xmin;
}
scalex = length_x / xsize;
scaley = length_y / ysize;
-// SCRUTE(xsize);
-// SCRUTE(ysize);
double xyratio = xsize*scalex/(ysize*scaley);
const double maxratio = 1.e2;
- //SCRUTE(xyratio);
if (xyratio > maxratio) {
- SCRUTE( scaley );
scaley *= xyratio / maxratio;
- SCRUTE( scaley );
}
else if (xyratio < 1./maxratio) {
- SCRUTE( scalex );
scalex *= 1 / xyratio / maxratio;
- SCRUTE( scalex );
}
- ASSERT(scalex);
- ASSERT(scaley);
}
// namespace