From 4ab4ce0ba01789bc94486b144efd7af39a4b1b2a Mon Sep 17 00:00:00 2001 From: gdd Date: Tue, 23 Aug 2011 08:47:04 +0000 Subject: [PATCH] PreCAD --- idl/BLSURFPlugin_Algorithm.idl | 6 +++--- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 2 +- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 7 ++++++- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx | 6 +++--- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 2 -- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index 83750ea..e5e6281 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -212,7 +212,7 @@ module BLSURFPlugin short GetVerbosity(); /*! - * To optimize merges edges. + * To merges edges. */ void SetPreCADMergeEdges(in boolean toMergeEdges); boolean GetPreCADMergeEdges(); @@ -230,8 +230,8 @@ module BLSURFPlugin boolean GetPreCADDiscardInput(); /*! - * To help PreCAD treat some very dirty cases. - * If the treated object is manifold. + * Sets the length below which an edge is considered as nano + * for the topology processing. */ void SetPreCADEpsNano(in double epsNano); boolean GetPreCADEpsNano(); diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 340cc17..191a186 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -696,7 +696,7 @@ void BLSURFPlugin_BLSURF::SetParameters( int _precadMergeEdges = BLSURFPlugin_Hypothesis::GetDefaultPreCADMergeEdges(); int _precadRemoveNanoEdges = BLSURFPlugin_Hypothesis::GetDefaultPreCADRemoveNanoEdges(); int _precadDiscardInput = BLSURFPlugin_Hypothesis::GetDefaultPreCADDiscardInput(); - double _precadEpsNano = BLSURFPlugin_Hypothesis::GetDefaultMinSize(); + double _precadEpsNano = BLSURFPlugin_Hypothesis::GetDefaultPreCADEpsNano(); if (hyp) { diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index 0daa17a..d425913 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -58,7 +58,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G _preCADMergeEdges(GetDefaultPreCADMergeEdges()), _preCADRemoveNanoEdges(GetDefaultPreCADRemoveNanoEdges()), _preCADDiscardInput(GetDefaultPreCADDiscardInput()), - _preCADEpsNano(GetDefaultMinSize()), + _preCADEpsNano(GetDefaultPreCADEpsNano()), _sizeMap(GetDefaultSizeMap()), _attractors(GetDefaultSizeMap()), _classAttractors(GetDefaultAttractorMap()), @@ -1585,3 +1585,8 @@ bool BLSURFPlugin_Hypothesis::GetDefaultQuadAllowed() { bool BLSURFPlugin_Hypothesis::GetDefaultDecimesh() { return false; } + +//====================================================================== +double BLSURFPlugin_Hypothesis::GetDefaultPreCADEpsNano() { + return undefinedDouble(); //1e-4; +} diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx index b6ffd4b..f6bdec6 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx @@ -286,10 +286,10 @@ public: static bool GetDefaultDecimesh(); static int GetDefaultVerbosity() { return 10; } // PreCAD - static bool GetDefaultPreCADMergeEdges() { return true; } - static bool GetDefaultPreCADRemoveNanoEdges() { return true; } + static bool GetDefaultPreCADMergeEdges() { return false; } + static bool GetDefaultPreCADRemoveNanoEdges() { return false; } static bool GetDefaultPreCADDiscardInput() { return false; } -// static double GetDefaultPreCADEpsNano() { return undefinedDouble(); } + static double GetDefaultPreCADEpsNano(); static TSizeMap GetDefaultSizeMap() { return TSizeMap();} static TAttractorMap GetDefaultAttractorMap() { return TAttractorMap(); } diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index a334094..4f112e8 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -777,10 +777,8 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() myPreCADGroupBox->setEnabled(false); QGridLayout* aPreCADGroupLayout = new QGridLayout(myPreCADGroupBox); myPreCADMergeEdges = new QCheckBox(tr("BLSURF_PRECAD_MERGE_EDGES"),myPreCADGroupBox); - myPreCADMergeEdges->setChecked(true); aPreCADGroupLayout->addWidget(myPreCADMergeEdges,0,0,1,2); myPreCADRemoveNanoEdges = new QCheckBox(tr("BLSURF_PRECAD_REMOVE_NANO_EDGES"),myPreCADGroupBox); - myPreCADRemoveNanoEdges->setChecked(true); aPreCADGroupLayout->addWidget(myPreCADRemoveNanoEdges,1,0,1,2); myPreCADEpsNano = new SMESHGUI_SpinBox(myPreCADGroupBox); myPreCADEpsNano->RangeStepAndValidator(0, COORD_MAX, 10.0, "length_precision"); -- 2.39.2