Enable 'Fineness' at 'curvature' switch on
This commit is contained in:
parent
67c76bbea8
commit
e69bcd9018
@ -330,14 +330,7 @@ void NETGENPluginGUI_HypothesisCreator::retrieveParams() const
|
||||
myFuseEdges->setChecked( data.myFuseEdges );
|
||||
|
||||
// update widgets
|
||||
bool isCustom = (myFineness->currentIndex() == UserDefined);
|
||||
bool isSurfaceCurvature = (mySurfaceCurvature ? mySurfaceCurvature->checkState() == Qt::Checked : true);
|
||||
myFineness->setEnabled(isSurfaceCurvature);
|
||||
myGrowthRate->setEnabled(isCustom && isSurfaceCurvature);
|
||||
if ( myNbSegPerEdge )
|
||||
myNbSegPerEdge->setEnabled(isCustom && isSurfaceCurvature);
|
||||
if ( myNbSegPerRadius )
|
||||
myNbSegPerRadius->setEnabled(isCustom && isSurfaceCurvature);
|
||||
((NETGENPluginGUI_HypothesisCreator*) this )-> onSurfaceCurvatureChanged();
|
||||
|
||||
if ( myLocalSizeTable )
|
||||
{
|
||||
@ -566,6 +559,7 @@ void NETGENPluginGUI_HypothesisCreator::onSurfaceCurvatureChanged()
|
||||
{
|
||||
bool isSurfaceCurvature = (mySurfaceCurvature ? mySurfaceCurvature->isChecked() : true);
|
||||
bool isCustom = (myFineness->currentIndex() == UserDefined);
|
||||
myFineness->setEnabled(isSurfaceCurvature);
|
||||
myGrowthRate->setEnabled(isCustom);
|
||||
if ( myNbSegPerEdge )
|
||||
myNbSegPerEdge->setEnabled(isCustom && isSurfaceCurvature);
|
||||
|
@ -1672,12 +1672,12 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
||||
// element size (regression on issue 0020452, note 0010898)
|
||||
int iPrev = SMESH_MesherHelper::WrapIndex( i-1, nbSegments );
|
||||
int iNext = SMESH_MesherHelper::WrapIndex( i+1, nbSegments );
|
||||
double sunH = segLen[ iPrev ] + segLen[ i ] + segLen[ iNext ];
|
||||
int nbSeg = ( int( segLen[ iPrev ] > sunH / 100.) +
|
||||
int( segLen[ i ] > sunH / 100.) +
|
||||
int( segLen[ iNext ] > sunH / 100.));
|
||||
double sumH = segLen[ iPrev ] + segLen[ i ] + segLen[ iNext ];
|
||||
int nbSeg = ( int( segLen[ iPrev ] > sumH / 100.) +
|
||||
int( segLen[ i ] > sumH / 100.) +
|
||||
int( segLen[ iNext ] > sumH / 100.));
|
||||
if ( nbSeg > 0 )
|
||||
RestrictLocalSize( ngMesh, 0.5*(np1+np2), sunH / nbSeg );
|
||||
RestrictLocalSize( ngMesh, 0.5*(np1+np2), sumH / nbSeg );
|
||||
}
|
||||
if ( isInternalWire )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user