From: dbv Date: Thu, 12 Nov 2015 12:41:58 +0000 (+0300) Subject: Fix fillet validator X-Git-Tag: V_2.0.0_alfa2~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=68225400f2898e1a5d9f1b7d454749dc5e0cb7e5;p=modules%2Fshaper.git Fix fillet validator --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp index 981a60bc2..c870c1ec1 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp @@ -106,12 +106,11 @@ void SketchPlugin_ConstraintFillet::execute() // Obtain base features FeaturePtr anOldFeatureA, anOldFeatureB; - std::list aNewFeatList = aRefListOfBaseLines->list(); - std::list::iterator aFeatIt = aNewFeatList.begin(); + std::list anOldFeatList = aRefListOfBaseLines->list(); + std::list::iterator aFeatIt = anOldFeatList.begin(); anOldFeatureA = ModelAPI_Feature::feature(*aFeatIt++); anOldFeatureB = ModelAPI_Feature::feature(*aFeatIt); - if(!anOldFeatureA.get() || !anOldFeatureB.get()) { setError("One of the edges is empty"); return; @@ -244,10 +243,6 @@ void SketchPlugin_ConstraintFillet::execute() aRefListOfFillet->append(aNewFeatureB->lastResult()); aRefListOfFillet->append(aNewArc->lastResult()); - // attach base lines to the list - aRefListOfBaseLines->append(anOldFeatureA); - aRefListOfBaseLines->append(anOldFeatureB); - myProducedFeatures.push_back(aNewFeatureA); myProducedFeatures.push_back(aNewFeatureB); myProducedFeatures.push_back(aNewArc); diff --git a/src/SketchPlugin/SketchPlugin_Validators.cpp b/src/SketchPlugin/SketchPlugin_Validators.cpp index a432becda..e88aa1db8 100755 --- a/src/SketchPlugin/SketchPlugin_Validators.cpp +++ b/src/SketchPlugin/SketchPlugin_Validators.cpp @@ -414,7 +414,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut FeaturePtr aFeature = std::dynamic_pointer_cast(theAttribute->owner()); AttributePtr aBaseLinesAttribute = aFeature->attribute(SketchPlugin_Constraint::ENTITY_C()); AttributeRefListPtr aRefListOfBaseLines = std::dynamic_pointer_cast(aBaseLinesAttribute); - if(aRefListOfBaseLines->list().size() == 2) { + if(!aRefListOfBaseLines->list().empty()) { return true; }