//=============================================================================
void BLSURFPlugin_Hypothesis::SetGradation(double theVal) {
+ _useGradation = ( theVal > 0 );
if (theVal != _gradation) {
_gradation = theVal;
NotifySubMeshesHypothesisModification();
//=============================================================================
void BLSURFPlugin_Hypothesis::SetVolumeGradation(double theVal) {
+ _useVolumeGradation = ( theVal > 0 );
if (theVal != _volumeGradation) {
_volumeGradation = theVal;
NotifySubMeshesHypothesisModification();
if (theVal != _preCADProcess3DTopology) {
// SetTopology(PreCAD);
_preCADProcess3DTopology = theVal;
+ AddPreCADOption("process_3d_topology", theVal ? "yes" : "no" );
NotifySubMeshesHypothesisModification();
}
}
}
}
+//=============================================================================
+// Return true if any PreCAD option is activated
+bool BLSURFPlugin_Hypothesis::HasPreCADOptions(const BLSURFPlugin_Hypothesis* hyp)
+{
+ if ( !hyp )
+ {
+ return false;
+ }
+ bool orDefault, isOk;
+ return ( ToBool( hyp->GetPreCADOptionValue("closed_geometry" , &orDefault )) ||
+ ToBool( hyp->GetPreCADOptionValue("discard_input_topology" , &orDefault )) ||
+ ToBool( hyp->GetPreCADOptionValue("merge_edges" , &orDefault )) ||
+ ToBool( hyp->GetPreCADOptionValue("remove_duplicate_cad_faces", &orDefault )) ||
+ ToBool( hyp->GetPreCADOption ("process_3d_topology") , &isOk ) ||
+ ToBool( hyp->GetPreCADOption ("manifold_geometry") , &isOk ) ||
+ hyp->GetPreCADOptionValue("sewing_tolerance") != "5e-4*D" ||
+ hyp->GetPreCADProcess3DTopology() );
+}
+
//=============================================================================
// void BLSURFPlugin_Hypothesis::SetGMFFile(const std::string& theFileName, bool isBinary)
void BLSURFPlugin_Hypothesis::SetGMFFile(const std::string& theFileName)
}
//=============================================================================
-std::string BLSURFPlugin_Hypothesis::GetOption(const std::string& optionName)
+std::string BLSURFPlugin_Hypothesis::GetOption(const std::string& optionName) const
{
- TOptionValues::iterator op_val = _customOption2value.find(optionName);
+ TOptionValues::const_iterator op_val = _customOption2value.find(optionName);
if (op_val != _customOption2value.end())
return op_val->second;
else
}
//=============================================================================
-std::string BLSURFPlugin_Hypothesis::GetPreCADOption(const std::string& optionName)
+std::string BLSURFPlugin_Hypothesis::GetPreCADOption(const std::string& optionName) const
{
- TOptionValues::iterator op_val = _customOption2value.find(optionName);
+ TOptionValues::const_iterator op_val = _customOption2value.find(optionName);
if (op_val != _customOption2value.end())
return op_val->second;
else