From: vtn Date: Mon, 4 Feb 2008 13:58:23 +0000 (+0000) Subject: NPAL16568: Added Approximation parameter in MakeFilling algorithm. X-Git-Tag: for_M2008_07022008~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ac24e7592ac5965df5aa639a9f8bd21feab562d;p=modules%2Fgeom.git NPAL16568: Added Approximation parameter in MakeFilling algorithm. --- diff --git a/doc/salome/gui/GEOM/images/filling.png b/doc/salome/gui/GEOM/images/filling.png index 418c22431..1fb29455c 100755 Binary files a/doc/salome/gui/GEOM/images/filling.png and b/doc/salome/gui/GEOM/images/filling.png differ diff --git a/doc/salome/gui/GEOM/input/creating_complex_obj.doc b/doc/salome/gui/GEOM/input/creating_complex_obj.doc index 23927a4a9..6edbfd9c5 100644 --- a/doc/salome/gui/GEOM/input/creating_complex_obj.doc +++ b/doc/salome/gui/GEOM/input/creating_complex_obj.doc @@ -5,8 +5,8 @@ -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_filling.doc b/doc/salome/gui/GEOM/input/creating_filling.doc index 25c99395a..82d446f2c 100644 --- a/doc/salome/gui/GEOM/input/creating_filling.doc +++ b/doc/salome/gui/GEOM/input/creating_filling.doc @@ -1,18 +1,20 @@ /*! -\page creaet_filling_page Filling Surface with Edges +\page create_filling_page Filling Surface with Edges To generate a \b Filling in the Main Menu select New Entity - > Generation - > Filling \n To create a curving face using several edges you need to define the Edges Compound, \b Minimum and Maximum Degree, \b -Tolerance for \b 2D and for \b 3D and the Number of Iterations. +Tolerance for \b 2D and for \b 3D , the Number of Iterations +and Approximation. \n The \b Result of the operation will be a GEOM_Object (face). -\n TUI Command: geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter) -\n Arguments: Name + 1 List of edges + 5 Parameters +\n TUI Command: geompy.MakeFilling(Edges, MinDegree, +MaxDegree, Tol2D, Tol3D, NbIter, isApprox) +\n Arguments: Name + 1 List of edges + 6 Parameters (Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D -tolerance, Number of iterations). +tolerance, Number of iterations, Approximation). \image html filling.png diff --git a/doc/salome/gui/GEOM/input/creating_geom_objects.doc b/doc/salome/gui/GEOM/input/creating_geom_objects.doc index bc66bed97..1c804ae71 100644 --- a/doc/salome/gui/GEOM/input/creating_geom_objects.doc +++ b/doc/salome/gui/GEOM/input/creating_geom_objects.doc @@ -28,7 +28,7 @@
  • \subpage work_with_groups_page
  • @@ -46,4 +46,4 @@ -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/index.doc b/doc/salome/gui/GEOM/input/index.doc index 3d2d5d102..45eb2ac65 100644 --- a/doc/salome/gui/GEOM/input/index.doc +++ b/doc/salome/gui/GEOM/input/index.doc @@ -32,7 +32,7 @@
  • \ref work_with_groups_page
  • @@ -134,4 +134,4 @@ -*/ \ No newline at end of file +*/ diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index ff1d4044a..de4600e27 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -902,7 +902,7 @@ module GEOM GEOM_Object MakeFilling (in GEOM_Object theShape, in long theMinDeg, in long theMaxDeg, in double theTol2D, in double theTol3D, - in long theNbIter); + in long theNbIter, in boolean theApprox); /*! * Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices. diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl index dcaecd95f..98d819daf 100644 --- a/idl/GEOM_Superv.idl +++ b/idl/GEOM_Superv.idl @@ -176,7 +176,7 @@ module GEOM GEOM_Object MakeFilling (in GEOM_Object theShape, in long theMinDeg, in long theMaxDeg, in double theTol2D, in double theTol3D, - in long theNbIter) ; + in long theNbIter, in boolean theApprox) ; GEOM_Object MakeThruSections(in ListOfGO theSeqSections, in boolean theModeSolid, in double thePreci, diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check.cxx b/src/DlgRef/DlgRef_1Sel5Spin1Check.cxx new file mode 100644 index 000000000..d683e9745 --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check.cxx @@ -0,0 +1,71 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 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 +// +// +// +// File : DlgRef_1Sel5Spin1Check.cxx +// Author : Vladimir TURIN +// Module : GEOM +// $Header: + +#include "DlgRef_1Sel5Spin1Check.h" + +#include +#include +#include + +/* + * Constructs a DlgRef_1Sel5Spin1Check which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +DlgRef_1Sel5Spin1Check::DlgRef_1Sel5Spin1Check(QWidget* parent, const char* name, WFlags fl) + :DlgRef_1Sel5Spin1Check_QTD(parent, name, fl) +{ + SpinBox1->close(TRUE); + SpinBox2->close(TRUE); + SpinBox3->close(TRUE); + SpinBox4->close(TRUE); + SpinBox5->close(TRUE); + + SpinBox_1 = new DlgRef_SpinBox(GroupBox1, "SpinBox_1"); + Layout2->addWidget(SpinBox_1, 0, 1); + + SpinBox_2 = new DlgRef_SpinBox(GroupBox1, "SpinBox_2"); + Layout2->addWidget(SpinBox_2, 0, 3); + + SpinBox_3 = new DlgRef_SpinBox(GroupBox1, "SpinBox_3"); + Layout2->addWidget(SpinBox_3, 2, 1); + + SpinBox_4 = new DlgRef_SpinBox(GroupBox1, "SpinBox_4"); + Layout2->addWidget(SpinBox_4, 1, 1); + + SpinBox_5 = new DlgRef_SpinBox(GroupBox1, "SpinBox_5"); + Layout2->addWidget(SpinBox_5, 1, 3); +} + + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check() +{ + // no need to delete child widgets, Qt does it all for us +} diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check.h b/src/DlgRef/DlgRef_1Sel5Spin1Check.h new file mode 100644 index 000000000..271839c42 --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check.h @@ -0,0 +1,53 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 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 +// +// +// +// File : DlgRef_1Sel5Spin1Check.h +// Author : Vladimir TURIN +// Module : GEOM +// $Header: + +#ifndef DLGREF_1SEL5SPIN_H +#define DLGREF_1SEL5SPIN_H + +#include "GEOM_DlgRef.hxx" + +#include "DlgRef_1Sel5Spin1Check_QTD.h" +#include "DlgRef_SpinBox.h" + +class GEOM_DLGREF_EXPORT DlgRef_1Sel5Spin1Check : public DlgRef_1Sel5Spin1Check_QTD +{ + Q_OBJECT + +public: + DlgRef_1Sel5Spin1Check( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_1Sel5Spin1Check(); + + DlgRef_SpinBox* SpinBox_1; + DlgRef_SpinBox* SpinBox_2; + DlgRef_SpinBox* SpinBox_3; + DlgRef_SpinBox* SpinBox_4; + DlgRef_SpinBox* SpinBox_5; + +}; + +#endif // DLGREF_1SEL5SPIN_H diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.cxx b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.cxx new file mode 100644 index 000000000..27857593a --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.cxx @@ -0,0 +1,150 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_1Sel5Spin1Check_QTD.ui' +** +** Created: Fri Feb 1 14:04:55 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#include "DlgRef_1Sel5Spin1Check_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_1Sel5Spin1Check_QTD as a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_1Sel5Spin1Check_QTD::DlgRef_1Sel5Spin1Check_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_1Sel5Spin1Check_QTD" ); + DlgRef_1Sel5Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_1Sel5Spin1Check_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 6 ); + GroupBox1->layout()->setMargin( 11 ); + GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + + Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + + Layout1->addWidget( TextLabel1, 0, 0 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + + Layout1->addWidget( PushButton1, 0, 1 ); + + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + + SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" ); + SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox2, 0, 3 ); + + SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" ); + SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox3, 2, 1 ); + + TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); + TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel5, 1, 0 ); + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel3, 0, 2 ); + + TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel4, 2, 0 ); + + SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" ); + SpinBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox4->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox4, 1, 1 ); + + SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); + SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox1, 0, 1 ); + + TextLabel6 = new QLabel( GroupBox1, "TextLabel6" ); + TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel6, 1, 2 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel2, 0, 0 ); + + SpinBox5 = new QSpinBox( GroupBox1, "SpinBox5" ); + SpinBox5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox5->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox5, 1, 3 ); + + CheckBox1 = new QCheckBox( GroupBox1, "CheckBox1" ); + + Layout2->addMultiCellWidget( CheckBox1, 2, 2, 2, 3 ); + + Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 ); + Spacer6 = new QSpacerItem( 0, 120, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( Spacer6, 2, 2 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + Layout1->addWidget( LineEdit1, 0, 2 ); + + GroupBox1Layout->addLayout( Layout1, 0, 0 ); + + DlgRef_1Sel5Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + languageChange(); + resize( QSize(162, 143).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_1Sel5Spin1Check_QTD::~DlgRef_1Sel5Spin1Check_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void DlgRef_1Sel5Spin1Check_QTD::languageChange() +{ + setCaption( tr( "DlgRef_1Sel5Spin1Check_QTD" ) ); + GroupBox1->setTitle( QString::null ); + TextLabel1->setText( tr( "TL1" ) ); + PushButton1->setText( QString::null ); + TextLabel5->setText( tr( "TL5" ) ); + TextLabel3->setText( tr( "TL3" ) ); + TextLabel4->setText( tr( "TL4" ) ); + TextLabel6->setText( tr( "TL6" ) ); + TextLabel2->setText( tr( "TL2" ) ); + CheckBox1->setText( QString::null ); +} + diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h new file mode 100644 index 000000000..0f7fbc84b --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h @@ -0,0 +1,63 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_1Sel5Spin1Check_QTD.ui' +** +** Created: Fri Feb 1 14:04:51 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#ifndef DLGREF_1SEL5SPIN1CHECK_QTD_H +#define DLGREF_1SEL5SPIN1CHECK_QTD_H + +#include +#include + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QSpacerItem; +class QGroupBox; +class QLabel; +class QPushButton; +class QSpinBox; +class QCheckBox; +class QLineEdit; + +class DlgRef_1Sel5Spin1Check_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_1Sel5Spin1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_1Sel5Spin1Check_QTD(); + + QGroupBox* GroupBox1; + QLabel* TextLabel1; + QPushButton* PushButton1; + QSpinBox* SpinBox2; + QSpinBox* SpinBox3; + QLabel* TextLabel5; + QLabel* TextLabel3; + QLabel* TextLabel4; + QSpinBox* SpinBox4; + QSpinBox* SpinBox1; + QLabel* TextLabel6; + QLabel* TextLabel2; + QSpinBox* SpinBox5; + QCheckBox* CheckBox1; + QLineEdit* LineEdit1; + +protected: + QGridLayout* DlgRef_1Sel5Spin1Check_QTDLayout; + QGridLayout* GroupBox1Layout; + QGridLayout* Layout1; + QSpacerItem* Spacer6; + QGridLayout* Layout2; + +protected slots: + virtual void languageChange(); + +}; + +#endif // DLGREF_1SEL5SPIN1CHECK_QTD_H diff --git a/src/DlgRef/Makefile.am b/src/DlgRef/Makefile.am index 4db37c6eb..960a9ad06 100644 --- a/src/DlgRef/Makefile.am +++ b/src/DlgRef/Makefile.am @@ -46,6 +46,7 @@ dist_libDlgRef_la_SOURCES = \ DlgRef_1Sel3Spin_QTD.cxx \ DlgRef_1Sel4Spin_QTD.cxx \ DlgRef_1Sel5Spin_QTD.cxx \ + DlgRef_1Sel5Spin1Check_QTD.cxx \ DlgRef_2Sel1Spin_QTD.cxx \ DlgRef_2Sel2Spin_QTD.cxx \ DlgRef_2Sel3Spin_QTD.cxx \ @@ -73,6 +74,7 @@ dist_libDlgRef_la_SOURCES = \ DlgRef_1Sel3Spin.cxx \ DlgRef_1Sel4Spin.cxx \ DlgRef_1Sel5Spin.cxx \ + DlgRef_1Sel5Spin1Check.cxx \ DlgRef_2Sel1Spin.cxx \ DlgRef_2Sel2Spin.cxx \ DlgRef_2Sel3Spin.cxx \ @@ -105,6 +107,7 @@ MOC_FILES = \ DlgRef_1Sel3Spin_QTD_moc.cxx \ DlgRef_1Sel4Spin_QTD_moc.cxx \ DlgRef_1Sel5Spin_QTD_moc.cxx \ + DlgRef_1Sel5Spin1Check_QTD_moc.cxx \ DlgRef_2Sel1Spin_QTD_moc.cxx \ DlgRef_2Sel2Spin_QTD_moc.cxx \ DlgRef_2Sel3Spin_QTD_moc.cxx \ @@ -132,6 +135,7 @@ MOC_FILES = \ DlgRef_1Sel3Spin_moc.cxx \ DlgRef_1Sel4Spin_moc.cxx \ DlgRef_1Sel5Spin_moc.cxx \ + DlgRef_1Sel5Spin1Check_moc.cxx \ DlgRef_2Sel1Spin_moc.cxx \ DlgRef_2Sel2Spin_moc.cxx \ DlgRef_2Sel3Spin_moc.cxx \ @@ -166,6 +170,7 @@ salomeinclude_HEADERS = \ DlgRef_1Sel3Spin_QTD.h \ DlgRef_1Sel4Spin_QTD.h \ DlgRef_1Sel5Spin_QTD.h \ + DlgRef_1Sel5Spin1Check_QTD.h \ DlgRef_2Sel1Spin_QTD.h \ DlgRef_2Sel2Spin_QTD.h \ DlgRef_2Sel3Spin_QTD.h \ @@ -193,6 +198,7 @@ salomeinclude_HEADERS = \ DlgRef_1Sel3Spin.h \ DlgRef_1Sel4Spin.h \ DlgRef_1Sel5Spin.h \ + DlgRef_1Sel5Spin1Check.h \ DlgRef_2Sel1Spin.h \ DlgRef_2Sel2Spin.h \ DlgRef_2Sel3Spin.h \ diff --git a/src/DlgRef/UIFiles/DlgRef_1Sel5Spin1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_1Sel5Spin1Check_QTD.ui new file mode 100644 index 000000000..155cbeca0 --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_1Sel5Spin1Check_QTD.ui @@ -0,0 +1,290 @@ + +DlgRef_1Sel5Spin1Check_QTD + + + DlgRef_1Sel5Spin1Check_QTD + + + + 0 + 0 + 162 + 143 + + + + DlgRef_1Sel5Spin1Check_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + SpinBox2 + + + + 7 + 0 + 0 + 0 + + + + + + SpinBox3 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel5 + + + + 0 + 0 + 0 + 0 + + + + TL5 + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + TextLabel4 + + + + 0 + 0 + 0 + 0 + + + + TL4 + + + + + SpinBox4 + + + + 7 + 0 + 0 + 0 + + + + + + SpinBox1 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel6 + + + + 0 + 0 + 0 + 0 + + + + TL6 + + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + SpinBox5 + + + + 7 + 0 + 0 + 0 + + + + + + CheckBox1 + + + + + + + + + + Spacer6 + + + Vertical + + + Expanding + + + + 0 + 120 + + + + + + LineEdit1 + + + + + + + + + + diff --git a/src/DlgRef/UIFiles/ui_to_cxx b/src/DlgRef/UIFiles/ui_to_cxx index d7a050dfd..60e5b024d 100755 --- a/src/DlgRef/UIFiles/ui_to_cxx +++ b/src/DlgRef/UIFiles/ui_to_cxx @@ -42,6 +42,9 @@ #uic -o DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui #uic -o DlgRef_1Sel5Spin_QTD.cxx -impl DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui +#uic -o DlgRef_1Sel5Spin1Check_QTD.h DlgRef_1Sel5Spin1Check_QTD.ui +#uic -o DlgRef_1Sel5Spin1Check_QTD.cxx -impl DlgRef_1Sel5Spin1Check_QTD.h DlgRef_1Sel5Spin1Check_QTD.ui + #uic -o DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui #uic -o DlgRef_1Sel1Check_QTD.cxx -impl DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui diff --git a/src/GEOM/GEOM_Gen_i.cc b/src/GEOM/GEOM_Gen_i.cc index 5e85a6195..f07429df9 100644 --- a/src/GEOM/GEOM_Gen_i.cc +++ b/src/GEOM/GEOM_Gen_i.cc @@ -3014,7 +3014,8 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape, CORBA::Short maxdeg, CORBA::Double tol3d, CORBA::Double tol2d, - CORBA::Short nbiter) + CORBA::Short nbiter, + CORBA::Boolean theApprox) throw (SALOME::SALOME_Exception) { Unexpect aCatch(SALOME_SalomeException); @@ -3053,7 +3054,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape, Handle(GeomFill_Line) Line = new GeomFill_Line(i) ; GeomFill_AppSurf App(mindeg, maxdeg, tol3d, tol2d, nbiter) ; /* user parameters */ - App.Perform(Line, Section) ; + App.Perform(Line, Section, theApprox) ; if (!App.IsDone()) { THROW_SALOME_CORBA_EXCEPTION("Filling aborted : non valid shape result", SALOME::BAD_PARAM); diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po index 7a4a29d8d..11e004ab0 100644 --- a/src/GEOMGUI/GEOM_msg_en.po +++ b/src/GEOMGUI/GEOM_msg_en.po @@ -1012,6 +1012,10 @@ msgstr "Tol. 3D :" msgid "GEOM_FILLING_NB_ITER" msgstr "Nb. Iter :" +#: GeometryGUI_FillingDlg.cxx:84 +msgid "GEOM_FILLING_APPROX" +msgstr "Approximation" + #: GeometryGUI_FuseDlg.cxx:48 msgid "GEOM_FUSE_TITLE" msgstr "BOOLEAN : Fuse Two Objects" diff --git a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx index f37a2176a..d17febfd2 100644 --- a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx @@ -88,6 +88,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const Standard_Real tol3d = IF.GetTol2D(); Standard_Real tol2d = IF.GetTol3D(); Standard_Integer nbiter = IF.GetNbIter(); + Standard_Boolean isApprox = IF.GetApprox(); if (mindeg > maxdeg) { Standard_RangeError::Raise("Minimal degree can not be more than maximal degree"); @@ -115,7 +116,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const Handle(GeomFill_Line) Line = new GeomFill_Line(i); GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */ - App.Perform(Line, Section); + App.Perform(Line, Section, isApprox); if (!App.IsDone()) return 0; Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots; diff --git a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx index 6eefda984..a1c554544 100644 --- a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx @@ -1110,7 +1110,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSolidShell (Handle(GEOM_Obje //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, - double theTol2D, double theTol3D, int theNbIter) + double theTol2D, double theTol3D, int theNbIter, bool isApprox) { SetErrorCode(KO); @@ -1138,6 +1138,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling aFI.SetTol2D(theTol2D); aFI.SetTol3D(theTol3D); aFI.SetNbIter(theNbIter); + aFI.SetApprox(isApprox); //Compute the Solid value try { @@ -1159,9 +1160,13 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling } //Make a Python command - GEOM::TPythonDump(aFunction) << aFilling << " = geompy.MakeFilling(" + GEOM::TPythonDump pd (aFunction); + pd << aFilling << " = geompy.MakeFilling(" << theShape << ", " << theMinDeg << ", " << theMaxDeg << ", " - << theTol2D << ", " << theTol3D << ", " << theNbIter << ")"; + << theTol2D << ", " << theTol3D << ", " << theNbIter; + if(isApprox) + pd << ", " << isApprox; + pd << ")"; SetErrorCode(OK); return aFilling; diff --git a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx index f87ddd5d5..5f1f52f36 100644 --- a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx @@ -83,7 +83,7 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations { Standard_EXPORT Handle(GEOM_Object) MakeSolidShell (Handle(GEOM_Object) theShell); - Standard_EXPORT Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter); + Standard_EXPORT Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter, bool isApprox); Standard_EXPORT Handle(GEOM_Object) MakeThruSections(const Handle(TColStd_HSequenceOfTransient)& theSeqSections, bool theModeSolid, diff --git a/src/GEOMImpl/GEOMImpl_IFilling.hxx b/src/GEOMImpl/GEOMImpl_IFilling.hxx index d4269bf19..f8fbae645 100644 --- a/src/GEOMImpl/GEOMImpl_IFilling.hxx +++ b/src/GEOMImpl/GEOMImpl_IFilling.hxx @@ -28,6 +28,7 @@ #define FILL_ARG_TOL3D 4 #define FILL_ARG_SHAPE 5 #define FILL_ARG_NBITER 6 +#define FILL_ARG_APPROX 7 class GEOMImpl_IFilling { @@ -47,6 +48,9 @@ class GEOMImpl_IFilling void SetNbIter(int theNbIter) { _func->SetInteger(FILL_ARG_NBITER, theNbIter); } int GetNbIter() { return _func->GetInteger(FILL_ARG_NBITER); } + void SetApprox(bool theApprox) { _func->SetInteger(FILL_ARG_APPROX, theApprox); } + bool GetApprox() { return _func->GetInteger(FILL_ARG_APPROX); } + void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(FILL_ARG_SHAPE, theShape); } Handle(GEOM_Function) GetShape() { return _func->GetReference(FILL_ARG_SHAPE); } diff --git a/src/GEOM_I/GEOM_I3DPrimOperations_i.cc b/src/GEOM_I/GEOM_I3DPrimOperations_i.cc index 207c99708..55160f0fb 100644 --- a/src/GEOM_I/GEOM_I3DPrimOperations_i.cc +++ b/src/GEOM_I/GEOM_I3DPrimOperations_i.cc @@ -567,7 +567,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_pt CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, - CORBA::Long theNbIter) + CORBA::Long theNbIter, + CORBA::Boolean theApprox) { GEOM::GEOM_Object_var aGEOMObject; @@ -583,7 +584,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_pt if (aShape.IsNull()) return aGEOMObject._retn(); //Create the Solid - Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter); + Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox); if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); diff --git a/src/GEOM_I/GEOM_I3DPrimOperations_i.hh b/src/GEOM_I/GEOM_I3DPrimOperations_i.hh index f0397e5e9..330f4974b 100644 --- a/src/GEOM_I/GEOM_I3DPrimOperations_i.hh +++ b/src/GEOM_I/GEOM_I3DPrimOperations_i.hh @@ -105,7 +105,7 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i : GEOM::GEOM_Object_ptr theAxis, CORBA::Double theAngle); - GEOM::GEOM_Object_ptr MakeFilling(GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, CORBA::Long theNbIter); + GEOM::GEOM_Object_ptr MakeFilling(GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, CORBA::Long theNbIter, CORBA::Boolean theApprox); GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections, CORBA::Boolean theModeSolid, diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index ba79c1791..520fbc2fe 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -1019,12 +1019,12 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Ob GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, - CORBA::Long theNbIter) + CORBA::Long theNbIter, CORBA::Boolean theApprox) { beginService( " GEOM_Superv_i::MakeFilling" ); MESSAGE("GEOM_Superv_i::MakeFilling"); get3DPrimOp(); - GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter); + GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox); endService( " GEOM_Superv_i::MakeFilling" ); return anObj; } diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index 18993469f..3cb1ffd25 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -237,7 +237,7 @@ public: GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, - CORBA::Long theNbIter); + CORBA::Long theNbIter, CORBA::Boolean theApprox); GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections, CORBA::Boolean theModeSolid, diff --git a/src/GEOM_SWIG/batchmode_geompy.py b/src/GEOM_SWIG/batchmode_geompy.py index 6485368cf..3ca8d022f 100644 --- a/src/GEOM_SWIG/batchmode_geompy.py +++ b/src/GEOM_SWIG/batchmode_geompy.py @@ -700,8 +700,8 @@ def MakeCopy(aShape): print "MakeCopy : ", InsertOp.GetErrorCode() return anObj -def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter): - anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter) +def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox=0): + anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox) if PrimOp.IsDone() == 0: print "MakeFilling : ", PrimOp.GetErrorCode() return anObj diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index 415ff983b..2f37c4e86 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -1379,8 +1379,8 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @return New GEOM_Object, containing the created filling surface. # # Example: see GEOM_TestAll.py - def MakeFilling(self,theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter): - anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter) + def MakeFilling(self,theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox=0): + anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox) RaiseIfFailed("MakeFilling", self.PrimOp) return anObj diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 64d13f3e7..9f6bc2c60 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -46,6 +46,7 @@ #include "GEOMImpl_Types.hxx" #include +#include #include "utilities.h" @@ -72,7 +73,7 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_1Sel5Spin(this, "GroupPoints"); + GroupPoints = new DlgRef_1Sel5Spin1Check(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupPoints->TextLabel1->setText(tr("GEOM_FILLING_COMPOUND")); GroupPoints->TextLabel2->setText(tr("GEOM_FILLING_MIN_DEG")); @@ -80,13 +81,14 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(GeometryGUI* theGeometryGUI, GroupPoints->TextLabel4->setText(tr("GEOM_FILLING_NB_ITER")); GroupPoints->TextLabel5->setText(tr("GEOM_FILLING_MAX_DEG")); GroupPoints->TextLabel6->setText(tr("GEOM_FILLING_TOL_3D")); + GroupPoints->CheckBox1->setText(tr("GEOM_FILLING_APPROX")); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->LineEdit1->setReadOnly( true ); Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ - setHelpFileName("creaet_filling_page.html"); + setHelpFileName("create_filling_page.html"); /* Initialisations */ Init(); @@ -116,6 +118,7 @@ void GenerationGUI_FillingDlg::Init() myTol3D = 0.0001; myTol2D = 0.0001; myNbIter = 5; + myIsApprox = false; myOkCompound = false; globalSelection( GEOM_COMPOUND ); @@ -147,6 +150,7 @@ void GenerationGUI_FillingDlg::Init() connect(GroupPoints->SpinBox_3, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupPoints->SpinBox_4, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupPoints->SpinBox_5, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->CheckBox1, SIGNAL(stateChanged(int)), this, SLOT(ApproxChanged())); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_1, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_2, SLOT(SetStep(double))); @@ -309,6 +313,16 @@ void GenerationGUI_FillingDlg::ValueChangedInSpinBox(double newValue) displayPreview(); } +//================================================================================= +// function : ApproxChanged() +// purpose : +//================================================================================= +void GenerationGUI_FillingDlg::ApproxChanged() +{ + myIsApprox = GroupPoints->CheckBox1->isChecked(); + displayPreview(); +} + //================================================================================= // function : createOperation // purpose : @@ -336,7 +350,7 @@ bool GenerationGUI_FillingDlg::execute( ObjectList& objects ) GEOM::GEOM_Object_var anObj; anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation() )->MakeFilling( - myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter ); + myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter, myIsApprox ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.h b/src/GenerationGUI/GenerationGUI_FillingDlg.h index e4691b97e..67d70b837 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.h +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.h @@ -31,7 +31,7 @@ #include "GenerationGUI.h" #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel5Spin.h" +#include "DlgRef_1Sel5Spin1Check.h" //================================================================================= // class : GenerationGUI_FillingDlg @@ -62,9 +62,10 @@ private: Standard_Real myTol3D; Standard_Real myTol2D; Standard_Integer myNbIter; + bool myIsApprox; bool myOkCompound; /* to check when curv. compound is defined */ - DlgRef_1Sel5Spin* GroupPoints; + DlgRef_1Sel5Spin1Check* GroupPoints; private slots: void ClickOnOk(); @@ -74,6 +75,7 @@ private slots: void SelectionIntoArgument(); void SetEditCurrentArgument(); void ValueChangedInSpinBox(double newValue); + void ApproxChanged(); }; #endif // DIALOGBOX_FILLING_H