Salome HOME
29470 - Point cloud on a face
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IBasicOperations.cxx
index 200a4eec53724c3d38c7c409cda0901499a25921..659d8ff6484799c5f8f8678f251adb8e958c1374 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  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 @@
 #include <GEOMImpl_IBasicOperations.hxx>
 
 #include "utilities.h"
-#include <OpUtil.hxx>
 #include <Utils_ExceptHandlers.hxx>
 
 #include <TFunction_DriverTable.hxx>
@@ -185,6 +184,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
                      double              theParam2,
                      double              theParam3,
                      const PointLocation theLocation,
+                     int                 theNumberOfPnts,
                      const bool          takeOrientationIntoAccount,
                      Handle(GEOM_Object) theRefPoint)
 {
@@ -251,6 +251,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
       break;
     case PointOn_Face:
       aPI.SetSurface(aRefFunction);
+      aPI.SetNumberOfPoints(theNumberOfPnts);
       break;
     default: break;
     }
@@ -297,7 +298,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
       break;
     case PointOn_Face:
       GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexInsideFace("
-                                   << theGeomObj << ")";
+                                   << theGeomObj << ", " << theNumberOfPnts << ")";
       break;
     default: break;
     }
@@ -317,7 +318,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurve
                              bool                takeOrientationIntoAccount)
 {
   return makePointOnGeom(theCurve, theParameter, 0.0, 0.0, PointOn_CurveByParam,
-                         takeOrientationIntoAccount);
+                         1, takeOrientationIntoAccount);
 }
 
 //=============================================================================
@@ -345,7 +346,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurveByLength
                      Handle(GEOM_Object) theStartPoint)
 {
   return makePointOnGeom(theCurve, theLength, 0.0, 0.0, PointOn_CurveByLength,
-                         false, theStartPoint);
+                         1, false, theStartPoint);
 }
 
 //=============================================================================
@@ -380,9 +381,10 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnSurfaceByCoord
  *  MakePointOnFace
  */
 //=============================================================================
-Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnFace (Handle(GEOM_Object) theFace)
+Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnFace (Handle(GEOM_Object) theFace,
+                                                                int                 theNumberOfPnts)
 {
-  return makePointOnGeom(theFace, 0., 0., 0., PointOn_Face);
+  return makePointOnGeom(theFace, 0., 0., 0., PointOn_Face, theNumberOfPnts);
 }
 
 //=============================================================================