mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
Implement PAL7218: Sweep mesh elements along discretized curve
This commit is contained in:
parent
76e859fd8d
commit
e9962a2562
@ -88,6 +88,7 @@ LIB_SRC = SMESHGUI.cxx \
|
||||
SMESHGUI_SmoothingDlg.cxx \
|
||||
SMESHGUI_RenumberingDlg.cxx \
|
||||
SMESHGUI_ExtrusionDlg.cxx \
|
||||
SMESHGUI_ExtrusionAlongPathDlg.cxx \
|
||||
SMESHGUI_RevolutionDlg.cxx \
|
||||
SMESHGUI_RotationDlg.cxx \
|
||||
SMESHGUI_TranslationDlg.cxx \
|
||||
@ -138,6 +139,7 @@ LIB_MOC = \
|
||||
SMESHGUI_SmoothingDlg.h \
|
||||
SMESHGUI_RenumberingDlg.h \
|
||||
SMESHGUI_ExtrusionDlg.h \
|
||||
SMESHGUI_ExtrusionAlongPathDlg.h \
|
||||
SMESHGUI_RevolutionDlg.h \
|
||||
SMESHGUI_RotationDlg.h \
|
||||
SMESHGUI_TranslationDlg.h \
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "SMESHGUI_SmoothingDlg.h"
|
||||
#include "SMESHGUI_RenumberingDlg.h"
|
||||
#include "SMESHGUI_ExtrusionDlg.h"
|
||||
#include "SMESHGUI_ExtrusionAlongPathDlg.h"
|
||||
#include "SMESHGUI_RevolutionDlg.h"
|
||||
#include "SMESHGUI_TranslationDlg.h"
|
||||
#include "SMESHGUI_RotationDlg.h"
|
||||
@ -1449,6 +1450,21 @@ bool SMESHGUI::OnGUIEvent(int theCommandID, QAD_Desktop * parent)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 416: // Extrusion along a path
|
||||
{
|
||||
if(checkLock(aStudy)) break;
|
||||
if (myActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
|
||||
EmitSignalDeactivateDialog();
|
||||
SALOME_Selection *Sel = SALOME_Selection::Selection(myActiveStudy->getSelection());
|
||||
new SMESHGUI_ExtrusionAlongPathDlg(parent, Sel);
|
||||
}
|
||||
else {
|
||||
QAD_MessageBox::warn1(QAD_Application::getDesktop(),
|
||||
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"),
|
||||
tr("SMESH_BUT_OK"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 801: // CREATE GROUP
|
||||
{
|
||||
if(checkLock(aStudy)) break;
|
||||
|
1127
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
Normal file
1127
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
Normal file
File diff suppressed because it is too large
Load Diff
156
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
Normal file
156
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h
Normal file
@ -0,0 +1,156 @@
|
||||
// SMESH SMESHGUI : GUI for SMESH 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMESHGUI_ExtrusionAlongPathDlg.h
|
||||
// Author : Vadim SANDLER
|
||||
// Module : SMESH
|
||||
// $Header:
|
||||
|
||||
#ifndef DIALOGBOX_EXTRUSION_PATH_H
|
||||
#define DIALOGBOX_EXTRUSION_PATH_H
|
||||
|
||||
#include "SALOME_Selection.h"
|
||||
#include "SMESH_LogicalFilter.hxx"
|
||||
#include "SMESH_TypeFilter.hxx"
|
||||
// QT Includes
|
||||
#include <qdialog.h>
|
||||
|
||||
class QButtonGroup;
|
||||
class QRadioButton;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QToolButton;
|
||||
class QLineEdit;
|
||||
class QCheckBox;
|
||||
class QListBox;
|
||||
class QPushButton;
|
||||
class SMESHGUI_SpinBox;
|
||||
class SMESHGUI;
|
||||
class SMESH_Actor;
|
||||
|
||||
// IDL Headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||
|
||||
//=================================================================================
|
||||
// class : SMESHGUI_ExtrusionAlongPathDlg
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
class SMESHGUI_ExtrusionAlongPathDlg : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
class SetBusy {
|
||||
public:
|
||||
SetBusy( SMESHGUI_ExtrusionAlongPathDlg* _dlg ) { myDlg = _dlg; myDlg->myBusy = true; }
|
||||
~SetBusy() { myDlg->myBusy = false; }
|
||||
private:
|
||||
SMESHGUI_ExtrusionAlongPathDlg* myDlg;
|
||||
};
|
||||
friend class SetBusy;
|
||||
|
||||
public:
|
||||
SMESHGUI_ExtrusionAlongPathDlg( QWidget* parent = 0, SALOME_Selection* Sel = 0, bool modal = FALSE );
|
||||
~SMESHGUI_ExtrusionAlongPathDlg();
|
||||
|
||||
bool eventFilter( QObject* object, QEvent* event );
|
||||
|
||||
protected slots:
|
||||
void reject();
|
||||
|
||||
private:
|
||||
void Init( bool ResetControls = true ) ;
|
||||
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
|
||||
int GetConstructorId();
|
||||
void SetEditCurrentArgument( QToolButton* button );
|
||||
|
||||
SMESHGUI* mySMESHGUI ; /* Current SMESHGUI object */
|
||||
SALOME_Selection* mySelection ; /* User shape selection */
|
||||
QWidget* myEditCurrentArgument; /* Current argument */
|
||||
|
||||
bool myBusy;
|
||||
SMESH::SMESH_IDSource_var myIDSource;
|
||||
SMESH::SMESH_Mesh_var myMesh;
|
||||
SMESH_Actor* myMeshActor;
|
||||
SMESH::SMESH_Mesh_var myPathMesh;
|
||||
GEOM::GEOM_Object_var myPathShape;
|
||||
Handle(SMESH_LogicalFilter) myElementsFilter;
|
||||
Handle(SMESH_TypeFilter) myPathMeshFilter;
|
||||
int myType;
|
||||
|
||||
// widgets
|
||||
QButtonGroup* ElementsTypeGrp;
|
||||
QRadioButton* Elements1dRB;
|
||||
QRadioButton* Elements2dRB;
|
||||
QGroupBox* ArgumentsGrp;
|
||||
QLabel* ElementsLab;
|
||||
QToolButton* SelectElementsButton;
|
||||
QLineEdit* ElementsLineEdit;
|
||||
QCheckBox* MeshCheck;
|
||||
QGroupBox* PathGrp;
|
||||
QLabel* PathMeshLab;
|
||||
QToolButton* SelectPathMeshButton;
|
||||
QLineEdit* PathMeshLineEdit;
|
||||
QLabel* PathShapeLab;
|
||||
QToolButton* SelectPathShapeButton;
|
||||
QLineEdit* PathShapeLineEdit;
|
||||
QLabel* StartPointLab;
|
||||
QToolButton* SelectStartPointButton;
|
||||
QLineEdit* StartPointLineEdit;
|
||||
QCheckBox* AnglesCheck;
|
||||
QGroupBox* AnglesGrp;
|
||||
QListBox* AnglesList;
|
||||
QToolButton* AddAngleButton;
|
||||
QToolButton* RemoveAngleButton;
|
||||
SMESHGUI_SpinBox* AngleSpin;
|
||||
QCheckBox* BasePointCheck;
|
||||
QGroupBox* BasePointGrp;
|
||||
QToolButton* SelectBasePointButton;
|
||||
QLabel* XLab;
|
||||
SMESHGUI_SpinBox* XSpin;
|
||||
QLabel* YLab;
|
||||
SMESHGUI_SpinBox* YSpin;
|
||||
QLabel* ZLab;
|
||||
SMESHGUI_SpinBox* ZSpin;
|
||||
QGroupBox* ButtonsGrp;
|
||||
QPushButton* OkButton;
|
||||
QPushButton* ApplyButton;
|
||||
QPushButton* CloseButton;
|
||||
|
||||
private slots:
|
||||
void TypeChanged( int type );
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void SetEditCurrentArgument();
|
||||
void SelectionIntoArgument();
|
||||
void DeactivateActiveDialog();
|
||||
void ActivateThisDialog();
|
||||
void onTextChange(const QString&);
|
||||
void onSelectMesh();
|
||||
void onAnglesCheck();
|
||||
void onBasePointCheck();
|
||||
void OnAngleAdded();
|
||||
void OnAngleRemoved();
|
||||
};
|
||||
|
||||
#endif // DIALOGBOX_EXTRUSION_PATH_H
|
@ -44,16 +44,17 @@ public :
|
||||
SMESHGUI_SpinBox( QWidget* parent, const char* name = 0 ) ;
|
||||
~SMESHGUI_SpinBox() ;
|
||||
|
||||
void RangeStepAndValidator( double min = -1000000.0,
|
||||
double max = +1000000.0,
|
||||
double step = 100.0,
|
||||
unsigned short decimals = 3 ) ;
|
||||
void SetValue( double v ) ;
|
||||
double GetValue() ;
|
||||
QString GetString() ;
|
||||
void RangeStepAndValidator( double min = -1000000.0,
|
||||
double max = +1000000.0,
|
||||
double step = 100.0,
|
||||
unsigned short decimals = 3 ) ;
|
||||
void SetValue( double v ) ;
|
||||
double GetValue() ;
|
||||
QString GetString() ;
|
||||
QLineEdit* editor() { return QAD_SpinBoxDbl::editor(); }
|
||||
|
||||
public slots:
|
||||
void SetStep( double newStep );
|
||||
void SetStep( double newStep );
|
||||
|
||||
};
|
||||
#endif // SMESHSPINBOX_H
|
||||
|
@ -211,27 +211,12 @@ msgstr "pattern_sample_2d.png"
|
||||
msgid "ICON_PATTERN_SAMPLE_3D"
|
||||
msgstr "pattern_sample_3D.png"
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Add/Remove buttons
|
||||
#-----------------------------------------------------------
|
||||
|
||||
msgid "ICON_APPEND"
|
||||
msgstr "mesh_add.png"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
msgid "ICON_REMOVE"
|
||||
msgstr "mesh_remove.png"
|
@ -1432,7 +1432,6 @@ msgstr "Centroidal"
|
||||
msgid "SMESHGUI_ExtrusionDlg::EXTRUSION_ALONG_LINE"
|
||||
msgstr "Extrusion along a line"
|
||||
|
||||
|
||||
msgid "SMESHGUI_ExtrusionDlg::EXTRUSION_1D"
|
||||
msgstr "Extrusion of 1D elements"
|
||||
|
||||
@ -1441,6 +1440,41 @@ msgstr "Extrusion of 2D elements"
|
||||
|
||||
#----------------------------------------------------
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::EXTRUSION_ALONG_PATH"
|
||||
msgstr "Extrusion along a path"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::EXTRUSION_1D"
|
||||
msgstr "Extrusion of 1D elements"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::EXTRUSION_2D"
|
||||
msgstr "Extrusion of 2D elements"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_PATH"
|
||||
msgstr "Path"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_PATH_MESH"
|
||||
msgstr "Mesh"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_PATH_SHAPE"
|
||||
msgstr "Shape (edge or wire)"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_PATH_START"
|
||||
msgstr "Start point"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_USE_ANGLES"
|
||||
msgstr "Use Angles"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_ANGLES"
|
||||
msgstr "Angles"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_USE_BASE_POINT"
|
||||
msgstr "Use Base Point"
|
||||
|
||||
msgid "SMESHGUI_ExtrusionAlongPathDlg::SMESH_BASE_POINT"
|
||||
msgstr "Base Point"
|
||||
|
||||
#----------------------------------------------------
|
||||
|
||||
msgid "SMESHGUI_RevolutionDlg::REVOLUTION_AROUND_AXIS"
|
||||
msgstr "Revolution around an axis"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user