]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Suppressing white space at the end line.
authorClarisse Genrault <clarisse.genrault@cea.fr>
Mon, 21 Nov 2016 10:12:09 +0000 (11:12 +0100)
committerClarisse Genrault <clarisse.genrault@cea.fr>
Mon, 21 Nov 2016 10:12:09 +0000 (11:12 +0100)
src/FeaturesAPI/FeaturesAPI_Translation.cpp
src/FeaturesAPI/FeaturesAPI_Translation.h
src/FeaturesPlugin/FeaturesPlugin_Translation.cpp
src/FeaturesPlugin/FeaturesPlugin_Translation.h
src/GeomAPI/GeomAPI_Trsf.h
src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h
src/GeomAlgoAPI/GeomAlgoAPI_Translation.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Translation.h
src/PrimitivesAPI/PrimitivesAPI_Box.cpp

index a57e812af39d8136a8196bd0dd6cece544dc04f9..bfcd5bdfc61524bbfc848111331f032ea5d00413 100644 (file)
@@ -90,14 +90,14 @@ void FeaturesAPI_Translation::dump(ModelHighAPI_Dumper& theDumper) const
 {
   FeaturePtr aBase = feature();
   const std::string& aDocName = theDumper.name(aBase->document());
-  
+
   AttributeSelectionListPtr anAttrObjects =
     aBase->selectionList(FeaturesPlugin_Translation::OBJECTS_LIST_ID());
   theDumper << aBase << " = model.addTranslation(" << aDocName << ", " << anAttrObjects;
-  
+
   std::string aCreationMethod =
     aBase->string(FeaturesPlugin_Translation::CREATION_METHOD())->value();
-  
+
   if(aCreationMethod == FeaturesPlugin_Translation::CREATION_METHOD_BY_DISTANCE()) {
     AttributeSelectionPtr anAttrAxis =
       aBase->selection(FeaturesPlugin_Translation::AXIS_OBJECT_ID());
index 3fd650e52afcfedbebb44c7be2edd1063b162989..7a14f8a88940ab67f6992a6018fc6008f226c83a 100644 (file)
@@ -56,11 +56,11 @@ public:
               ModelAPI_AttributeSelection, /** Axis object */,
               distance, FeaturesPlugin_Translation::DISTANCE_ID(),
               ModelAPI_AttributeDouble, /** Distance */,
-              dx, FeaturesPlugin_Translation::DX_ID(), 
+              dx, FeaturesPlugin_Translation::DX_ID(),
               ModelAPI_AttributeDouble, /** Dimension in X */,
-              dy, FeaturesPlugin_Translation::DY_ID(), 
+              dy, FeaturesPlugin_Translation::DY_ID(),
               ModelAPI_AttributeDouble, /** Dimension in Y */,
-              dz, FeaturesPlugin_Translation::DZ_ID(), 
+              dz, FeaturesPlugin_Translation::DZ_ID(),
               ModelAPI_AttributeDouble, /** Dimension in Z */
              )
 
@@ -72,7 +72,7 @@ public:
   FEATURESAPI_EXPORT
   void setAxisAndDistance(const ModelHighAPI_Selection& theAxisObject,
                           const ModelHighAPI_Double& theDistance);
-  
+
   /// Modify CreationMethod, dx, dy, dz attributes of the feature.
   FEATURESAPI_EXPORT
   void setDimensions(const ModelHighAPI_Double& theDx,
index b176b485dfa76d3a183824279862c30e3ce0b0d1..5fbe5f184fbaf803a195176d6f3aa7074b48caea 100644 (file)
@@ -30,7 +30,7 @@ FeaturesPlugin_Translation::FeaturesPlugin_Translation()
 void FeaturesPlugin_Translation::initAttributes()
 {
   data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
-  
+
   AttributeSelectionListPtr aSelection =
     std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
     FeaturesPlugin_Translation::OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
@@ -39,12 +39,12 @@ void FeaturesPlugin_Translation::initAttributes()
                        ModelAPI_AttributeSelection::typeId());
   data()->addAttribute(FeaturesPlugin_Translation::DISTANCE_ID(),
                        ModelAPI_AttributeDouble::typeId());
-  
-  data()->addAttribute(FeaturesPlugin_Translation::DX_ID(), 
+
+  data()->addAttribute(FeaturesPlugin_Translation::DX_ID(),
                        ModelAPI_AttributeDouble::typeId());
-  data()->addAttribute(FeaturesPlugin_Translation::DY_ID(), 
+  data()->addAttribute(FeaturesPlugin_Translation::DY_ID(),
                        ModelAPI_AttributeDouble::typeId());
-  data()->addAttribute(FeaturesPlugin_Translation::DZ_ID(), 
+  data()->addAttribute(FeaturesPlugin_Translation::DZ_ID(),
                        ModelAPI_AttributeDouble::typeId());
 }
 
@@ -53,11 +53,11 @@ void FeaturesPlugin_Translation::execute()
 {
   AttributeStringPtr aMethodTypeAttr = string(FeaturesPlugin_Translation::CREATION_METHOD());
   std::string aMethodType = aMethodTypeAttr->value();
-  
+
   if (aMethodType == CREATION_METHOD_BY_DISTANCE()) {
     performTranslationByAxisAndDistance();
   }
-  
+
   if (aMethodType == CREATION_METHOD_BY_DIMENSIONS()) {
     performTranslationByDimensions();
   }
@@ -83,14 +83,14 @@ void FeaturesPlugin_Translation::performTranslationByAxisAndDistance()
     anObjects.push_back(anObject);
     aContextes.push_back(anObjectAttr->context());
   }
-  
+
   //Getting axis.
   std::shared_ptr<GeomAPI_Ax1> anAxis;
   std::shared_ptr<GeomAPI_Edge> anEdge;
   std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(FeaturesPlugin_Translation::AXIS_OBJECT_ID());
   if(anObjRef && anObjRef->value() && anObjRef->value()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->value()));
-  } else if (anObjRef && !anObjRef->value() && anObjRef->context() && 
+  } else if (anObjRef && !anObjRef->value() && anObjRef->context() &&
              anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
     anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->context()->shape()));
   }
@@ -100,7 +100,7 @@ void FeaturesPlugin_Translation::performTranslationByAxisAndDistance()
 
   // Getting distance.
   double aDistance = real(FeaturesPlugin_Translation::DISTANCE_ID())->value();
-  
+
   // Moving each object.
   int aResultIndex = 0;
   std::list<ResultPtr>::iterator aContext = aContextes.begin();
@@ -119,12 +119,12 @@ void FeaturesPlugin_Translation::performTranslationByAxisAndDistance()
       setResult(aResultPart, aResultIndex);
     } else {
       GeomAlgoAPI_Translation aTranslationAlgo(aBaseShape, anAxis, aDistance);
-      
+
       if (!aTranslationAlgo.check()) {
         setError(aTranslationAlgo.getError());
         return;
       }
-      
+
       aTranslationAlgo.build();
 
       // Checking that the algorithm worked properly.
@@ -175,12 +175,12 @@ void FeaturesPlugin_Translation::performTranslationByDimensions()
     anObjects.push_back(anObject);
     aContextes.push_back(anObjectAttr->context());
   }
-  
+
   // Getting dimensions in X, in Y and in Z
   double aDX = real(FeaturesPlugin_Translation::DX_ID())->value();
   double aDY = real(FeaturesPlugin_Translation::DY_ID())->value();
   double aDZ = real(FeaturesPlugin_Translation::DZ_ID())->value();
-  
+
   // Moving each object.
   int aResultIndex = 0;
   std::list<ResultPtr>::iterator aContext = aContextes.begin();
@@ -199,12 +199,12 @@ void FeaturesPlugin_Translation::performTranslationByDimensions()
       setResult(aResultPart, aResultIndex);
     } else {
       GeomAlgoAPI_Translation aTranslationAlgo(aBaseShape, aDX, aDY, aDZ);
-      
+
       if (!aTranslationAlgo.check()) {
         setError(aTranslationAlgo.getError());
         return;
       }
-      
+
       aTranslationAlgo.build();
 
       // Checking that the algorithm worked properly.
@@ -247,7 +247,7 @@ void FeaturesPlugin_Translation::loadNamingDS(GeomAlgoAPI_Translation& theTransl
   std::string aTranslatedName = "Translated";
   std::shared_ptr<GeomAPI_DataMapOfShapeShape> aSubShapes = theTranslationAlgo.mapOfSubShapes();
 
-  FeaturesPlugin_Tools::storeModifiedShapes(theTranslationAlgo, theResultBody, 
+  FeaturesPlugin_Tools::storeModifiedShapes(theTranslationAlgo, theResultBody,
                                             theBaseShape, aTranslatedTag, aTranslatedName,
                                             *aSubShapes.get());
 }
index da144ab2057eeb6e465f5450faae476c3335d0c1..2e3cf314b0c0e2201a3ee469d0c8aa7edcc92909 100644 (file)
@@ -69,21 +69,21 @@ class FeaturesPlugin_Translation : public ModelAPI_Feature
     static const std::string MY_DISTANCE_ID("distance");
     return MY_DISTANCE_ID;
   }
-  
+
   /// Attribute name of dimension in X.
   inline static const std::string& DX_ID()
   {
     static const std::string MY_DX_ID("dx");
     return MY_DX_ID;
   }
-  
+
   /// Attribute name of dimension in Y.
   inline static const std::string& DY_ID()
   {
     static const std::string MY_DY_ID("dy");
     return MY_DY_ID;
   }
-  
+
   /// Attribute name of dimension in Z.
   inline static const std::string& DZ_ID()
   {
@@ -110,10 +110,10 @@ class FeaturesPlugin_Translation : public ModelAPI_Feature
 private:
   ///Perform the translation using an axis and a distance.
   void performTranslationByAxisAndDistance();
-  
+
   ///Perform the translation using three dimensions X, Y and Z
   void performTranslationByDimensions();
-  
+
   void loadNamingDS(GeomAlgoAPI_Translation& theTranslationAlgo,
                     std::shared_ptr<ModelAPI_ResultBody> theResultBody,
                     std::shared_ptr<GeomAPI_Shape> theBaseShape);
index 47bcb2b3ed0ffbcfdaf39dd5deba16a54ff6b6b7..630c36fddfa6c17c7924a526671db2d1f3e1eef1 100644 (file)
@@ -33,7 +33,7 @@ class GeomAPI_Trsf : public GeomAPI_Interface
    */
   GEOMAPI_EXPORT void setTranslation(const std::shared_ptr<GeomAPI_Ax1> theAxis,
                                      const double theDistance);
-  
+
   /** \brief Sets a translation transformation using three coordinates.
    *  \param[in] theDx x coordinate of the translation vector
    *  \param[in] theDy y coordinate of the translation vector
index dc94f7123573e6ed297114407c0c741ef03d81cd..bd5f6015b6eac47d0b5e6adfc9a189eca27978eb 100644 (file)
@@ -59,7 +59,7 @@ namespace GeomAlgoAPI_ShapeAPI
     }
     return aBoxAlgo.shape();
   }
-  
+
   //=========================================================================================================
   std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeTranslation(
     std::shared_ptr<GeomAPI_Shape> theSourceShape,
@@ -67,13 +67,13 @@ namespace GeomAlgoAPI_ShapeAPI
     const double theDistance) throw (GeomAlgoAPI_Exception)
   {
     GeomAlgoAPI_Translation aTranslationAlgo(theSourceShape, theAxis, theDistance);
-    
+
     if (!aTranslationAlgo.check()) {
       throw GeomAlgoAPI_Exception(aTranslationAlgo.getError());
     }
-    
+
     aTranslationAlgo.build();
-    
+
     if(!aTranslationAlgo.isDone()) {
       throw GeomAlgoAPI_Exception(aTranslationAlgo.getError());
     }
@@ -82,7 +82,7 @@ namespace GeomAlgoAPI_ShapeAPI
     }
     return aTranslationAlgo.shape();
   }
-  
+
   //=========================================================================================================
   std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeTranslation(
     std::shared_ptr<GeomAPI_Shape> theSourceShape,
@@ -91,13 +91,13 @@ namespace GeomAlgoAPI_ShapeAPI
     const double theDz) throw (GeomAlgoAPI_Exception)
   {
     GeomAlgoAPI_Translation aTranslationAlgo(theSourceShape, theDx, theDy, theDz);
-    
+
     if (!aTranslationAlgo.check()) {
       throw GeomAlgoAPI_Exception(aTranslationAlgo.getError());
     }
-    
+
     aTranslationAlgo.build();
-    
+
     if(!aTranslationAlgo.isDone()) {
       throw GeomAlgoAPI_Exception(aTranslationAlgo.getError());
     }
index d84249c6145fe3d1bbf83d887f7bd7d6c72829d8..f5769a35e2bff8d91480b91b6b1584af38f6c20e 100644 (file)
@@ -37,7 +37,7 @@ public:
   /// \return a shape
   static std::shared_ptr<GeomAPI_Shape> makeBox(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
                      std::shared_ptr<GeomAPI_Pnt> theSecondPoint) throw (GeomAlgoAPI_Exception);
-                                                   
+
   /// Performs a translation from an axis and a distance.
   /// \param theSourceShape Shape to be moved.
   /// \param theAxis Movement axis.
@@ -47,7 +47,7 @@ public:
                      std::shared_ptr<GeomAPI_Shape> theSourceShape,
                      std::shared_ptr<GeomAPI_Ax1>   theAxis,
                      const double theDistance) throw (GeomAlgoAPI_Exception);
-                                                   
+
   /// Performs a translation from dimensions.
   /// \param theSourceShape Shape to be moved.
   /// \param theDx Movement dimension on X.
index c9bfeacf9b6b3151d500572a168cf9c73befd1a0..148bfacf8658fa71431e12bb905c5144e8e74dc6 100644 (file)
@@ -53,8 +53,8 @@ bool GeomAlgoAPI_Translation::check()
       return true;
     }
     case BY_DIM: {
-      if ((fabs(myDx) < Precision::Confusion()) && 
-          (fabs(myDy) < Precision::Confusion()) && 
+      if ((fabs(myDx) < Precision::Confusion()) &&
+          (fabs(myDy) < Precision::Confusion()) &&
           (fabs(myDz) < Precision::Confusion())) {
         myError = "Translation builder :: Dx, Dy and Dz are null.";
         return false;
@@ -76,7 +76,7 @@ bool GeomAlgoAPI_Translation::check()
 void GeomAlgoAPI_Translation::build()
 {
   gp_Trsf* aTrsf = new gp_Trsf();
-  
+
   switch (myMethodType) {
     case BY_DISTANCE: {
       const gp_Ax1& anAxis = myAxis->impl<gp_Ax1>();
@@ -99,7 +99,7 @@ void GeomAlgoAPI_Translation::build()
     myError = "Translation builder :: source shape does not contain any actual shape.";
     return;
   }
-  
+
   // Transform the shape while copying it.
   BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, *aTrsf, true);
   if(!aBuilder) {
index fe6f0a7d67ed482e16b347854083dd5c5448af37..91fc03c8fd08a9428137dafb0e622d21f7031ec6 100644 (file)
@@ -27,7 +27,7 @@ public:
     BY_DIM,      ///< Translation by dimensions in X, Y and Z
     BY_POINTS    ///< Translation by two points
   };
-  
+
   /// \brief Creates an object which is obtained from current object by moving it along the axis.
   /// \param[in] theSourceShape  a shape to be moved.
   /// \param[in] theAxis         movement axis.
@@ -35,8 +35,8 @@ public:
   GEOMALGOAPI_EXPORT GeomAlgoAPI_Translation(std::shared_ptr<GeomAPI_Shape> theSourceShape,
                                              std::shared_ptr<GeomAPI_Ax1>   theAxis,
                                              double                         theDistance);
-  
-  /// \brief Creates an object which is obtained from current object by moving it along a vector 
+
+  /// \brief Creates an object which is obtained from current object by moving it along a vector
   ///        defined by its dimensions in X, Y and Z.
   /// \param[in] theSourceShape  the shape to be moved.
   /// \param[in] theDX           the movement dimension in X.
@@ -46,10 +46,10 @@ public:
                                              double                         theDx,
                                              double                         theDy,
                                              double                         theDz);
-  
+
   /// Checks if data for the translation execution is OK.
   GEOMALGOAPI_EXPORT bool check();
-  
+
   /// Execute the translation.
   GEOMALGOAPI_EXPORT void build();
 
index 3e3fb54c0d85e1dc84be92a59b77157f5e75079f..03fd6b9d39e88c91624ba0d6f20dadb4fa920684 100644 (file)
@@ -76,19 +76,17 @@ void PrimitivesAPI_Box::dump(ModelHighAPI_Dumper& theDumper) const
   theDumper << aBase << " = model.addBox(" << aDocName;
 
   std::string aCreationMethod = aBase->string(PrimitivesPlugin_Box::CREATION_METHOD())->value();
-  
+
   if(aCreationMethod == PrimitivesPlugin_Box::CREATION_METHOD_BY_DIMENSIONS()) {
     AttributeDoublePtr anAttrDx = aBase->real(PrimitivesPlugin_Box::DX_ID());
     AttributeDoublePtr anAttrDy = aBase->real(PrimitivesPlugin_Box::DY_ID());
     AttributeDoublePtr anAttrDz = aBase->real(PrimitivesPlugin_Box::DZ_ID());
-    
     theDumper << ", " << anAttrDx << ", " << anAttrDy << ", " << anAttrDz;
   } else if (aCreationMethod == PrimitivesPlugin_Box::CREATION_METHOD_BY_TWO_POINTS()) {
     AttributeSelectionPtr anAttrFirstPnt =
       aBase->selection(PrimitivesPlugin_Box::POINT_FIRST_ID());
     AttributeSelectionPtr anAttrSecondPnt =
       aBase->selection(PrimitivesPlugin_Box::POINT_SECOND_ID());
-
     theDumper << ", " << anAttrFirstPnt << ", " << anAttrSecondPnt;
   }