]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix issue for concealment validate
authorJérôme <jerome.lucas@cesgenslab.fr>
Sun, 18 Oct 2020 15:00:27 +0000 (17:00 +0200)
committerJérôme <jerome.lucas@cesgenslab.fr>
Sun, 18 Oct 2020 15:00:27 +0000 (17:00 +0200)
src/FeaturesAPI/FeaturesAPI_Fillet.cpp
src/FeaturesAPI/FeaturesAPI_Fillet.h
src/FeaturesPlugin/FeaturesPlugin_Fillet.cpp
src/FeaturesPlugin/FeaturesPlugin_Fillet.h
src/FeaturesPlugin/FeaturesPlugin_VersionedChFi.cpp
src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.cpp
src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.h
src/FeaturesPlugin/fillet_widget.xml

index 531586796b374a33452938ecd1a2ad1c32d0fdb1..a6233275241f723af66dd3f6c6866c73d28d6816 100644 (file)
@@ -151,8 +151,8 @@ FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Featur
     fillAttribute(theEdgesFaces, myedgesfacesselected);
     fillAttribute(theRadius1, mystartRadius);
     fillAttribute(theRadius2, myendRadius);
-
-    execIfBaseNotEmpty();
+    if (myedgesfacesselected->size() > 0)
+      execute();
   }
 }
 
@@ -164,9 +164,9 @@ FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Featur
   : FeaturesAPI_Fillet(theFeature)
 {
   if (initialize()) {
-    fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_MULTIPLES_RADIUSES(), mycreationMethod);
+    fillAttribute(FeaturesPlugin_Fillet::METHOD_MULTIPLES_RADIUSES(), mycreationMethod);
     fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_BY_POINTS(), mycreationMethodmulti);
-    fillAttribute(theedgeselected, edgeselected());
+    fillAttribute(theedgeselected, myedgeselected);
     fillAttribute(thepoint, myarraypointradiusbypoint);
 
     GeomEdgePtr anEdge = GeomEdgePtr(new GeomAPI_Edge( edgeselected()->value()));
@@ -213,7 +213,8 @@ FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Featur
     myvalues()->setValue(aVal, aRowIndex, 0 );
     aVal.myDouble = aRowsRadiusIter->value();
     myvalues()->setValue(aVal, aRowIndex, 1 );
-    execIfBaseNotEmpty();
+    execute();
   }
 }
 
@@ -224,9 +225,9 @@ FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Featur
   : FeaturesAPI_Fillet(theFeature)
 {
   if (initialize()) {
-    fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_MULTIPLES_RADIUSES(), mycreationMethod);
+    fillAttribute(FeaturesPlugin_Fillet::METHOD_MULTIPLES_RADIUSES(), mycreationMethod);
     fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_BY_CURVILEAR_ABSCISSA(), mycreationMethodmulti);
-    fillAttribute(theEdgesFaces, myedgesfacesselected);
+    fillAttribute(theEdgesFaces, myedgesfacesmultiselected);
 
     int aRowIndex = 0;
     myvaluescurv()->setSize( thepointCurvCood.size(), 2 );
@@ -239,8 +240,9 @@ FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Featur
       myvaluescurv()->setValue(aVal, aRowIndex, 0 );
       aVal.myDouble = aRowsRadiusIter->value();
       myvaluescurv()->setValue(aVal, aRowIndex, 1 );
-    }
-    execIfBaseNotEmpty();
+    } 
+    if (myedgesfacesmultiselected->size() > 0)
+      execute();
   }
 }
 
@@ -284,12 +286,12 @@ void FeaturesAPI_Fillet2D::dump(ModelHighAPI_Dumper& theDumper) const
 
 
   if ( aBase->string(FeaturesPlugin_Fillet::CREATION_METHOD())->value()
-        == FeaturesPlugin_Fillet::CREATION_METHOD_MULTIPLES_RADIUSES() )
+        == FeaturesPlugin_Fillet::METHOD_MULTIPLES_RADIUSES() )
   {
     AttributeSelectionPtr anAttrEdgeSelec =
     aBase->selection(FeaturesPlugin_Fillet::EDGE_SELECTED_ID());
 
-    if( aBase->string(FeaturesPlugin_Fillet::CREATION_METHOD_MULTIPLES_RADIUSES())->value()
+    if( aBase->string(FeaturesPlugin_Fillet::CREATION_MULTI_RADIUS_METHODE())->value()
           == FeaturesPlugin_Fillet::CREATION_METHOD_BY_POINTS() )
     {
 
@@ -310,7 +312,7 @@ void FeaturesAPI_Fillet2D::dump(ModelHighAPI_Dumper& theDumper) const
 
     }else{
       AttributeSelectionListPtr anAttrEdgesFaces =
-                      aBase->selectionList(FeaturesPlugin_Fillet::EDGES_FACES_LIST_ID());
+                      aBase->selectionList(FeaturesPlugin_Fillet::EDGES_FACES_MULTI_LIST_ID());
       AttributeTablesPtr anAttrTable = aBase->tables(FeaturesPlugin_Fillet::VALUES_CURV_ID());
       theDumper << aBase << " = model.addFilletMultiRadiusBycurvAbs(" << aDocName << ", " << anAttrEdgesFaces;
       theDumper << ", ";
index c61c032d27a8d20d794675aa0bab53f04623a68b..3e5e45db1312423d6e956bcf5c945dbceb6ef84a 100644 (file)
@@ -148,11 +148,11 @@ public:
   FEATURESAPI_EXPORT
   virtual ~FeaturesAPI_Fillet2D();
 
-  INTERFACE_11(FeaturesPlugin_Fillet::ID(),
+  INTERFACE_12(FeaturesPlugin_Fillet::ID(),
               creationMethod, FeaturesPlugin_Fillet::CREATION_METHOD(),
                               ModelAPI_AttributeString,
                               /** Creation method */,
-              creationMethodmulti, FeaturesPlugin_Fillet::CREATION_METHOD_MULTIPLES_RADIUSES(),
+              creationMethodmulti, FeaturesPlugin_Fillet::CREATION_MULTI_RADIUS_METHODE(),
                               ModelAPI_AttributeString,
                               /** Creation method */,
               baseObjects, FeaturesPlugin_Fillet::OBJECT_LIST_ID(),
@@ -164,6 +164,9 @@ public:
               edgesfacesselected, FeaturesPlugin_Fillet::EDGES_FACES_LIST_ID(),
                            ModelAPI_AttributeSelectionList,
                            /** edge and face objects */,
+              edgesfacesmultiselected, FeaturesPlugin_Fillet::EDGES_FACES_MULTI_LIST_ID(),
+                           ModelAPI_AttributeSelectionList,
+                           /** edge and face objects */,
               arraypointradiusbypoint, FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS(),
                            ModelAPI_AttributeSelectionList,
                            /** selection points  */,
index 41b786e7319a3d8dd4a0e998d9c97e4c45e0652c..96054ea28b50272c0d34912681db661de685cc99 100644 (file)
@@ -61,62 +61,52 @@ FeaturesPlugin_Fillet::FeaturesPlugin_Fillet()
 
 void FeaturesPlugin_Fillet::initAttributes()
 {
-  data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
-  data()->addAttribute(CREATION_METHOD_MULTIPLES_RADIUSES(), ModelAPI_AttributeString::typeId());
-  
+
   AttributePtr aSelectionList =
       data()->addAttribute(OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
 
-  data()->addAttribute(EDGES_FACES_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+  AttributePtr aSelectionEdgesFacesList = 
+      data()->addAttribute(EDGES_FACES_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+  
+  AttributePtr aSelectionEdgesFacesMultiList = 
+    data()->addAttribute(EDGES_FACES_MULTI_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+  
+  AttributePtr aSelectionEdgeSelected =
+      data()->addAttribute(EDGE_SELECTED_ID(), ModelAPI_AttributeSelection::typeId());
+  
+  data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+  data()->addAttribute(CREATION_MULTI_RADIUS_METHODE(), ModelAPI_AttributeString::typeId());
 
   data()->addAttribute(START_RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(END_RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
 
   data()->addAttribute(VALUES_ID(), ModelAPI_AttributeTables::typeId());
   data()->addAttribute(VALUES_CURV_ID(), ModelAPI_AttributeTables::typeId());
-  data()->addAttribute(EDGE_SELECTED_ID(), ModelAPI_AttributeSelection::typeId());
 
   data()->addAttribute(ARRAY_POINT_RADIUS_BY_POINTS(), ModelAPI_AttributeSelectionList::typeId());
 
-  data()->addAttribute(CREATION_METHOD_BY_POINTS(), ModelAPI_AttributeString::typeId());
-  
-  data()->addAttribute(CREATION_METHOD_BY_CURVILEAR_ABSCISSA(), ModelAPI_AttributeString::typeId());
-
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), END_RADIUS_ID());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ARRAY_POINT_RADIUS_BY_POINTS());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VALUES_ID());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), VALUES_CURV_ID());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATION_METHOD_MULTIPLES_RADIUSES());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATION_METHOD_BY_CURVILEAR_ABSCISSA());
-  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATION_METHOD_BY_POINTS());
-  tables(VALUES_ID())->setSize(2,2);
-  tables(VALUES_CURV_ID())->setSize(2,2);
-  ModelAPI_AttributeTables::Value aVar;
-  aVar.myDouble = 0.0;  
-  tables(VALUES_ID())->setValue(aVar,0,0);
-  tables(VALUES_CURV_ID())->setValue(aVar,0,0);
-  aVar.myDouble = 1;
-  tables(VALUES_ID())->setValue(aVar,0,1);
-  tables(VALUES_CURV_ID())->setValue(aVar,0,1);
-
-  tables(VALUES_ID())->setValue(aVar,1,0);
-  tables(VALUES_CURV_ID())->setValue(aVar,1,0);
-  aVar.myDouble = 2;
-  tables(VALUES_ID())->setValue(aVar,1,1);
-  tables(VALUES_CURV_ID())->setValue(aVar,1,1);
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), CREATION_MULTI_RADIUS_METHODE());
 
+  initVersion(aSelectionEdgeSelected);
+  initVersion(aSelectionEdgesFacesMultiList);
+  initVersion(aSelectionEdgesFacesList);
   initVersion(aSelectionList);
+
 }
 
 AttributePtr FeaturesPlugin_Fillet::objectsAttribute()
 { 
-  if( string(CREATION_METHOD())->value() == CREATION_METHOD_MULTIPLES_RADIUSES() )
+  if( string(CREATION_METHOD())->value() == METHOD_MULTIPLES_RADIUSES() )
   {
-    if( string(CREATION_METHOD_MULTIPLES_RADIUSES())->value() == CREATION_METHOD_BY_POINTS())
+    if( string(CREATION_MULTI_RADIUS_METHODE())->value() == CREATION_METHOD_BY_POINTS())
     {
       return attribute(EDGE_SELECTED_ID());
     }else{
-      return attribute(EDGES_FACES_LIST_ID());
+     return attribute(EDGES_FACES_MULTI_LIST_ID());
     }
   }else if ( string(CREATION_METHOD())->value() == CREATION_METHOD_VARYING_RADIUS() )
   {
@@ -152,14 +142,14 @@ GeomMakeShapePtr FeaturesPlugin_Fillet::performOperation(const GeomShapePtr& the
   std::shared_ptr<GeomAlgoAPI_Fillet> aFilletBuilder;
   
   ListOfShape aFilletEdges = extractEdges(theEdges);
-  if ( aCreationMethod->value() == CREATION_METHOD_MULTIPLES_RADIUSES() )
+  if ( aCreationMethod->value() == METHOD_MULTIPLES_RADIUSES())
   {
 
     std::list<double> coodCurv; 
     std::list<double> radiuses;
     AttributeTablesPtr aTablesAttr;
 
-    if( string(CREATION_METHOD_MULTIPLES_RADIUSES())->value() == CREATION_METHOD_BY_POINTS() )
+    if( string(CREATION_MULTI_RADIUS_METHODE())->value() == CREATION_METHOD_BY_POINTS() )
     {
       aTablesAttr =  tables(VALUES_ID());
   
index 98b406cbe5d0fd85cb44eb6d8f6a740417005d2d..b8d11935dbd1422a8d0cd5485d24886853784332 100644 (file)
@@ -61,15 +61,26 @@ public:
     return MY_VARYING_RADIUS;
   }
 
-  inline static const std::string CREATION_METHOD_MULTIPLES_RADIUSES()
+  inline static const std::string METHOD_MULTIPLES_RADIUSES()
   {
     static std::string MY_METHOD_MULTIPLES_RADIUSES("multiple_radiuses");
     return MY_METHOD_MULTIPLES_RADIUSES;
   }
 
+  inline static const std::string CREATION_MULTI_RADIUS_METHODE()
+  {
+    static std::string MY_CREATION_MULTI_RADIUS_METHODE("multiple_radiuses_methode");
+    return MY_CREATION_MULTI_RADIUS_METHODE;
+  }
+
+  inline static const std::string CREATION_METHOD_BY_CURVILEAR_ABSCISSA()
+  {
+    static std::string MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA("by_curvilinear_abscissa_methode");
+    return MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA;
+  }
   inline static const std::string CREATION_METHOD_BY_POINTS()
   {
-    static std::string MY_CREATION_METHOD_BY_POINTS("by_point_method");
+    static std::string MY_CREATION_METHOD_BY_POINTS("by_points");
     return MY_CREATION_METHOD_BY_POINTS;
   }
 
@@ -79,11 +90,7 @@ public:
     return MY_ARRAY_POINT_RADIUS_BY_POINTS;
   }
 
-  inline static const std::string CREATION_METHOD_BY_CURVILEAR_ABSCISSA()
-  {
-    static std::string MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA("by_curvilinear_abscissa_methode");
-    return MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA;
-  }
+
 
   /// Attribute name of main objects.
   inline static const std::string& OBJECT_LIST_ID()
@@ -98,6 +105,13 @@ public:
     return MY_EDGES_FACES_LIST_ID;
   }
 
+  /// Attribute name of main objects.
+  inline static const std::string& EDGES_FACES_MULTI_LIST_ID()
+  {
+    static const std::string 
+                MY_EDGES_FACES_MULTI_LIST_ID("edges_faces_seleted_multi");
+    return MY_EDGES_FACES_MULTI_LIST_ID;
+  }
   /// Attribute name of start radius.
   inline static const std::string& START_RADIUS_ID()
   {
index 5a13070b26afc4a1b11306a9e3232195c2e25b3b..51bba73a30f1b996850cd5b41948f1fc3db728e9 100644 (file)
@@ -114,7 +114,7 @@ bool FeaturesPlugin_VersionedChFi::processAttribute(const AttributePtr& theAttri
 {
   bool isStoreFullHierarchy = data()->version() == CHAMFERFILLET_VERSION_1;
 
-  AttributeSelectionPtr anObject = 
+  AttributeSelectionPtr anObject =
                     std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
 
   if( anObject.get() )
index 4dfe53b66f62009b8615e5b837a064482daf7d68..d2091a551ec9ef47797e9c6102b274432a976d8d 100644 (file)
@@ -158,7 +158,7 @@ FeaturesPlugin_WidgetFilletMultiRadiuses::
                                            const Config_WidgetAPI* theData,
                                            bool TypeMethodeBypoint):
 ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0),
- myTypeMethodeBypoint(TypeMethodeBypoint),mySetSelection(true)
+ myTypeMethodeBypoint(TypeMethodeBypoint),mySetSelection(true), mySortList(false)
 {
   QVBoxLayout* aMainLayout = new QVBoxLayout(this);
 
@@ -291,20 +291,9 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::eventFilter(QObject* theObject, Q
       }
     }
   }
-  else if (theEvent->type() == QEvent::Show ) {
-    DataPtr aData = myFeature->data();
-    if( myTypeMethodeBypoint )
-      aData->string(FeaturesPlugin_Fillet::CREATION_METHOD_MULTIPLES_RADIUSES())
-            ->setValue(FeaturesPlugin_Fillet::CREATION_METHOD_BY_POINTS() );
-    else
-      aData->string(FeaturesPlugin_Fillet::CREATION_METHOD_MULTIPLES_RADIUSES())
-          ->setValue(FeaturesPlugin_Fillet::CREATION_METHOD_BY_CURVILEAR_ABSCISSA() );
-  }
   return ModuleBase_WidgetSelector::eventFilter(theObject, theEvent);
 }
 
-
-
 //**********************************************************************************
 bool FeaturesPlugin_WidgetFilletMultiRadiuses::storeValueCustom()
 {
@@ -329,6 +318,35 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::storeValueCustom()
       aTablesAttr->setValue( getValue( aTblVal ), i, j);
     }
   }
+  
+
+  if(myTypeMethodeBypoint && mySortList ){
+      AttributeSelectionListPtr aSelectionListAttr =
+          aData->selectionList(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
+    if(  aSelectionListAttr->isInitialized() )
+    {
+      std::map<double,std::pair<QString,QString>>::iterator itValuesSort;
+      QList<std::shared_ptr<ModuleBase_ViewerPrs>> alist = getAttributeSelection();
+      aSelectionListAttr->clear();
+      itValuesSort = myValuesSort.begin();
+      for(;itValuesSort != myValuesSort.end();++itValuesSort)
+      {
+        std::pair<QString,QString> elem = itValuesSort->second;
+        ResultPtr aResult;
+        GeomShapePtr aShape;
+        foreach(ModuleBase_ViewerPrsPtr aPrs, alist) {
+          aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs->object());
+          aShape = aPrs->shape();
+          if (!aResult.get() && !aShape.get())
+            continue;
+          if (aResult->data()->name()== Locale::Convert::toWString(elem.first.toStdString())) {
+            aSelectionListAttr->append(aResult, aShape);
+            break;
+          }
+        }
+      }
+    }
+  }
 
   return true;
 }
@@ -350,13 +368,25 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
   else{
     aTablesAttr = aData->tables(FeaturesPlugin_Fillet::VALUES_CURV_ID());
   }
+  
+  if( aTablesAttr->rows() == 0 )
+  {
+    aTablesAttr->setSize(2,2);
+    ModelAPI_AttributeTables::Value aVar;
+    aVar.myDouble = 0.0;
+    aTablesAttr->setValue(aVar,0,0);
+    aVar.myDouble = 1;
+    aTablesAttr->setValue(aVar,0,1);
+    aTablesAttr->setValue(aVar,1,0);
+    aVar.myDouble = 2;
+    aTablesAttr->setValue(aVar,1,1);
+  }
 
   AttributeSelectionPtr anEdges =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(
       aData->attribute(FeaturesPlugin_Fillet::EDGE_SELECTED_ID()));
 
-  std::map<double,std::pair<QString,QString>> aValuesSort;
-
+  myValuesSort.clear();
   double res;
   int aRows = 0;
   std::map<double,std::pair<QString,QString>>::iterator itValuesSort;
@@ -402,16 +432,18 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
       res = (aPntCurv->distance(first) / taille);
       QString aName = QString::fromStdWString(attsel->namingName());
       QString aRad = findRadius( QString::number(res) );
-      if ( aValuesSort.find( res ) == aValuesSort.end() )
-        aValuesSort[ res ] = std::make_pair(aName, aRad );
+      if ( myValuesSort.find( res ) == myValuesSort.end() )
+        myValuesSort[ res ] = std::make_pair(aName, aRad );
       i++;
+      mySortList = true;
     }
 
     res = 0.0;
-    aValuesSort[ res ] = std::make_pair (myfirstRowValue[0], findRadius( QString::number(res) ));
+    myValuesSort[ res ] = std::make_pair (myfirstRowValue[0], findRadius( QString::number(res) ));
     res = 1.0;
-    aValuesSort[ res ] = std::make_pair (myLastRowValue[0], findRadius( QString::number(res) ));
-    aRows =  aValuesSort.size();
+    std::cout << "res =  restore = " << res << std::endl;
+    myValuesSort[ res ] = std::make_pair (myLastRowValue[0], findRadius( QString::number(res) )); 
+    aRows =  myValuesSort.size();
   }else{
 
     ModelAPI_AttributeTables::Value aVal;
@@ -419,16 +451,16 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
         for (int anIndex = 0; anIndex < aTablesAttr->rows(); ++anIndex) {
           aVal = aTablesAttr->value(anIndex,0);
           double curv = getValueText(aVal).toDouble();
-          if ( aValuesSort.find( curv ) == aValuesSort.end() )
-            aValuesSort[ curv ] = std::make_pair(getValueText(aVal),
-                                                 findRadius(getValueText(aVal)));
+          if ( myValuesSort.find( curv ) == myValuesSort.end() )
+            myValuesSort[ curv ] = std::make_pair(getValueText(aVal),
+                                                  findRadius(getValueText(aVal)));
         }
-        aRows = aValuesSort.size();
+        aRows = myValuesSort.size();
     }else{
       res = 0.0;
-      aValuesSort[ res ] = std::make_pair (myfirstRowValue[0], myfirstRowValue[2]);
+      myValuesSort[ res ] = std::make_pair (myfirstRowValue[0], myfirstRowValue[2]);
       res = 1.0;
-      aValuesSort[ res ] = std::make_pair (myLastRowValue[0], myLastRowValue[2]);
+      myValuesSort[ res ] = std::make_pair (myLastRowValue[0], myLastRowValue[2]);
       aRows = 2;
     }
 
@@ -445,7 +477,7 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
 
   myDataTbl->setRowCount(aRows);
 
-  itValuesSort = aValuesSort.begin();
+  itValuesSort = myValuesSort.begin();
 
   for (int k = 0; k < aRows; k++, ++itValuesSort ) {
 
@@ -603,6 +635,7 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::
   setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues, const bool theToValidate)
 {
 
+  mySortList = false;
   if ( theValues.size() > 1 || !myTypeMethodeBypoint || theValues.size() == 0 )
   {
     mySetSelection = false;
index 2e2af1f382de438c8f0328a28c70468527cdb2e8..4de9debbff542023b2df38269f0c27cf75a1d842 100644 (file)
@@ -106,6 +106,7 @@ protected:
   /// \param theToValidate a validation of the values flag
   virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
                             const bool theToValidate);
+
     /// Return the attribute values wrapped in a list of viewer presentations
   /// \return a list of viewer presentations, which contains an attribute result and
   /// a shape. If the attribute do not uses the shape, it is empty
@@ -156,10 +157,13 @@ private:
 
   bool mySetSelection;
 
+  bool mySortList;
+
   DataArrayItemDelegate* myDelegate;
 
   std::vector<QString> myfirstRowValue;
   std::vector<QString> myLastRowValue;
+  std::map<double,std::pair<QString,QString>> myValuesSort;
 
 };
 
index bedfb94e39a4d77ef34c325b08743d371c8d225e..2a756d3f7218e3204bf32a264c956e57b87bfbfc 100644 (file)
@@ -34,7 +34,7 @@
                       use_choice="false"
                       concealment="true">
         <validator id="PartSet_DifferentObjects"/>
-        <validator id="FeaturesPlugin_ValidatorFilletSelection"/>
+        <validator id="FeaturesPlugin_ValidatorFilletSelection" parameters="edge,wire,face"/>
       </multi_selector>
       <doublevalue id="radius1"
                    label="Start radius"
          title="Multiple radiuses"
          tooltip="Fillet with multiple radiuses"
          icon="icons/Features/fillet_var_multiple_radiuses.png">
-      <toolbox id="by_point_method">
-        <box id="by_points"
-         title="By points"
-         tooltip="Fillet with multiple radiuses by points"
-         icon="icons/Features/fillet_multiradius_by_point.png">
-          <shape_selector id="edge_selected"
-                        icon="icons/Features/edge.png"
-                        label="Start"
-                        tooltip="Select edge"
-                        shape_types="edge"
-                        use_choice="false"
-                        concealment="true">
-           <validator id="PartSet_DifferentObjects"/>
-           <validator id="FeaturesPlugin_ValidatorFilletSelectionEdge"/>
-          </shape_selector>
-          <multiradius-panel id="array_point_radius_by_point"
-            filter_points="false">
-            <validator id="GeomValidators_ShapeType" parameters="empty,vertex"/>
-          </multiradius-panel>
-          <validator id="FeaturesPlugin_ValidatorFilletSelection" parameters = "main_objects"/>
-        </box>
-        <box id="by_curvilinear_abscissa_methode"
+      <toolbox id="multiple_radiuses_methode">
+         <box id="by_curvilinear_abscissa_methode"
          title="By curvilinear abscissa"
          tooltip="Fillet with multiple radiuses by curvilinear abscissa"
          icon="icons/Features/fillet_multiradius_by_curv.png">
-          <multi_selector id="edges_faces_seleted"
+          <multi_selector id="edges_faces_seleted_multi"
                       label="Edges or/and faces"
                       icon=""
                       tooltip="Select objects"
                       use_choice="false"
                       concealment="true">
           <validator id="PartSet_DifferentObjects"/>
-          <validator id="FeaturesPlugin_ValidatorFilletSelection"/>
+          <validator id="FeaturesPlugin_ValidatorFilletSelection" parameters="edge,wire,face"/>
           </multi_selector>
           <multiradiuscurv-panel id="array_point_radius_by_point"
             filter_points="false">
             <validator id="GeomValidators_ShapeType" parameters="empty,vertex"/>
           </multiradiuscurv-panel>
         </box>
+         <box id="by_points"
+         title="By points"
+         tooltip="Fillet with multiple radiuses by points"
+         icon="icons/Features/fillet_multiradius_by_point.png">
+          <shape_selector id="edge_selected"
+                        icon="icons/Features/edge.png"
+                        tooltip="Select edge"
+                        shape_types="edge"
+                        use_choice="false"
+                        concealment="true">
+           <validator id="PartSet_DifferentObjects"/>
+           <validator id="FeaturesPlugin_ValidatorFilletSelectionEdge" parameters="edge,wire"/>
+          </shape_selector>
+          <multiradius-panel id="array_point_radius_by_point"
+            filter_points="false">
+            <validator id="GeomValidators_ShapeType" parameters="empty,vertex"/>
+          </multiradius-panel>
+         </box>  
       </toolbox>
     </box>
   </toolbox>