//=============================================================================
void BLSURFPlugin_Hypothesis_i::SetMinSize(CORBA::Double theMinSize) {
ASSERT(myBaseImpl);
- if (GetMinSize() != theMinSize) {
+ if (IsMinSizeRel() || GetMinSize() != theMinSize ) {
this->GetImpl()->SetMinSize(theMinSize, false);
SMESH::TPythonDump() << _this() << ".SetMinSize( " << theMinSize << " )";
}
//=============================================================================
void BLSURFPlugin_Hypothesis_i::SetMinSizeRel(CORBA::Double theMinSize) {
ASSERT(myBaseImpl);
- if ( IsMinSizeRel() && (GetMinSize() != theMinSize) ) {
+ if ( !IsMinSizeRel() && (GetMinSize() != theMinSize) ) {
this->GetImpl()->SetMinSize(theMinSize, true);
SMESH::TPythonDump() << _this() << ".SetMinSize( " << theMinSize << ", isRelative = True )";
}
//=============================================================================
void BLSURFPlugin_Hypothesis_i::SetMaxSize(CORBA::Double theMaxSize) {
ASSERT(myBaseImpl);
- if (GetMaxSize() != theMaxSize) {
+ if (IsMaxSizeRel() || GetMaxSize() != theMaxSize) {
this->GetImpl()->SetMaxSize(theMaxSize, false);
SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theMaxSize << " )";
}
//=============================================================================
void BLSURFPlugin_Hypothesis_i::SetMaxSizeRel(CORBA::Double theMaxSize) {
ASSERT(myBaseImpl);
- if ( IsMaxSizeRel() && (GetMaxSize() != theMaxSize) ) {
+ if ( !IsMaxSizeRel() && (GetMaxSize() != theMaxSize) ) {
this->GetImpl()->SetMaxSize(theMaxSize, true);
SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theMaxSize << ", isRelative = True )";
}
h->SetGeometricMesh( (int) h_data.myGeometricMesh );
if ( ((int) h_data.myPhysicalMesh == PhysicalGlobalSize)||((int) h_data.myPhysicalMesh == PhysicalLocalSize) ) {
- if ( h->GetPhySize() != h_data.myPhySize ) {
+ if ( h->GetPhySize() != h_data.myPhySize ||
+ h->IsPhySizeRel() != h_data.myPhySizeRel ) {
if ( h_data.myPhySizeRel )
h->SetPhySizeRel( h_data.myPhySize );
else
h->SetPhySize( h_data.myPhySize );
}
}
- if (h->GetMinSize() != h_data.myMinSize) {
+ if (h->GetMinSize() != h_data.myMinSize ||
+ h->IsMinSizeRel() != h_data.myMinSizeRel ) {
if ( h_data.myMinSizeRel )
h->SetMinSizeRel( h_data.myMinSize <= 0 ? -1 : h_data.myMinSize );
else
h->SetMinSize( h_data.myMinSize <= 0 ? -1 : h_data.myMinSize );
}
- if (h->GetMaxSize() != h_data.myMaxSize) {
+ if (h->GetMaxSize() != h_data.myMaxSize ||
+ h->IsMaxSizeRel() != h_data.myMaxSizeRel ) {
if ( h_data.myMaxSizeRel )
h->SetMaxSizeRel( h_data.myMaxSize <= 0 ? -1 : h_data.myMaxSize );
else