-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
_toAddEdges( false ),
_toConsiderInternalFaces( false ),
_toUseThresholdForInternalFaces( false ),
- _toCreateFaces( false )
+ _toCreateFaces( false ),
+ _toUseQuanta(false),
+ _quanta(0.01)
{
_name = "CartesianParameters3D"; // used by "Cartesian_3D"
_param_algo_dim = 3; // 3D
}
}
+//=======================================================================
+//function : SetToUseQuanta
+//purpose : Enables use of quanta
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D::SetToUseQuanta(bool toUseQuanta)
+{
+ if ( _toUseQuanta != toUseQuanta )
+ {
+ _toUseQuanta = toUseQuanta;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : SetQuanta
+//purpose : Set size quanta value
+//=======================================================================
+
+void StdMeshers_CartesianParameters3D::SetQuanta(const double quanta)
+{
+ if ( quanta < 1e-6 || quanta > 1.0 )
+ throw SALOME_Exception(LOCALIZED("Quanta must be in the range [0.01,1] "));
+
+ bool changed = (_quanta != quanta);
+ _quanta = quanta;
+
+ if ( changed )
+ NotifySubMeshesHypothesisModification();
+}
+
//=======================================================================
//function : IsDefined
//purpose : Return true if parameters are well defined
save << " " << _toConsiderInternalFaces
<< " " << _toUseThresholdForInternalFaces
- << " " << _toCreateFaces;
+ << " " << _toCreateFaces
+ << " " << _toUseQuanta
+ << " " << _quanta;
return save;
}
load >> _toCreateFaces;
}
+ if ( load >> _toUseQuanta )
+ load >> _quanta;
+
return load;
}