From: lucasjerome Date: Fri, 22 Jan 2021 13:11:56 +0000 (+0100) Subject: Refactoring code X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb407487cc26cd4ba21358a35a8b1ca8a9b3701f;p=modules%2Fshaper.git Refactoring code --- diff --git a/src/BuildAPI/BuildAPI_Interpolation.cpp b/src/BuildAPI/BuildAPI_Interpolation.cpp index 7b2becdcb..f6ab52589 100644 --- a/src/BuildAPI/BuildAPI_Interpolation.cpp +++ b/src/BuildAPI/BuildAPI_Interpolation.cpp @@ -30,7 +30,8 @@ BuildAPI_Interpolation::BuildAPI_Interpolation(const std::shared_ptr& 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& 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, diff --git a/src/BuildPlugin/BuildPlugin_Interpolation.cpp b/src/BuildPlugin/BuildPlugin_Interpolation.cpp index edcb547dc..ad60b679b 100644 --- a/src/BuildPlugin/BuildPlugin_Interpolation.cpp +++ b/src/BuildPlugin/BuildPlugin_Interpolation.cpp @@ -252,16 +252,16 @@ void BuildPlugin_Interpolation::execute() std::list> aCoordPoints; for (int step = 0; step < aTable->rows(); step++) { std::vector 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()); } diff --git a/src/BuildPlugin/BuildPlugin_Interpolation.h b/src/BuildPlugin/BuildPlugin_Interpolation.h index 1eaa6116d..0b8c98bce 100644 --- a/src/BuildPlugin/BuildPlugin_Interpolation.h +++ b/src/BuildPlugin/BuildPlugin_Interpolation.h @@ -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"); diff --git a/src/BuildPlugin/BuildPlugin_msg_fr.ts b/src/BuildPlugin/BuildPlugin_msg_fr.ts index 9b01bdfdd..163ef0773 100644 --- a/src/BuildPlugin/BuildPlugin_msg_fr.ts +++ b/src/BuildPlugin/BuildPlugin_msg_fr.ts @@ -828,27 +828,39 @@ - Interpolation:analytical - - Curves parameters - Paramètres de la courbe - - - X(t) equation - Équation X(t) - - - Y(t) equation - Équation Y(t) - - - Z(t) equation - Équation Z(t) - - - Number of steps - Nombre de pas - + Interpolation + + Curves parameters + Paramètres de la courbe + + + + Interpolation:xt + + X(t) equation + Équation X(t) + + + + Interpolation:yt + + Y(t) equation + Équation Y(t) + + + + Interpolation:zt + + Z(t) equation + Équation Z(t) + + + + Interpolation:numstep + + Number of steps + Nombre de pas + Polyline:base_objects diff --git a/src/BuildPlugin/doc/interpolationFeature.rst b/src/BuildPlugin/doc/interpolationFeature.rst index d9fe1ed89..11885e72b 100644 --- a/src/BuildPlugin/doc/interpolationFeature.rst +++ b/src/BuildPlugin/doc/interpolationFeature.rst @@ -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. diff --git a/src/BuildPlugin/interpolation_widget.xml b/src/BuildPlugin/interpolation_widget.xml index b5036905f..7e2334b43 100644 --- a/src/BuildPlugin/interpolation_widget.xml +++ b/src/BuildPlugin/interpolation_widget.xml @@ -37,7 +37,7 @@ - +