diff options
author | deepa-chaudhari | 2015-06-06 21:32:56 +0530 |
---|---|---|
committer | deepa-chaudhari | 2015-06-06 21:32:56 +0530 |
commit | f6743a741b3ebec50494a6d3b0712cd90c0ff5de (patch) | |
tree | b9af68ce5b758b51c0f63868d868002f04ba0f49 | |
parent | 206483b5243a70967c45c8add26961b9ac7db3eb (diff) | |
download | OsdagLive-f6743a741b3ebec50494a6d3b0712cd90c0ff5de.tar.gz OsdagLive-f6743a741b3ebec50494a6d3b0712cd90c0ff5de.tar.bz2 OsdagLive-f6743a741b3ebec50494a6d3b0712cd90c0ff5de.zip |
platethicknesspopupmethosd implemented
-rw-r--r-- | Connections/Shear/Finplate/colWebBeamWebConnectivity.py | 4 | ||||
-rw-r--r-- | Connections/Shear/Finplate/fin.log | 12 | ||||
-rw-r--r-- | Connections/Shear/Finplate/finPlate.ui | 47 | ||||
-rw-r--r-- | Connections/Shear/Finplate/finPlateMain.py | 82 | ||||
-rw-r--r-- | Connections/Shear/Finplate/model.py | 2 | ||||
-rw-r--r-- | Connections/Shear/Finplate/saveINPUT.txt | 15 | ||||
-rw-r--r-- | Connections/Shear/Finplate/ui_finPlate.py | 22 |
7 files changed, 153 insertions, 31 deletions
diff --git a/Connections/Shear/Finplate/colWebBeamWebConnectivity.py b/Connections/Shear/Finplate/colWebBeamWebConnectivity.py index c448092..f8c55e4 100644 --- a/Connections/Shear/Finplate/colWebBeamWebConnectivity.py +++ b/Connections/Shear/Finplate/colWebBeamWebConnectivity.py @@ -10,6 +10,8 @@ from bolt import Bolt from nut import Nut import copy +from OCC.BRepPrimAPI import BRepPrimAPI_MakeSphere +from OCC.gp import gp_Pnt class ColWebBeamWeb(object): def __init__(self,column,beam,Fweld,plate,boltRadius,nutRadius,boltPlaceObj): @@ -82,6 +84,7 @@ class ColWebBeamWeb(object): self.beam.t/2.0 * (-self.beam.uDir)+ self.plate.T/2.0 * (-self.beam.uDir)) #origin4 = self.column.secOrigin + self.weld.T * self.weld.wDir + self.plate.place(plateOrigin, uDir4, wDir4) # # Weld @@ -142,6 +145,7 @@ class ColWebBeamWeb(object): nut3.place(nut_Origin3, uDir5, wDir5) self.nuts = [nut1,nut2,nut3] + # Call for createModel self.columnModel = self.column.createModel() self.beamModel = self.beam.createModel() diff --git a/Connections/Shear/Finplate/fin.log b/Connections/Shear/Finplate/fin.log index d2e8b78..4b2cf8a 100644 --- a/Connections/Shear/Finplate/fin.log +++ b/Connections/Shear/Finplate/fin.log @@ -1 +1,13 @@ <link rel="stylesheet" type="text/css" href="log.css"/> + + <div class="LOG ERROR"> + <span class="DATE">Sat, 06 Jun 2015 21:30:26</span> + <span class="LEVEL">ERROR</span> + <span class="MSG">: Plate width provided is less than the minimum required</span> + </div> + + <div class="LOG WARNING"> + <span class="DATE">Sat, 06 Jun 2015 21:30:26</span> + <span class="LEVEL">WARNING</span> + <span class="MSG">: Minimum plate width required is 100.00 mm </span> + </div> diff --git a/Connections/Shear/Finplate/finPlate.ui b/Connections/Shear/Finplate/finPlate.ui index c134c07..94561db 100644 --- a/Connections/Shear/Finplate/finPlate.ui +++ b/Connections/Shear/Finplate/finPlate.ui @@ -1258,11 +1258,56 @@ <string notr="true">QComboBox { combobox-popup: 0; }</string> </property> <property name="currentIndex"> - <number>-1</number> + <number>0</number> </property> <property name="maxVisibleItems"> <number>5</number> </property> + <item> + <property name="text"> + <string>Select plate thickness</string> + </property> + </item> + <item> + <property name="text"> + <string>6</string> + </property> + </item> + <item> + <property name="text"> + <string>8</string> + </property> + </item> + <item> + <property name="text"> + <string>10</string> + </property> + </item> + <item> + <property name="text"> + <string>12</string> + </property> + </item> + <item> + <property name="text"> + <string>14</string> + </property> + </item> + <item> + <property name="text"> + <string>16</string> + </property> + </item> + <item> + <property name="text"> + <string>18</string> + </property> + </item> + <item> + <property name="text"> + <string>20</string> + </property> + </item> </widget> <widget class="QLabel" name="label_42"> <property name="geometry"> diff --git a/Connections/Shear/Finplate/finPlateMain.py b/Connections/Shear/Finplate/finPlateMain.py index a9398d8..3887a2b 100644 --- a/Connections/Shear/Finplate/finPlateMain.py +++ b/Connections/Shear/Finplate/finPlateMain.py @@ -42,6 +42,7 @@ from colWebBeamWebConnectivity import ColWebBeamWeb from colFlangeBeamWebConnectivity import ColFlangeBeamWeb from OCC import IGESControl from filletweld import FilletWeld +from ModelUtils import * class MainController(QtGui.QMainWindow): @@ -59,6 +60,8 @@ class MainController(QtGui.QMainWindow): self.ui.comboType.currentIndexChanged[str].connect(self.combotype_currentindexchanged) self.ui.comboType.setCurrentIndex(0) + + self.ui.comboConnLoc.currentIndexChanged[str].connect(self.setimage_connection) self.ui.btn_Reset.clicked.connect(self.resetbtn_clicked) @@ -98,6 +101,9 @@ class MainController(QtGui.QMainWindow): self.ui.combo_Beam.addItems(get_beamcombolist()) self.ui.comboColSec.addItems(get_columncombolist()) + self.ui.combo_Beam.currentIndexChanged[str].connect(self.populatePlateThickCombo) + #beam_sec = self.ui.combo_Beam.currentText() + #self.populatePlateThickCombo(beam_sec) self.ui.menuView.addAction(self.ui.inputDock.toggleViewAction()) self.ui.menuView.addAction(self.ui.outputDock.toggleViewAction()) @@ -127,31 +133,31 @@ class MainController(QtGui.QMainWindow): #my_sphere = BRepPrimAPI_MakeSphere(5).Shape() self.fuse_model = self.create2Dcad() #self.fuse_model = my_sphere - self.validatePlateThickCombo() + #self.closeEvent() - def validatePlateThickCombo(self): - - beam_sec = self.ui.combo_Beam.currentText() - dictbeamdata = get_beamdata(beam_sec) + def populatePlateThickCombo(self): + dictbeamdata = self.fetchBeamPara() +# beam_sec = self.ui.combo_Beam.currentText() +# dictbeamdata = get_beamdata(beam_sec) beam_tw = float(dictbeamdata[QString("tw")]) - plateThickness = ['select Thickness',6,8,10,12,14,16,18,20] - newlist = ['Select Thickness'] + #comboPlateItems = [str(self.ui.comboPlateThick_2.itemText(i)) for i in range(self.ui.comboPlateThick_2.count())] + plateThickness = [6,8,10,12,14,16,18,20] + newlist = [] #comboPlateThickItenewlist = [] - for item in plateThickness[1:]: + for ele in plateThickness[:]: + item = int(ele) if item >= beam_tw: newlist.append(str(item)) print newlist - + self.ui.comboPlateThick_2.clear() for i in newlist[:]: self.ui.comboPlateThick_2.addItem(str(i)) - #self.ui.comboPlateThick_2.setCurrentIndex(0) + self.ui.comboPlateThick_2.setCurrentIndex(0) - - def saveTopng(self,display): display.ExportToImage('/home/Pictures/cad.png') @@ -256,7 +262,7 @@ class MainController(QtGui.QMainWindow): '''(Dictionary)--> None ''' - return + inputFile = QtCore.QFile('saveINPUT.txt') if not inputFile.open(QtCore.QFile.WriteOnly | QtCore.QFile.Text): QtGui.QMessageBox.warning(self, "Application", @@ -636,25 +642,58 @@ class MainController(QtGui.QMainWindow): self.display.EraseAll() osdagDisplayShape(self.display, cadlist[0], update=True) osdagDisplayShape(self.display, cadlist[1],material = Graphic3d_NOT_2D_ALUMINUM, update=True) - osdagDisplayShape(self.display,cadlist[2],color = 'red', update = True) - osdagDisplayShape(self.display,cadlist[3],color = 'red', update = True) + #osdagDisplayShape(self.display,cadlist[2],color = 'red', update = True) + #osdagDisplayShape(self.display,cadlist[3],color = 'red', update = True) osdagDisplayShape(self.display, cadlist[4], color = 'blue', update = True) self.display.DisplayShape(cadlist[5:8],color = Quantity_NOC_SADDLEBROWN, update=True) self.display.DisplayShape(cadlist[8:11],color = Quantity_NOC_SADDLEBROWN, update = True) - + #osdagDisplayShape(self.display, cadlist[11], update = True) else: pass start_display() - + def fetchBeamPara(self): + beam_sec = self.ui.combo_Beam.currentText() + dictbeamdata = get_beamdata(beam_sec) + return dictbeamdata + def fetchColumnPara(self): + column_sec = self.ui.comboColSec.currentText() + dictcoldata = get_columndata(column_sec) + return dictcoldata def create3DColWebBeamWeb(self): ''' creating 3d cad model with column web beam web ''' + dictbeamdata = self.fetchBeamPara() + + beam_D = int(dictbeamdata[QString("D")]) + beam_B = int(dictbeamdata[QString("B")]) + beam_tw = float(dictbeamdata[QString("tw")]) + beam_T = float(dictbeamdata[QString("T")]) + beam_alpha = float(dictbeamdata[QString("FlangeSlope")]) + beam_R1 = float(dictbeamdata[QString("R1")]) + beam_R2 = float(dictbeamdata[QString("R2")]) + + #beam = ISection(B = 140, T = 16,D = 400,t = 8.9, R1 = 14, R2 = 7, alpha = 98,length = 500) + beam = ISection(B = beam_B, T = beam_T,D = beam_D,t = beam_tw, + R1 = beam_R1, R2 = beam_R2, alpha = beam_alpha,length = 500) + + ##### COLUMN PARAMETERS ###### + dictcoldata = self.fetchColumnPara() + + column_D = int(dictcoldata[QString("D")]) + column_B = int(dictcoldata[QString("B")]) + column_tw = float(dictcoldata[QString("tw")]) + column_T = float(dictcoldata[QString("T")]) + column_alpha = float(dictcoldata[QString("FlangeSlope")]) + column_R1 = float(dictcoldata[QString("R1")]) + column_R2 = float(dictcoldata[QString("R2")]) + + #column = ISection(B = 83, T = 14.1, D = 250, t = 11, R1 = 12, R2 = 3.2, alpha = 98, length = 1000) + column = ISection(B = column_B, T = column_T, D = column_D, + t = column_tw, R1 = column_R1, R2 = column_R2, alpha = column_alpha, length = 1000) - column = ISection(B = 83, T = 14.1, D = 250, t = 11, R1 = 12, R2 = 3.2, alpha = 98, length = 1000) - beam = ISection(B = 140, T = 16,D = 400,t = 8.9, R1 = 14, R2 = 7, alpha = 98,length = 500) Fweld1 = FilletWeld(L= 300,b = 6, h = 6) #Fweld1 = Weld(L= 300,W = beam.t, T = 8) @@ -696,6 +735,11 @@ class MainController(QtGui.QMainWindow): connectivity = self.createColFlangeBeamWeb() self.display3Dmodel(connectivity.get_models(), "Model") + plateOrigin = connectivity.plate.secOrigin + gpPntplateOrigin= getGpPt(plateOrigin) + my_sphere = BRepPrimAPI_MakeSphere(gpPntplateOrigin,2).Shape() + self.display.DisplayShape(my_sphere,update=True) + def call_3DBeam(self): diff --git a/Connections/Shear/Finplate/model.py b/Connections/Shear/Finplate/model.py index fdd0141..b1b32f2 100644 --- a/Connections/Shear/Finplate/model.py +++ b/Connections/Shear/Finplate/model.py @@ -106,7 +106,7 @@ def get_columndata(sect): ''' section = sect #section = Ui_MainWindow.comboColSec.currentText() - queryStr = "Select * from Beams where Designation = '%s'" % section + queryStr = "Select * from Columns where Designation = '%s'" % section designQuery = QSqlQuery(queryStr) print(designQuery) diff --git a/Connections/Shear/Finplate/saveINPUT.txt b/Connections/Shear/Finplate/saveINPUT.txt index 6b4cf97..b6e25d5 100644 --- a/Connections/Shear/Finplate/saveINPUT.txt +++ b/Connections/Shear/Finplate/saveINPUT.txt @@ -4,7 +4,7 @@ p1 (dp2 S'columSection' p3 -S'ISHB 250' +S'ISSC 200' p4 sS'fy(MPa)' p5 @@ -26,12 +26,12 @@ p11 S'thickness(mm)' p13 I12 -sS'length(mm)' +sS'height(mm)' p14 I300 sS'width(mm)' p15 -I100 +I20 ssS'Load' p16 (dp17 @@ -49,13 +49,12 @@ p22 (dp23 S'grade' p24 -S'8.8' -p25 +F8.8 sS'type' -p26 +p25 S'HSFG' -p27 +p26 sS'diameter(mm)' -p28 +p27 I20 ss.
\ No newline at end of file diff --git a/Connections/Shear/Finplate/ui_finPlate.py b/Connections/Shear/Finplate/ui_finPlate.py index c87d3a9..1c41207 100644 --- a/Connections/Shear/Finplate/ui_finPlate.py +++ b/Connections/Shear/Finplate/ui_finPlate.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'finPlate.ui' # -# Created: Fri Jun 5 22:26:06 2015 +# Created: Sat Jun 6 12:28:08 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! @@ -469,6 +469,15 @@ class Ui_MainWindow(object): self.comboPlateThick_2.setStyleSheet(_fromUtf8("QComboBox { combobox-popup: 0; }")) self.comboPlateThick_2.setMaxVisibleItems(5) self.comboPlateThick_2.setObjectName(_fromUtf8("comboPlateThick_2")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) + self.comboPlateThick_2.addItem(_fromUtf8("")) self.label_42 = QtGui.QLabel(self.dockWidgetContents) self.label_42.setGeometry(QtCore.QRect(1, 540, 66, 25)) font = QtGui.QFont() @@ -1464,7 +1473,7 @@ class Ui_MainWindow(object): self.retranslateUi(MainWindow) self.mytabWidget.setCurrentIndex(-1) - self.comboPlateThick_2.setCurrentIndex(-1) + self.comboPlateThick_2.setCurrentIndex(0) self.comboWldSize.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) @@ -1527,6 +1536,15 @@ class Ui_MainWindow(object): self.label_40.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-weight:600; font-style:italic;\">Plate</span></p></body></html>", None)) self.label_41.setText(_translate("MainWindow", "<html><head/><body><p>Thickness (mm) *</p></body></html>", None)) self.lbl_len_2.setText(_translate("MainWindow", "Height (mm)", None)) + self.comboPlateThick_2.setItemText(0, _translate("MainWindow", "Select plate thickness", None)) + self.comboPlateThick_2.setItemText(1, _translate("MainWindow", "6", None)) + self.comboPlateThick_2.setItemText(2, _translate("MainWindow", "8", None)) + self.comboPlateThick_2.setItemText(3, _translate("MainWindow", "10", None)) + self.comboPlateThick_2.setItemText(4, _translate("MainWindow", "12", None)) + self.comboPlateThick_2.setItemText(5, _translate("MainWindow", "14", None)) + self.comboPlateThick_2.setItemText(6, _translate("MainWindow", "16", None)) + self.comboPlateThick_2.setItemText(7, _translate("MainWindow", "18", None)) + self.comboPlateThick_2.setItemText(8, _translate("MainWindow", "20", None)) self.label_42.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-weight:600; font-style:italic;\">Weld</span></p></body></html>", None)) self.label_43.setText(_translate("MainWindow", "<html><head/><body><p>Thickness (mm) *</p></body></html>", None)) self.label_44.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-weight:600; font-style:italic;\">Bolt</span></p></body></html>", None)) |