]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Refactoring code
authorlucasjerome <jerome.lucas@cegsenslab.fr>
Fri, 22 Jan 2021 13:11:56 +0000 (14:11 +0100)
committerlucasjerome <jerome.lucas@cegsenslab.fr>
Fri, 22 Jan 2021 13:11:56 +0000 (14:11 +0100)
src/BuildAPI/BuildAPI_Interpolation.cpp
src/BuildPlugin/BuildPlugin_Interpolation.cpp
src/BuildPlugin/BuildPlugin_Interpolation.h
src/BuildPlugin/BuildPlugin_msg_fr.ts
src/BuildPlugin/doc/interpolationFeature.rst
src/BuildPlugin/interpolation_widget.xml

index 7b2becdcb152dac2019cc3954c3c0f3fe15068bc..f6ab52589bd4fa16e3a95d51ff215b326ccdcf13 100644 (file)
@@ -30,7 +30,8 @@ BuildAPI_Interpolation::BuildAPI_Interpolation(const std::shared_ptr<ModelAPI_Fe
 }
 
 //==================================================================================================
-BuildAPI_Interpolation::BuildAPI_Interpolation(const FeaturePtr& theFeature,
+BuildAPI_Interpolation::BuildAPI_Interpolation(
+                        const FeaturePtr& theFeature,
                         const std::list<ModelHighAPI_Selection>& theBaseObjects,
                         const ModelHighAPI_Selection& theStartTangent,
                         const ModelHighAPI_Selection& theEndTangent,
@@ -49,7 +50,8 @@ BuildAPI_Interpolation::BuildAPI_Interpolation(const FeaturePtr& theFeature,
 }
 
 //==================================================================================================
-BuildAPI_Interpolation::BuildAPI_Interpolation(const FeaturePtr& theFeature,
+BuildAPI_Interpolation::BuildAPI_Interpolation(
+                        const FeaturePtr& theFeature,
                         const std::list<ModelHighAPI_Selection>& theBaseObjects,
                         const bool theIsClosed,
                         const bool theIsToReorder)
@@ -64,6 +66,7 @@ BuildAPI_Interpolation::BuildAPI_Interpolation(const FeaturePtr& theFeature,
   }
 }
 
+//==================================================================================================
 BuildAPI_Interpolation::BuildAPI_Interpolation(const FeaturePtr& theFeature,
                                                const std::string & theXTexpression,
                                                const std::string & theYTexpression,
index edcb547dc76cc9f24e7f174953ba3a9034cf9a25..ad60b679bfa49b4b6ace556145356d1c9d9617c9 100644 (file)
@@ -252,16 +252,16 @@ void BuildPlugin_Interpolation::execute()
     std::list<std::vector<double>> aCoordPoints;
     for (int step = 0; step < aTable->rows(); step++) {
       std::vector<double> aCoordPoint;
-      ModelAPI_AttributeTables::Value value;
+      ModelAPI_AttributeTables::Value aValue;
       //x
-      value = aTable->value(step, 1);
-      aCoordPoint.push_back(value.myDouble);
+      aValue = aTable->value(step, 1);
+      aCoordPoint.push_back(aValue.myDouble);
       //y
-      value = aTable->value(step, 2);
-      aCoordPoint.push_back(value.myDouble);
+      aValue = aTable->value(step, 2);
+      aCoordPoint.push_back(aValue.myDouble);
       //
-      value = aTable->value(step, 3);
-      aCoordPoint.push_back(value.myDouble);
+      aValue = aTable->value(step, 3);
+      aCoordPoint.push_back(aValue.myDouble);
 
       aCoordPoints.push_back(aCoordPoint);
     }
@@ -271,10 +271,9 @@ void BuildPlugin_Interpolation::execute()
 
     for (; anItCoordPoints!=aCoordPoints.end(); ++anItCoordPoints) {
 
-      GeomVertexPtr aVertex =
-          GeomAlgoAPI_PointBuilder::vertex((*anItCoordPoints)[0],
-                                           (*anItCoordPoints)[1],
-                                           (*anItCoordPoints)[2]);
+      GeomVertexPtr aVertex = GeomAlgoAPI_PointBuilder::vertex((*anItCoordPoints)[0],
+                                                               (*anItCoordPoints)[1],
+                                                               (*anItCoordPoints)[2]);
       aPoints.push_back(aVertex->point());
     }
 
index 1eaa6116d702665902a2bf328427921492cfcfec..0b8c98bce6647a9ca0844cea433be2ba4e188bd0 100644 (file)
@@ -166,7 +166,7 @@ public:
   /// Default value of the closed attribute
   inline static bool CLOSED_DEFAULT() { return false; }
 
- /// list of references to the arguments of this expression
 /// list of references to the arguments of this expression
   inline static const std::string& ARGUMENTS_ID()
   {
     static const std::string MY_ARGUMENTS_ID("arguments");
index 9b01bdfddd68c3237093285bc9fd8f20fef080f5..163ef0773b0c7eed0e52934e1725284416246e96 100644 (file)
     </message>
   </context>
   <context>
-  <name>Interpolation:analytical</name>
-  <message>
-    <source>Curves parameters</source>
-    <translation>Paramètres de la courbe</translation>
-  </message>
-  <message>
-    <source>X(t) equation</source>
-    <translation>Équation X(t)</translation>
-  </message>
-  <message>
-    <source>Y(t) equation</source>
-    <translation>Équation Y(t)</translation>
-  </message>
-  <message>
-    <source>Z(t) equation</source>
-    <translation>Équation Z(t)</translation>
-  </message>
-  <message>
-    <source>Number of steps</source>
-    <translation>Nombre de pas</translation>
-  </message>
+    <name>Interpolation</name>
+    <message>
+      <source>Curves parameters</source>
+      <translation>Paramètres de la courbe</translation>
+    </message>
+  </context>
+  <context>
+    <name>Interpolation:xt</name>
+    <message>
+      <source>X(t) equation</source>
+      <translation>Équation X(t)</translation>
+    </message>
+  </context>
+  <context>
+    <name>Interpolation:yt</name>
+    <message>
+      <source>Y(t) equation</source>
+      <translation>Équation Y(t)</translation>
+    </message>
+  </context>
+  <context>
+    <name>Interpolation:zt</name>
+    <message>
+      <source>Z(t) equation</source>
+      <translation>Équation Z(t)</translation>
+    </message>
+  </context>
+  <context>
+    <name>Interpolation:numstep</name>
+    <message>
+      <source>Number of steps</source>
+      <translation>Nombre de pas</translation>
+    </message>
   </context>
   <context>
     <name>Polyline:base_objects</name>
index d9fe1ed89f71ebe8240848d32d64b8f04dcd7b48..11885e72bb0a4e6885e969e43bb714998942c054 100644 (file)
@@ -89,7 +89,7 @@ Interpolation analytical
 
 The  property panel is shown below.
 
-.. figure:: images/InterpolationAnalitycal.png
+.. figure:: images/InterpolationAnalytical.png
   :align: center
 
   Create an interpolation analytical
@@ -129,7 +129,7 @@ Result
 
 The result of the operation will be a curve created from analytical expressions for x,y and z as functions of variable t:
 
-.. figure:: images/CreateInterpolationAnalitycal.png
+.. figure:: images/CreateInterpolationAnalytical.png
   :align: center
 
   Result of the operation.
index b5036905f1ab5dab7e8c399c875a801c2d722e18..7e2334b4360818789fc05fc005e8610f3955a99b 100644 (file)
@@ -37,7 +37,7 @@
     <box id="analytical"
          title="Curve analytical"
          icon="icons/Build/feature_interpolation_analytical.png">
-      <groupbox title="Curves parameters">
+      <groupbox id="curves_parameters" title="Curves parameters">
         <stringvalue id="xt" label="X(t) equation">
             <validator id="BuildPlugin_ValidatorExpressionInterpolation"/>
           </stringvalue>