-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 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
* \retval bool - always false
*/
//================================================================================
-bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh,
- const TopoDS_Shape& theShape)
+bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
+ const TopoDS_Shape& /*theShape*/)
{
return false;
}
else if ( theMesh && theMesh->HasShapeToMesh() )
_minSize = NETGENPlugin_Mesher::GetDefaultMinSize( theMesh->GetShapeToMesh(), _maxSize );
+ if ( dflts._way == SMESH_Hypothesis::BY_AVERAGE_LENGTH )
+ {
+ _minSize = dflts._elemLength / 100.;
+ _nbSegPerEdge = 1;
+ _chordalError = dflts._elemLength / 2.;
+ _chordalErrorEnabled = true;
+ _quadAllowed = dflts._quadDominated;
+ }
+
return _nbSegPerEdge && _maxSize > 0;
}