Salome HOME
0022782: [CEA 1315] GetFirstVertex does not return the edge's starting point
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IBasicOperations.cxx
index 576ba74af0ceaad6a56e0430c53f0bf02d1e3e3b..8f282f2ae477fa3c06457de0f06a7af2483bcf0a 100644 (file)
@@ -186,10 +186,11 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference
 //=============================================================================
 Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
                     (Handle(GEOM_Object) theGeomObj,
-                     double theParam1,
-                     double theParam2,
-                     double theParam3,
+                     double              theParam1,
+                     double              theParam2,
+                     double              theParam3,
                      const PointLocation theLocation,
+                     const bool          takeOrientationIntoAccount,
                      Handle(GEOM_Object) theRefPoint)
 {
   SetErrorCode(KO);
@@ -226,6 +227,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
     case PointOn_CurveByParam:
       aPI.SetCurve(aRefFunction);
       aPI.SetParameter(theParam1);
+      aPI.SetTakeOrientationIntoAccount(takeOrientationIntoAccount);
       break;
     case PointOn_CurveByLength:
       aPI.SetCurve(aRefFunction);
@@ -277,7 +279,8 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
     {
     case PointOn_CurveByParam:
       GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnCurve("
-                                   << theGeomObj << ", " << theParam1 << ")";
+                                   << theGeomObj << ", " << theParam1 << ", "
+                                   << takeOrientationIntoAccount <<  ")";
       break;
     case PointOn_CurveByLength:
       GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnCurveByLength("
@@ -315,9 +318,12 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
  */
 //=============================================================================
 Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurve
-                            (Handle(GEOM_Object) theCurve, double theParameter)
+                            (Handle(GEOM_Object) theCurve,
+                             double              theParameter,
+                             bool                takeOrientationIntoAccount)
 {
-  return makePointOnGeom(theCurve, theParameter, 0.0, 0.0, PointOn_CurveByParam);
+  return makePointOnGeom(theCurve, theParameter, 0.0, 0.0, PointOn_CurveByParam,
+                         takeOrientationIntoAccount);
 }
 
 //=============================================================================
@@ -344,7 +350,8 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurveByLength
                      double              theLength, 
                      Handle(GEOM_Object) theStartPoint)
 {
-  return makePointOnGeom(theCurve, theLength, 0.0, 0.0, PointOn_CurveByLength, theStartPoint);
+  return makePointOnGeom(theCurve, theLength, 0.0, 0.0, PointOn_CurveByLength,
+                         false, theStartPoint);
 }
 
 //=============================================================================