]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix fillet validator
authordbv <dbv@opencascade.com>
Thu, 12 Nov 2015 12:41:58 +0000 (15:41 +0300)
committerdbv <dbv@opencascade.com>
Thu, 12 Nov 2015 12:41:58 +0000 (15:41 +0300)
src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp
src/SketchPlugin/SketchPlugin_Validators.cpp

index 981a60bc25479be7a35b48b16deffd7300b22b46..c870c1ec167367a7fbac49e247d570c3be54b5e0 100644 (file)
@@ -106,12 +106,11 @@ void SketchPlugin_ConstraintFillet::execute()
 
   // Obtain base features
   FeaturePtr anOldFeatureA, anOldFeatureB;
-  std::list<ObjectPtr> aNewFeatList = aRefListOfBaseLines->list();
-  std::list<ObjectPtr>::iterator aFeatIt = aNewFeatList.begin();
+  std::list<ObjectPtr> anOldFeatList = aRefListOfBaseLines->list();
+  std::list<ObjectPtr>::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);
index a432becdaa31f84efa7cf8f0a641362b45d96310..e88aa1db86c787525671ef334b6aeb66a21d179a 100755 (executable)
@@ -414,7 +414,7 @@ bool SketchPlugin_FilletVertexValidator::isValid(const AttributePtr& theAttribut
   FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
   AttributePtr aBaseLinesAttribute = aFeature->attribute(SketchPlugin_Constraint::ENTITY_C());
   AttributeRefListPtr aRefListOfBaseLines = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(aBaseLinesAttribute);
-  if(aRefListOfBaseLines->list().size() == 2) {
+  if(!aRefListOfBaseLines->list().empty()) {
     return true;
   }