Salome HOME
Update copyright information
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_StartEndLength_i.cxx
index 461d86b6c29795462f66400fcb6bc5d873e95e59..61b855a1dc111eda34f1fcf60c4d8de41862ff74 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -25,7 +25,6 @@
 //           Moved here from SMESH_LocalLength_i.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #include "StdMeshers_StartEndLength_i.hxx"
 #include "SMESH_Gen_i.hxx"
@@ -96,7 +95,8 @@ void StdMeshers_StartEndLength_i::SetLength(CORBA::Double theLength,
 
   // Update Python script
   SMESH::TPythonDump() <<
-    _this() << ( theIsStart ? ".SetStartLength( " : ".SetEndLength( " ) << theLength << " )";
+    _this() << ( theIsStart ? ".SetStartLength( " : ".SetEndLength( " ) <<
+    SMESH::TVar(theLength) << " )";
 }
 
 //=============================================================================
@@ -257,3 +257,14 @@ CORBA::Boolean StdMeshers_StartEndLength_i::IsDimSupported( SMESH::Dimension typ
   return type == SMESH::DIM_1D;
 }
 
+//================================================================================
+/*!
+ * \brief Return method name corresponding to index of variable parameter
+ */
+//================================================================================
+
+std::string StdMeshers_StartEndLength_i::getMethodOfParameter(const int paramIndex,
+                                                              int       /*nbVars*/) const
+{
+  return paramIndex == 0 ? "SetStartLength" : "SetEndLength";
+}