summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeepa-chaudhari2015-12-11 18:30:01 +0530
committerdeepa-chaudhari2015-12-11 18:30:01 +0530
commit6b1e3275e721669ac214ca18d765cff2f83b1732 (patch)
tree52d76011e17f9ea1e49cd4ce8dd9fc66edd63e9a
parent1d1133feb0107d1f166439ff0857e98a97fa09c0 (diff)
parente1ebd7855f387b2823d6ffecb353fbebc5f63389 (diff)
downloadOsdagLive-6b1e3275e721669ac214ca18d765cff2f83b1732.tar.gz
OsdagLive-6b1e3275e721669ac214ca18d765cff2f83b1732.tar.bz2
OsdagLive-6b1e3275e721669ac214ca18d765cff2f83b1732.zip
Merge pull request #2 from deepa-chaudhari/masterHEADmaster
Report
-rw-r--r--Connections/Shear/Finplate/drawing_2D.py33
-rw-r--r--Connections/Shear/Finplate/finPlateMain.py4
-rw-r--r--Connections/Shear/Finplate/reportGenerator.py347
3 files changed, 381 insertions, 3 deletions
diff --git a/Connections/Shear/Finplate/drawing_2D.py b/Connections/Shear/Finplate/drawing_2D.py
index 342456c..4232cc9 100644
--- a/Connections/Shear/Finplate/drawing_2D.py
+++ b/Connections/Shear/Finplate/drawing_2D.py
@@ -216,6 +216,7 @@ class FinCommonData(object):
def drawOrientedArrow(self, dwg, pt, theta, orientation, offset, textUp,textDown):
+
'''
Drawing an arrow on given direction
@@ -278,7 +279,7 @@ class FinCommonData(object):
txtPtUp = None
if(orientation == "NE"):
txtPtUp = p2 + 0.1 * lengthB * (-labelVec) + txtOffset * offsetVec
- txtPtDwn = p2 - 0.1 * lengthB * (labelVec) - txtOffset * offsetVec
+ txtPtDwn = p2 - 0.1 * lengthB * (labelVec) - (txtOffset + 28) * offsetVec
elif(orientation == "NW"):
txtPtUp = p3 + 0.1 * lengthB * labelVec + txtOffset * offsetVec
txtPtDwn = p3 - 0.1 * lengthB * labelVec - txtOffset * offsetVec
@@ -297,10 +298,12 @@ class FinCommonData(object):
dwg.add(dwg.text(textDown, insert=(txtPtDwn), fill='black',font_family = "sans-serif",font_size = 28))
def saveToSvg(self):
- ''' It returns the svg drawing depending upon connectivity
+ '''
+ It returns the svg drawing depending upon connectivity
CFBW = Column Flange Beam Web
CWBW = Column Web Beam Web
BWBW = Beam Web Beam Web
+
'''
fin2DFront = Fin2DCreatorFront(self)
fin2DTop = Fin2DCreatorTop(self)
@@ -712,6 +715,10 @@ class Fin2DCreatorFront(object):
textDown = ""
self.dataObj.drawOrientedArrow(dwg, pltPt, theta, "SE", offset, textUp, textDown)
+ # 2D view name
+ ptx = self.FC + (self.dataObj.col_L/4)* np.array([0,1])
+ dwg.add(dwg.text('Front view', insert=(ptx), fill='black',font_family = "sans-serif",font_size = 30))
+
dwg.save()
print"########### Column Flange Beam Web Saved ############"
@@ -915,6 +922,10 @@ class Fin2DCreatorFront(object):
self.dataObj.drawOrientedArrow(dwg, weldPt, theta, "NW", offset, textUp, textDown)
+ # 2D view name
+ ptx = self.C + (self.dataObj.col_L/4)* np.array([0,1])
+ dwg.add(dwg.text('Front view', insert=(ptx), fill='black',font_family = "sans-serif",font_size = 30))
+
dwg.save()
print"########### Column Web Beam Web Saved ############"
@@ -1100,7 +1111,10 @@ class Fin2DCreatorTop(object):
ptC = self.FA4
ptD = ptG2
self.dataObj.drawFaintLine(ptC,ptD,dwg)
-
+
+ # 2D view name
+ ptx = self.FG + (self.dataObj.col_B + 20)* np.array([0,1])
+ dwg.add(dwg.text('Top view', insert=(ptx), fill='black',font_family = "sans-serif",font_size = 30))
dwg.save()
print"$$$$$$$$$ Saved Column Flange Beam Web Top $$$$$$$$$$$$"
@@ -1205,6 +1219,10 @@ class Fin2DCreatorTop(object):
ptD = ptC + (100) * np.array([0,1])
self.dataObj.drawFaintLine(ptC,ptD,dwg)
+ # 2D view name
+ ptx = self.G + (self.dataObj.D_col + 30)* np.array([0,1])
+ dwg.add(dwg.text('Top view', insert=(ptx), fill='black',font_family = "sans-serif",font_size = 30))
+
dwg.save()
print"$$$$$$$$$ Saved Column Web Beam Web Top $$$$$$$$$$$"
@@ -1346,6 +1364,10 @@ class Fin2DCreatorSide(object):
textDown = u"\u25C1"
self.dataObj.drawOrientedArrow(dwg, weldPt, theta, "NE", offset, textUp, textDown)
+ # 2D view name
+ ptx = self.H + (self.dataObj.col_L/4)* np.array([0,1])
+ dwg.add(dwg.text('Side view', insert=(ptx), fill='black',font_family = "sans-serif",font_size = 30))
+
dwg.save()
print "********* Column Web Beam Web Side Saved ***********"
@@ -1426,6 +1448,11 @@ class Fin2DCreatorSide(object):
textUp = " z " + str(int(self.dataObj.weld_thick)) + " mm"
textDown = u"\u25C1"
self.dataObj.drawOrientedArrow(dwg, weldPt, theta, "NE", offset, textUp, textDown)
+
+ # 2D view name
+ ptx = self.FC + (self.dataObj.col_L/4)* np.array([0,1])
+ dwg.add(dwg.text('Side view', insert=(ptx), fill='black',font_family = "sans-serif",font_size = 30))
+
dwg.save()
print "********** Column Flange Beam Web Side Saved *************"
diff --git a/Connections/Shear/Finplate/finPlateMain.py b/Connections/Shear/Finplate/finPlateMain.py
index f07dca3..373bb16 100644
--- a/Connections/Shear/Finplate/finPlateMain.py
+++ b/Connections/Shear/Finplate/finPlateMain.py
@@ -35,6 +35,7 @@ from OCC.IFSelect import IFSelect_RetDone
from OCC.StlAPI import StlAPI_Writer
from drawing_2D import FinCommonData
# Developed by deepa
+from reportGenerator import *
class MainController(QtGui.QMainWindow):
@@ -405,6 +406,9 @@ class MainController(QtGui.QMainWindow):
self.outdict = self.outputdict()
self.inputdict = self.getuser_inputs()
self.save_yaml(self.outdict,self.inputdict)
+ dictBeamData = self.fetchBeamPara()
+ dictColData = self.fetchColumnPara()
+ save_html(self.outdict, self.inputdict, dictBeamData, dictColData)
#self.save(self.outdict,self.inputdict)
diff --git a/Connections/Shear/Finplate/reportGenerator.py b/Connections/Shear/Finplate/reportGenerator.py
new file mode 100644
index 0000000..9131b48
--- /dev/null
+++ b/Connections/Shear/Finplate/reportGenerator.py
@@ -0,0 +1,347 @@
+'''
+Created on Dec 10, 2015
+
+@author: deepa
+'''
+def save_html(): # (outObj, uiObj, dictBeamData, dictColData)
+ fileName = '/home/deepa/finPlateReport.html'
+ f = open(fileName,'w')
+ f.write(t('html'))
+ f.write(t('head'))
+ f.write(t('''link rel="stylesheet" type="text/css" href="mystyle.css"'''))
+ f.write(t('/head'))
+ f.write(t('body'))
+ f.write(t('img src="Osdag.png" align = "middle" style="width:100px;height:100px;"'))
+ f.write(t('img src="Osdagextd.png" align = "down" style="width:100px;height:35px;"'))
+# data = [
+# [0, "Project Summary", ""],
+# [1, "Project Title", "XXX"],
+# [1, "Company", "XXX"],
+# [1, "Designer", "XXX"],
+# [0, "finplate", ""],
+# [1, "Connection", ""],
+# [2, "Connection Type", "Shear Connection"],
+# [2, "Connectivity", "Column Flange Beam Web"],
+# [2, "Beam Connection", "Bolted and Welded"],
+# [1, "Load(Factored Load)", ""],
+# [2, "Shear Force(kH)", "140"],
+# [1, "Components", ""],
+# [2, "Column Section", "ISSC200"],
+# [3, "Steel Grade", "410"],
+# [3, "Steel Type", "250"],
+# [2, "Beam Section", "ISMB 400"],
+# [2, "Plate Section", ""],
+# [3, "Thickness", "xx"],
+# [3, "Width", "xx"],
+# [3, "Depth", "xx"],
+# ]
+
+
+ #---------------------
+ rstr = t('table')
+ rstr += t('''col width=70%''')
+ rstr += t('''col width=30%''')
+
+ row = [0,' ', '']
+ rstr += t('tr')
+ rstr += t('td img src="Osdag.png" alt="Mountain View"align = "middle" style="width:100px;height:100px;') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+ rstr = t('table')
+
+ rstr = t('table')
+ rstr += t('''col width=70%''')
+ rstr += t('''col width=30%''')
+
+# row = [0,' ', '']
+# rstr += t('tr')
+# rstr += t('td img src="Osdag.png" alt="Mountain View"align = "middle" style="width:100px;height:100px;') + space(row[0]) + row[1] + t('/td')
+# rstr += t('/tr')
+
+ row = [0, 'Project Summary', ' ']
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header0"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Project Title", "FinPlate Connection"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header1"') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Company", "Osdag"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header1"') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Designer", "Hashmi"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header1"') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Job Number", "test_1"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header1"') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Design Code/Method", "IS800:2007/Limit state design"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header1"') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Design Conclusion", "IS800:2007/Limit state design"]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header0"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Finplate", "Pass"]
+ rstr += t('tr')
+ rstr += t('td class="header1 "') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header1 safe"') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Finplate", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header0"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Connection Properties", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1_1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Connection ", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Connection Title", " Single Finplate"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Connection Type", "Shear Connection"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Connection Category ", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Beam Connection", "Bolted and Welded"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Connectivity", "Column Flange Beam Web"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Loading (Factored Load) ", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Shear Force (kN)", "140"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Components ", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Column Section", "ISSC 200"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Material", "Fe250"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Beam Section", "ISMB 400"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Material", "Fe250"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Hole", "STD"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Plate Section ", "PLT 300X10X100 "]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Thickness (mm)", "10"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Width (mm)", "10"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Depth (mm)", "300"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Hole", "STD"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Weld ", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Type", "Double Fillet"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Size (mm)", "6"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Bolts ", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Type", "HSFG"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Grade", "8.8"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Diameter (mm)", "20"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Bolt Numbers", "3"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Columns (Vertical Lines)", "1 "]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Bolts Per Column", "3"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Gauge (mm)", "0"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Pitch (mm)", "100"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "End Distance (mm)", "50"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2"') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [2, "Edge Distance (mm)", "50"]
+ rstr += t('tr')
+ rstr += t('td class="header2"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ row = [0, "Assembly ", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+
+ row = [1, "Column-Beam Clearance (mm)", "20"]
+ rstr += t('tr')
+ rstr += t('td class="header1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('td class="header2 "') + row[2] + t('/td')
+ rstr += t('/tr')
+
+ rstr += t('/table')
+
+ rstr += t('table')
+ row = [0, "3D View", " "]
+ rstr += t('tr')
+ rstr += t('td colspan="2" class="header1_1"') + space(row[0]) + row[1] + t('/td')
+ rstr += t('/tr')
+ rstr += t('/table')
+
+
+ f.write(rstr)
+ f.write(t('/body'))
+ f.write(t('/html'))
+ f.close()
+
+
+def space(n):
+ rstr = " " * 4 * n
+ return rstr
+
+def t(n):
+ return '<' + n + '>'
+
+def quote(m):
+ return '"' + m + '"'
+
+if __name__ == '__main__':
+ save_html()
+ print "hiiiiii" \ No newline at end of file