]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
0022475: EDF 2811 GEOM: Features for "Smoothing Surface" function
authorskv <skv@opencascade.com>
Wed, 26 Mar 2014 09:07:43 +0000 (13:07 +0400)
committerskv <skv@opencascade.com>
Wed, 26 Mar 2014 09:07:43 +0000 (13:07 +0400)
15 files changed:
doc/salome/gui/GEOM/images/smoothingsurface_dlg.png
doc/salome/gui/GEOM/input/creating_smoothingsurface.doc
idl/GEOM_Gen.idl
src/AdvancedEngine/GEOMImpl_IAdvancedOperations.cxx
src/AdvancedEngine/GEOMImpl_IAdvancedOperations.hxx
src/AdvancedEngine/GEOMImpl_ISmoothingSurface.hxx
src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.cxx
src/AdvancedEngine/GEOMImpl_SmoothingSurfaceDriver.hxx
src/AdvancedEngine/GEOM_IAdvancedOperations_i.cc
src/AdvancedEngine/GEOM_IAdvancedOperations_i.hh
src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx
src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.h
src/AdvancedGUI/AdvancedGUI_msg_en.ts
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_SWIG/geomBuilder.py [changed mode: 0755->0644]

index a92bbba8a02420194465a7fea3b7142b8171445d..4605175c2d7a3d25e62c52a98263bb4c395ee34b 100644 (file)
Binary files a/doc/salome/gui/GEOM/images/smoothingsurface_dlg.png and b/doc/salome/gui/GEOM/images/smoothingsurface_dlg.png differ
index 5b102a173ac1659b5d6e9f80f23cb5ef2a5696fe..a16c2da58ffa8386d2d4f57b61fd9f98dd6f1519 100644 (file)
@@ -5,13 +5,20 @@
 To create a <b> Smoothing Surface</b> in the <b>Main Menu</b> select <b>New Entity - >
 Advanced - > SmoothingSurface </b>
 
-Specify the \b Name of the surface and the list of \b Points, from which it is approximated and press "Apply" or "Apply & Close" button.
+To create a surface it is necessary to specify the \b Name of the surface, the list of \b Points
+from which it is approximated and some plate approximation parameters such as: <b>Max nbr of
+Bezier pieces</b>, <b>Max BSpline surface degree</b> and <b>Max plate criterion value</b>.
+And then press "Apply" or "Apply & Close" button.
 
 \note The dialog accepts compounds of points as well as single nodes.
 
 The result of the operation will be a GEOM_Object(Surface).
 
-<b>TUI Command:</b> <em>geompy.MakeSmoothingSurface(Points)</em>
+<b>TUI Command:</b> <em>geompy.MakeSmoothingSurface(thelPoints, theNbMax, theDegMax, theDMax)</em>, where:
+- \em thelPoints list of points. Compounds of points are accepted as well
+- \em theNbMax maximum number of Bezier pieces in the resulting surface
+- \em theDegMax maximum degree of the resulting BSpline surface
+- \em theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion
 
 \image html smoothingsurface_dlg.png
 
index dcb9de5a03190e9f0b4718afa0e0040ed7faf4fe..921e359955eddb48b638d2006badd4901b281a0f 100644 (file)
@@ -4694,10 +4694,16 @@ module GEOM
     /*!
      *  
      *  Create a smoothing surface from a set of points
-     *  \param thelPoints list of points
+     *  \param thelPoints list of points. Compounds of points are accepted as well.
+     *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
+     *  \param theDegMax maximum degree of the resulting BSpline surface
+     *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
      *  \return New GEOM_Object, containing the created shape.
      */
-    GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints);
+    GEOM_Object MakeSmoothingSurface (in ListOfGO thelPoints,
+                                      in long     theNbMax,
+                                      in long     theDegMax,
+                                      in double   theDMax);
 
     /*@@ insert new functions before this line @@ do not remove this line @@*/
   };
index 6e535e2ac2766eb88bb4866cafeea66e9a05c495..59c4d95f8c659e6eda538167cd598a8098ec6b2e 100644 (file)
@@ -3430,10 +3430,16 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedCylinder (double th
 /*!
  *  Create a smoothing surface from a set of points
  *  \param thelPoints list of points or compounds of points
+ *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
+ *  \param theDegMax maximum degree of the resulting BSpline surface
+ *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
  *  \return New GEOM_Object, containing the created shape.
  */
 //=============================================================================
-Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints)
+Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints, 
+                                                                        int                            theNbMax,
+                                                                        int                            theDegMax,
+                                                                        double                         theDMax)
 {
   SetErrorCode(KO);
 
@@ -3462,6 +3468,9 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::lis
     aData.SetPntOrComp(ind, aRefObj);
   }
 
+  aData.SetNbMax(theNbMax);
+  aData.SetDegMax(theDegMax);
+  aData.SetDMax(theDMax);
 
   //Compute the resulting value
   try {
@@ -3487,7 +3496,10 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::lis
   while (it != thelPoints.end()) {
     pd << ", " << (*it++);
   }
-  pd << "])";
+  pd << "], "
+     << theNbMax << ", "
+     << theDegMax << ", "
+     << theDMax <<")";
 
   SetErrorCode(OK);
 
index 2f2367f3e94b2d71e6b42e98e4614c8a62ea017e..8f59a95908858420e5b652397b3aca76f14dbe67 100644 (file)
@@ -236,7 +236,10 @@ public:
                                                            double theH,
                                                            int thePattern);
   
-  Standard_EXPORT Handle(GEOM_Object) MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints);
+  Standard_EXPORT Handle(GEOM_Object) MakeSmoothingSurface (std::list<Handle(GEOM_Object)> thelPoints, 
+                                                            int                            theNbMax,
+                                                            int                            theDegMax,
+                                                            double                         theDMax);
   /*@@ insert new functions before this line @@ do not remove this line @@*/
 };
 #endif
index 5cd77a502ed33394159f96c17ef29e8a10a76bc6..ec3cf1a24015b7316a9b5896d9c6c3efae706c1c 100644 (file)
@@ -27,6 +27,9 @@
 
 #define SMOOTHINGSURFACE_ARG_LENG        1
 #define SMOOTHINGSURFACE_ARG_LAST        2
+#define SMOOTHINGSURFACE_ARG_NB_MAX      3
+#define SMOOTHINGSURFACE_ARG_DEG_MAX     4
+#define SMOOTHINGSURFACE_ARG_D_MAX       5
 
 class GEOMImpl_ISmoothingSurface
 {
@@ -39,6 +42,15 @@ public:
   void SetPntOrComp(int theId, Handle(GEOM_Function) theP) { _func->SetReference(SMOOTHINGSURFACE_ARG_LAST + theId, theP); }
   Handle(GEOM_Function) GetPntOrComp(int theId) { return _func->GetReference(SMOOTHINGSURFACE_ARG_LAST + theId); }
 
+  void SetNbMax(int theNbMax) { _func->SetInteger(SMOOTHINGSURFACE_ARG_NB_MAX, theNbMax); }
+  int GetNbMax() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_NB_MAX); }
+
+  void SetDegMax(int theDegMax) { _func->SetInteger(SMOOTHINGSURFACE_ARG_DEG_MAX, theDegMax); }
+  int GetDegMax() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_DEG_MAX); }
+
+  void SetDMax(double theDMax) { _func->SetReal(SMOOTHINGSURFACE_ARG_D_MAX, theDMax); }
+  double GetDMax() { return _func->GetReal(SMOOTHINGSURFACE_ARG_D_MAX); }
+
 private:
   Handle(GEOM_Function) _func;
 };
index 662df462347fb29f37ce7af70e18f7685e74e1b5..ef1b732aedba6e1cf557d01889a95a13c4f6691d 100644 (file)
@@ -98,13 +98,17 @@ GEOMImpl_SmoothingSurfaceDriver::GEOMImpl_SmoothingSurfaceDriver()
 //function : MakeSmoothingSurfaceUnClosed
 //purpose  :
 //=======================================================================
-TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const
+TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed
+                          (const Handle_TColgp_HArray1OfPnt &theListOfPoints,
+                           const Standard_Integer            theNbMax,
+                           const Standard_Integer            theDegMax,
+                           const Standard_Real               theDMax) const
 {
   TopoDS_Face aInitShape;
   
   // Create an average Plane
-  //Handle(TColgp_HArray1OfPnt) HAP = new TColgp_HArray1OfPnt(1,myListOfPoints.Length())
-  GeomPlate_BuildAveragePlane gpbap(myListOfPoints,myListOfPoints->Length(),Precision::Confusion(),1,1);
+  //Handle(TColgp_HArray1OfPnt) HAP = new TColgp_HArray1OfPnt(1,theListOfPoints.Length())
+  GeomPlate_BuildAveragePlane gpbap(theListOfPoints,theListOfPoints->Length(),Precision::Confusion(),1,1);
   Handle(Geom_Plane) plane(gpbap.Plane());
   Standard_Real Umin, Umax, Vmin, Vmax;
   gpbap.MinMaxBox(Umin,Umax,Vmin,Vmax);
@@ -121,11 +125,11 @@ TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed(Handl
 
   Standard_Integer j, j1, j2;
   // cout << "Init surface" << endl;
-  j1 = myListOfPoints->Lower();
-  j2 = myListOfPoints->Upper();
+  j1 = theListOfPoints->Lower();
+  j2 = theListOfPoints->Upper();
   for (j=j1; j<=j2 ; j++)
   {
-    gp_Pnt aPnt = myListOfPoints->Value(j); 
+    gp_Pnt aPnt = theListOfPoints->Value(j); 
     Handle(GeomPlate_PointConstraint) PCont = new GeomPlate_PointConstraint(aPnt,0);
     aBuilder.Add(PCont);
   }
@@ -136,10 +140,14 @@ TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed(Handl
   // A ce niveau : surface algo
   Handle(GeomPlate_Surface) gpPlate = aBuilder.Surface();
   
-  Standard_Integer nbcarreau=2;
-  Standard_Integer degmax=8;
-  Standard_Real seuil;
-  seuil = Max(0.0001,10*aBuilder.G0Error());
+  Standard_Integer nbcarreau = (theNbMax > 0 ? theNbMax : 2);
+  Standard_Integer degmax = (theDegMax > 0 ? theDegMax : 8);
+  Standard_Real seuil = theDMax;
+
+  if (seuil <= 0.) {
+    seuil = Max(0.0001,10*aBuilder.G0Error());
+  }
+
   GeomPlate_MakeApprox Mapp(gpPlate,0.0001,nbcarreau,degmax,seuil);
   // cout << "Approx surface" << endl;
 
@@ -204,9 +212,13 @@ Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log
     anArrayofPnt->SetValue(i, aPnt);
   }
 
+  const Standard_Integer aNbMax  = aData.GetNbMax();
+  const Standard_Integer aDegMax = aData.GetDegMax();
+  const Standard_Real    aDMax   = aData.GetDMax();
+
   // Make smoothing surface.
-  TopoDS_Shape aShape =
-    GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed(anArrayofPnt);
+  TopoDS_Shape aShape = GEOMImpl_SmoothingSurfaceDriver::
+    MakeSmoothingSurfaceUnClosed(anArrayofPnt, aNbMax, aDegMax, aDMax);
 
   if (aShape.IsNull()) return 0;
 
@@ -237,11 +249,21 @@ GetCreationInformation(std::string&             theOperationName,
 
   switch ( aType ) {
   case SMOOTHINGSURFACE_LPOINTS:
-    AddParam( theParams, "Points" );
-    if ( aCI.GetLength() > 1 )
-      theParams[0] << aCI.GetLength() << " points: ";
-    for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
-      theParams[0] << aCI.GetPntOrComp( i ) << " ";
+    {
+      AddParam( theParams, "Points" );
+      if ( aCI.GetLength() > 1 )
+        theParams[0] << aCI.GetLength() << " points: ";
+      for ( int i = 1, nb = aCI.GetLength(); i <= nb; ++i )
+        theParams[0] << aCI.GetPntOrComp( i ) << " ";
+
+      const Standard_Integer aNbMax  = aCI.GetNbMax();
+      const Standard_Integer aDegMax = aCI.GetDegMax();
+      const Standard_Real    aDMax   = aCI.GetDMax();
+
+      AddParam(theParams, "Max nbr of Bezier pieces", aCI.GetNbMax());
+      AddParam(theParams, "Max BSpline surface degree", aCI.GetDegMax());
+      AddParam(theParams, "Max plate criterion value", aCI.GetDMax());
+    }
     break;
   default:
     return false;
index 6887f1f29a79890773a63a000a8372ae40594863..6a22f65dc2b8f49dbb65264ec8bd927efaffed14 100644 (file)
@@ -63,7 +63,11 @@ public:
 DEFINE_STANDARD_RTTI( GEOMImpl_SmoothingSurfaceDriver )
 
 private:
-  TopoDS_Shape MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const;
+  TopoDS_Shape MakeSmoothingSurfaceUnClosed
+                    (const Handle_TColgp_HArray1OfPnt &theListOfPoints,
+                     const Standard_Integer            theNbMax,
+                     const Standard_Integer            theDegMax,
+                     const Standard_Real               theDMax) const;
 };
 
 #endif // _GEOMImpl_SmoothingSurfaceDriver_HXX
index cd131f3ef3268995eb1181ca0cbbd84685a09d87..7ff12c39d63567be353c020517e3e0fd35cbb594 100644 (file)
@@ -755,10 +755,16 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Do
 /*!
  *  
  *  \param thelPoints list of  points
+ *  \param theNbMax maximum number of Bezier pieces in the resulting surface.
+ *  \param theDegMax maximum degree of the resulting BSpline surface
+ *  \param theDMax specifies maximum value of the GeomPlate_PlateG0Criterion criterion.
  *  \return New GEOM_Object, containing the created shape.
  */
 //=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints)
+GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
+                                                                        CORBA::Long           theNbMax,
+                                                                        CORBA::Long           theDegMax,
+                                                                        CORBA::Double         theDMax)
 {
   GEOM::GEOM_Object_var aGEOMObject;
 
@@ -775,7 +781,8 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GE
     aPoints.push_back(aPnt);
   }
   //Create the SmoothingSurface
-  Handle(GEOM_Object) anObject = GetOperations()->MakeSmoothingSurface(aPoints);
+  Handle(GEOM_Object) anObject = GetOperations()->MakeSmoothingSurface
+        (aPoints, theNbMax, theDegMax, theDMax);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
index d7fa5d6a8de98791251b76a9427b3a11c650a07f..7f700132dc49d1b7b379524f9489e24def6dbf3f 100644 (file)
@@ -127,7 +127,10 @@ class ADVANCEDENGINE_EXPORT GEOM_IAdvancedOperations_i :
   GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
                                              CORBA::Double theH,
                                              GEOM::pattern thePattern);
-  GEOM::GEOM_Object_ptr MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints);
+  GEOM::GEOM_Object_ptr MakeSmoothingSurface (const GEOM::ListOfGO& thelPoints,
+                                              CORBA::Long           theNbMax,
+                                              CORBA::Long           theDegMax,
+                                              CORBA::Double         theDMax);
   /*@@ insert new functions before this line @@ do not remove this line @@*/
 
   ::GEOMImpl_IAdvancedOperations* GetOperations()
index d8fe398095e43bbe8ee5f25fa2a3808d4361b25e..15a5cd5701897a6714ed7da1f36d205ea4e16474 100644 (file)
 // Constructor
 //=================================================================================
 AdvancedGUI_SmoothingSurfaceDlg::AdvancedGUI_SmoothingSurfaceDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
-  : GEOMBase_Skeleton(theGeometryGUI, parent, false)
+  : GEOMBase_Skeleton(theGeometryGUI, parent, false),
+    myNbMaxSpin(0),
+    myDegMaxSpin(0),
+    myDMaxSpin(0)
 {
   QPixmap imageOp  (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_SMOOTHINGSURFACE_LPOINTS")));
   QPixmap imageSel (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
@@ -65,6 +68,20 @@ AdvancedGUI_SmoothingSurfaceDlg::AdvancedGUI_SmoothingSurfaceDlg (GeometryGUI* t
   GroupPoints->PushButton1->setIcon( image1 );
   GroupPoints->LineEdit1->setReadOnly( true );
 
+  QLabel *aNbMax  = new QLabel(tr("GEOM_SMOOTHINGSURFACE_ARG_NB_MAX"));
+  QLabel *aDegMax = new QLabel(tr("GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX"));
+  QLabel *aDMax   = new QLabel(tr("GEOM_SMOOTHINGSURFACE_ARG_D_MAX"));
+
+  myNbMaxSpin  = new SalomeApp_IntSpinBox(0, 1000, 1, 0, true, true);
+  myDegMaxSpin = new SalomeApp_IntSpinBox(0, 1000, 1, 0, true, true);
+  myDMaxSpin   = new SalomeApp_DoubleSpinBox;
+  GroupPoints->gridLayout1->addWidget(aNbMax,       1, 0);
+  GroupPoints->gridLayout1->addWidget(aDegMax,      2, 0);
+  GroupPoints->gridLayout1->addWidget(aDMax,        3, 0);
+  GroupPoints->gridLayout1->addWidget(myNbMaxSpin,  1, 1, 1, 2);
+  GroupPoints->gridLayout1->addWidget(myDegMaxSpin, 2, 1, 1, 2);
+  GroupPoints->gridLayout1->addWidget(myDMaxSpin,   3, 1, 1, 2);
+
   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
   layout->setMargin(0); layout->setSpacing(6);
   layout->addWidget(GroupPoints);
@@ -91,7 +108,12 @@ void AdvancedGUI_SmoothingSurfaceDlg::Init()
 {
   // Get setting of step value from file configuration
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
-  double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
+
+  initSpinBox(myDMaxSpin, 0., COORD_MAX, 0.00001, "parametric_precision" );
+
+  myNbMaxSpin->setValue(2);
+  myDegMaxSpin->setValue(8);
+  myDMaxSpin->setValue(0.);
 
   //@@ initialize dialog box widgets here @@//
 
@@ -102,7 +124,13 @@ void AdvancedGUI_SmoothingSurfaceDlg::Init()
           this,          SLOT(SetDoubleSpinBoxStep(double)));
   connect( myGeomGUI->getApp()->selectionMgr(),
            SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
-
+  connect(myNbMaxSpin, SIGNAL(valueChanged(const QString&)),
+          this, SLOT(processPreview()) );
+  connect(myDegMaxSpin, SIGNAL(valueChanged(const QString&)),
+          this, SLOT(processPreview()) );
+  connect(myDMaxSpin, SIGNAL(valueChanged(const QString&)),
+          this, SLOT(processPreview()) );
   initName(tr("GEOM_SMOOTHINGSURFACE"));
   //displayPreview();
 }
@@ -167,9 +195,14 @@ GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation()
 //=================================================================================
 bool AdvancedGUI_SmoothingSurfaceDlg::isValid (QString& msg)
 {
-  bool ok = true;
+  if (myPoints.empty()) {
+    msg += tr("GEOM_SMOOTHINGSURFACE_NO_POINTS");
+    return false;
+  }
 
-  //@@ add custom validation actions here @@//
+  bool ok = myNbMaxSpin->isValid (msg, !IsPreview()) &&
+            myDegMaxSpin->isValid(msg, !IsPreview()) &&
+            myDMaxSpin->isValid  (msg, !IsPreview());
 
   return ok;
 }
@@ -192,9 +225,12 @@ bool AdvancedGUI_SmoothingSurfaceDlg::execute (ObjectList& objects)
   for ( int i = 0; i < myPoints.count(); i++ )
     points[i] = myPoints[i].copy();
 
+  const int    aNbMax  = myNbMaxSpin->value();
+  const int    aDegMax = myDegMaxSpin->value();
+  const double aDMax   = myDMaxSpin->value();
 
   // call engine function
-  anObj = anOper->MakeSmoothingSurface(points);
+  anObj = anOper->MakeSmoothingSurface(points, aNbMax, aDegMax, aDMax);
   res = !anObj->_is_nil();
   if (res && !IsPreview())
   {
index c12ab517341c276edcad5baa0d1eb8d29474477f..822d2aa0f8db29d965c866b85953cfa23faf1cac 100644 (file)
@@ -26,6 +26,7 @@
 #include <list>
 
 class DlgRef_1Sel;
+class SalomeApp_IntSpinBox;
 
 //=================================================================================
 // class    : AdvancedGUI_SmoothingSurfaceDlg
@@ -53,6 +54,9 @@ private:
 private:
   DlgRef_1Sel*                 GroupPoints;
   QList<GEOM::GeomObjPtr>            myPoints;
+  SalomeApp_IntSpinBox              *myNbMaxSpin;
+  SalomeApp_IntSpinBox              *myDegMaxSpin;
+  SalomeApp_DoubleSpinBox           *myDMaxSpin;
 
 private slots:
   void                               ClickOnOk();
index 2aab6e88ac713ffa834726334221af60ec1e492f..3e6b28602527ec622fe9a012bebd3f81d8c62e9b 100644 (file)
     </message>
     <message>
         <source>GEOM_SMOOTHINGSURFACE_ARG</source>
-        <translation>Nodes</translation>
+        <translation>Arguments</translation>
     </message>
     <message>
         <source>GEOM_SMOOTHINGSURFACE_ARG_POINTS</source>
         <translation>Points</translation>
     </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_NB_MAX</source>
+        <translation>Max nbr of Bezier pieces</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_DEG_MAX</source>
+        <translation>Max BSpline surface degree</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_ARG_D_MAX</source>
+        <translation>Max plate criterion value</translation>
+    </message>
+    <message>
+        <source>GEOM_SMOOTHINGSURFACE_NO_POINTS</source>
+        <translation>No points selected</translation>
+    </message>
 </context>
 </TS>
index 71e38f9d2e7f4ac41ea3feb34afc505033eff666..792cbe5ae2efbf0af16cd4296b45b7cd0359f332 100644 (file)
@@ -3516,7 +3516,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSmoothingSurface (GEOM::GEOM_List_ptr t
   if (GEOM_List_i<GEOM::ListOfGO>* aListImplP =
       dynamic_cast<GEOM_List_i<GEOM::ListOfGO>*>(GetServant(thelPoints, myPOA).in())) {
     getCurvesOp();
-    GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeSmoothingSurface(aListImplP->GetList());
+    GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeSmoothingSurface(aListImplP->GetList(), 2, 8, 0.);
     endService( " GEOM_Superv_i::MakeSmoothingSurface" );
     return anObj;
   }
old mode 100755 (executable)
new mode 100644 (file)
index 34fe54d..c269bc7
@@ -12631,12 +12631,41 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         ## Create a surface from a cloud of points
         #  @param thelPoints list of points. Compounds of points are
         #         accepted as well.
+        #  @param theNbMax maximum number of Bezier pieces in the resulting
+        #         surface.
+        #  @param theDegMax maximum degree of the resulting BSpline surface.
+        #  @param theDMax specifies maximum value of the
+        #         GeomPlate_PlateG0Criterion criterion.
+        #  @param theName Object name; when specified, this parameter is used
+        #         for result publication in the study. Otherwise, if automatic
+        #         publication is switched on, default value is used for result name.
         #  @return New GEOM_Object, containing the created shape.
         #
         #  @ref tui_creation_smoothingsurface "Example"
-        def MakeSmoothingSurface(self, thelPoints):
-            anObj = self.AdvOp.MakeSmoothingSurface(thelPoints)
+        def MakeSmoothingSurface(self, thelPoints, theNbMax=2, theDegMax=8,
+                                 theDMax=0.0, theName=None):
+            """
+            Create a surface from a cloud of points
+
+            Parameters:
+                thelPoints list of points. Compounds of points are
+                           accepted as well.
+                theNbMax maximum number of Bezier pieces in the resulting
+                         surface.
+                theDegMax maximum degree of the resulting BSpline surface.
+                theDMax specifies maximum value of the
+                        GeomPlate_PlateG0Criterion criterion.
+                theName Object name; when specified, this parameter is used
+                        for result publication in the study. Otherwise, if automatic
+                        publication is switched on, default value is used for result name.
+
+            Returns:
+                New GEOM_Object, containing the created shape.
+            """
+            anObj = self.AdvOp.MakeSmoothingSurface
+                (thelPoints, theNbMax, theDegMax, theDMax)
             RaiseIfFailed("MakeSmoothingSurface", self.AdvOp)
+            self._autoPublish(anObj, theName, "smoothing")
             return anObj
 
         ## Export a shape to XAO format