From aaabaf47861bdb0ad247c6837fc3bb5b11d8068e Mon Sep 17 00:00:00 2001 From: fps Date: Thu, 22 Nov 2012 09:02:52 +0000 Subject: [PATCH] Modif Smoothing Surfaces --- .../gui/GEOM/input/creating_adv_obj.doc | 1 + .../GEOM/input/creating_smoothingsurface.doc | 27 ++ .../gui/GEOM/input/tui_advanced_geom_objs.doc | 18 + idl/GEOM_Gen.idl | 8 + idl/GEOM_Superv.idl | 2 + resources/GEOMCatalog.xml.in | 27 ++ resources/Makefile.am | 1 + resources/smoothingsurface.png | Bin 0 -> 1233 bytes .../smoothingsurface_points_isclosed.png | Bin 0 -> 22215 bytes resources/tree_smoothingsurface.png | Bin 0 -> 1233 bytes src/AdvancedGUI/AdvancedGUI.cxx | 4 + .../AdvancedGUI_SmoothingSurfaceDlg.cxx | 288 +++++++++++++++ .../AdvancedGUI_SmoothingSurfaceDlg.h | 73 ++++ src/AdvancedGUI/Makefile.am | 8 +- src/GEOMGUI/GEOM_images.ts | 12 + src/GEOMGUI/GEOM_msg_en.ts | 27 ++ src/GEOMGUI/GEOM_msg_fr.ts | 27 ++ src/GEOMGUI/GeometryGUI.cxx | 7 +- src/GEOMGUI/GeometryGUI_Operations.h | 1 + src/GEOMImpl/GEOMImpl_Gen.cxx | 2 + src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx | 71 ++++ src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx | 3 + src/GEOMImpl/GEOMImpl_ISmoothingSurface.hxx | 49 +++ .../GEOMImpl_SmoothingSurfaceDriver.cxx | 346 ++++++++++++++++++ .../GEOMImpl_SmoothingSurfaceDriver.hxx | 135 +++++++ src/GEOMImpl/GEOMImpl_Types.hxx | 2 + src/GEOMImpl/Makefile.am | 2 + src/GEOM_I/GEOM_IAdvancedOperations_i.cc | 33 ++ src/GEOM_I/GEOM_IAdvancedOperations_i.hh | 1 + src/GEOM_I_Superv/GEOM_Superv_i.cc | 20 + src/GEOM_I_Superv/GEOM_Superv_i.hh | 1 + src/GEOM_SWIG/geompyDC.py | 13 + 32 files changed, 1207 insertions(+), 2 deletions(-) create mode 100644 doc/salome/gui/GEOM/input/creating_smoothingsurface.doc create mode 100644 resources/smoothingsurface.png create mode 100644 resources/smoothingsurface_points_isclosed.png create mode 100644 resources/tree_smoothingsurface.png create mode 100644 src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx create mode 100644 src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.h create mode 100644 src/GEOMImpl/GEOMImpl_ISmoothingSurface.hxx create mode 100644 src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.hxx diff --git a/doc/salome/gui/GEOM/input/creating_adv_obj.doc b/doc/salome/gui/GEOM/input/creating_adv_obj.doc index eb11522cf..d61dc1415 100644 --- a/doc/salome/gui/GEOM/input/creating_adv_obj.doc +++ b/doc/salome/gui/GEOM/input/creating_adv_obj.doc @@ -6,6 +6,7 @@ diff --git a/doc/salome/gui/GEOM/input/creating_smoothingsurface.doc b/doc/salome/gui/GEOM/input/creating_smoothingsurface.doc new file mode 100644 index 000000000..4326aeefb --- /dev/null +++ b/doc/salome/gui/GEOM/input/creating_smoothingsurface.doc @@ -0,0 +1,27 @@ +/*! + +\page create_smoothingsurface_page SmoothingSurface + +To create a \b SmoothingSurface in the Main Menu select New Entity - > +Advanced - > SmoothingSurface + +Specify the parameters of the SmoothingSurface object creation in the opened dialog +box and press "Apply" or "Apply & Close" button. +Result of each operation will be a GEOM_Object. + +TUI Command: geompy.MakeSmoothingSurface(Points, isClosed) + +Arguments: +- \b Points - list of points +- \b isClosed - Define if the created surface must be closed + +\image html smoothingsurface_dlg.png + +Example: + +\image html smoothingsurface.png + +Our TUI Scripts provide you with useful examples of creation of +\ref tui_creation_smoothingsurface "Advanced objects". + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc index 654cdd158..42fa49ea1 100644 --- a/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc @@ -80,5 +80,23 @@ gg.createAndDisplayGO(id_pipetshapefillet_position) \endcode +\anchor tui_creation_smoothingsurface +

Creation of SmoothingSurface

+ +\code +import geompy +import salome +gg = salome.ImportComponentGUI("GEOM") + +# create SmoothingSurface object +smoothingsurface = geompy.MakeSmoothingSurface([value], false) + +# add object in the study +id_smoothingsurface = geompy.addToStudy(smoothingsurface,"SmoothingSurface") + +# display smoothingsurface +gg.createAndDisplayGO(id_smoothingsurface) +\endcode + */ diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 783392170..bfc5a5e34 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -3758,6 +3758,14 @@ module GEOM in double theR2, in double theW2, in double theL2, in double theRF, in boolean theHexMesh, in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); + /*! + * Create a smoothing surface from a set of points + * \param thePoints list of points + * \param theisClosed Define if the created surface must be closed + * \return New GEOM_Object, containing the created shape. + */ + GEOM_Object MakeSmoothingSurface (in ListOfGO thePoints, in boolean theisClosed); + /*@@ insert new functions before this line @@ do not remove this line @@*/ }; diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl index 7bc184a7f..cb2b9adab 100644 --- a/idl/GEOM_Superv.idl +++ b/idl/GEOM_Superv.idl @@ -617,6 +617,8 @@ module GEOM in double theRF, in boolean theHexMesh, in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); + GEOM_Object MakeSmoothingSurface (in GEOM_List thePoints, in boolean theisClosed); + /*@@ insert new functions before this line @@ do not remove this line @@*/ }; }; diff --git a/resources/GEOMCatalog.xml.in b/resources/GEOMCatalog.xml.in index db645d25b..f3a5e70c3 100644 --- a/resources/GEOMCatalog.xml.in +++ b/resources/GEOMCatalog.xml.in @@ -5225,6 +5225,33 @@ + + MakeSmoothingSurface + + + unknown + 0 + + + thePoints + GEOM_List + list of points + + + theisClosed + boolean + Define if the created surface must be closed + + + + + return + GEOM_Object + Result object + + + + diff --git a/resources/Makefile.am b/resources/Makefile.am index 187ca89c6..aa04c3e62 100644 --- a/resources/Makefile.am +++ b/resources/Makefile.am @@ -251,6 +251,7 @@ ADVANCED_RESOURCES += dlg_pipetshapechamferh.png dlg_pipetshapechamferw.png ADVANCED_RESOURCES += dlg_pipetshapefilletl1.png dlg_pipetshapefilletr1.png dlg_pipetshapefilletw1.png ADVANCED_RESOURCES += dlg_pipetshapefilletl2.png dlg_pipetshapefilletr2.png dlg_pipetshapefilletw2.png ADVANCED_RESOURCES += dlg_pipetshapefilletrf.png +ADVANCED_RESOURCES += smoothingsurface.png smoothingsurface_points_isclosed.png tree_smoothingsurface.png ##@@ insert new functions before this line @@ do not remove this line @@## dist_salomeres_DATA += $(ADVANCED_RESOURCES) diff --git a/resources/smoothingsurface.png b/resources/smoothingsurface.png new file mode 100644 index 0000000000000000000000000000000000000000..38a2457bc9cc46141c46c59861868799ccc28530 GIT binary patch literal 1233 zcmV;?1TOoDP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY( z3lbzd{ZD=X000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000CmNkl#%+#rEtYAYIN(6(TwxDhrT52JiU>gcm(iYnywSr0twwoxn zr8IP*sbax4#<llgXgN5>ampE)xN0A#(8FGohm$5*c& zzIW%&r6>%ugi;u#peq%qQVEXh7B_9(`r)&?c74Lu1KNM?+?MZd+!($)F>%UR>k7{U zPo=Tn`H7DX9EcW=4~~q`9}0!m@u{gJ<#PE*d2a5p zXm%E`79y8}@I3HD0*rG2KsAoRjrrrb_V%Z~Id#fk*0b$Lj~<+wo*ovCqufMdnoBtg z#)_2lq_(y#48upNVTfwEjB2FO$v`9$5K@8?0uTbNHS(Fvi9&z>r;Yj?0A4tB z=%ty-$&T?`x8AQR1;V)~3$cy5?lvkV2&=W$Dg_ViBeRa2$wiwsxn}5a~3y zlr;#Ypp=493PK1{t~+@1!iB?&ljC4)?-Q-9L~;(!IS2q_Ey5_m{K5j}XJ_FTi_k#; zPzs(*LL`$AuG=(0-KJqh2tmSet}k5=JdC1eBBdSU&+bhAyn^&&1e0J>EU#lHWooCN>N7d?(BZRXdlYuq{l^{Ub_fe`; z5XCWcJ#qlxoSTEYcV~J#J1fgzYdH&Fy?AkFq|}XUI_;S{tP}(&RVs+%7}^-1Zk2T1 znXyZkT2`t<*8=;#xA&)w+3X%`?VPRe!+LJD=&Y@+(AvB4)#}i-p7et!P81lWFIsDV zCxp}@Axna>7M#-Qb;AJQtCJ^h=aR`Cl#pQny0JH#mH-%If37y4|J#4r=f{uF19*LZ vfB!|L)Imn+o>-~JDWw}>Ez*g^s%HNHtb^8QP&nO}00000NkvXXu0mjfKN2hC literal 0 HcmV?d00001 diff --git a/resources/smoothingsurface_points_isclosed.png b/resources/smoothingsurface_points_isclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..fe6dce0da335b51e2c6623a3bf9a0c035bc873fe GIT binary patch literal 22215 zcmXtgbySq!_w^Jwlz<=%J%ofG=^>O32}uzVX&6AdI|q;whElqvMWjm_q+38bhYsnk zcl`d=`^V&3^E~&Sd+s^=?6dELtEGdmZ6jFXwMiTPO@JCRPgm&tHb?0ItqSX_hf`c zjL16kBcKnLoUpWvhnX8bmAlff{zciOhg6=tV1It%t>@;8dmq=Uo3|4kvwGVPaD9uL zmEF_#eKtfkB)SjfnESM9Dyr-Mq^K}4>DX6OEH=7W;xLH#uKfCK)8v&J z2k6l<-z@2juda?Kwp++Ox0}maG;DgcQ)@qVRiazvxTmxFoL@fr5$Wh|0Qe;NGh29= zg@1`$0R@GHrJY@PSQyZR4JCsMn4WpFGe0pAR&IE|$?WCt8vnBMa^-soy)CFjU*9R}lg z-6ele-YlEfmijlO3Atg%8;P5v#FN?o-d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G4a7TVb25s`6r z641pLpM|@ViIdhmzg;wlr=Z)b-S9b^JJ9p^`zY(u-;*05L^;Cl%cT5_aA?=!%rrAW-M!`!~C_49<6_8?o4nu&EwS5+KnG4IoXI|oyu2iVp8 zygpR1O#Y1%1Is&uU3z^K_hGz7!8i*U|K;M|9Z`rMZs!wxo_P4%nehE*xa2U8`>iFY%($P=7gp6O5Bi8Mk>EXj)YJ7z9b+wES zw*{xtK(DHe4(Kz~pP_-c%MK!9+yR86@KGBWgU)3>&8F&?C5d6GaC&idcLgKeNvr z$vD5QF#*PzV0mMk7460&x9MaXKRn)e2;%sMMri#QC*@rbLkHACmoFIU<>}gy{s-r@ BwXOgF literal 0 HcmV?d00001 diff --git a/resources/tree_smoothingsurface.png b/resources/tree_smoothingsurface.png new file mode 100644 index 0000000000000000000000000000000000000000..38a2457bc9cc46141c46c59861868799ccc28530 GIT binary patch literal 1233 zcmV;?1TOoDP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY( z3lbzd{ZD=X000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000CmNkl#%+#rEtYAYIN(6(TwxDhrT52JiU>gcm(iYnywSr0twwoxn zr8IP*sbax4#<llgXgN5>ampE)xN0A#(8FGohm$5*c& zzIW%&r6>%ugi;u#peq%qQVEXh7B_9(`r)&?c74Lu1KNM?+?MZd+!($)F>%UR>k7{U zPo=Tn`H7DX9EcW=4~~q`9}0!m@u{gJ<#PE*d2a5p zXm%E`79y8}@I3HD0*rG2KsAoRjrrrb_V%Z~Id#fk*0b$Lj~<+wo*ovCqufMdnoBtg z#)_2lq_(y#48upNVTfwEjB2FO$v`9$5K@8?0uTbNHS(Fvi9&z>r;Yj?0A4tB z=%ty-$&T?`x8AQR1;V)~3$cy5?lvkV2&=W$Dg_ViBeRa2$wiwsxn}5a~3y zlr;#Ypp=493PK1{t~+@1!iB?&ljC4)?-Q-9L~;(!IS2q_Ey5_m{K5j}XJ_FTi_k#; zPzs(*LL`$AuG=(0-KJqh2tmSet}k5=JdC1eBBdSU&+bhAyn^&&1e0J>EU#lHWooCN>N7d?(BZRXdlYuq{l^{Ub_fe`; z5XCWcJ#qlxoSTEYcV~J#J1fgzYdH&Fy?AkFq|}XUI_;S{tP}(&RVs+%7}^-1Zk2T1 znXyZkT2`t<*8=;#xA&)w+3X%`?VPRe!+LJD=&Y@+(AvB4)#}i-p7et!P81lWFIsDV zCxp}@Axna>7M#-Qb;AJQtCJ^h=aR`Cl#pQny0JH#mH-%If37y4|J#4r=f{uF19*LZ vfB!|L)Imn+o>-~JDWw}>Ez*g^s%HNHtb^8QP&nO}00000NkvXXu0mjfKN2hC literal 0 HcmV?d00001 diff --git a/src/AdvancedGUI/AdvancedGUI.cxx b/src/AdvancedGUI/AdvancedGUI.cxx index a092ecc3a..5ba967912 100644 --- a/src/AdvancedGUI/AdvancedGUI.cxx +++ b/src/AdvancedGUI/AdvancedGUI.cxx @@ -29,6 +29,7 @@ #include #include "AdvancedGUI_PipeTShapeDlg.h" +#include "AdvancedGUI_SmoothingSurfaceDlg.h" //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@// #include @@ -69,6 +70,9 @@ bool AdvancedGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) // case GEOMOp::OpPipeTShapeGroups: // aDlg = new AdvancedGUI_PipeTShapeGroupsDlg( getGeometryGUI(), parent ); // break; + case GEOMOp::OpSmoothingSurface: + aDlg = new AdvancedGUI_SmoothingSurfaceDlg( getGeometryGUI(), parent ); + break; //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@// default: app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); diff --git a/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx new file mode 100644 index 000000000..17373f9d3 --- /dev/null +++ b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.cxx @@ -0,0 +1,288 @@ +// Copyright (C) 2007-2008 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 +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#include "AdvancedGUI_SmoothingSurfaceDlg.h" + +#include +#include +#include + +#include +#include +#include +#include + +// OCCT Includes +#include +#include +#include +#include +#include + +#include + +//================================================================================= +// Constructor +//================================================================================= +AdvancedGUI_SmoothingSurfaceDlg::AdvancedGUI_SmoothingSurfaceDlg (GeometryGUI* theGeometryGUI, QWidget* parent) + : GEOMBase_Skeleton(theGeometryGUI, parent, false) +{ + QPixmap imageOp (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_SMOOTHINGSURFACE_POINTS_ISCLOSED"))); + QPixmap imageSel (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT"))); + QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); + + setWindowTitle(tr("GEOM_SMOOTHINGSURFACE_TITLE")); + + /***************************************************************/ + mainFrame()->GroupConstructors->setTitle(tr("GEOM_SMOOTHINGSURFACE")); + mainFrame()->RadioButton1->setIcon(imageOp); + mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose); + mainFrame()->RadioButton3->close(); + + GroupPoints = new DlgRef_1Sel1Check( centralWidget() ); + + GroupPoints->GroupBox1->setTitle( tr( "GEOM_SMOOTHINGSURFACE_ARG" ) ); + GroupPoints->TextLabel1->setText( tr( "GEOM_SMOOTHINGSURFACE_ARG_POINTS" ) ); + GroupPoints->PushButton1->setIcon( image1 ); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->CheckButton1->setText( tr( "GEOM_SMOOTHINGSURFACE_ARG_ISCLOSED" ) ); + GroupPoints->CheckButton1->setChecked(false); + + QVBoxLayout* layout = new QVBoxLayout(centralWidget()); + layout->setMargin(0); layout->setSpacing(6); + layout->addWidget(GroupPoints); + /***************************************************************/ + + setHelpFileName("create_smoothingsurface_page.html"); + + Init(); +} + +//================================================================================= +// Destructor +//================================================================================= +AdvancedGUI_SmoothingSurfaceDlg::~AdvancedGUI_SmoothingSurfaceDlg() +{ + // no need to delete child widgets, Qt does it all for us +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +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); + + //@@ initialize dialog box widgets here @@// + + // Signal/slot connections + connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), + this, SLOT(SetDoubleSpinBoxStep(double))); + connect( myGeomGUI->getApp()->selectionMgr(), + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + + initName(tr("GEOM_SMOOTHINGSURFACE")); + //displayPreview(); +} + +/*//================================================================================= +// function : SetDoubleSpinBoxStep() +// purpose : Double spin box management +//================================================================================= +void AdvancedGUI_SmoothingSurfaceDlg::SetDoubleSpinBoxStep (double step) +{ + //@@ set double spin box step for all spin boxes here @@// +}*/ + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void AdvancedGUI_SmoothingSurfaceDlg::ClickOnOk() +{ + if (ClickOnApply()) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool AdvancedGUI_SmoothingSurfaceDlg::ClickOnApply() +{ + if (!onAccept()) + return false; + + initName(); + + return true; +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void AdvancedGUI_SmoothingSurfaceDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + //displayPreview(); +} + +//================================================================================= +// function : enterEvent [REDEFINED] +// purpose : +//================================================================================= +void AdvancedGUI_SmoothingSurfaceDlg::enterEvent (QEvent*) +{ + if (!mainFrame()->GroupConstructors->isEnabled()) + ActivateThisDialog(); +} + +/*//================================================================================= +// function : ValueChangedInSpinBox() +// purpose : +//================================================================================= +void AdvancedGUI_SmoothingSurfaceDlg::ValueChangedInSpinBox() +{ + //@@ connect custom spin boxes or other widget to this slot in the Init() method for automatic preview update @@// + //displayPreview(); +}*/ + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr AdvancedGUI_SmoothingSurfaceDlg::createOperation() +{ + return getGeomEngine()->GetIAdvancedOperations(getStudyId()); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool AdvancedGUI_SmoothingSurfaceDlg::isValid (QString& msg) +{ + bool ok = true; + + //@@ add custom validation actions here @@// + + return ok; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool AdvancedGUI_SmoothingSurfaceDlg::execute (ObjectList& objects) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + GEOM::GEOM_IAdvancedOperations_var anOper = GEOM::GEOM_IAdvancedOperations::_narrow(getOperation()); + + //@@ retrieve input values from the widgets here @@// + GEOM::ListOfGO_var points = new GEOM::ListOfGO(); + points->length( myPoints.count() ); + for ( int i = 0; i < myPoints.count(); i++ ) + points[i] = myPoints[i].copy(); + + CORBA::Boolean theisClosed = GroupPoints->CheckButton1->isChecked(); + + // call engine function + anObj = anOper->MakeSmoothingSurface(points, theisClosed); + res = !anObj->_is_nil(); + if (res && !IsPreview()) + { + QStringList aParameters; + //@@ put stringified input parameters to the string list here to store in the data model for notebook @@// + /*aParameters << @@ stringified parameter value @@; // Points parameter + aParameters << @@ stringified parameter value @@; // isClosed parameter*/ + if ( aParameters.count() > 0 ) anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + } + + if (res) + objects.push_back(anObj._retn()); + + return res; +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection as changed or other case +//================================================================================= +void AdvancedGUI_SmoothingSurfaceDlg::SelectionIntoArgument() +{ + QList points = getSelected( TopAbs_VERTEX, -1 ); + synchronize( myPoints, points ); + if ( !myPoints.isEmpty() ) + GroupPoints->LineEdit1->setText( QString::number( myPoints.count() ) + "_" + tr( "GEOM_POINT" ) + tr( "_S_" ) ); + else + GroupPoints->LineEdit1->setText( "" ); + processPreview(); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void AdvancedGUI_SmoothingSurfaceDlg::SetEditCurrentArgument() +{ + if ( sender() == GroupPoints->PushButton1 ) + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); +} + +void AdvancedGUI_SmoothingSurfaceDlg::synchronize( QList& left, QList& right ) +{ + // 1. remove items from the "left" list that are not in the "right" list + QMutableListIterator it1( left ); + while ( it1.hasNext() ) { + GEOM::GeomObjPtr o1 = it1.next(); + bool found = false; + QMutableListIterator it2( right ); + while ( it2.hasNext() && !found ) + found = o1 == it2.next(); + if ( !found ) + it1.remove(); + } + // 2. add items from the "right" list that are not in the "left" list (to keep selection order) + it1 = right; + while ( it1.hasNext() ) { + GEOM::GeomObjPtr o1 = it1.next(); + bool found = false; + QMutableListIterator it2( left ); + while ( it2.hasNext() && !found ) + found = o1 == it2.next(); + if ( !found ) + left << o1; + } +} + diff --git a/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.h b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.h new file mode 100644 index 000000000..2f0229441 --- /dev/null +++ b/src/AdvancedGUI/AdvancedGUI_SmoothingSurfaceDlg.h @@ -0,0 +1,73 @@ +// Copyright (C) 2007-2008 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 +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#ifndef ADVANCEDGUI_SMOOTHINGSURFACEDLG_H +#define ADVANCEDGUI_SMOOTHINGSURFACEDLG_H + +#include +#include "GEOM_GenericObjPtr.h" + +#include + +class DlgRef_1Sel1Check; + +//================================================================================= +// class : AdvancedGUI_SmoothingSurfaceDlg +// purpose : +//================================================================================= +class AdvancedGUI_SmoothingSurfaceDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + AdvancedGUI_SmoothingSurfaceDlg( GeometryGUI*, QWidget* = 0 ); + ~AdvancedGUI_SmoothingSurfaceDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& ); + +private: + void Init(); + void enterEvent( QEvent* ); + void synchronize( QList& left, QList& right ); + +private: + DlgRef_1Sel1Check* GroupPoints; + QList myPoints; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void CheckButtonToggled(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + //void ValueChangedInSpinBox(); + //void SetDoubleSpinBoxStep( double ); +}; + +#endif // ADVANCEDGUI_SMOOTHINGSURFACEDLG_H diff --git a/src/AdvancedGUI/Makefile.am b/src/AdvancedGUI/Makefile.am index 1a1005aeb..4eccd642a 100644 --- a/src/AdvancedGUI/Makefile.am +++ b/src/AdvancedGUI/Makefile.am @@ -28,6 +28,7 @@ salomeinclude_HEADERS = \ ADVANCED_INCLUDES = ADVANCED_INCLUDES += AdvancedGUI_PipeTShapeDlg.h +ADVANCED_INCLUDES += AdvancedGUI_SmoothingSurfaceDlg.h ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@## salomeinclude_HEADERS += $(ADVANCED_INCLUDES) @@ -41,6 +42,7 @@ dist_libAdvancedGUI_la_SOURCES = \ ADVANCED_SOURCES = ADVANCED_SOURCES += AdvancedGUI_PipeTShapeDlg.h AdvancedGUI_PipeTShapeDlg.cxx +ADVANCED_SOURCES += AdvancedGUI_SmoothingSurfaceDlg.h AdvancedGUI_SmoothingSurfaceDlg.cxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@## dist_libAdvancedGUI_la_SOURCES += $(ADVANCED_SOURCES) @@ -49,6 +51,7 @@ MOC_FILES = ADVANCED_MOC_FILES = ADVANCED_MOC_FILES += AdvancedGUI_PipeTShapeDlg_moc.cxx +ADVANCED_MOC_FILES += AdvancedGUI_SmoothingSurfaceDlg_moc.cxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@## MOC_FILES += $(ADVANCED_MOC_FILES) @@ -80,4 +83,7 @@ libAdvancedGUI_la_CPPFLAGS = \ libAdvancedGUI_la_LDFLAGS = \ ../GEOMFiltersSelection/libGEOMFiltersSelection.la \ - ../GEOMBase/libGEOMBase.la + ../GEOMBase/libGEOMBase.la \ + ../GEOMGUI/libGEOM.la \ + $(CAS_LDFLAGS) -lTKGeomBase \ + $(GUI_LDFLAGS) -lsuit diff --git a/src/GEOMGUI/GEOM_images.ts b/src/GEOMGUI/GEOM_images.ts index 98439825d..928aeae89 100644 --- a/src/GEOMGUI/GEOM_images.ts +++ b/src/GEOMGUI/GEOM_images.ts @@ -1276,6 +1276,18 @@ pipetshapegroups.png --> + + ICON_DLG_SMOOTHINGSURFACE_POINTS_ISCLOSED + smoothingsurface_points_isclosed.png + + + ICO_SMOOTHINGSURFACE + smoothingsurface.png + + + ICON_OBJBROWSER_ADVANCED_202 + tree_smoothingsurface.png + diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 83b653889..32db576d2 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -5414,6 +5414,33 @@ Do you want to create new material? New L2 + + AdvancedGUI_SmoothingSurfaceDlg + + GEOM_SMOOTHINGSURFACE_TITLE + Smoothing surface Construction + + + GEOM_SMOOTHINGSURFACE + Smoothing surface + + + GEOM_SMOOTHINGSURFACE_RESULT + Result name + + + GEOM_SMOOTHINGSURFACE_ARG + Nodes + + + GEOM_SMOOTHINGSURFACE_ARG_POINTS + Points + + + GEOM_SMOOTHINGSURFACE_ARG_ISCLOSED + Build a closed surface + + GEOMToolsGUI_PublishDlg diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index d0a4c96da..7f7baab53 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -5414,6 +5414,33 @@ Voulez-vous en créer un nouveau ? Nouvelle L2 + + AdvancedGUI_SmoothingSurfaceDlg + + GEOM_SMOOTHINGSURFACE_TITLE + Constructions de surface lisse + + + GEOM_SMOOTHINGSURFACE + Surface lisse + + + GEOM_SMOOTHINGSURFACE_RESULT + Nom du résultat + + + GEOM_SMOOTHINGSURFACE_ARG + Noeuds + + + GEOM_SMOOTHINGSURFACE_ARG_POINTS + Points + + + GEOM_SMOOTHINGSURFACE_ARG_ISCLOSED + Cration d'une surface fermée + + GEOMToolsGUI_PublishDlg diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 918a9f316..bd2ffdd3b 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -566,6 +566,7 @@ void GeometryGUI::OnGUIEvent( int id ) case GEOMOp::OpAdvancedNoOp: // NO OPERATION (advanced operations base) case GEOMOp::OpPipeTShape: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE // case GEOMOp::OpPipeTShapeGroups: // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS + case GEOMOp::OpSmoothingSurface: // MENU NEW ENTITY - ADVANCED - SMOOTHINGSURFACE //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@// libName = "AdvancedGUI"; break; @@ -887,6 +888,7 @@ void GeometryGUI::initialize( CAM_Application* app ) "Geometry:Decrease number of isolines"); // createGeomAction( GEOMOp::OpPipeTShapeGroups, "PIPETSHAPEGROUPS" ); + createGeomAction( GEOMOp::OpSmoothingSurface, "SMOOTHINGSURFACE" ); //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@// // ---- create menus -------------------------- @@ -933,9 +935,10 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( GEOMOp::OpFilling, genId, -1 ); createMenu( GEOMOp::OpPipe, genId, -1 ); -// int advId = createMenu( tr( "MEN_ADVANCED" ), newEntId, -1 ); + int advId = createMenu( tr( "MEN_ADVANCED" ), newEntId, -1 ); // createMenu( GEOMOp::OpPipeTShape, advId, -1 ); // createMenu( GEOMOp::OpPipeTShapeGroups, advId, -1 ); + createMenu( GEOMOp::OpSmoothingSurface, advId, -1 ); //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@// createMenu( separator(), newEntId, -1 ); @@ -1191,6 +1194,8 @@ void GeometryGUI::initialize( CAM_Application* app ) createTool( GEOMOp::OpFeatureDetect, picturesTbId ); #endif + int advancedTbId = createTool( tr( "TOOL_ADVANCED" ) ); + createTool( GEOMOp::OpSmoothingSurface, advancedTbId ); //@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@ do not remove this line @@// // ---- create popup menus -------------------------- diff --git a/src/GEOMGUI/GeometryGUI_Operations.h b/src/GEOMGUI/GeometryGUI_Operations.h index 807643831..0aa1b2258 100644 --- a/src/GEOMGUI/GeometryGUI_Operations.h +++ b/src/GEOMGUI/GeometryGUI_Operations.h @@ -185,6 +185,7 @@ namespace GEOMOp { OpAdvancedNoOp = 10000, // NO OPERATION (advanced operations base) OpPipeTShape = 10001, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE // OpPipeTShapeGroups = 10002, // MENU NEW ENTITY - ADVANCED - PIPE TSHAPE GROUPS + OpSmoothingSurface = 10003, // MENU NEW ENTITY - ADVANCED - SMOOTHINGSURFACE //@@ insert new functions before this line @@ do not remove this line @@// }; } diff --git a/src/GEOMImpl/GEOMImpl_Gen.cxx b/src/GEOMImpl/GEOMImpl_Gen.cxx index 6fd6cb8dd..f6833d1a7 100644 --- a/src/GEOMImpl/GEOMImpl_Gen.cxx +++ b/src/GEOMImpl/GEOMImpl_Gen.cxx @@ -83,6 +83,7 @@ #include // Advanced operations #include +#include /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ //============================================================================= @@ -166,6 +167,7 @@ GEOMImpl_Gen::GEOMImpl_Gen() // Advanced operations TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeTShapeDriver::GetID(), new GEOMImpl_PipeTShapeDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SmoothingSurfaceDriver::GetID(), new GEOMImpl_SmoothingSurfaceDriver()); /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ SetEngine(this); diff --git a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx index 7c415bc08..c8029f023 100644 --- a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx @@ -45,6 +45,8 @@ #include "GEOMImpl_PipeTShapeDriver.hxx" #include "GEOMImpl_IPipeTShape.hxx" +#include +#include /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ #include @@ -2227,4 +2229,73 @@ GEOMImpl_IAdvancedOperations::MakePipeTShapeFilletWithPosition(double theR1, dou return aSeq; } +//============================================================================= +/*! + * Create a smoothing surface from a set of points + * \param thePoints list of points + * \param theisClosed Define if the created surface must be closed + * \return New GEOM_Object, containing the created shape. + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeSmoothingSurface (std::list thePoints, bool theisClosed) +{ + SetErrorCode(KO); + + //Add a new object + Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE); + + //Add a new shape function with parameters + Handle(GEOM_Function) aFunction = aShape->AddFunction(GEOMImpl_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_POINTS_ISCLOSED); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_SmoothingSurfaceDriver::GetID()) return NULL; + + GEOMImpl_ISmoothingSurface aData (aFunction); + + int aLen = thePoints.size(); + aData.SetLength(aLen); + int ind = 1; + std::list::iterator it = thePoints.begin(); + for (; it != thePoints.end(); it++, ind++) { + Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); + if (aRefPnt.IsNull()) { + SetErrorCode("NULL point for bSplineFaceShape"); + return NULL; + } + aData.SetPoint(ind, aRefPnt); + } + + aData.SetisClosed(theisClosed); + + //Compute the resulting value + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("SmoothingSurface driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + GEOM::TPythonDump pd (aFunction); + pd << aShape << " = geompy.MakeSmoothingSurface(["; + it = thePoints.begin(); + pd << (*it++); + while (it != thePoints.end()) { + pd << ", " << (*it++); + } + pd << "], " << theisClosed << ")"; + + SetErrorCode(OK); + + return aShape; +} /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ diff --git a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx index 6c0d3f677..ff95f8bba 100644 --- a/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IAdvancedOperations.hxx @@ -27,6 +27,8 @@ #include "GEOM_Engine.hxx" #include "GEOM_Object.hxx" +#include + class GEOMImpl_IBasicOperations; class GEOMImpl_IBooleanOperations; class GEOMImpl_IShapesOperations; @@ -109,6 +111,7 @@ public: Handle(GEOM_Object) P1 = 0, Handle(GEOM_Object) P2 = 0, Handle(GEOM_Object) P3 = 0); + Standard_EXPORT Handle(GEOM_Object) MakeSmoothingSurface (std::list thePoints, bool theisClosed); /*@@ insert new functions before this line @@ do not remove this line @@*/ }; #endif diff --git a/src/GEOMImpl/GEOMImpl_ISmoothingSurface.hxx b/src/GEOMImpl/GEOMImpl_ISmoothingSurface.hxx new file mode 100644 index 000000000..4683a973d --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ISmoothingSurface.hxx @@ -0,0 +1,49 @@ +// Copyright (C) 2007-2008 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 +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#ifndef _GEOMImpl_ISmoothingSurface_HXX_ +#define _GEOMImpl_ISmoothingSurface_HXX_ + +#include "GEOM_Function.hxx" + +#define SMOOTHINGSURFACE_ARG_LENG 1 +#define SMOOTHINGSURFACE_ARG_LAST 2 +#define SMOOTHINGSURFACE_ARG_ISCLOSED 3 + +class GEOMImpl_ISmoothingSurface +{ +public: + GEOMImpl_ISmoothingSurface(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetLength(int theLen) { _func->SetInteger(SMOOTHINGSURFACE_ARG_LENG, theLen); } + int GetLength() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_LENG); } + + void SetPoint(int theId, Handle(GEOM_Function) theP) { _func->SetReference(SMOOTHINGSURFACE_ARG_LAST + theId, theP); } + Handle(GEOM_Function) GetPoint(int theId) { return _func->GetReference(SMOOTHINGSURFACE_ARG_LAST + theId); } + + void SetisClosed(bool theisClosed) { _func->SetInteger(SMOOTHINGSURFACE_ARG_ISCLOSED, theisClosed); } + bool GetisClosed() { return _func->GetInteger(SMOOTHINGSURFACE_ARG_ISCLOSED); } + +private: + Handle(GEOM_Function) _func; +}; + +#endif // _GEOMImpl_ISmoothingSurface_HXX_ diff --git a/src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.cxx b/src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.cxx new file mode 100644 index 000000000..aa7e6361f --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.cxx @@ -0,0 +1,346 @@ +// Copyright (C) 2007-2008 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 +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#include + +#include +#include +#include +#include + +#include +#include + +//@@ include required header files here @@// +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_SmoothingSurfaceDriver::GetID() +{ + static Standard_GUID aGUID("1C3A0F3F-729D-4E83-8232-78E74FC5637C"); + return aGUID; +} + +//======================================================================= +//function : GEOMImpl_SmoothingSurfaceDriver +//purpose : +//======================================================================= +GEOMImpl_SmoothingSurfaceDriver::GEOMImpl_SmoothingSurfaceDriver() +{ +} + +//======================================================================= +//function : MakeSmoothingSurfaceUnClosed +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) 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(Geom_Plane) plane(gpbap.Plane()); + Standard_Real Umin, Umax, Vmin, Vmax; + gpbap.MinMaxBox(Umin,Umax,Vmin,Vmax); + cout << "Vals : " << Umin << ", " << Umax << ", " << Vmin << ", " << Vmax << endl; + BRepBuilderAPI_MakeFace mf(plane,Umin,Umax,Vmin,Vmax,Precision::Confusion()); + aInitShape = mf.Face(); + //return aInitShape; + + GeomPlate_BuildPlateSurface aBuilder(3,10); + // ** Initialization of surface + Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface(); + HSI->ChangeSurface().Initialize(aInitShape); + aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face())); + + Standard_Integer j, j1, j2; + cout << "Init surface" << endl; + j1 = myListOfPoints->Lower(); + j2 = myListOfPoints->Upper(); + for (j=j1; j<=j2 ; j++) + { + gp_Pnt aPnt = myListOfPoints->Value(j); + Handle(GeomPlate_PointConstraint) PCont = new GeomPlate_PointConstraint(aPnt,0); + aBuilder.Add(PCont); + } + cout << "avant Perform surface" << endl; + aBuilder.Perform(); + cout << "Perform surface" << endl; + + // 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()); + GeomPlate_MakeApprox Mapp(gpPlate,0.0001,nbcarreau,degmax,seuil); + cout << "Approx surface" << endl; + + Handle (Geom_Surface) Surf (Mapp.Surface()); + + aBuilder.Surface()->Bounds( Umin, Umax, Vmin, Vmax); + + BRepBuilderAPI_MakeFace MF(Surf,Umin, Umax, Vmin, Vmax, Precision::Confusion()); + TopoDS_Shape aShape = MF.Shape(); + + return aShape; +} + +//======================================================================= +//function : MakeSmoothingSurfaceClosed +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) 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(Geom_Plane) plane(gpbap.Plane()); + Standard_Real Umin, Umax, Vmin, Vmax; + gpbap.MinMaxBox(Umin,Umax,Vmin,Vmax); + cout << "Vals : " << Umin << ", " << Umax << ", " << Vmin << ", " << Vmax << endl; + BRepBuilderAPI_MakeFace mf(plane,Umin,Umax,Vmin,Vmax,Precision::Confusion()); + aInitShape = mf.Face(); + + // Retrieve normal and center of mass of the plane + gp_Pln aPln = plane->Pln(); + gp_Ax3 aAxisNormal = aPln.Position(); + gp_Dir N = aAxisNormal.Direction(); + Standard_Real xN = N.X(); + Standard_Real yN = N.Y(); + Standard_Real zN = N.Z(); + GProp_GProps aSystem; + BRepGProp::SurfaceProperties(aInitShape, aSystem); + gp_Pnt aCenterMass = aSystem.CentreOfMass(); + + // Splitting points + Standard_Integer j, j1, j2; + j1 = myListOfPoints->Lower(); + j2 = myListOfPoints->Upper(); + TColStd_Array1OfInteger ReparPoints(1, myListOfPoints->Length()); + Standard_Real eps = 0.0001; + for (j=j1; j<=j2 ; j++) + { + gp_Pnt aPnt = myListOfPoints->Value(j); + gp_Vec vec(aCenterMass,aPnt); + Standard_Real xVec = vec.X(); + Standard_Real yVec = vec.Y(); + Standard_Real zVec = vec.Z(); + + Standard_Real Scalar = xN*xVec+yN*yVec+zN*zVec; + if (Scalar > 0.) + { + ReparPoints(j) = 1; + } + else + { + ReparPoints(j) = 0; + } + } + + cout << "Init surface" << endl; + GeomPlate_BuildPlateSurface aBuilder(3,10); + GeomPlate_BuildPlateSurface aBuilder2(3,10); + // ** Initialization of surface + Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface(); + HSI->ChangeSurface().Initialize(aInitShape); + aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face())); + aBuilder2.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face())); + + for (j=j1; j<=j2 ; j++) + { + gp_Pnt aPnt = myListOfPoints->Value(j); + Handle(GeomPlate_PointConstraint) PCont = new GeomPlate_PointConstraint(aPnt,0); + if (ReparPoints(j) = 1) + { + aBuilder.Add(PCont); + } + else + { + aBuilder2.Add(PCont); + } + } + cout << "avant Perform surface" << endl; + aBuilder.Perform(); + cout << "Perform surface" << endl; + + // 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()); + GeomPlate_MakeApprox Mapp(gpPlate,0.0001,nbcarreau,degmax,seuil); + cout << "Approx surface" << endl; + + Handle (Geom_Surface) Surf (Mapp.Surface()); + + aBuilder.Surface()->Bounds( Umin, Umax, Vmin, Vmax); + + BRepBuilderAPI_MakeFace MF(Surf,Umin, Umax, Vmin, Vmax, Precision::Confusion()); + TopoDS_Shape aShapePartOne = MF.Shape(); + + // Recuperation de la curve + //return (aShape); + + //Modification A.D (Incka) + return (aShapePartOne); +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_SmoothingSurfaceDriver::Execute(TFunction_Logbook& log) const +{ + //double eps = 0.001; + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + if (aFunction.IsNull()) return 0; + + Standard_Integer aType = aFunction->GetType(); + cout << "Type : " << aType << endl; + + if (aType != SMOOTHINGSURFACE_POINTS_ISCLOSED) return 0; + cout << "Youhou : " << aType << endl; + + GEOMImpl_ISmoothingSurface aData (aFunction); + + bool isClosed = aData.GetisClosed(); + Standard_Integer nbPoints = aData.GetLength(); + + Handle(TColgp_HArray1OfPnt) anArrayofPnt = new TColgp_HArray1OfPnt(1,nbPoints); + for (int ind=1;ind<=nbPoints;ind++) + { + Handle(GEOM_Function) aPoint = aData.GetPoint(ind); + TopoDS_Shape aShapePnt = aPoint->GetValue(); + TopoDS_Vertex dsPoint; + dsPoint = TopoDS::Vertex( aShapePnt ); + gp_Pnt aPnt = BRep_Tool::Pnt( dsPoint ); + anArrayofPnt->SetValue(ind,aPnt); + } + + TopoDS_Shape aShape; + if (isClosed) + { + aShape = GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceClosed(anArrayofPnt); + } + else + { + aShape = GEOMImpl_SmoothingSurfaceDriver::MakeSmoothingSurfaceUnClosed(anArrayofPnt); + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + +//======================================================================= +//function : GEOMImpl_SmoothingSurfaceDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_SmoothingSurfaceDriver_Type_() +{ + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SmoothingSurfaceDriver", + sizeof(GEOMImpl_SmoothingSurfaceDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_SmoothingSurfaceDriver) Handle(GEOMImpl_SmoothingSurfaceDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_SmoothingSurfaceDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver))) { + _anOtherObject = Handle(GEOMImpl_SmoothingSurfaceDriver)((Handle(GEOMImpl_SmoothingSurfaceDriver)&)AnObject); + } + } + + return _anOtherObject; +} diff --git a/src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.hxx b/src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.hxx new file mode 100644 index 000000000..2d5fc858c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.hxx @@ -0,0 +1,135 @@ +// Copyright (C) 2007-2008 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 +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#ifndef _GEOMImpl_SmoothingSurfaceDriver_HXX +#define _GEOMImpl_SmoothingSurfaceDriver_HXX + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif +#include +#include + +class Handle_Standard_Type; +class GEOMImpl_SmoothingSurfaceDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver); + +class Handle(GEOMImpl_SmoothingSurfaceDriver) : public Handle(TFunction_Driver) { +public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_SmoothingSurfaceDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_SmoothingSurfaceDriver)(const Handle(GEOMImpl_SmoothingSurfaceDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + {} + + Handle(GEOMImpl_SmoothingSurfaceDriver)(const GEOMImpl_SmoothingSurfaceDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + {} + + Handle(GEOMImpl_SmoothingSurfaceDriver)& operator=(const Handle(GEOMImpl_SmoothingSurfaceDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_SmoothingSurfaceDriver)& operator=(const GEOMImpl_SmoothingSurfaceDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_SmoothingSurfaceDriver* operator->() + { + return (GEOMImpl_SmoothingSurfaceDriver *)ControlAccess(); + } + + GEOMImpl_SmoothingSurfaceDriver* operator->() const + { + return (GEOMImpl_SmoothingSurfaceDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_SmoothingSurfaceDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_SmoothingSurfaceDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +class GEOMImpl_SmoothingSurfaceDriver : public TFunction_Driver { +public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // + Standard_EXPORT GEOMImpl_SmoothingSurfaceDriver(); + Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; + Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} + Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const + { + return Standard_True; + } + Standard_EXPORT static const Standard_GUID& GetID(); + Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {}; + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SmoothingSurfaceDriver_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const + { + return STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver); + } + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const + { + return (STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver) == AType || TFunction_Driver::IsKind(AType)); + } +private: + TopoDS_Shape MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const; + TopoDS_Shape MakeSmoothingSurfaceClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const; + +}; + +#endif // _GEOMImpl_SmoothingSurfaceDriver_HXX diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx index a18cd853c..54d9070e7 100755 --- a/src/GEOMImpl/GEOMImpl_Types.hxx +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -329,9 +329,11 @@ // Advanced functions (base = 200) #define ADVANCED_BASE 200 // NO OPERATION (advanced operations base) #define GEOM_TSHAPE 201 +#define GEOM_SMOOTHINGSURFACE 202 /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ // Advanced functions sub-operations codes #define TSHAPE_BASIC 1 #define TSHAPE_CHAMFER 2 #define TSHAPE_FILLET 3 +#define SMOOTHINGSURFACE_POINTS_ISCLOSED 1 /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ diff --git a/src/GEOMImpl/Makefile.am b/src/GEOMImpl/Makefile.am index 5cb682251..f7266c48e 100644 --- a/src/GEOMImpl/Makefile.am +++ b/src/GEOMImpl/Makefile.am @@ -144,6 +144,7 @@ salomeinclude_HEADERS = \ ADVANCED_INCLUDES = ADVANCED_INCLUDES += GEOMImpl_IPipeTShape.hxx GEOMImpl_PipeTShapeDriver.hxx +ADVANCED_INCLUDES += GEOMImpl_ISmoothingSurface.hxx GEOMImpl_SmoothingSurfaceDriver.hxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@## salomeinclude_HEADERS += $(ADVANCED_INCLUDES) @@ -214,6 +215,7 @@ dist_libGEOMimpl_la_SOURCES = \ ADVANCED_SOURCES = ADVANCED_SOURCES += GEOMImpl_PipeTShapeDriver.cxx +ADVANCED_SOURCES += GEOMImpl_SmoothingSurfaceDriver.cxx ##@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@## dist_libGEOMimpl_la_SOURCES += $(ADVANCED_SOURCES) diff --git a/src/GEOM_I/GEOM_IAdvancedOperations_i.cc b/src/GEOM_I/GEOM_IAdvancedOperations_i.cc index 271c3cecb..f7dfbccf7 100644 --- a/src/GEOM_I/GEOM_IAdvancedOperations_i.cc +++ b/src/GEOM_I/GEOM_IAdvancedOperations_i.cc @@ -321,4 +321,37 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CO return aSeq._retn(); } +//============================================================================= +/*! + * Create a smoothing surface from a set of points + * \param thePoints list of points + * \param theisClosed Define if the created surface must be closed + * \return New GEOM_Object, containing the created shape. + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeSmoothingSurface (const GEOM::ListOfGO& thePoints, CORBA::Boolean theisClosed) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the reference point + int ind = 0; + int aLen = thePoints.length(); + std::list aPoints; + for (; ind < aLen; ind++) { + Handle(GEOM_Object) aPnt = GetObjectImpl(thePoints[ind]); + if (aPnt.IsNull()) return aGEOMObject._retn(); + aPoints.push_back(aPnt); + } + + //Create the SmoothingSurface + Handle(GEOM_Object) anObject = GetOperations()->MakeSmoothingSurface(aPoints, theisClosed); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + /*@@ insert new functions before this line @@ do not remove this line @@*/ diff --git a/src/GEOM_I/GEOM_IAdvancedOperations_i.hh b/src/GEOM_I/GEOM_IAdvancedOperations_i.hh index d0d3308c7..d05f787dd 100644 --- a/src/GEOM_I/GEOM_IAdvancedOperations_i.hh +++ b/src/GEOM_I/GEOM_IAdvancedOperations_i.hh @@ -63,6 +63,7 @@ class GEOM_I_EXPORT GEOM_IAdvancedOperations_i : CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Double theRF, CORBA::Boolean theHexMesh, GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); + GEOM::GEOM_Object_ptr MakeSmoothingSurface (const GEOM::ListOfGO& thePoints, CORBA::Boolean theisClosed); /*@@ insert new functions before this line @@ do not remove this line @@*/ ::GEOMImpl_IAdvancedOperations* GetOperations() diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index e29a8faa9..7d16df91f 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -3402,6 +3402,26 @@ GEOM::GEOM_List_ptr GEOM_Superv_i::MakePipeTShapeFilletWithPosition return aSeqPtr->_this(); } +//============================================================================= +// MakeSmoothingSurface +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSmoothingSurface (GEOM::GEOM_List_ptr thePoints, CORBA::Boolean theisClosed) +{ + beginService( " GEOM_Superv_i::MakeSmoothingSurface" ); + MESSAGE("GEOM_Superv_i::MakeSmoothingSurface"); + getAdvancedOp(); + //GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeSmoothingSurface(thePoints, theisClosed); + if (GEOM_List_i* aListImplP = + dynamic_cast*>(GetServant(thePoints, myPOA).in())) { + getCurvesOp(); + GEOM::GEOM_Object_ptr anObj = myAdvancedOp->MakeSmoothingSurface(aListImplP->GetList(), theisClosed); + endService( " GEOM_Superv_i::MakeSmoothingSurface" ); + return anObj; + } + endService( " GEOM_Superv_i::MakeSmoothingSurface" ); + return NULL; +} + /*@@ insert new functions before this line @@ do not remove this line @@*/ //===================================================================================== diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index 67ccd80dd..65a2a93ef 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -703,6 +703,7 @@ public: CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Double theRF, CORBA::Boolean theHexMesh, GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); + GEOM::GEOM_Object_ptr MakeSmoothingSurface (GEOM::GEOM_List_ptr thePoints, CORBA::Boolean theisClosed); /*@@ insert new functions before this line @@ do not remove this line @@*/ private: diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index b072e7c73..6ee2af802 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -8513,6 +8513,19 @@ class geompyDC(GEOM._objref_GEOM_Gen): if Parameters: anObj[0].SetParameters(Parameters) return anObj + ## Create a smoothing surface from a set of points + # @param thePoints list of points + # @param theisClosed Define if the created surface must be closed + # @return New GEOM_Object, containing the created shape. + # + # @ref tui_creation_smoothingsurface "Example" + def MakeSmoothingSurface(self, thePoints, theisClosed): + thePoints, theisClosed, Parameters = ParseParameters(thePoints, theisClosed) + anObj = self.AdvOp.MakeSmoothingSurface(thePoints, theisClosed) + RaiseIfFailed("MakeSmoothingSurface", self.AdvOp) + if Parameters: anObj.SetParameters(Parameters) + return anObj + #@@ insert new functions before this line @@ do not remove this line @@# # end of l4_advanced -- 2.39.2