mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-29 02:40:36 +05:00
some cleaning
This commit is contained in:
parent
54a9a7984f
commit
a71898b2c0
@ -36,7 +36,7 @@ def t_shape_fluid(context):
|
||||
dialog.exec_()
|
||||
if dialog.wasOk():
|
||||
r1, r2, h1, h2 = dialog.getData()
|
||||
QMessageBox.about(None, "Building in progress", "building shape, please be patient")
|
||||
#QMessageBox.about(None, "Building in progress", "building shape, please be patient")
|
||||
shape = t_shape_builder.build_shape(activeStudy, r1, r2, h1, h2)
|
||||
entry = xalome.addToStudy(activeStudy, shape, "T_shape_fluid" )
|
||||
xalome.displayShape(entry)
|
||||
|
@ -103,9 +103,6 @@ def build_shape(study, r1, r2, h1, h2):
|
||||
v1, l1, arc1, part1 = demidisk(study, r1, a1)
|
||||
v2, l2, arc2, part2 = demidisk(study, r2, a1, 90.0)
|
||||
|
||||
geompy.addToStudy(part1, 'part1')
|
||||
geompy.addToStudy(part2, 'part2')
|
||||
|
||||
# --- extrusion des sections --> demi cylindres de travail, pour en extraire les sections utilisées au niveau du Té
|
||||
# et enveloppe cylindrique du cylindre principal
|
||||
|
||||
@ -113,10 +110,6 @@ def build_shape(study, r1, r2, h1, h2):
|
||||
demicyl2 = geompy.MakePrismVecH(part2, OZ, h2)
|
||||
arcextru = geompy.MakePrismVecH(arc1, OX, h1)
|
||||
|
||||
geompy.addToStudy(demicyl1, 'demicyl1')
|
||||
geompy.addToStudy(demicyl2, 'demicyl2')
|
||||
geompy.addToStudy(arcextru, 'arcextru')
|
||||
|
||||
# --- plan de coupe à 45° sur le cylindre principal,
|
||||
# section à 45° du cylndre principal,
|
||||
# section du cylindre secondaire par l'enveloppe cylindique du cylindre principal
|
||||
@ -240,25 +233,21 @@ def build_shape(study, r1, r2, h1, h2):
|
||||
# --- extrusion droite des faces de jonction, pour reconstituer les demi cylindres
|
||||
|
||||
extru1 = geompy.MakePrismVecH(sect45, OX, h1+10)
|
||||
geompy.addToStudy(extru1, "extru1")
|
||||
|
||||
base2 = geompy.MakePartition(faci[5:], [], [], [], geompy.ShapeType["FACE"], 0, [], 0, True)
|
||||
extru2 = geompy.MakePrismVecH(base2, OZ, h2)
|
||||
geompy.addToStudy(extru2, "extru2")
|
||||
|
||||
# --- partition et coupe
|
||||
|
||||
demiDisque = geompy.MakeFaceWires([arc1, l1[0]], 1)
|
||||
demiCylindre = geompy.MakePrismVecH(demiDisque, OX, h1)
|
||||
#geompy.addToStudy(demiCylindre, "demiCylindre")
|
||||
|
||||
box = geompy.MakeBox(0, -2*(r1+h1), -2*(r1+h1), 2*(r1+h1), 2*(r1+h1), 2*(r1+h1))
|
||||
rot = geompy.MakeRotation(box, OY, 45*math.pi/180.0)
|
||||
#geompy.addToStudy(rot, "rot")
|
||||
|
||||
garder = geompy.MakeCutList(demiCylindre, [extru2, rot], True)
|
||||
geompy.addToStudy(garder, "garder")
|
||||
raccord = geompy.MakePartition([garder], faci, [], [], geompy.ShapeType["SOLID"], 0, [], 0, True)
|
||||
assemblage = geompy.MakePartition([raccord, extru1, extru2], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0, True)
|
||||
geompy.addToStudy(assemblage, "assemblage")
|
||||
|
||||
box = geompy.MakeBox(-1, -(r1+r2), -1, h1, r1+r2, h2)
|
||||
geompy.addToStudy(box, "box")
|
||||
|
@ -36,7 +36,6 @@ class TShapeDialog(QtGui.QDialog):
|
||||
self._wasOk = False
|
||||
|
||||
def accept(self):
|
||||
print "DATA ACCEPTED"
|
||||
self._wasOk = True
|
||||
QtGui.QDialog.accept(self)
|
||||
|
||||
@ -47,25 +46,6 @@ class TShapeDialog(QtGui.QDialog):
|
||||
h2 = self.ui.doubleSpinBox_4.value()
|
||||
|
||||
return r1, r2, h1, h2
|
||||
|
||||
#def setupUi(self):
|
||||
#TShapeDialog_UI.setupUi(self)
|
||||
#self.handleAcceptWith(self.accept)
|
||||
#self.handleRejectWith(self.reject)
|
||||
|
||||
#def handleAcceptWith(self,callbackFunction):
|
||||
#"""This defines the function to be connected to the signal 'accepted()' (click on Ok)"""
|
||||
#QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), callbackFunction)
|
||||
|
||||
#def handleRejectWith(self,callbackFunction):
|
||||
#"""This defines the function to be connected to the signal 'rejected()' (click on Cancel)"""
|
||||
#QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), callbackFunction)
|
||||
|
||||
#def accept(self):
|
||||
#'''Callback function when dialog is accepted (click Ok)'''
|
||||
#self._wasOk = True
|
||||
## We should test here the validity of values
|
||||
#QtGui.QDialog.accept(self)
|
||||
|
||||
def reject(self):
|
||||
self._wasOk = False
|
||||
@ -74,11 +54,6 @@ class TShapeDialog(QtGui.QDialog):
|
||||
def wasOk(self):
|
||||
return self._wasOk
|
||||
|
||||
#def setData(self):
|
||||
#pass
|
||||
|
||||
#def getData(self):
|
||||
#pass
|
||||
|
||||
# ================
|
||||
# Tests
|
||||
|
Loading…
Reference in New Issue
Block a user