mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-28 00:40:33 +05:00
remise en marche du plugin t_shape_fluid
This commit is contained in:
parent
5e3080a50e
commit
9c396f2059
@ -127,6 +127,7 @@ IF(SALOME_BUILD_GUI)
|
|||||||
|
|
||||||
# Qt4
|
# Qt4
|
||||||
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
|
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
|
||||||
|
FIND_PACKAGE(SalomePyQt4)
|
||||||
ENDIF(SALOME_BUILD_GUI)
|
ENDIF(SALOME_BUILD_GUI)
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -24,7 +24,7 @@ SET(SUBDIRS_COMMON
|
|||||||
ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM ShHealOper GEOMUtils XAO XAO_Swig
|
ARCHIMEDE BlockFix GEOMAlgo SKETCHER GEOM ShHealOper GEOMUtils XAO XAO_Swig
|
||||||
GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
|
GEOMImpl GEOM_I GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY
|
||||||
AdvancedEngine OCC2VTK
|
AdvancedEngine OCC2VTK
|
||||||
STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin VTKPlugin
|
STLPlugin BREPPlugin STEPPlugin IGESPlugin XAOPlugin VTKPlugin Tools
|
||||||
)
|
)
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -5350,7 +5350,7 @@ shells and solids on the other hand.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_PLUGINS_OTHER</source>
|
<source>GEOM_PLUGINS_OTHER</source>
|
||||||
<translation>Other</translation>
|
<translation>Python Plugins</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SHOW_ONLY_SELECTED</source>
|
<source>SHOW_ONLY_SELECTED</source>
|
||||||
|
@ -5342,7 +5342,7 @@ le paramètre '%1' aux préférences du module Géométrie.</translati
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_PLUGINS_OTHER</source>
|
<source>GEOM_PLUGINS_OTHER</source>
|
||||||
<translation>Autre</translation>
|
<translation>Plugins Python</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SHOW_ONLY_SELECTED</source>
|
<source>SHOW_ONLY_SELECTED</source>
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
import salome_pluginsmanager
|
import salome_pluginsmanager
|
||||||
|
|
||||||
def t_shape_fluid(context):
|
def t_shape_fluid(context):
|
||||||
import t_shape_builder
|
from t_shape import t_shape_builder
|
||||||
import t_shape_dialog
|
from t_shape import t_shape_dialog
|
||||||
import xalome
|
import xalome
|
||||||
from PyQt4.QtGui import QMessageBox
|
from PyQt4.QtGui import QMessageBox
|
||||||
activeStudy = context.study
|
activeStudy = context.study
|
||||||
|
@ -17,16 +17,28 @@
|
|||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
|
|
||||||
|
INCLUDE(UsePyQt4)
|
||||||
|
|
||||||
# --- scripts ---
|
# --- scripts ---
|
||||||
|
|
||||||
# scripts / static
|
# scripts / static
|
||||||
SET(plugin_SCRIPTS
|
SET(plugin_SCRIPTS
|
||||||
|
__init__.py
|
||||||
t_shape_builder.py
|
t_shape_builder.py
|
||||||
t_shape_dialog.py
|
t_shape_dialog.py
|
||||||
t_shape_dialog.ui
|
t_shape_dialog.ui
|
||||||
t_shape_dialog_ui.py
|
)
|
||||||
)
|
|
||||||
|
# uic files / to be processed by pyuic
|
||||||
|
SET(_pyuic_files
|
||||||
|
t_shape_dialog.ui
|
||||||
|
)
|
||||||
|
|
||||||
|
# scripts / pyuic wrappings
|
||||||
|
PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
|
||||||
|
|
||||||
|
|
||||||
# --- rules ---
|
# --- rules ---
|
||||||
|
|
||||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/t_shape)
|
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_GEOM_INSTALL_PLUGINS}/t_shape)
|
||||||
|
SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_GEOM_INSTALL_PLUGINS}/t_shape)
|
1
src/Tools/t_shape/__init__.py
Normal file
1
src/Tools/t_shape/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
@ -1,4 +1,4 @@
|
|||||||
# -*- coding: iso-8859-1 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import salome
|
import salome
|
||||||
|
@ -34,19 +34,23 @@ class TShapeDialog(QtGui.QDialog):
|
|||||||
self.ui.setupUi(self)
|
self.ui.setupUi(self)
|
||||||
self.show()
|
self.show()
|
||||||
self._wasOk = False
|
self._wasOk = False
|
||||||
self.ui.doubleSpinBox_5.setEnabled(False)
|
self.ui.dsb_solidThickness.setEnabled(False)
|
||||||
self.ui.label_5.setEnabled(False)
|
self.ui.label_5.setEnabled(False)
|
||||||
|
self.ui.dsb_bigRadius.setValue(50.0)
|
||||||
|
self.ui.dsb_smallRadius.setValue(40.0)
|
||||||
|
self.ui.dsb_bigHeight.setValue(80.0)
|
||||||
|
self.ui.dsb_smallHeight.setValue(80.0)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
self._wasOk = True
|
self._wasOk = True
|
||||||
QtGui.QDialog.accept(self)
|
QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
def getData(self):
|
def getData(self):
|
||||||
r1 = self.ui.doubleSpinBox.value()
|
r1 = self.ui.dsb_bigRadius.value()
|
||||||
r2 = self.ui.doubleSpinBox_2.value()
|
r2 = self.ui.dsb_smallRadius.value()
|
||||||
h1 = self.ui.doubleSpinBox_3.value()
|
h1 = self.ui.dsb_bigHeight.value()
|
||||||
h2 = self.ui.doubleSpinBox_4.value()
|
h2 = self.ui.dsb_smallHeight.value()
|
||||||
thickness = self.ui.doubleSpinBox_5.value()
|
thickness = self.ui.dsb_solidThickness.value()
|
||||||
|
|
||||||
return r1, r2, h1, h2, thickness
|
return r1, r2, h1, h2, thickness
|
||||||
|
|
||||||
|
@ -17,7 +17,17 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_2"/>
|
<widget class="QDoubleSpinBox" name="dsb_smallRadius">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>100000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>40.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
@ -27,13 +37,43 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_3"/>
|
<widget class="QDoubleSpinBox" name="dsb_bigHeight">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>80.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_4"/>
|
<widget class="QDoubleSpinBox" name="dsb_smallHeight">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>80.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBox"/>
|
<widget class="QDoubleSpinBox" name="dsb_bigRadius">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>100000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>50.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
@ -61,7 +101,7 @@
|
|||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="checkBox">
|
<widget class="QCheckBox" name="cb_buildSolid">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Build solid part</string>
|
<string>Build solid part</string>
|
||||||
</property>
|
</property>
|
||||||
@ -75,7 +115,17 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBox_5"/>
|
<widget class="QDoubleSpinBox" name="dsb_solidThickness">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1000000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>5.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -126,14 +176,14 @@
|
|||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>checkBox</sender>
|
<sender>cb_buildSolid</sender>
|
||||||
<signal>clicked(bool)</signal>
|
<signal>clicked(bool)</signal>
|
||||||
<receiver>label_5</receiver>
|
<receiver>label_5</receiver>
|
||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>89</x>
|
<x>99</x>
|
||||||
<y>184</y>
|
<y>170</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>107</x>
|
<x>107</x>
|
||||||
@ -142,14 +192,14 @@
|
|||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>checkBox</sender>
|
<sender>cb_buildSolid</sender>
|
||||||
<signal>clicked(bool)</signal>
|
<signal>clicked(bool)</signal>
|
||||||
<receiver>doubleSpinBox_5</receiver>
|
<receiver>dsb_solidThickness</receiver>
|
||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>140</x>
|
<x>150</x>
|
||||||
<y>178</y>
|
<y>170</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>277</x>
|
<x>277</x>
|
||||||
|
@ -1,103 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 't_shape_dialog.ui'
|
|
||||||
#
|
|
||||||
# Created: Tue Nov 4 16:52:09 2014
|
|
||||||
# by: PyQt4 UI code generator 4.9.6
|
|
||||||
#
|
|
||||||
# WARNING! All changes made in this file will be lost!
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
|
|
||||||
try:
|
|
||||||
_fromUtf8 = QtCore.QString.fromUtf8
|
|
||||||
except AttributeError:
|
|
||||||
def _fromUtf8(s):
|
|
||||||
return s
|
|
||||||
|
|
||||||
try:
|
|
||||||
_encoding = QtGui.QApplication.UnicodeUTF8
|
|
||||||
def _translate(context, text, disambig):
|
|
||||||
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
|
||||||
except AttributeError:
|
|
||||||
def _translate(context, text, disambig):
|
|
||||||
return QtGui.QApplication.translate(context, text, disambig)
|
|
||||||
|
|
||||||
class Ui_Dialog(object):
|
|
||||||
def setupUi(self, Dialog):
|
|
||||||
Dialog.setObjectName(_fromUtf8("Dialog"))
|
|
||||||
Dialog.resize(349, 283)
|
|
||||||
self.gridLayout_3 = QtGui.QGridLayout(Dialog)
|
|
||||||
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
|
|
||||||
self.gridLayout = QtGui.QGridLayout()
|
|
||||||
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
|
|
||||||
self.doubleSpinBox_2 = QtGui.QDoubleSpinBox(Dialog)
|
|
||||||
self.doubleSpinBox_2.setObjectName(_fromUtf8("doubleSpinBox_2"))
|
|
||||||
self.gridLayout.addWidget(self.doubleSpinBox_2, 2, 1, 1, 1)
|
|
||||||
self.label = QtGui.QLabel(Dialog)
|
|
||||||
self.label.setObjectName(_fromUtf8("label"))
|
|
||||||
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
|
|
||||||
self.doubleSpinBox_3 = QtGui.QDoubleSpinBox(Dialog)
|
|
||||||
self.doubleSpinBox_3.setObjectName(_fromUtf8("doubleSpinBox_3"))
|
|
||||||
self.gridLayout.addWidget(self.doubleSpinBox_3, 3, 1, 1, 1)
|
|
||||||
self.doubleSpinBox_4 = QtGui.QDoubleSpinBox(Dialog)
|
|
||||||
self.doubleSpinBox_4.setObjectName(_fromUtf8("doubleSpinBox_4"))
|
|
||||||
self.gridLayout.addWidget(self.doubleSpinBox_4, 4, 1, 1, 1)
|
|
||||||
self.doubleSpinBox = QtGui.QDoubleSpinBox(Dialog)
|
|
||||||
self.doubleSpinBox.setObjectName(_fromUtf8("doubleSpinBox"))
|
|
||||||
self.gridLayout.addWidget(self.doubleSpinBox, 0, 1, 1, 1)
|
|
||||||
self.label_3 = QtGui.QLabel(Dialog)
|
|
||||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
|
||||||
self.gridLayout.addWidget(self.label_3, 3, 0, 1, 1)
|
|
||||||
self.label_2 = QtGui.QLabel(Dialog)
|
|
||||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
|
||||||
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
|
|
||||||
self.label_4 = QtGui.QLabel(Dialog)
|
|
||||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
|
||||||
self.gridLayout.addWidget(self.label_4, 4, 0, 1, 1)
|
|
||||||
self.gridLayout_3.addLayout(self.gridLayout, 0, 0, 1, 1)
|
|
||||||
self.gridLayout_2 = QtGui.QGridLayout()
|
|
||||||
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
|
|
||||||
self.checkBox = QtGui.QCheckBox(Dialog)
|
|
||||||
self.checkBox.setObjectName(_fromUtf8("checkBox"))
|
|
||||||
self.gridLayout_2.addWidget(self.checkBox, 0, 0, 1, 1)
|
|
||||||
self.label_5 = QtGui.QLabel(Dialog)
|
|
||||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
|
||||||
self.gridLayout_2.addWidget(self.label_5, 1, 0, 1, 1)
|
|
||||||
self.doubleSpinBox_5 = QtGui.QDoubleSpinBox(Dialog)
|
|
||||||
self.doubleSpinBox_5.setObjectName(_fromUtf8("doubleSpinBox_5"))
|
|
||||||
self.gridLayout_2.addWidget(self.doubleSpinBox_5, 1, 1, 1, 1)
|
|
||||||
self.gridLayout_3.addLayout(self.gridLayout_2, 1, 0, 1, 1)
|
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
|
|
||||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
|
||||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
|
||||||
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
|
|
||||||
self.gridLayout_3.addWidget(self.buttonBox, 2, 0, 1, 1)
|
|
||||||
|
|
||||||
self.retranslateUi(Dialog)
|
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
|
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
|
|
||||||
QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.label_5.setEnabled)
|
|
||||||
QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.doubleSpinBox_5.setEnabled)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(Dialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, Dialog):
|
|
||||||
Dialog.setWindowTitle(_translate("Dialog", "Dialog", None))
|
|
||||||
self.label.setText(_translate("Dialog", "Big pipe radius", None))
|
|
||||||
self.label_3.setText(_translate("Dialog", "Big pipe height", None))
|
|
||||||
self.label_2.setText(_translate("Dialog", "Small pipe radius", None))
|
|
||||||
self.label_4.setText(_translate("Dialog", "Small pipe height", None))
|
|
||||||
self.checkBox.setText(_translate("Dialog", "Build solid part", None))
|
|
||||||
self.label_5.setText(_translate("Dialog", "Solid thickness", None))
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
import sys
|
|
||||||
app = QtGui.QApplication(sys.argv)
|
|
||||||
Dialog = QtGui.QDialog()
|
|
||||||
ui = Ui_Dialog()
|
|
||||||
ui.setupUi(Dialog)
|
|
||||||
Dialog.show()
|
|
||||||
sys.exit(app.exec_())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user