]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improvement coding style, documentation, translation
authorJérôme <jerome.lucas@cesgenslab.fr>
Fri, 30 Oct 2020 15:53:54 +0000 (16:53 +0100)
committerJérôme <jerome.lucas@cesgenslab.fr>
Fri, 30 Oct 2020 15:53:54 +0000 (16:53 +0100)
26 files changed:
src/FeaturesAPI/FeaturesAPI_Fillet.cpp
src/FeaturesAPI/FeaturesAPI_Fillet.h
src/FeaturesPlugin/FeaturesPlugin_Fillet.cpp
src/FeaturesPlugin/FeaturesPlugin_Fillet.h
src/FeaturesPlugin/FeaturesPlugin_WidgetCreator.cpp
src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.cpp
src/FeaturesPlugin/FeaturesPlugin_WidgetFilletMultiRadiuses.h
src/FeaturesPlugin/FeaturesPlugin_msg_fr.ts
src/FeaturesPlugin/doc/TUI_filletvariableFeature.rst
src/FeaturesPlugin/doc/examples/filletMultiRadiusByPoints.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/filletMultiRadiusBycurvAbs.py [new file with mode: 0644]
src/FeaturesPlugin/doc/filletFeature.rst
src/FeaturesPlugin/doc/images/FilletFixed.png
src/FeaturesPlugin/doc/images/FilletMultipleRadius.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/FilletMultiplebycurv.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/FilletMultiplebypoint.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/FilletVarious.png
src/FeaturesPlugin/doc/images/fillet_multiradius_by_curv.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/fillet_multiradius_by_point.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/fillet_var_multiple_radiuses.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/filletmultiRadiusCurvResult.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/filletmultiRadiuspointResult.png [new file with mode: 0644]
src/FeaturesPlugin/fillet_widget.xml
src/FeaturesPlugin/plugin-Features.xml
src/GeomAlgoAPI/CMakeLists.txt
src/GeomAlgoAPI/GeomAlgoAPI_Fillet.cpp

index 1b0f7172d617cd4421bdd022f20e6b8677dce93c..4863546aad0b78e65867884cf5096bd7a5d07654 100644 (file)
@@ -141,33 +141,33 @@ FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Featur
 }
 
 FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Feature>& theFeature,
-                                           const std::list<ModelHighAPI_Selection>& theEdgesFaces,
+                                           const std::list<ModelHighAPI_Selection>& theBaseObjects,
                                            const ModelHighAPI_Double& theRadius1,
                                            const ModelHighAPI_Double& theRadius2)
   : FeaturesAPI_Fillet(theFeature)
 {
   if (initialize()) {
     fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_VARYING_RADIUS(), mycreationMethod);
-    fillAttribute(theEdgesFaces, myedgesfacesselected);
+    fillAttribute(theBaseObjects, mybaseObjects);
     fillAttribute(theRadius1, mystartRadius);
     fillAttribute(theRadius2, myendRadius);
-    if (myedgesfacesselected->size() > 0)
-      execute();
+
+    execIfBaseNotEmpty();
   }
 }
 
 
 FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Feature>& theFeature,
-                                           const ModelHighAPI_Selection & theedgeselected,
-                                           const std::list<ModelHighAPI_Selection>& thepoint,
+                                           const ModelHighAPI_Selection & theEdgeSelected,
+                                           const std::list<ModelHighAPI_Selection>& thePoint,
                                            const std::list<ModelHighAPI_Double>& theRadius)
   : FeaturesAPI_Fillet(theFeature)
 {
   if (initialize()) {
     fillAttribute(FeaturesPlugin_Fillet::METHOD_MULTIPLES_RADIUSES(), mycreationMethod);
     fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_BY_POINTS(), mycreationMethodmulti);
-    fillAttribute(theedgeselected, myedgeselected);
-    fillAttribute(thepoint, myarraypointradiusbypoint);
+    fillAttribute(theEdgeSelected, myedgeselected);
+    fillAttribute(thePoint, myarraypointradiusbypoint);
 
     GeomEdgePtr anEdge = GeomEdgePtr(new GeomAPI_Edge( edgeselected()->value()));
     GeomPointPtr first =  anEdge->firstPoint();
@@ -220,21 +220,21 @@ FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Featur
 
 FeaturesAPI_Fillet2D::FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                                            const std::list<ModelHighAPI_Selection>& theEdgesFaces,
-                                           const std::list<ModelHighAPI_Double>& thepointCurvCood,
+                                           const std::list<ModelHighAPI_Double>& thePointCurvCood,
                                            const std::list<ModelHighAPI_Double>& theRadius)
   : FeaturesAPI_Fillet(theFeature)
 {
   if (initialize()) {
     fillAttribute(FeaturesPlugin_Fillet::METHOD_MULTIPLES_RADIUSES(), mycreationMethod);
     fillAttribute(FeaturesPlugin_Fillet::CREATION_METHOD_BY_CURVILEAR_ABSCISSA(),
-                                                                 mycreationMethodmulti);
+                  mycreationMethodmulti);
     fillAttribute(theEdgesFaces, myedgesfacesmultiselected);
 
     int aRowIndex = 0;
-    myvaluescurv()->setSize( thepointCurvCood.size(), 2 );
-    std::list<ModelHighAPI_Double>::const_iterator aRowsCoodIter = thepointCurvCood.begin();
+    myvaluescurv()->setSize( thePointCurvCood.size(), 2 );
+    std::list<ModelHighAPI_Double>::const_iterator aRowsCoodIter = thePointCurvCood.begin();
     std::list<ModelHighAPI_Double>::const_iterator aRowsRadiusIter = theRadius.begin();
-    for(; aRowsCoodIter != thepointCurvCood.end();
+    for(; aRowsCoodIter != thePointCurvCood.end();
           aRowsCoodIter++, aRowsRadiusIter++, aRowIndex++) {
       ModelAPI_AttributeTables::Value aVal;
       aVal.myDouble = aRowsCoodIter->value();
@@ -292,7 +292,7 @@ void FeaturesAPI_Fillet2D::dump(ModelHighAPI_Dumper& theDumper) const
     AttributeSelectionPtr anAttrEdgeSelec =
     aBase->selection(FeaturesPlugin_Fillet::EDGE_SELECTED_ID());
 
-    if( aBase->string(FeaturesPlugin_Fillet::CREATION_MULTI_RADIUS_METHODE())->value()
+    if( aBase->string(FeaturesPlugin_Fillet::CREATION_MULTI_RADIUS_METHOD())->value()
           == FeaturesPlugin_Fillet::CREATION_METHOD_BY_POINTS() )
     {
 
@@ -301,7 +301,7 @@ void FeaturesAPI_Fillet2D::dump(ModelHighAPI_Dumper& theDumper) const
       AttributeTablesPtr anAttrTable =
           aBase->tables(FeaturesPlugin_Fillet::VALUES_ID());
       theDumper << aBase << " = model.addFilletMultiRadiusByPoints("
-                         << aDocName << ", " << anAttrEdgeSelec;
+                << aDocName << ", " << anAttrEdgeSelec;
       theDumper << ", " << anAttrPoint ;
       theDumper<<", [";
       for(int aRow = 0; aRow < myvalues()->rows(); aRow++) {
@@ -317,7 +317,7 @@ void FeaturesAPI_Fillet2D::dump(ModelHighAPI_Dumper& theDumper) const
                       aBase->selectionList(FeaturesPlugin_Fillet::EDGES_FACES_MULTI_LIST_ID());
       AttributeTablesPtr anAttrTable = aBase->tables(FeaturesPlugin_Fillet::VALUES_CURV_ID());
       theDumper << aBase << " = model.addFilletMultiRadiusBycurvAbs("
-                         << aDocName << ", " << anAttrEdgesFaces;
+                << aDocName << ", " << anAttrEdgesFaces;
       theDumper << ", ";
       theDumper<<"[";
       for(int aRow = 0; aRow < myvaluescurv()->rows(); aRow++) {
@@ -337,7 +337,8 @@ void FeaturesAPI_Fillet2D::dump(ModelHighAPI_Dumper& theDumper) const
   }else
   {
 
-    std::string aCreationMethod = aBase->string(FeaturesPlugin_Fillet::CREATION_METHOD())->value();
+    std::string aCreationMethod =
+                      aBase->string(FeaturesPlugin_Fillet::CREATION_METHOD())->value();
 
     if(aCreationMethod == FeaturesPlugin_Fillet::CREATION_METHOD_SINGLE_RADIUS()) {
        theDumper << aBase << " = model.addFillet(" << aDocName << ", " << anAttrObjects;
@@ -365,9 +366,7 @@ void FeaturesAPI_Fillet2D::execIfBaseNotEmpty()
     execute();
 }
 
-
 //==================================================================================================
-
 FilletPtr addFillet(const std::shared_ptr<ModelAPI_Document>& thePart,
                     const std::list<ModelHighAPI_Selection>& theBaseObjects,
                     const ModelHighAPI_Double& theRadius1,
@@ -393,10 +392,10 @@ FilletPtr addFillet(const std::shared_ptr<ModelAPI_Document>& thePart,
 }
 
 FilletPtr addFilletMultiRadiusByPoints(const std::shared_ptr<ModelAPI_Document>& thePart,
-                    const ModelHighAPI_Selection & theedgeselected,
-                    const std::list<ModelHighAPI_Selection>& thepoint,
-                    const std::list<ModelHighAPI_Double>& theRadius,
-                    const bool keepSubResults)
+                                       const ModelHighAPI_Selection & theEdgeSelected,
+                                       const std::list<ModelHighAPI_Selection>& thePoint,
+                                       const std::list<ModelHighAPI_Double>& theRadius,
+                                       const bool keepSubResults)
 {
 
   FeaturePtr aFeature = thePart->addFeature(FeaturesAPI_Fillet2D::ID());
@@ -405,14 +404,14 @@ FilletPtr addFilletMultiRadiusByPoints(const std::shared_ptr<ModelAPI_Document>&
 
   FilletPtr aFillet;
 
-  aFillet.reset(new FeaturesAPI_Fillet2D(aFeature, theedgeselected, thepoint, theRadius));
+  aFillet.reset(new FeaturesAPI_Fillet2D(aFeature, theEdgeSelected, thePoint, theRadius));
 
   return aFillet;
 }
 
 FilletPtr addFilletMultiRadiusBycurvAbs(const std::shared_ptr<ModelAPI_Document>& thePart,
                     const std::list<ModelHighAPI_Selection>& theBaseObjects,
-                    const std::list<ModelHighAPI_Double>& thepointCurvCood,
+                    const std::list<ModelHighAPI_Double>& thePointCurvCood,
                     const std::list<ModelHighAPI_Double>& theRadius,
                     const bool keepSubResults)
 {
@@ -423,7 +422,7 @@ FilletPtr addFilletMultiRadiusBycurvAbs(const std::shared_ptr<ModelAPI_Document>
 
   FilletPtr aFillet;
 
-  aFillet.reset(new FeaturesAPI_Fillet2D(aFeature, theBaseObjects, thepointCurvCood, theRadius));
+  aFillet.reset(new FeaturesAPI_Fillet2D(aFeature, theBaseObjects, thePointCurvCood, theRadius));
 
   return aFillet;
 }
\ No newline at end of file
index 3e5e45db1312423d6e956bcf5c945dbceb6ef84a..413bb49f7de1d67b81ffde22fc2e68b56aaf0d3a 100644 (file)
@@ -127,21 +127,21 @@ public:
   /// Constructor with values.
   FEATURESAPI_EXPORT
   explicit FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Feature>& theFeature,
-                                const std::list<ModelHighAPI_Selection>& theEdgesFaces,
+                                const std::list<ModelHighAPI_Selection>& theBaseObjects,
                                 const ModelHighAPI_Double& theRadius1,
                                 const ModelHighAPI_Double& theRadius2);
 
   /// Constructor with values.
   FEATURESAPI_EXPORT
   explicit FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Feature>& theFeature,
-                                const ModelHighAPI_Selection& theedgeselected,
-                                const std::list<ModelHighAPI_Selection>& thepoint,
+                                const ModelHighAPI_Selection& theEdgeSelected,
+                                const std::list<ModelHighAPI_Selection>& thePoint,
                                 const std::list<ModelHighAPI_Double>& theRadius);
 
   /// Constructor with values.
   FEATURESAPI_EXPORT
   explicit FeaturesAPI_Fillet2D(const std::shared_ptr<ModelAPI_Feature>& theFeature,
-                                const std::list<ModelHighAPI_Selection>& theEdgesFaces,
+                                const std::list<ModelHighAPI_Selection>& theBaseObjects,
                                 const std::list<ModelHighAPI_Double>& thepointCurvCood,
                                 const std::list<ModelHighAPI_Double>& theRadius);
   /// Destructor.
@@ -152,7 +152,7 @@ public:
               creationMethod, FeaturesPlugin_Fillet::CREATION_METHOD(),
                               ModelAPI_AttributeString,
                               /** Creation method */,
-              creationMethodmulti, FeaturesPlugin_Fillet::CREATION_MULTI_RADIUS_METHODE(),
+              creationMethodmulti, FeaturesPlugin_Fillet::CREATION_MULTI_RADIUS_METHOD(),
                               ModelAPI_AttributeString,
                               /** Creation method */,
               baseObjects, FeaturesPlugin_Fillet::OBJECT_LIST_ID(),
@@ -220,8 +220,8 @@ FilletPtr addFillet(const std::shared_ptr<ModelAPI_Document>& thePart,
 /// \brief Create Fillet feature.
 FEATURESAPI_EXPORT
 FilletPtr addFilletMultiRadiusByPoints(const std::shared_ptr<ModelAPI_Document>& thePart,
-                    const ModelHighAPI_Selection & theedgeselected,
-                    const std::list<ModelHighAPI_Selection>& thepoint,
+                    const ModelHighAPI_Selection & theEdgeSelected,
+                    const std::list<ModelHighAPI_Selection>& thePoint,
                     const std::list<ModelHighAPI_Double>& theRadius,
                     const bool keepSubResults= false);
 
@@ -231,7 +231,7 @@ FilletPtr addFilletMultiRadiusByPoints(const std::shared_ptr<ModelAPI_Document>&
 FEATURESAPI_EXPORT
 FilletPtr addFilletMultiRadiusBycurvAbs( const std::shared_ptr<ModelAPI_Document>& thePart,
                      const std::list<ModelHighAPI_Selection>& theBaseObjects,
-                     const std::list<ModelHighAPI_Double>& thepointCurvCood,
+                     const std::list<ModelHighAPI_Double>& thePointCurvCood,
                      const std::list<ModelHighAPI_Double>& theRadius,
                      const bool keepSubResults= false);
 
index 1fc2904233ec1744badbf19afdc70c14ddf3aa1d..0095a62e928cdc180135870d9a1b89a4b0316137 100644 (file)
@@ -75,7 +75,7 @@ void FeaturesPlugin_Fillet::initAttributes()
       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(CREATION_MULTI_RADIUS_METHOD(), ModelAPI_AttributeString::typeId());
 
   data()->addAttribute(START_RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(END_RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
@@ -85,13 +85,17 @@ void FeaturesPlugin_Fillet::initAttributes()
 
   data()->addAttribute(ARRAY_POINT_RADIUS_BY_POINTS(), ModelAPI_AttributeSelectionList::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_MULTI_RADIUS_METHODE());
+
+  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_MULTI_RADIUS_METHOD());
 
   initVersion(aSelectionEdgeSelected);
   initVersion(aSelectionEdgesFacesMultiList);
@@ -104,18 +108,17 @@ AttributePtr FeaturesPlugin_Fillet::objectsAttribute()
 {
   if( string(CREATION_METHOD())->value() == METHOD_MULTIPLES_RADIUSES() )
   {
-    if( string(CREATION_MULTI_RADIUS_METHODE())->value() == CREATION_METHOD_BY_POINTS())
+    if( string(CREATION_MULTI_RADIUS_METHOD())->value() == CREATION_METHOD_BY_POINTS())
     {
       return attribute(EDGE_SELECTED_ID());
     }else{
-     return attribute(EDGES_FACES_MULTI_LIST_ID());
+      return attribute(EDGES_FACES_MULTI_LIST_ID());
     }
   }else if ( string(CREATION_METHOD())->value() == CREATION_METHOD_VARYING_RADIUS() )
   {
        return attribute(EDGES_FACES_LIST_ID());
 
   }
-
  return attribute(OBJECT_LIST_ID());
 
 }
@@ -144,6 +147,7 @@ GeomMakeShapePtr FeaturesPlugin_Fillet::performOperation(const GeomShapePtr& the
   std::shared_ptr<GeomAlgoAPI_Fillet> aFilletBuilder;
 
   ListOfShape aFilletEdges = extractEdges(theEdges);
+
   if ( aCreationMethod->value() == METHOD_MULTIPLES_RADIUSES())
   {
 
@@ -151,7 +155,8 @@ GeomMakeShapePtr FeaturesPlugin_Fillet::performOperation(const GeomShapePtr& the
     std::list<double> aRadiuses;
     AttributeTablesPtr aTablesAttr;
 
-    if( string(CREATION_MULTI_RADIUS_METHODE())->value() == CREATION_METHOD_BY_POINTS() )
+
+    if( string(CREATION_MULTI_RADIUS_METHOD())->value() == CREATION_METHOD_BY_POINTS() )
     {
       aTablesAttr =  tables(VALUES_ID());
 
@@ -167,6 +172,8 @@ GeomMakeShapePtr FeaturesPlugin_Fillet::performOperation(const GeomShapePtr& the
         aVal = aTablesAttr->value(k, 1);
         aRadiuses.push_back(aVal.myDouble);
     }
+
+
     aFilletBuilder.reset(new GeomAlgoAPI_Fillet(theSolid, aFilletEdges, aCoodCurv,aRadiuses));
 
   }else
index 8175928371d8b2cfa2604ed06616f0eb552f4082..60bba75edca30bfbbc0274466545353b01335d6c 100644 (file)
@@ -67,15 +67,15 @@ public:
     return MY_METHOD_MULTIPLES_RADIUSES;
   }
 
-  inline static const std::string CREATION_MULTI_RADIUS_METHODE()
+  inline static const std::string CREATION_MULTI_RADIUS_METHOD()
   {
-    static std::string MY_CREATION_MULTI_RADIUS_METHODE("multiple_radiuses_methode");
+    static std::string MY_CREATION_MULTI_RADIUS_METHODE("multiple_radiuses_method");
     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");
+    static std::string MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA("by_curvilinear_abscissa_method");
     return MY_CREATION_METHOD_BY_CURVILEAR_ABSCISSA;
   }
   inline static const std::string CREATION_METHOD_BY_POINTS()
@@ -90,8 +90,6 @@ public:
     return MY_ARRAY_POINT_RADIUS_BY_POINTS;
   }
 
-
-
   /// Attribute name of main objects.
   inline static const std::string& OBJECT_LIST_ID()
   {
index 310ef83889a1868d0747f2d3a0ca76221f221e63..fd62f428af013264b37706d083af1f04d0913923 100644 (file)
@@ -57,6 +57,5 @@ ModuleBase_ModelWidget* FeaturesPlugin_WidgetCreator::createWidgetByType(
                                                            false);
   }
 
-
   return aWidget;
 }
index ca8cfa72b029f006ccf9d28fdd9b20348cde6a35..3c390fd168a0e9141c1b60827d4e6644a414b604 100644 (file)
@@ -68,43 +68,38 @@ const char* MYFalse = "False";
 
 class TextFieldDoubleValidator : public QDoubleValidator {
 public:
-  TextFieldDoubleValidator (QObject * parent = 0) : QDoubleValidator(parent) {}
-  TextFieldDoubleValidator (double bottom, double top, int decimals, QObject * parent) :
-  QDoubleValidator(bottom, top, decimals, parent) {}
+  TextFieldDoubleValidator (QObject * theParent = 0) : QDoubleValidator(theParent) {}
+  TextFieldDoubleValidator (double theBottom, double theTop, int theDecimals, QObject * theParent) :
+  QDoubleValidator(theBottom, theTop, theDecimals, theParent) {}
 
-  QValidator::State validate(QString & s, int & pos) const {
-      if (s.isEmpty() || s.startsWith("0.") || s == "0" ){
+  QValidator::State validate(QString & theS, int & thePos) const {
+      if (theS.isEmpty() || theS.startsWith("0.") || theS == "0" ){//|| s.startsWith("-")) {
           // allow empty field or minus sign
           return QValidator::Intermediate;
       }
       // check length of decimal places
       QChar point = locale().decimalPoint();
-      if(s.indexOf(point) != -1) {
-          int lengthDecimals = s.length() - s.indexOf(point) - 1;
-          if (lengthDecimals > decimals()) {
+      if(theS.indexOf(point) != -1) {
+          int alengthDecimals = theS.length() - theS.indexOf(point) - 1;
+          if (alengthDecimals > decimals()) {
               return QValidator::Invalid;
           }
       }
-
       // check range of value
       bool isNumber;
-      double value = locale().toDouble(s, &isNumber);
-      if (isNumber && bottom() <= value && value <= top()) {
+      double aValue = locale().toDouble(theS, &isNumber);
+      if (isNumber && bottom() <= aValue && aValue <= top()) {
           return QValidator::Acceptable;
       }
       return QValidator::Invalid;
   }
-
 };
 
-
-
-DataArrayItemDelegate::DataArrayItemDelegate(bool theTypeMethode)
-  : QStyledItemDelegate(), myTypeMethodePoint(theTypeMethode)
+DataArrayItemDelegate::DataArrayItemDelegate(bool theTypeMethod)
+  : QStyledItemDelegate(), myTypeMethodPoint(theTypeMethod)
 {
 }
 
-
 QWidget* DataArrayItemDelegate::createEditor(QWidget* theParent,
                                              const QStyleOptionViewItem & theOption,
                                              const QModelIndex& theIndex ) const
@@ -124,7 +119,7 @@ QWidget* DataArrayItemDelegate::createEditor(QWidget* theParent,
     if (aLineEdt) {
       if( theIndex.column() == 1 ){
         TextFieldDoubleValidator* doubleVal =
-                    new TextFieldDoubleValidator(0.00001 , 0.99, 6, aLineEdt);
+                            new TextFieldDoubleValidator(0.00001 , 0.99, 6, aLineEdt);
         doubleVal->setNotation(TextFieldDoubleValidator::StandardNotation);
         aLineEdt->setValidator(doubleVal);
       }
@@ -148,17 +143,14 @@ void DataArrayItemDelegate::onEditItem(const QString& theText)
   commitData(aWgt);
 }
 
-
-//**********************************************************************************
-//**********************************************************************************
 //**********************************************************************************
 FeaturesPlugin_WidgetFilletMultiRadiuses::
   FeaturesPlugin_WidgetFilletMultiRadiuses(QWidget* theParent,
                                            ModuleBase_IWorkshop* theWorkshop,
                                            const Config_WidgetAPI* theData,
-                                           bool TypeMethodeBypoint):
+                                           bool theTypeMethodBypoint):
 ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0),
- myTypeMethodeBypoint(TypeMethodeBypoint),mySetSelection(true), mySortList(false)
+ myTypeMethodBypoint(theTypeMethodBypoint),mySetSelection(true)
 {
   QVBoxLayout* aMainLayout = new QVBoxLayout(this);
 
@@ -173,14 +165,12 @@ ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0),
 
   myDataTbl = new QTableWidget(2, 3, aRadiusesFrame);
 
-  myDelegate = new DataArrayItemDelegate(myTypeMethodeBypoint);
-
+  myDelegate = new DataArrayItemDelegate(myTypeMethodBypoint);
   myDataTbl->setItemDelegate(myDelegate);
-
   myDataTbl->verticalHeader()->hide();
   myDataTbl->setRowHeight(0, 25);
 
-  if(myTypeMethodeBypoint){
+  if(myTypeMethodBypoint){
     myfirstRowValue.push_back("Start extremity");
     myfirstRowValue.push_back("0");
     myfirstRowValue.push_back("1");
@@ -196,7 +186,7 @@ ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0),
     myLastRowValue.push_back("2");
   }
 
-  if(myTypeMethodeBypoint)
+  if(myTypeMethodBypoint)
     myDataTbl->hideColumn(1);
   else
     myDataTbl->hideColumn(0);
@@ -206,20 +196,19 @@ ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0),
   aHeaders << "Curvilinear \n Abscissa";
   aHeaders << "Radius";
 
-
   myDataTbl->setHorizontalHeaderLabels(aHeaders);
 
-  QTableWidgetItem* aItem;
+  QTableWidgetItem* anItem;
   for(int j =0; j<3;j++)
   {
-    aItem = new QTableWidgetItem(myfirstRowValue[j]);
+    anItem = new QTableWidgetItem(myfirstRowValue[j]);
     if(j==0 || j== 1)
-      aItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled);
-    myDataTbl->setItem(0, j, aItem);
-    aItem = new QTableWidgetItem(myLastRowValue[j]);
+      anItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled);
+    myDataTbl->setItem(0, j, anItem);
+    anItem = new QTableWidgetItem(myLastRowValue[j]);
     if(j==0 || j== 1)
-      aItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled);
-    myDataTbl->setItem(1, j, aItem);
+      anItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled);
+    myDataTbl->setItem(1, j, anItem);
   }
 
   connect(myDataTbl, SIGNAL(cellChanged(int, int)), SLOT(onTableEdited(int, int)));
@@ -235,16 +224,16 @@ ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0),
   aBtnLayout->setContentsMargins(0, 0, 0, 0);
 
   QPushButton* aAddBtn = new QPushButton(tr("+"), aBtnWgt);
-  QFont font = aAddBtn->font();
-  font.setPointSize(12);
-  aAddBtn->setFont(font);
+  QFont aFont = aAddBtn->font();
+  aFont.setPointSize(12);
+  aAddBtn->setFont(aFont);
   aBtnLayout->addWidget(aAddBtn);
   aBtnLayout->addStretch(1);
 
   myRemoveBtn = new QPushButton(tr("-"), aBtnWgt);
-  font = myRemoveBtn->font();
-  font.setPointSize(12);
-  myRemoveBtn->setFont(font);
+  aFont = myRemoveBtn->font();
+  aFont.setPointSize(12);
+  myRemoveBtn->setFont(aFont);
   aBtnLayout->addWidget(myRemoveBtn);
 
   aRadiusesFrame->setLayout(aRadiusesLayout ) ;
@@ -252,7 +241,8 @@ ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0),
 
   connect(aAddBtn, SIGNAL(clicked(bool)), SLOT(onAdd()));
   connect(myRemoveBtn, SIGNAL(clicked(bool)), SLOT(onRemove()));
-  connect(qApp, SIGNAL(focusChanged(QWidget*, QWidget*)), SLOT(onFocusChanged(QWidget*, QWidget*)));
+  connect(qApp,SIGNAL(focusChanged(QWidget*, QWidget*)),SLOT(onFocusChanged(QWidget*,QWidget*)));
+  connect(myDataTbl, SIGNAL(itemSelectionChanged()), SLOT(onListSelection()));
 }
 
 QList<QWidget*> FeaturesPlugin_WidgetFilletMultiRadiuses::getControls() const
@@ -275,33 +265,31 @@ QIntList FeaturesPlugin_WidgetFilletMultiRadiuses::shapeTypes() const
 //**********************************************************************************
 void FeaturesPlugin_WidgetFilletMultiRadiuses::deactivate()
 {
+
+  myWorkshop->module()->enableCustomModes();
+
   ModuleBase_WidgetSelector::deactivate();
+
+  myWorkshop->module()->deactivateCustomPrs(ModuleBase_IModule::CustomizeHighlightedObjects, true);
+
   storeValueCustom();
 }
 
 //**********************************************************************************
 bool FeaturesPlugin_WidgetFilletMultiRadiuses::eventFilter(QObject* theObject, QEvent* theEvent)
 {
-  if (theEvent->type() == QEvent::FocusIn) {
-    QTableWidget* aTable = dynamic_cast<QTableWidget*>(theObject);
-    if (aTable) {
-      ModuleBase_IPropertyPanel* aPanel = myWorkshop->propertyPanel();
-      if (aPanel->activeWidget() != this) {
-        aPanel->activateWidget(this, false);
-      }
-    }
-  }
   return ModuleBase_WidgetSelector::eventFilter(theObject, theEvent);
 }
 
 //**********************************************************************************
 bool FeaturesPlugin_WidgetFilletMultiRadiuses::storeValueCustom()
 {
+
   DataPtr aData = myFeature->data();
 
   AttributeTablesPtr aTablesAttr;
 
-  if(myTypeMethodeBypoint)
+  if(myTypeMethodBypoint)
     aTablesAttr = aData->tables(FeaturesPlugin_Fillet::VALUES_ID());
   else
     aTablesAttr = aData->tables(FeaturesPlugin_Fillet::VALUES_CURV_ID());
@@ -319,18 +307,18 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::storeValueCustom()
     }
   }
 
-  if(myTypeMethodeBypoint && mySortList ){
+  if(myTypeMethodBypoint && mySortList ){
       AttributeSelectionListPtr aSelectionListAttr =
           aData->selectionList(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
     if(  aSelectionListAttr->isInitialized() )
     {
-      std::map<double,std::pair<QString,QString>>::iterator itValuesSort;
+      std::map<double,std::pair<QString,QString>>::iterator anItValuesSort;
       QList<std::shared_ptr<ModuleBase_ViewerPrs>> alist = getAttributeSelection();
       aSelectionListAttr->clear();
-      itValuesSort = myValuesSort.begin();
-      for(;itValuesSort != myValuesSort.end();++itValuesSort)
+      anItValuesSort = myValuesSort.begin();
+      for(;anItValuesSort != myValuesSort.end();++anItValuesSort)
       {
-        std::pair<QString,QString> elem = itValuesSort->second;
+        std::pair<QString,QString> elem = anItValuesSort->second;
         ResultPtr aResult;
         GeomShapePtr aShape;
         foreach(ModuleBase_ViewerPrsPtr aPrs, alist) {
@@ -346,13 +334,13 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::storeValueCustom()
       }
     }
   }
-
   return true;
 }
 
 //**********************************************************************************
 bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
 {
+
   if ( !mySetSelection) {
     mySetSelection = true;
     return false;
@@ -361,7 +349,7 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
 
   AttributeTablesPtr aTablesAttr;
 
-  if(myTypeMethodeBypoint){
+  if(myTypeMethodBypoint){
     aTablesAttr = aData->tables(FeaturesPlugin_Fillet::VALUES_ID());
   }
   else{
@@ -369,41 +357,41 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
   }
 
   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);
-  }
+    {
+      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::dynamic_pointer_cast<ModelAPI_AttributeSelection>
+                (aData->attribute(FeaturesPlugin_Fillet::EDGE_SELECTED_ID()));
 
   myValuesSort.clear();
-  double res;
+  double aRes;
   int aRows = 0;
-  std::map<double,std::pair<QString,QString>>::iterator itValuesSort;
-  if(myTypeMethodeBypoint)
+  std::map<double,std::pair<QString,QString>>::iterator anItValuesSort;
+  if(myTypeMethodBypoint)
   {
     if( !anEdges->isInitialized() )
       return false;
 
     GeomEdgePtr anEdge = GeomEdgePtr(new GeomAPI_Edge( anEdges->value()));
-    GeomPointPtr first =  anEdge->firstPoint();
-    GeomPointPtr last  =  anEdge->lastPoint();
-    double taille = first->distance(last);
+    GeomPointPtr aFirst =  anEdge->firstPoint();
+    GeomPointPtr aLast  =  anEdge->lastPoint();
+    double taille = aFirst->distance(aLast);
 
     std::shared_ptr<GeomAPI_Curve> aCurve(new GeomAPI_Curve(anEdges->value()));
 
     // Load points
     AttributeSelectionListPtr aSelectionListAttr =
-        aData->selectionList(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
+            aData->selectionList(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
     AttributeDoubleArrayPtr aArrayAttr;
     ListOfShape aPoints;
 
@@ -421,93 +409,95 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
 
         aPoints.push_back(aShape);
     }
-    int i =0;
+
+    int anI =0;
 
     ListOfShape::const_iterator aPointsIt = aPoints.begin();
     for (; aPointsIt != aPoints.end(); ++aPointsIt) {
-      AttributeSelectionPtr attsel = aSelectionListAttr->value(i);
+      AttributeSelectionPtr attsel = aSelectionListAttr->value(anI);
       std::shared_ptr<GeomAPI_Pnt> aPnt = GeomAlgoAPI_PointBuilder::point(*aPointsIt);
       std::shared_ptr<GeomAPI_Pnt> aPntCurv = aCurve->project(aPnt);
-      res = (aPntCurv->distance(first) / taille);
+      aRes = (aPntCurv->distance(aFirst) / taille);
       QString aName = QString::fromStdWString(attsel->namingName());
-      QString aRad = findRadius( QString::number(res) );
-      if ( myValuesSort.find( res ) == myValuesSort.end() )
-        myValuesSort[ res ] = std::make_pair(aName, aRad );
-      i++;
+      QString aRad = findRadius( QString::number(aRes) );
+      if ( myValuesSort.find( aRes ) == myValuesSort.end() )
+        myValuesSort[ aRes ] = std::make_pair(aName, aRad );
+      anI++;
       mySortList = true;
     }
 
-    res = 0.0;
-    myValuesSort[ res ] = std::make_pair (myfirstRowValue[0], findRadius( QString::number(res) ));
-    res = 1.0;
-    myValuesSort[ res ] = std::make_pair (myLastRowValue[0], findRadius( QString::number(res) ));
+    aRes = 0.0;
+    myValuesSort[ aRes ] = std::make_pair (myfirstRowValue[0], findRadius( QString::number(aRes)));
+    aRes = 1.0;
+    myValuesSort[ aRes ] = std::make_pair (myLastRowValue[0], findRadius( QString::number(aRes)));
     aRows =  myValuesSort.size();
   }else{
 
     ModelAPI_AttributeTables::Value aVal;
     if (aTablesAttr->isInitialized()){
+
         for (int anIndex = 0; anIndex < aTablesAttr->rows(); ++anIndex) {
           aVal = aTablesAttr->value(anIndex,0);
-          double curv = getValueText(aVal).toDouble();
-          if ( myValuesSort.find( curv ) == myValuesSort.end() )
-            myValuesSort[ curv ] = std::make_pair(getValueText(aVal),
-                                                  findRadius(getValueText(aVal)));
+          double aCurv = getValueText(aVal).toDouble();
+          if ( myValuesSort.find( aCurv ) == myValuesSort.end() )
+            myValuesSort[ aCurv ] =
+                          std::make_pair(getValueText(aVal),findRadius(getValueText(aVal)));
         }
         aRows = myValuesSort.size();
     }else{
-      res = 0.0;
-      myValuesSort[ res ] = std::make_pair (myfirstRowValue[0], myfirstRowValue[2]);
-      res = 1.0;
-      myValuesSort[ res ] = std::make_pair (myLastRowValue[0], myLastRowValue[2]);
+      aRes = 0.0;
+      myValuesSort[ aRes ] = std::make_pair (myfirstRowValue[0], myfirstRowValue[2]) ;
+      aRes = 1.0;
+      myValuesSort[ aRes ] = std::make_pair (myLastRowValue[0], myLastRowValue[2]) ;
       aRows = 2;
     }
 
   }
 
-  QTableWidgetItem* aItem = 0;
+  QTableWidgetItem* anItem = 0;
   myDataTbl->blockSignals(true);
-  aItem = myDataTbl->item( myDataTbl->rowCount() -1, 0 );
-  aItem->setFlags(Qt::NoItemFlags
-                | Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
-  aItem = myDataTbl->item( myDataTbl->rowCount() -1, 1 );
-  aItem->setFlags(Qt::NoItemFlags | Qt::ItemIsSelectable
-                | Qt::ItemIsEnabled | Qt::ItemIsEditable);
+  anItem = myDataTbl->item( myDataTbl->rowCount() -1, 0 );
+  anItem->setFlags(Qt::NoItemFlags | Qt::ItemIsSelectable
+                 | Qt::ItemIsEnabled | Qt::ItemIsEditable);
+  anItem = myDataTbl->item( myDataTbl->rowCount() -1, 1 );
+  anItem->setFlags(Qt::NoItemFlags | Qt::ItemIsSelectable
+                 | Qt::ItemIsEnabled | Qt::ItemIsEditable);
 
   myDataTbl->setRowCount(aRows);
 
-  itValuesSort = myValuesSort.begin();
+  anItValuesSort = myValuesSort.begin();
 
-  for (int k = 0; k < aRows; k++, ++itValuesSort ) {
+  for (int k = 0; k < aRows; k++, ++anItValuesSort ) {
 
-    std::pair<QString,QString> elem = itValuesSort->second;
-    QString aCurv = QString::number(itValuesSort->first);
+    std::pair<QString,QString> elem = anItValuesSort->second;
+    QString aCurv = QString::number(anItValuesSort->first);
 
-    aItem = myDataTbl->item(k, 0);
-    if (aItem) {
-          aItem->setText( elem.first);
+    anItem = myDataTbl->item(k, 0);
+    if (anItem) {
+          anItem->setText( elem.first);
     } else {
-          aItem = new QTableWidgetItem(elem.first);
-          myDataTbl->setItem(k, 0, aItem);
+          anItem = new QTableWidgetItem(elem.first);
+          myDataTbl->setItem(k, 0, anItem);
     }
-    aItem = myDataTbl->item(k, 1);
-    if (aItem) {
-          aItem->setText( aCurv);
+    anItem = myDataTbl->item(k, 1);
+    if (anItem) {
+          anItem->setText( aCurv);
     } else {
-          aItem = new QTableWidgetItem(aCurv);
-          myDataTbl->setItem(k, 1, aItem);
+          anItem = new QTableWidgetItem(aCurv);
+          myDataTbl->setItem(k, 1, anItem);
     }
-    aItem = myDataTbl->item(k, 2);
-    if (aItem) {
-          aItem->setText( elem.second);
+    anItem = myDataTbl->item(k, 2);
+    if (anItem) {
+          anItem->setText( elem.second);
     } else {
-          aItem = new QTableWidgetItem(elem.second);
-          myDataTbl->setItem(k, 2, aItem);
+          anItem = new QTableWidgetItem(elem.second);
+          myDataTbl->setItem(k, 2, anItem);
     }
   }
-  aItem = myDataTbl->item(myDataTbl->rowCount()-1, 0 );
-  aItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled );
-  aItem = myDataTbl->item(myDataTbl->rowCount()-1, 1 );
-  aItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled );
+  anItem = myDataTbl->item(myDataTbl->rowCount()-1, 0 );
+  anItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled );
+  anItem = myDataTbl->item(myDataTbl->rowCount()-1, 1 );
+  anItem->setFlags(Qt::NoItemFlags | Qt::ItemIsEnabled );
   myDataTbl->blockSignals(false);
 
   return true;
@@ -517,8 +507,8 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::restoreValueCustom()
 //**********************************************************************************
 void FeaturesPlugin_WidgetFilletMultiRadiuses::onAdd()
 {
-  QModelIndex index = myDataTbl->currentIndex();
-  int i  = index.row();
+  QModelIndex anIndex = myDataTbl->currentIndex();
+   int i  = anIndex.row();
   if( i != -1
       && !(!myDataTbl->currentItem()->isSelected() && myDataTbl->rowCount() >2))
   {
@@ -532,18 +522,18 @@ void FeaturesPlugin_WidgetFilletMultiRadiuses::onAdd()
       i = 1;
     else
       i= i+1;
-    myDataTbl->model()->insertRow(i);
 
-    QTableWidgetItem* aItem =0;
+    myDataTbl->model()->insertRow(i);
 
-    aItem = myDataTbl->item( i, 0 );
-    aItem = new QTableWidgetItem( "" );
-    myDataTbl->setItem(i, 0, aItem);
-    aItem = new QTableWidgetItem("0.1");
-    myDataTbl->setItem(i, 1, aItem);
+    QTableWidgetItem* anItem =0;
 
-    aItem = new QTableWidgetItem("0.5");
-    myDataTbl->setItem(i, 2, aItem);
+    anItem = myDataTbl->item( i, 0 );
+    anItem = new QTableWidgetItem( "" );
+    myDataTbl->setItem(i, 0, anItem);
+    anItem = new QTableWidgetItem("0.1");
+    myDataTbl->setItem(i, 1, anItem);
+    anItem = new QTableWidgetItem("0.5");
+    myDataTbl->setItem(i, 2, anItem);
     myDataTbl->blockSignals(false);
 
     emit valuesChanged();
@@ -554,31 +544,30 @@ void FeaturesPlugin_WidgetFilletMultiRadiuses::onAdd()
 //**********************************************************************************
 void FeaturesPlugin_WidgetFilletMultiRadiuses::onRemove()
 {
-  QModelIndex index = myDataTbl->currentIndex();
+  QModelIndex anIndex = myDataTbl->currentIndex();
 
   if( myDataTbl->currentItem()->isSelected() && myDataTbl->rowCount() >2
-    && index.row() != -1
-    && index.row() != 0
-    && index.row() != myDataTbl->rowCount() -1){
+    && anIndex.row() != -1
+    && anIndex.row() != 0
+    && anIndex.row() != myDataTbl->rowCount() -1){
 
     myDataTbl->blockSignals(true);
-    if (myTypeMethodeBypoint)
+    if (myTypeMethodBypoint)
     {
-      QString aName = myDataTbl->item( index.row() , 0 )->text();
+      QString aName = myDataTbl->item( anIndex.row() , 0 )->text();
       AttributeSelectionListPtr aSelList =
-              myFeature->data()
-                      ->selectionList(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
+          myFeature->data()->selectionList(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
 
-      AttributeSelectionPtr aAttr;
+      AttributeSelectionPtr anAttr;
       for (int i = 0; i < aSelList->size(); i++) {
-          aAttr = aSelList->value(i);
-          if( aName == QString::fromStdWString( aAttr->namingName()) )
+          anAttr = aSelList->value(i);
+          if( aName == QString::fromStdWString( anAttr->namingName()) )
           {
             aSelList->remove({i});
           }
       }
     }
-    myDataTbl->model()->removeRow(index.row());
+    myDataTbl->model()->removeRow(anIndex.row());
     myDataTbl->blockSignals(false);
 
     emit valuesChanged();
@@ -602,7 +591,7 @@ void FeaturesPlugin_WidgetFilletMultiRadiuses::onTableEdited(int theRow, int the
 
     AttributeTablesPtr aTablesAttr;
 
-    if(myTypeMethodeBypoint)
+    if(myTypeMethodBypoint)
       aTablesAttr = myFeature->data()->tables(FeaturesPlugin_Fillet::VALUES_ID());
     else
       aTablesAttr = myFeature->data()->tables(FeaturesPlugin_Fillet::VALUES_CURV_ID());
@@ -632,9 +621,8 @@ bool FeaturesPlugin_WidgetFilletMultiRadiuses::processEnter()
 bool FeaturesPlugin_WidgetFilletMultiRadiuses::
   setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues, const bool theToValidate)
 {
-
   mySortList = false;
-  if ( theValues.size() > 1 || !myTypeMethodeBypoint || theValues.size() == 0 )
+  if ( theValues.size() > 1 || !myTypeMethodBypoint || theValues.size() == 0 )
   {
     mySetSelection = false;
     return false;
@@ -705,7 +693,7 @@ QString FeaturesPlugin_WidgetFilletMultiRadiuses::findRadius(QString thename) co
 {
   AttributeTablesPtr aTablesAttr;
 
-  if(myTypeMethodeBypoint)
+  if(myTypeMethodBypoint)
     aTablesAttr = myFeature->data()->tables(FeaturesPlugin_Fillet::VALUES_ID());
   else
     aTablesAttr = myFeature->data()->tables(FeaturesPlugin_Fillet::VALUES_CURV_ID());
@@ -724,8 +712,71 @@ QString FeaturesPlugin_WidgetFilletMultiRadiuses::findRadius(QString thename) co
 
 //**********************************************************************************
 QString FeaturesPlugin_WidgetFilletMultiRadiuses::
-                         getValueText(ModelAPI_AttributeTables::Value& theVal) const
+                          getValueText(ModelAPI_AttributeTables::Value& theVal) const
 {
-
     return QString::number(theVal.myDouble);
 }
+
+//********************************************************************
+void FeaturesPlugin_WidgetFilletMultiRadiuses::
+                              getHighlighted(QList<ModuleBase_ViewerPrsPtr>& theValues)
+{
+  std::set<int> anAttributeIds;
+  getSelectedAttributeIndices(anAttributeIds);
+  if (!anAttributeIds.empty())
+    convertIndicesToViewerSelection(anAttributeIds, theValues);
+}
+
+//********************************************************************
+void FeaturesPlugin_WidgetFilletMultiRadiuses::
+                            getSelectedAttributeIndices(std::set<int>& theAttributeIds)
+{
+  QModelIndexList indexList = myDataTbl->selectionModel()->selectedIndexes();
+  int aRow;
+  foreach (QModelIndex index, indexList) {
+    aRow = index.row();
+    theAttributeIds.insert(aRow-1);
+  }
+}
+
+void FeaturesPlugin_WidgetFilletMultiRadiuses::
+            convertIndicesToViewerSelection(std::set<int> theAttributeIds,
+                                            QList<ModuleBase_ViewerPrsPtr>& theValues) const
+{
+  if(myFeature.get() == NULL)
+    return;
+
+  DataPtr aData = myFeature->data();
+  AttributePtr anAttribute =
+                    aData->attribute(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
+
+  AttributeSelectionListPtr aSelectionListAttr =
+                    aData->selectionList(FeaturesPlugin_Fillet::ARRAY_POINT_RADIUS_BY_POINTS());
+  for (int i = 0; i < aSelectionListAttr->size(); i++) {
+    // filter by attribute indices only if the container is not empty otherwise return all items
+    if (!theAttributeIds.empty() && theAttributeIds.find(i) == theAttributeIds.end())
+      continue;
+    AttributeSelectionPtr anAttr = aSelectionListAttr->value(i);
+    ObjectPtr anObject = anAttr->contextObject();
+    if (anObject.get())
+      theValues.append(std::shared_ptr<ModuleBase_ViewerPrs>(
+              new ModuleBase_ViewerPrs(anObject, anAttr->value(), NULL)));
+  }
+}
+
+//********************************************************************
+void FeaturesPlugin_WidgetFilletMultiRadiuses::onListSelection()
+{
+  myWorkshop->module()->customizeFeature(myFeature,ModuleBase_IModule::CustomizeHighlightedObjects,
+                                         true);
+}
+
+//********************************************************************
+void FeaturesPlugin_WidgetFilletMultiRadiuses::activateCustom()
+{
+  ModuleBase_WidgetSelector::activateCustom();
+
+  ModuleBase_IModule* aModule = myWorkshop->module();
+  aModule->activateCustomPrs(myFeature,
+                            ModuleBase_IModule::CustomizeHighlightedObjects, true);
+}
index 4de9debbff542023b2df38269f0c27cf75a1d842..4d60f3389a967967397f2e141eeec85cb66543d6 100644 (file)
@@ -41,7 +41,7 @@ class DataArrayItemDelegate : public QStyledItemDelegate
 {
  Q_OBJECT
 public:
-  DataArrayItemDelegate(bool theTypeMethode);
+  DataArrayItemDelegate(bool theTypeMethod);
 
   virtual QWidget* createEditor(QWidget* theParent,
                                 const QStyleOptionViewItem & theOption,
@@ -51,7 +51,7 @@ private slots:
   void onEditItem(const QString& theText);
 
 private:
-  bool myTypeMethodePoint;
+  bool myTypeMethodPoint;
 };
 
 
@@ -66,7 +66,7 @@ public:
   FeaturesPlugin_WidgetFilletMultiRadiuses(QWidget* theParent,
                                            ModuleBase_IWorkshop* theWorkshop,
                                            const Config_WidgetAPI* theData,
-                                           bool TypeMethodeBypoint);
+                                           bool TypeMethodBypoint);
 
   virtual ~FeaturesPlugin_WidgetFilletMultiRadiuses() {}
 
@@ -81,7 +81,15 @@ public:
   /// \return a boolean value
   virtual bool isValidSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
 
+  /// Returns values which should be highlighted when the whidget is active
+  /// \param theValues a list of presentations
+  virtual void getHighlighted(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
+
 protected:
+  /// The methiod called when widget is activated
+  virtual void activateCustom();
+
+
   /// Saves the internal parameters to the given feature
   /// \return True in success
   virtual bool storeValueCustom();
@@ -112,6 +120,16 @@ protected:
   /// a shape. If the attribute do not uses the shape, it is empty
   virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>> getAttributeSelection() const;
 
+   /// Returns attribute indices selected in the widget selection list
+  /// \param theIndices a list of indices
+  void getSelectedAttributeIndices(std::set<int>& theIndices);
+
+  /// Gets the feature attribute and fill a list of viewer presentation for the attribute
+  /// indices. If the the container of indices is empty, it returns all objects.
+  /// \param theAttributeIds indices in attribute list to be returned
+  /// \param theValues the result presentations, filled with object and shape of an attribute item
+  void convertIndicesToViewerSelection(std::set<int> theAttributeIds,
+                            QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues) const;
 private slots:
 
   /// Slot called on add a row
@@ -129,6 +147,8 @@ private slots:
   /// \param theCol a column of the cell
   void onTableEdited(int theRow, int theCol);
 
+  /// Slot is called on selection of list of selected items
+  void onListSelection();
 
 private:
 
@@ -153,16 +173,20 @@ private:
   /// Editor for table header
   QLineEdit* myHeaderEditor;
 
-  bool myTypeMethodeBypoint;
+  // Choice of the method
+  bool myTypeMethodBypoint;
 
+  //Sort the selection
   bool mySetSelection;
 
   bool mySortList;
 
   DataArrayItemDelegate* myDelegate;
 
+  // Label for first and last row
   std::vector<QString> myfirstRowValue;
   std::vector<QString> myLastRowValue;
+  // map to sort
   std::map<double,std::pair<QString,QString>> myValuesSort;
 
 };
index aeebd768de1fc3ace1925dff286ffb73622d48a2..9eb3e05e6b2a1f24766d4b3ddbfaece0e7c4d6be 100644 (file)
       <translation>Rayon du congé au point final.</translation>
     </message>
   </context>
-
+  <context>
+    <name>Fillet:multiple_radiuses</name>
+    <message>
+      <source>Radii</source>
+      <translation>Rayons</translation>
+    </message>
+    <message>
+      <source>Radius</source>
+      <translation>Rayon</translation>
+    </message>
+    <message>
+      <source>Curvilinear \n Abscissa</source>
+      <translation>Abscisse \n curviligne</translation>
+    </message>
+    <message>
+      <source>Edges or/and faces</source>
+      <translation>Arêtes et/ou faces</translation>
+    </message>
+  </context>
+  
   <!-- 1D-fillet -->
   <context>
     <name>Fillet1D</name>
index 36311a584751e899128ab6850bcf093f1721f318..a2b47959c70ebef5da1ebaf64c079dda856eff64 100644 (file)
@@ -9,3 +9,25 @@ Create Fillet by variable radius
     :language: python
 
 :download:`Download this script <examples/fillet2.py>`
+
+  .. _tui_create_fillet_MultiRadiusBycurvAbs:
+
+Create Fillet with multiple radiuses by curvilinear abscissa
+============================================================
+
+.. literalinclude:: examples/filletMultiRadiusBycurvAbs.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/filletMultiRadiusBycurvAbs.py>`
+
+  .. _tui_create_filletMultiRadiusByPoints:
+
+Create Fillet with multiple radiuses by points
+==============================================
+
+.. literalinclude:: examples/filletMultiRadiusByPoints.py 
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/filletMultiRadiusByPoints.py>`
diff --git a/src/FeaturesPlugin/doc/examples/filletMultiRadiusByPoints.py b/src/FeaturesPlugin/doc/examples/filletMultiRadiusByPoints.py
new file mode 100644 (file)
index 0000000..d3f3ca6
--- /dev/null
@@ -0,0 +1,17 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+### Create Point
+Point_1 = model.addPoint(Part_1_doc, model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]"), 0.5, True, False)
+Point_2 = model.addPoint(Part_1_doc, model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]"), 0.2, True, False)
+Fillet_1 = model.addFilletMultiRadiusByPoints(Part_1_doc, 
+                model.selection("EDGE", "[Box_1_1/Left][Box_1_1/Top]"), 
+                [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")], 
+                [1, 0.5, 0.5, 2], keepSubResults = True)
+
+model.do()
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/filletMultiRadiusBycurvAbs.py b/src/FeaturesPlugin/doc/examples/filletMultiRadiusBycurvAbs.py
new file mode 100644 (file)
index 0000000..02456d8
--- /dev/null
@@ -0,0 +1,12 @@
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Fillet_1 = model.model.addFilletMultiRadiusBycurvAbs
+                (Part_1_doc, [model.selection("EDGE", "[Box_1_1/Front][Box_1_1/Top]")],
+                 [0, 0.5, 1],[1, 0.5, 1], keepSubResults = True)
+model.do()
+model.end()
index b41c2e16bf0e0ff7aa3d338c6cbac923bf53f6c0..c501ed4fe236a624aabde99ef099d4ebcb4c4351 100644 (file)
@@ -12,7 +12,7 @@ To create a Fillet in the active part:
 #. select in the Main Menu *Feature - > Fillet* item  or
 #. click |fillet.icon| **Fillet** button in the toolbar
 
-There are 2 types of fillet:
+There are 3 types of fillet:
 
 .. figure:: images/fillet_fixed_radius.png   
    :align: left
@@ -26,6 +26,12 @@ fillet by fixed radius
 
 fillet by variable radius
 
+.. figure:: images/fillet_var_multiple_radiuses.png
+   :align: left
+   :height: 24px
+
+fillet by multiple radius
+
 --------------------------------------------------------------------------------
 
 Fillet by fixed radius
@@ -40,15 +46,15 @@ The  property panel is shown below.
 
 Input fields:
 
-- **Faces or/and edges** panel contains filleted faces and edges. All edges of a face are subject to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Faces, edges or/and solids** panel contains filleted faces, edges and solids. All edges of a face or solid are subject to fillet operation. Faces, edges and solids are selected in 3D OCC viewer;
 - **Radius** defines fillet radius.
 
 **TUI Command**:
 
-.. py:function:: model.addFillet(Part_doc, [face,edge], radius)
+.. py:function:: model.addFillet(Part_doc, [face,edge,solid], radius)
 
     :param part: The current part object.
-    :param list: A list of faces and edges subject to fillet operation in format *model.selection(TYPE, shape)*.
+    :param list: A list of faces, edges and solids subject to fillet operation in format *model.selection(TYPE, shape)*.
     :param number: Radius value.
     :return: Created object.
 
@@ -101,3 +107,104 @@ Result of **Fillet by variable radius** is shown below.
    Fillet by variable radius
 
 **See Also** a sample TUI Script of :ref:`tui_create_fillet2` operation.
+
+Fillet by multiple radius
+-------------------------
+
+There is a possibility to create a fillet with multiple radius define along an edge.
+
+.. figure:: images/FilletMultipleRadius.png
+   :align: center
+
+   Fillet by multiple radius
+
+There are two methods for creating a fillet by multiple radius :
+
+.. figure:: images/fillet_multiradius_by_curv.png   
+   :align: left
+   :height: 24px
+
+Fillet with multiple radiuses by curvilinear abscissa
+
+.. figure:: images/fillet_multiradius_by_point.png   
+   :align: left
+   :height: 24px
+
+Fillet with multiple radiuses by points
+
+Fillet with multiple radiuses by curvilinear abscissa
+"""""""""""""""""""""""""""""""""""""""""""""""""""""
+The  property panel is shown below.
+
+.. figure:: images/FilletMultiplebycurv.png
+   :align: center
+
+   Fillet with multiple radiuses by curvilinear abscissa property panel
+
+Input fields:
+
+- **Edges or/and faces** panel contains filleted faces and edges. All edges of a face are subject to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Radii** table allows to define a radius for each selected abscissa along the selected edge(s);  
+   - **Curvilinea Abscissa** contains the curvilinear abscissa of points on edge; 
+   - **Radius** contains the radius for each point.
+
+**TUI Command**:
+
+.. py:function:: model.addFilletMultiRadiusBycurvAbs(Part_doc, shapes, listAbsc, listRadius)
+
+    :param document Part_doc: The current part object.
+    :param list shapes: A list of faces and edges subject to fillet operation in format *model.selection(TYPE, shape)*.
+    :param listAbsc: list of curvilinea abscissa.
+    :param listRadius: list of radius value.
+    :return: Created object.
+
+Result
+""""""
+
+Result of **Fillet with multiple radiuses by curvilinear abscissa** is shown below.
+
+.. figure:: images/filletmultiRadiusCurvResult.png
+   :align: center
+
+   Fillet with multiple radiuses by curvilinear abscissa
+
+**See Also** a sample TUI Script of :ref:`tui_create_fillet_MultiRadiusBycurvAbs` operation.
+
+Fillet with multiple radiuses by points
+"""""""""""""""""""""""""""""""""""""""
+The property panel is shown below.
+
+.. figure:: images/FilletMultiplebypoint.png
+   :align: center
+
+   Fillet with multiple radiuses by points property panel
+
+Input fields:
+
+- Selection panel contains one edge which has to be selected in 3D OCC viewer;
+- **Radii** defines the radius along the selected edge;  
+   - **Point**  column contains points on edge. These points have to selected in 3D OCC viewer;
+   - **Radius** column contains the radius for each selected point.
+
+**TUI Command**:
+
+.. py:function:: model.addFilletMultiRadiusByPoints(Part_doc, edge, Points, ListRadius)
+
+    :param document Part_doc: The current part object.
+    :param edge: An edge subject to fillet operation in format *model.selection(TYPE, shape)*.
+    :param Points: list of point in format *model.selection(TYPE, shape)*.
+    :param ListRadius: list of radius value.
+    :return: Created object.
+
+Result
+""""""
+
+Result of **Fillet with multiple radiuses by points** is shown below.
+
+.. figure:: images/filletmultiRadiuspointResult.png
+   :align: center
+
+   Fillet with multiple radiuses by points
+
+**See Also** a sample TUI Script of :ref:`tui_create_filletMultiRadiusByPoints` operation.
+
index 9b2b15d3e9e8a34060c51e0b2030e07233c446c1..11e5d3e1eb54f4b0f5944f4d26e395fa702f380b 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/FilletFixed.png and b/src/FeaturesPlugin/doc/images/FilletFixed.png differ
diff --git a/src/FeaturesPlugin/doc/images/FilletMultipleRadius.png b/src/FeaturesPlugin/doc/images/FilletMultipleRadius.png
new file mode 100644 (file)
index 0000000..76adbb1
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FilletMultipleRadius.png differ
diff --git a/src/FeaturesPlugin/doc/images/FilletMultiplebycurv.png b/src/FeaturesPlugin/doc/images/FilletMultiplebycurv.png
new file mode 100644 (file)
index 0000000..6664adc
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FilletMultiplebycurv.png differ
diff --git a/src/FeaturesPlugin/doc/images/FilletMultiplebypoint.png b/src/FeaturesPlugin/doc/images/FilletMultiplebypoint.png
new file mode 100644 (file)
index 0000000..4645c91
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/FilletMultiplebypoint.png differ
index fbcdf4c82779cdda3ba7db2328e0236024cc2697..88545bbea3c7580332a5e44e1a0f058d7e487448 100644 (file)
Binary files a/src/FeaturesPlugin/doc/images/FilletVarious.png and b/src/FeaturesPlugin/doc/images/FilletVarious.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet_multiradius_by_curv.png b/src/FeaturesPlugin/doc/images/fillet_multiradius_by_curv.png
new file mode 100644 (file)
index 0000000..015d270
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_multiradius_by_curv.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet_multiradius_by_point.png b/src/FeaturesPlugin/doc/images/fillet_multiradius_by_point.png
new file mode 100644 (file)
index 0000000..53dbb08
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_multiradius_by_point.png differ
diff --git a/src/FeaturesPlugin/doc/images/fillet_var_multiple_radiuses.png b/src/FeaturesPlugin/doc/images/fillet_var_multiple_radiuses.png
new file mode 100644 (file)
index 0000000..1951a8e
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/fillet_var_multiple_radiuses.png differ
diff --git a/src/FeaturesPlugin/doc/images/filletmultiRadiusCurvResult.png b/src/FeaturesPlugin/doc/images/filletmultiRadiusCurvResult.png
new file mode 100644 (file)
index 0000000..d167d17
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/filletmultiRadiusCurvResult.png differ
diff --git a/src/FeaturesPlugin/doc/images/filletmultiRadiuspointResult.png b/src/FeaturesPlugin/doc/images/filletmultiRadiuspointResult.png
new file mode 100644 (file)
index 0000000..f8fd816
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/filletmultiRadiuspointResult.png differ
index 2a756d3f7218e3204bf32a264c956e57b87bfbfc..b634ce52b64b1e1a0a934d9721960267f7ada3d8 100644 (file)
@@ -55,8 +55,8 @@
          title="Multiple radiuses"
          tooltip="Fillet with multiple radiuses"
          icon="icons/Features/fillet_var_multiple_radiuses.png">
-      <toolbox id="multiple_radiuses_methode">
-         <box id="by_curvilinear_abscissa_methode"
+      <toolbox id="multiple_radiuses_method">
+         <box id="by_curvilinear_abscissa_method"
          title="By curvilinear abscissa"
          tooltip="Fillet with multiple radiuses by curvilinear abscissa"
          icon="icons/Features/fillet_multiradius_by_curv.png">
index 74b60d59ac38b980f940926da5dfef4154d66d56..ba80beedda3367cc8fef29f58ce5dc4bcafa7734 100644 (file)
         <source path="fillet1d_widget.xml"/>
       </feature>
       <feature id="Fillet" title="Fillet" tooltip="Perform fillet on face or edge"
-               icon="icons/Features/fillet.png" auto_preview="false" helpfile="filletFeature.html">
+               icon="icons/Features/fillet.png" auto_preview="true" helpfile="filletFeature.html">
         <source path="fillet_widget.xml"/>
       </feature>
       <feature id="Chamfer" title="Chamfer" tooltip="Perform chamfer on face or edge"
index 95e749c10d2d5263ee845b513f73b2659f70365e..c60586a11ce15bd6ddc675a4bb18851db814628b 100644 (file)
@@ -176,6 +176,7 @@ INCLUDE_DIRECTORIES(
   ../GeomAlgoImpl
   ../ModelAPI
   ../XAO
+  ${PROJECT_SOURCE_DIR}/src/Locale
   ${OpenCASCADE_INCLUDE_DIR}
 )
 
index 1a4bd5bfdcc07283ccf7ea127e54fe3b86950dac..464ad002ff2b99220b2553b04fd135230bb2b3d5 100644 (file)
@@ -123,12 +123,12 @@ void GeomAlgoAPI_Fillet::build(const GeomShapePtr& theBaseSolid,
   TColgp_Array1OfPnt2d array(1, theRadiuses.size());
 
   int i = 1;
-  std::list<double>::const_iterator itCurv = theCurvCoord.begin();
-  std::list<double>::const_iterator itRadius = theRadiuses.begin();
+  std::list<double>::const_iterator anItCurv = theCurvCoord.begin();
+  std::list<double>::const_iterator anItRadius = theRadiuses.begin();
 
-  for( ; itCurv != theCurvCoord.end(); ++itCurv, ++itRadius )
+  for( ; anItCurv != theCurvCoord.end(); ++anItCurv, ++anItRadius )
   {
-    array.SetValue(i, gp_Pnt2d( (*itCurv) , (*itRadius)));
+    array.SetValue(i, gp_Pnt2d( (*anItCurv) , (*anItRadius)));
     i++;
   }
   // assign fillet radii for each contour of filleting edges