]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fixing the coding rules issues.
authormpv <mpv@opencascade.com>
Wed, 2 Oct 2019 10:51:12 +0000 (13:51 +0300)
committermpv <mpv@opencascade.com>
Wed, 2 Oct 2019 10:51:12 +0000 (13:51 +0300)
src/FeaturesPlugin/FeaturesPlugin_Chamfer.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Chamfer.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Chamfer.h

index 0419b57e0f7f497900f2b91eafae59a9c487e736..ecfc217e4c62e1ef23499429d9dff2d9eca1a9fb 100644 (file)
@@ -87,8 +87,10 @@ FeaturesPlugin_Chamfer::FeaturesPlugin_Chamfer()
 
 void FeaturesPlugin_Chamfer::initAttributes()
 {
-  data()->addAttribute(FeaturesPlugin_Chamfer::CREATION_METHOD(), ModelAPI_AttributeString::typeId());
-  data()->addAttribute(FeaturesPlugin_Chamfer::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
+  data()->addAttribute(FeaturesPlugin_Chamfer::CREATION_METHOD(),
+                       ModelAPI_AttributeString::typeId());
+  data()->addAttribute(FeaturesPlugin_Chamfer::OBJECT_LIST_ID(),
+                       ModelAPI_AttributeSelectionList::typeId());
   data()->addAttribute(FeaturesPlugin_Chamfer::D1_ID(), ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(FeaturesPlugin_Chamfer::D2_ID(), ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(FeaturesPlugin_Chamfer::D_ID(), ModelAPI_AttributeDouble::typeId());
@@ -185,9 +187,11 @@ void FeaturesPlugin_Chamfer::execute()
 
      ListOfShape aFilletEdges = selectEdges(aFilletEdgesAndVertices);
      if (aCreationMethod->value() == CREATION_METHOD_DISTANCE_DISTANCE()) {
-       aChamferBuilder.reset(new GeomAlgoAPI_Chamfer(aSolid, aFilletEdges, aMapEdgeFace, true, aD1, aD2));
+       aChamferBuilder.reset(new GeomAlgoAPI_Chamfer(
+         aSolid, aFilletEdges, aMapEdgeFace, true, aD1, aD2));
      } else {
-       aChamferBuilder.reset(new GeomAlgoAPI_Chamfer(aSolid, aFilletEdges, aMapEdgeFace, false, aD, anAngle));
+       aChamferBuilder.reset(new GeomAlgoAPI_Chamfer(
+         aSolid, aFilletEdges, aMapEdgeFace, false, aD, anAngle));
      }
 
      if (GeomAlgoAPI_Tools::AlgoError::isAlgorithmFailed(aChamferBuilder, getKind(), anError)) {
index ecba849a963d651c901a41e7e6173b83a969e7a7..ef52c2393217483e80d1134b9fa644642bf8603c 100644 (file)
 //=================================================================================================
 GeomAlgoAPI_Chamfer::GeomAlgoAPI_Chamfer(const GeomShapePtr& theBaseSolid,
                                          const ListOfShape&  theChamferShapes,
-                                         const std::map<GeomShapePtr, GeomShapePtr> aMapEdgeFace,
+                                         const std::map<GeomShapePtr, GeomShapePtr> theMapEdgeFace,
                                          const bool performDistances,
-                                         const double aVal1,
-                                         const double aVal2)
+                                         const double theVal1,
+                                         const double theVal2)
 {
-  build(theBaseSolid, theChamferShapes, aMapEdgeFace, performDistances, aVal1, aVal2);
+  build(theBaseSolid, theChamferShapes, theMapEdgeFace, performDistances, theVal1, theVal2);
 }
 
 //=================================================================================================
 void GeomAlgoAPI_Chamfer::build(const GeomShapePtr& theBaseSolid,
                                 const ListOfShape&  theChamferShapes,
-                                const std::map<GeomShapePtr, GeomShapePtr> aMapEdgeFace,
+                                const std::map<GeomShapePtr, GeomShapePtr> theMapEdgeFace,
                                 const bool performDistances,
-                                const double aVal1,
-                                const double aVal2)
+                                const double theVal1,
+                                const double theVal2)
 {
   TopoDS_Shape aShapeBase = theBaseSolid->impl<TopoDS_Shape>();
   TopTools_IndexedDataMapOfShapeListOfShape M;
@@ -60,24 +60,24 @@ void GeomAlgoAPI_Chamfer::build(const GeomShapePtr& theBaseSolid,
      anIt != theChamferShapes.end(); ++anIt) {
     if ((*anIt)->isEdge()) {
       TopoDS_Edge E = (*anIt)->impl<TopoDS_Edge>();
-      if (aMapEdgeFace.find(*anIt) != aMapEdgeFace.end()) {
-        //TopoDS_Face F = (aMapEdgeFace[*anIt])->impl<TopoDS_Face>();
-        TopoDS_Face F = (aMapEdgeFace.at(*anIt))->impl<TopoDS_Face>();
+      if (theMapEdgeFace.find(*anIt) != theMapEdgeFace.end()) {
+        //TopoDS_Face F = (theMapEdgeFace[*anIt])->impl<TopoDS_Face>();
+        TopoDS_Face F = (theMapEdgeFace.at(*anIt))->impl<TopoDS_Face>();
         if (!BRepTools::IsReallyClosed(E,F) && !BRep_Tool::Degenerated(E) &&
               M.FindFromKey(E).Extent() == 2) {
           if (performDistances) {
-              aChamferBuilder->Add(aVal1, aVal2, E, F);
+              aChamferBuilder->Add(theVal1, theVal2, E, F);
             } else {
-              aChamferBuilder->AddDA(aVal1, aVal2 * M_PI / 180., E, F);
+              aChamferBuilder->AddDA(theVal1, theVal2 * M_PI / 180., E, F);
             }
           }
       } else {
         const TopTools_ListOfShape& aFacesList = M.FindFromKey(E);
         TopoDS_Face F = TopoDS::Face(aFacesList.First());
         if (performDistances) {
-          aChamferBuilder->Add(aVal1, aVal2, E, F);
+          aChamferBuilder->Add(theVal1, theVal2, E, F);
         } else {
-          aChamferBuilder->AddDA(aVal1, aVal2 * M_PI / 180., E, F);
+          aChamferBuilder->AddDA(theVal1, theVal2 * M_PI / 180., E, F);
         }
       }
     }
index 4061ef24ffce4bb2ad9bf73167acb648b3c7c18e..a5f97e3004cb5c3b8964f4f09eea9cbe5a9341f9 100644 (file)
@@ -36,31 +36,35 @@ public:
   /// Run chamfer operation with two distances or with a distance and an angle .
   /// \param theBaseSolid      a changing solid
   /// \param theChamferShapes  list of edges the chamfer is performed on
-  /// \param aMapEdgeFace      map that associates an edge to a face when the chamfer is applied to a face
-  /// \param performDistances  boolean that indicates whether the operation is performed with two distances or not
-  /// \param aVal1             double D1 if performDistances is true or D
-  /// \param aVal2             double D2 if performDistances is true or Angle
+  /// \param theMapEdgeFace    map that associates an edge to a face when the chamfer is applied
+  ///                          to a face
+  /// \param performDistances  boolean that indicates whether the operation is performed with
+  ///                          two distances or not
+  /// \param theVal1           double D1 if performDistances is true or D
+  /// \param theVal2           double D2 if performDistances is true or Angle
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Chamfer(const GeomShapePtr& theBaseSolid,
                                          const ListOfShape&  theChamferShapes,
-                                         const std::map<GeomShapePtr, GeomShapePtr> aMapEdgeFace,
+                                         const std::map<GeomShapePtr, GeomShapePtr> theMapEdgeFace,
                                          const bool performDistances,
-                                         const double aVal1,
-                                         const double aVal2);
+                                         const double theVal1,
+                                         const double theVal2);
 
 private:
   /// Perform chamfer operation.
-  /// \param theBaseSolid    a changing solid
-  /// \param theChamferShapes  list of edges the chamfer is performed on
-  /// \param aMapEdgeFace      map that associates an edge to a face when the chamfer is applied to a face
-  /// \param performDistances  boolean that indicates whether the operation is performed with two distances or not
-  /// \param aVal1             double D1 if performDistances is true or D
-  /// \param aVal2             double D2 if performDistances is true or Angle
+  /// \param theBaseSolid     a changing solid
+  /// \param theChamferShapes list of edges the chamfer is performed on
+  /// \param theMapEdgeFace   map that associates an edge to a face when the chamfer is applied
+  ///                         to a face
+  /// \param performDistances boolean that indicates whether the operation is performed with two
+  ///                         distances or not
+  /// \param theVal1          double D1 if performDistances is true or D
+  /// \param theVal2          double D2 if performDistances is true or Angle
   GEOMALGOAPI_EXPORT void build(const GeomShapePtr& theBaseSolid,
                                 const ListOfShape&  theChamferShapes,
-                                const std::map<GeomShapePtr, GeomShapePtr> aMapEdgeFace,
+                                const std::map<GeomShapePtr, GeomShapePtr> theMapEdgeFace,
                                 const bool performDistances,
-                                const double aVal1,
-                                const double aVal2);
+                                const double theVal1,
+                                const double theVal2);
 };
 
 #endif