initParams.way = isSubMesh ? BY_MESH : BY_GEOM;
}
- SMESH::SMESH_Hypothesis_var hyp =
- SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toUtf8().data(),
- aServerLib.toUtf8().data(),
- aMesh,
- aGeomVar,
- initParams );
+ SMESH::SMESH_Hypothesis_var hyp;
+ if ( initParams.way == BY_AVERAGE_LENGTH )
+ hyp = SMESHGUI::GetSMESHGen()->CreateHypothesisByAverageLength( aHypType.toUtf8().data(),
+ aServerLib.toUtf8().data(),
+ initParams.averageLength,
+ initParams.quadDominated );
+ else
+ hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toUtf8().data(),
+ aServerLib.toUtf8().data(),
+ aMesh,
+ aGeomVar,
+ initParams );
if ( hyp->_is_nil() && initParams.way == BY_MESH )
{
initParams.way = BY_GEOM;
HypothesesSet::SetType setType = aHypoSet->getPreferredHypType();
if ( !aHypoSet->getAlgoAvailable( setType ))
{
- setType = setType == HypothesesSet::ALT ? HypothesesSet::MAIN : HypothesesSet::ALT;
+ setType = ( setType == HypothesesSet::ALT ) ? HypothesesSet::MAIN : HypothesesSet::ALT;
if ( !aHypoSet->getAlgoAvailable( setType ))
return;
}
}
currentHypoSet->setAlgoAvailable( sType, isAvailable );
}
+ if ( currentHypoSet->hasAlgo( HypothesesSet::MAIN ) &&
+ currentHypoSet->hasAlgo( HypothesesSet::ALT ))
+ {
+ HypothesesSet::SetType setType = HypothesesSet::getPreferredHypType();
+ if ( !currentHypoSet->getAlgoAvailable( setType ))
+ continue; // not add if a preferred type not available currently
+ }
+
if ( currentHypoSet->getAlgoAvailable( HypothesesSet::MAIN ) ||
currentHypoSet->getAlgoAvailable( HypothesesSet::ALT ))
+ {
aFilteredHypothesesSetsList.append( *inHypoSetName );
+ }
}
myDlg->setHypoSets( aFilteredHypothesesSetsList );
}