forked from osdag-admin/Osdag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truss_connection_bolted.py
1478 lines (1405 loc) · 72.9 KB
/
truss_connection_bolted.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
from design_type.connection.truss_connection import TrussConnection
from design_report.reportGenerator_latex import CreateLatex
from utils.common.component import *
from utils.common.material import *
from Report_functions import *
import logging
class TrussConnectionBolted(TrussConnection):
def __init__(self):
super(TrussConnectionBolted, self).__init__()
def tab_list(self):
tabs = []
return tabs
def tab_value_changed(self):
change_tab = []
return change_tab
def input_dictionary_design_pref(self):
design_input = []
return design_input
def input_dictionary_without_design_pref(self):
design_input = []
return design_input
# Setting up logger and Input and Output Docks
####################################
def set_osdaglogger(key):
global logger
logger = logging.getLogger('Osdag')
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
formatter = logging.Formatter(fmt='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
handler.setFormatter(formatter)
logger.addHandler(handler)
handler = logging.FileHandler('logging_text.log')
formatter = logging.Formatter(fmt='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
handler.setFormatter(formatter)
logger.addHandler(handler)
if key is not None:
handler = OurLog(key)
formatter = logging.Formatter(fmt='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
handler.setFormatter(formatter)
logger.addHandler(handler)
def module_name(self):
return KEY_DISP_TRUSS_BOLTED
def member(self, status):
member = []
return member
def input_values(self):
'''
Fuction to return a list of tuples to be displayed as the UI.(Input Dock)
e.g.
t = (Key, Key_display, Type, existing_val, Current_Value, enabled/disabled, Validator_type)
'''
self.module = KEY_DISP_TRUSS_BOLTED
options_list = []
t16 = (KEY_MODULE, KEY_DISP_TRUSS_BOLTED, TYPE_MODULE, None, True, 'No Validator')
options_list.append(t16)
t0 = (KEY_MEMBERS, KEY_DISP_MEMBERS, TYPE_COMBOBOX_CUSTOMIZED, VALUES_MEMBERS, True, 'No Validator')
options_list.append(t0)
t5 = (KEY_MATERIAL, KEY_DISP_MATERIAL, TYPE_COMBOBOX, VALUES_MATERIAL, True, 'No Validator')
options_list.append(t5)
t1 = (None, DISP_TITLE_CM, TYPE_TITLE, None, True, 'No Validator')
options_list.append(t1)
attributes = {
'Section profile': VALUES_SEC_PROFILE_2,
'Connection Location': {'Angle': VALUES_LOCATION_1, 'Channel': VALUES_LOCATION_2},
'Section Size': get_available_cleat_list(all_angles, 45.0, 20.0),
'Material': VALUES_MATERIAL[:-1],
'Angle with x-axis (Degrees)': None,
'Factored Load (KN)': None
}
t00 = (KEY_TABLE, '', TYPE_TABLE_IN, attributes, True, 'No Validator')
options_list.append(t00)
t9 = (None, DISP_TITLE_BOLT, TYPE_TITLE, None, True, 'No Validator')
options_list.append(t9)
t10 = (KEY_D, KEY_DISP_D, TYPE_COMBOBOX_CUSTOMIZED, VALUES_D, True, 'No Validator')
options_list.append(t10)
t11 = (KEY_TYP, KEY_DISP_TYP, TYPE_COMBOBOX, VALUES_TYP, True, 'No Validator')
options_list.append(t11)
t12 = (KEY_GRD, KEY_DISP_GRD, TYPE_COMBOBOX_CUSTOMIZED, VALUES_GRD, True, 'No Validator')
options_list.append(t12)
t13 = (None, DISP_TITLE_PLATE, TYPE_TITLE, None, True, 'No Validator')
options_list.append(t13)
t14 = (KEY_PLATETHK, KEY_DISP_PLATETHK, TYPE_COMBOBOX_CUSTOMIZED, VALUES_D, True, 'No Validator')
options_list.append(t14)
return options_list
def spacing(self, status):
spacing = []
return spacing
def summary(self, status):
summary = []
t1 = (KEY_TABLE, '', TYPE_TABLE_OU, '')
summary.append(t1)
return summary
def output_values(self, flag):
'''
Fuction to return a list of tuples to be displayed as the UI.(Output Dock)
'''
# @author: Umair
out_list = []
t1 = (None, "Bolt Design Summary", TYPE_TITLE, None, True)
out_list.append(t1)
t00 = (KEY_TABLE, '', TYPE_TABLE_OU, None, True, 'No Validator')
out_list.append(t00)
t2 = (KEY_OUT_SPACING, KEY_OUT_DISP_SPACING, TYPE_OUT_BUTTON, ['Spacing Details', self.spacing], True)
out_list.append(t2)
t3= (None, "Gusset Plate Detail", TYPE_TITLE, None, True)
out_list.append(t3)
t4 = (KEY_TABLE, '', TYPE_TABLE_GUS, None, True, 'No Validator')
out_list.append(t4)
return out_list
def get_3d_components(self):
components = []
t1 = ('Model', self.call_3DModel)
components.append(t1)
t2 = ('Beam', self.call_3DBeam)
components.append(t2)
t3 = ('Column', self.call_3DColumn)
components.append(t3)
t4 = ('Truss Connection Bolted', self.call_3DPlate)
components.append(t4)
return components
def call_3DPlate(self, ui, bgcolor):
from PyQt5.QtWidgets import QCheckBox
from PyQt5.QtCore import Qt
for chkbox in ui.frame.children():
if chkbox.objectName() == 'Truss Connection Bolted':
continue
if isinstance(chkbox, QCheckBox):
chkbox.setChecked(Qt.Unchecked)
#ui.commLogicObj.display_3DModel("Plate", bgcolor)
# # Author: Devesh Kumar
#
# from utils.common.component import Bolt
# import copy
# from utils.common.common_calculation import *
# import math
# from utils.common.is800_2007 import IS800_2007
#
# """ ======The input values start here====== """
#
# """ These values are to be extracted from the input provided by the users """
# no_of_members = 4
# """ this number of members info is not being used directly in the code """
#
# """ List of details of members
# i.e.[section_profile, conn_part_width(mm), conn_part_t(mm), fu_memb(MPa), fy_memb(MPa), member_type,
# angle from x-axis(in deg), gross area(mm2), h1(mm)]
# here h1(mm) is the width available for bolt accommodation = conn_part_width - t_flanges - root_radi
# starting from 1st member and proceeding one by one.
# member_type means 'tension' or 'compression' or 'compression_butting' (str) """
# # be careful while connecting the input values of gross area of back to back members (2Area) and star-angles(1 Area with
# # halved load)
# member_details = [['Back to Back Angles', 80, 10, 410, 250, 'tension', 0, 3000, 62],
# ['Back to Back Angles', 70, 10, 410, 250, 'tension', 180, 2600, 53],
# ['Angles', 75, 8, 410, 250, 'tension', 240, 1140, 55],
# ['Angles', 60, 6, 410, 250, 'tension', 270, 684, 47.5],
# ]
#
# #['Angles', 75, 8, 410, 250, 'compression', 180, 938, 55.5],
# #['Angles', 65, 6, 410, 250, 'compression', 225, 625, 53],
# #['Angles', 80, 8, 410, 250, 'tension', 270, 978, 65],
# #['Angles', 65, 8, 410, 250, 'tension', 315, 817, 51],
# #]
#
# """ here type of bolt may be 'Bearing' or 'Friction'. It is also mandatory to connect the input values such that
# the values inside the 'grade' and the 'Diameter'(mm) key are in ascending order to avoid any unforeseen error
# here grade can be like [4.6, 4.8, 6.8], Diameter like [8, 10, 12, 20, 32] """
# bolts_details = {'type': 'Bearing', 'grade': [4.6], 'Diameter': [10, 12], 'mu_f': 0.2}
#
# """List of the input of the [thickness, fu_plate, fy_plate] of gusset plate"""
# """ Note that currently at least one plate should be having thickness grater than the thickness of any of the members
# in the input """
# plate_details = [[6, 410, 250],
# [8, 410, 250],
# [12, 410, 250]
# ]
#
#
# """ List of axial load (in KN) on the members starting from 1st member and proceeding one by one """
# # beware of connecting the load inputs of star angles. the load should be divided by 2 because further design will be
# # done considering one of the angles of star angle as a single angle but whitmore width will consider both angles
# load_details = [225, 180, 110, 75]
#
# """ ======The input values end here====== """
#
#
# class bolt_general():
# def __init__(self, grade, bolt_dia, connection_plates_t_fu_fy, connection_plates_t, member_detail):
# self.grade = grade
# self.bolt_dia = bolt_dia
# """ conn_plates_t_fu_fy - List of tuples with plate thicknesses in mm, fu in MPa, fy in MPa (list of tuples)"""
# self.connection_plates_t_fu_fy = connection_plates_t_fu_fy
# """ connection_plates_t - List or tuple of thicknesses in mm of connected plates, the first entry being the
# thickness of gusset plate"""
# self.connection_plates_t = connection_plates_t
# """ example of member_detail - ['Angles', 70, 8, 410, 250, 'tension', 0, 858, 55.5] """
# self.member_detail = member_detail
# self.bolt_hole_dia = IS800_2007.cl_10_2_1_bolt_hole_size(bolt_dia, 'Standard')
# self.fu_b = bolt_general.f_u_bolt(grade=grade, bolt_dia=bolt_dia)
# self.min_edge_dist = IS800_2007.cl_10_2_4_2_min_edge_end_dist(d=self.bolt_dia, bolt_hole_type='Standard',
# edge_type='Sheared or hand flame cut')
# self.max_edge_dist = IS800_2007.cl_10_2_4_3_max_edge_dist(self.connection_plates_t_fu_fy, False)
# self.max_spacing = IS800_2007.cl_10_2_3_1_max_spacing(self.connection_plates_t)
# self.min_pitch = IS800_2007.cl_10_2_2_min_spacing(d=bolt_dia)
# self.max_pitch = IS800_2007.cl_10_2_3_2_max_pitch_tension_compression(d=bolt_dia,
# plate_thicknesses=self.connection_plates_t,
# member_type=self.member_detail[5])
# self.pitch_provided = min(round_up(self.min_pitch, 5), round_down(self.max_pitch, 5))
# self.edge_dist_provided = min(round_up(self.min_edge_dist, 5), round_down(self.max_edge_dist, 5))
# self.n_n = bolt_general.get_n_n(section_profile=self.member_detail[0])
# self.a_nb = bolt_general.get_a_nb(bolt_dia=self.bolt_dia)
# self.a_sb = round(math.pi / 4 * bolt_dia ** 2)
#
#
# @staticmethod
# def get_n_n(section_profile):
# """This will provide the number of shear planes intercepting the bolt.
# the connection location will be specified by the user in each of the member case"""
# if section_profile in ['Angles', 'Channels', 'Star Angles']:
# return 1
# elif section_profile in ['Back to Back Angles', 'Back to Back Channels']:
# return 2
#
# @staticmethod
# def get_a_nb(bolt_dia):
# return round(0.78 * math.pi / 4 * bolt_dia ** 2, 2)
#
# @staticmethod
# def f_u_bolt(grade, bolt_dia):
# """returns the ultimate strength of the bolt as per Table -1 of IS 800: 2007"""
# grade = float(grade)
# bolt_dia = float(bolt_dia)
#
# if grade == 8.8 and bolt_dia <= 16:
# return 800
# elif grade == 8.8:
# return 830
# else:
# fu_data = {3.6: 330, 4.6: 400, 4.8: 420, 5.6: 500, 5.8: 520, 6.8: 600, 9.8: 900, 10.9: 1040, 12.9: 1220}
# return fu_data[grade]
#
# @staticmethod
# def cl_10_2_1_bolt_hole_size(d, bolt_hole_type='Standard'):
# """Calculate bolt hole diameter as per Table 19 of IS 800:2007
# Args:
# d - Nominal diameter of fastener in mm (float)
# bolt_hole_type - Either 'Standard' or 'Over-sized' or 'short_slot' or 'long_slot' (str)
# Returns:
# bolt_hole_size - Diameter of the bolt hole in mm (float)
# Note:
# Reference:
# IS 800, Table 19 (Cl 10.2.1)
# TODO:ADD KEY_DISP for for Standard/oversize etc and replace these strings
# """
# table_19 = {
# "12-14": {'Standard': 1.0, 'Over-sized': 3.0, 'short_slot': 4.0, 'long_slot': 2.5},
# "16-22": {'Standard': 2.0, 'Over-sized': 4.0, 'short_slot': 6.0, 'long_slot': 2.5},
# "24": {'Standard': 2.0, 'Over-sized': 6.0, 'short_slot': 8.0, 'long_slot': 2.5},
# "24+": {'Standard': 3.0, 'Over-sized': 8.0, 'short_slot': 10.0, 'long_slot': 2.5}
# }
#
# d = int(d)
#
# if d < 12:
# clearance = 0
# elif d <= 14:
# clearance = table_19["12-14"][bolt_hole_type]
# elif d <= 22:
# clearance = table_19["16-22"][bolt_hole_type]
# elif d <= 24:
# clearance = table_19["24"][bolt_hole_type]
# else:
# clearance = table_19["24+"][bolt_hole_type]
# if bolt_hole_type == 'long_slot':
# bolt_hole_size = (clearance + 1) * d
# else:
# bolt_hole_size = clearance + d
# return bolt_hole_size
#
#
# class bearing_bolt(bolt_general):
# def __init__(self, grade, bolt_dia, connection_plates_t_fu_fy, connection_plates_t, member_detail, joint_length=0):
# super().__init__(grade, bolt_dia, connection_plates_t_fu_fy, connection_plates_t, member_detail)
# # joint_length(lj) is the distance between the first and the last row of joint in the direction of load
# self.joint_length = joint_length
# self.beta_lj = IS800_2007.cl_10_3_3_1_bolt_long_joint(d=self.bolt_dia, l_j=self.joint_length)
# # considering no packing plates to be used in the gusset connection, taking beta_pkg = 1
# self.beta_pkg = 1
# self.grip_length = sum(self.connection_plates_t)
# self.beta_lg = IS800_2007.cl_10_3_3_2_bolt_large_grip(d=self.bolt_dia, l_g=self.grip_length,
# l_j=self.joint_length)
# self.t_bearing = min(self.connection_plates_t[0], (sum(self.connection_plates_t) - self.connection_plates_t[0]))
#
# def bearing_bolt_design_capacity(self):
# v_dsb = self.beta_lj * self.beta_lg * self.beta_pkg * \
# IS800_2007.cl_10_3_3_bolt_shear_capacity(f_ub=self.fu_b, A_nb=self.a_nb, A_sb=self.a_sb, n_n=self.n_n)
# v_dpb = IS800_2007.cl_10_3_4_bolt_bearing_capacity(f_u=self.member_detail[3], f_ub=self.fu_b, t=self.t_bearing,
# d=self.bolt_dia, e=self.edge_dist_provided,
# p=self.pitch_provided, bolt_hole_type='Standard')
#
# v_db = min(v_dsb, v_dpb)
# return round(v_db/1000, 3)
#
#
# class friction_bolt(bolt_general):
# def __init__(self, grade, bolt_dia, connection_plates_t_fu_fy, connection_plates_t, member_detail, mu_f=0.2):
# super().__init__(grade, bolt_dia, connection_plates_t_fu_fy, connection_plates_t, member_detail)
# self.mu_f = mu_f
#
# def friction_bolt_design_capacity(self):
# v_dsf = IS800_2007.cl_10_4_3_bolt_slip_resistance(f_ub=self.fu_b, A_nb=self.a_nb, n_e=self.n_n,
# mu_f=self.mu_f, bolt_hole_type='Standard',
# slip_resistance='ultimate_load')
# return round(v_dsf[0]/1000, 3)
#
#
# """ creating some miscellaneous functions to be used in this module """
# def sort_abs_desc(lst):
# """
# Sort a list of integers in descending order of their absolute values.
# Return two lists: the sorted list of absolute values, and the corresponding indexes in the input list.
# """
# # Create a list of tuples (value, index) to keep track of the original indexes
# lst_with_index = [(abs(xy), ij) for ij, xy in enumerate(lst)]
# # Sort the list of tuples in descending order of the absolute values
# sorted_lst_with_index = sorted(lst_with_index, reverse=True)
# # Create the two output lists by extracting the values and indexes from the sorted tuples
# sorted_abs_lst = [xy[0] for xy in sorted_lst_with_index]
# sorted_index_lst = [xy[1] for xy in sorted_lst_with_index]
# return sorted_abs_lst, sorted_index_lst
#
#
# """ function to sort two list w.r.t first list by parallel iteration """
# def sort_two_lists(list1, list2):
# """
# Sort the first list in ascending order and return the corresponding
# values in the second list.
# """
# sorted_list1, sorted_list2 = zip(*sorted(zip(list1, list2)))
# return list(sorted_list1), list(sorted_list2)
#
# """ function to sort 5 lists w.r.t the first one"""
# def sort_five_lists(list1, list2, list3, list4, list5):
# """
# Sort the first list in ascending order and return the corresponding
# values in the second, third, fourth, and fifth lists.
# """
# sorted_lists = sorted(zip(list1, list2, list3, list4, list5))
# sorted_list1, sorted_list2, sorted_list3, sorted_list4, sorted_list5 = zip(*sorted_lists)
# return list(sorted_list1), list(sorted_list2), list(sorted_list3), list(sorted_list4), list(sorted_list5)
#
#
# """ creating a function to get the clearance distance d from the origin of any member """
# def get_clearance_d(alpha ,p0 , p1):
# if alpha == 180:
# return 2.5
# elif alpha < 180:
# alpha = math.radians(alpha)
# c = p0/p1
# c1 = (c*math.sin(alpha))/(1+c*math.cos(alpha))
# beta = math.atan(c1)
# d = p0/math.tan(beta)
# return round_up(d, 5)
# # increased the calculated value by 5mm to provide some space between members on the plate
# elif alpha > 180:
# return
#
#
# """ function to get quadrant from a given angle """
# def get_quadrant(angle):
# if 0 <= angle <= 90:
# return 1
# elif 90 < angle <= 180:
# return 2
# elif 180 < angle < 270:
# return 3
# elif 270 <= angle <= 360: # actually 360 = 0 therefore input should not accept 360 instead that 0 should be input
# return 4
#
#
# """function to get included angle where included angle is the angle less than 180degrees between two lines. no need to
# worry about the sequence of the angles. the angles should be positive and not greater than 360 """
#
#
# def get_included_angle(theta1, theta2):
# if abs(theta1-theta2) <= 180:
# return abs(theta1-theta2)
# elif abs(theta1-theta2) > 180:
# return 360-abs(theta1-theta2)
#
#
# """ function to get the value of d - the clearance for all members"""
# # defining a function which take lists [a,b,angle] for previous and the current member respectively and return p,p1
# def get_d(prev_memb_a_b_angle, current_memb_a_b_angle):
# quad1 = get_quadrant(prev_memb_a_b_angle[2])
# quad2 = get_quadrant(current_memb_a_b_angle[2])
# angle1 = prev_memb_a_b_angle[2]
# angle2 = current_memb_a_b_angle[2]
# a1 = prev_memb_a_b_angle[0]
# b1 = prev_memb_a_b_angle[1]
# a2 = current_memb_a_b_angle[0]
# b2 = current_memb_a_b_angle[1]
# inc_angle = get_included_angle(current_memb_a_b_angle[2], prev_memb_a_b_angle[2])
#
# """ initialising and assigning p0 and p1 """
# p0 = 1
# p1 = 1
#
# if quad1 == 1 and quad2 == 1:
# if angle1 < angle2:
# p0 = b2
# p1 = a1
# elif angle1 > angle2:
# p0 = a2
# p1 = b1
# elif quad1 == 2 and quad2 == 2:
# if angle1 < angle2:
# p0 = a2
# p1 = b1
# elif angle1 > angle2:
# p0 = b2
# p1 = a1
# elif quad1 == 3 and quad2 == 3:
# if angle1 < angle2:
# p0 = a2
# p1 = b1
# elif angle1 > angle2:
# p0 = b2
# p1 = a1
# elif quad1 == 4 and quad2 == 4:
# if angle1 < angle2:
# p0 = b2
# p1 = a1
# elif angle1 > angle2:
# p0 = a2
# p1 = b1
# elif quad1 == 1 and quad2 == 2:
# p0 = a2
# p1 = a1
# elif quad1 == 2 and quad2 == 3:
# p0 = a2
# p1 = b1
# elif quad1 == 3 and quad2 == 4:
# p0 = b2
# p1 = b1
# elif quad1 == 4 and quad2 == 1:
# p0 = b2
# p1 = a1
# elif quad1 == 1 and quad2 == 3:
# if abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) < 180:
# p0 = a2
# p1 = a1
# elif abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) > 180:
# p0 = b2
# p1 = b1
# elif quad1 == 2 and quad2 == 4:
# if abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) < 180:
# p0 = b2
# p1 = b1
# elif abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) > 180:
# p0 = a2
# p1 = a1
# elif quad1 == 3 and quad2 == 1:
# if abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) < 180:
# p0 = b2
# p1 = b1
# elif abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) > 180:
# p0 = a2
# p1 = a1
# elif quad1 == 4 and quad2 == 2:
# if abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) < 180:
# p0 = a2
# p1 = a1
# elif abs(current_memb_a_b_angle[2] - prev_memb_a_b_angle[2]) > 180:
# p0 = b2
# p1 = b1
# elif quad1 == 1 and quad2 == 4:
# p0 = a2
# p1 = b1
# elif quad1 == 2 and quad2 == 1:
# p0 = a2
# p1 = a1
# elif quad1 == 3 and quad2 == 2:
# p0 = b2
# p1 = a1
# elif quad1 == 4 and quad2 == 3:
# p0 = b2
# p1 = b1
#
# return get_clearance_d(inc_angle, p0, p1)
#
#
# """ function for rotation of angles. input will be list of tuples (x,y) which is to be rotated with same angle in
# anti-clock wise direction """
# def rotate_points(points, angle):
# # Convert angle from degrees to radians
# angle = math.radians(angle)
# # Initialize empty list to store rotated points
# rotated_points = []
# # Loop over input points
# for x, y in points:
# # Apply rotation formula to each point
# x_rotated = round((x * math.cos(angle) - y * math.sin(angle)), 2)
# y_rotated = round(x * math.sin(angle) + y * math.cos(angle), 2)
# # Add rotated point to list
# rotated_points.append((x_rotated, y_rotated))
# # Return list of rotated points
# return rotated_points
#
#
# """ function to give sides of a polynomial"""
# def polygon_side_lengths(vertices):
# """
# Takes a list of vertices of a polygon in the form of tuples and returns
# the length of each side of the polygon.
# """
# side_lengths = []
# n = len(vertices)
# for ijk in range(n):
# x__1, y__1 = vertices[ijk]
# x__2, y__2 = vertices[(ijk+1) % n]
# side_length = round(math.sqrt((x__2 - x__1)**2 + (y__2 - y__1)**2), 1)
# side_lengths.append(side_length)
# return side_lengths
#
#
# """ defining a function to get the design compressive strength of a gusset plate """
#
#
# def gusset_design_comp_strength(whitmore_width_guss, sec_thick, clearance_d, fy_guss):
# """ radius of gyration taken as 0.2887*thickness considering buckling of rectangle section with
# whitmore_width and sec_thick(gusset plate thickness) as its dimension """
# rad_gyr = 0.2887*sec_thick
# k_l = 2*clearance_d
# # here clearance_d is offset from origin and k is taken 2 considering 1st case of table 11(IS800:2007)
# mod_elasticity = 2*10**5 # Modulus of elasticity in MPa
# """ f_cc is Euler buckling stress """
# f_cc = (math.pi**2*mod_elasticity)/((k_l/rad_gyr)**2)
# lembda_guss = (fy_guss/f_cc)**0.5
# """ considering the section as the buckling class c as per table 10 of IS800:2007 and hence alpha = 0.49 """
# alpha_guss = 0.49
# phi_guss = 0.5*(1+alpha_guss*(lembda_guss-0.2)+lembda_guss**2)
# gamma_m0_guss = 1.1
# f_cd = min((fy_guss/gamma_m0_guss)/(phi_guss+(phi_guss**2-lembda_guss**2)**0.5), fy_guss/gamma_m0_guss)
# p_d = round((f_cd * whitmore_width_guss * sec_thick)/1000, 3) # divided by 1000 to convert to KN
# return p_d
#
#
# def calculate_side_lengths(A):
# # Select every odd-numbered point starting from the third point
# odd_points = A[2:(len(A) - 2):2]
#
# # Select every even-numbered point starting from the fourth point
# even_points = A[3:(len(A) - 2):2]
#
# # Pair the odd-numbered points with the next even-numbered point
# pairs = zip(odd_points, even_points)
#
# # Calculate the distance between each pair of points and store them in a list
# lengths = [math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) for ((x1, y1), (x2, y2)) in pairs]
#
# return lengths
#
#
# def calculate_even_side_lengths(poly):
# # Calculate the total number of vertices
# n = len(poly)
#
# # Initialize an empty list to store the side lengths
# side_lengths = []
#
# # Loop over every even-numbered vertex and calculate the distance to the next vertex
# for i in range(0, n, 2):
# x1, y1 = poly[i]
# x2, y2 = poly[(i + 1) % n]
# side_length = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
# side_lengths.append(side_length)
#
# return side_lengths
#
#
# """ starting the loop for the truss connection design. starting with selecting a thickness of a gusset plate and
# then for the same thickness all the joining members are designed for the available bolts. In the available bolts the
# bolts that can be suitably used will be stored and later the bolts common to all the members or most suitable
# bolt design will be selected"""
#
# """ starting with selecting and deciding the thicknesses of the gusset plate for which the loop has to run """
#
# """ selecting the thickness of thickest connected member and for that first creating the list of thickness
# of all the connected members named member_thickness_iter """
# member_thickness_iter = []
# for i in range(len(member_details)):
# member_thickness_iter.append(member_details[i][2])
#
#
# """Creating a list of input plate thickness having thickness greater than the max of thickness of all the members as it
# is a thumb rule to take the thickness of the gusset plate greater than the thickness of any connecting member
# plate_details_iter is a list - [gusset thickness, fu of gusset plate, fy of gusset plate]
# member_detail_iter - [section_profile, conn_part_width, conn_part_t, fu_memb, fy_memb, member_type, angle, A_g, h1]
# here h1(mm) is the width available for bolt accommodation = conn_part_width - t_flanges - root_radius """
# plate_details_iter = []
# for i in range(len(plate_details)):
# if plate_details[i][0] > max(tuple(member_thickness_iter)):
# plate_details_iter.append(plate_details[i])
#
# large_grip1 = False
# safe_whitmore_section = True
# gusset_block_shear_failure = False
# mem_width_too_large = False
# """ Starting the loop of gusset plate """
# for i in range(len(plate_details_iter)):
# selected_gusset = plate_details_iter[i]
# """ defining candidate_bolts_all to store the eligible bolts for all the members. it is as follows:
# candidate_bolts_all = [[candidate_bolt1 of member1],[candidate_bolt1 of member2],[candidate_bolt1 of member3]]"""
# candidate_bolts_all = []
#
# """gusset_plate_t_fu_fy - [thickness, fu_plate, fy_plate] of gusset plate"""
# gusset_plate_t_fu_fy = plate_details_iter[i]
#
# design_load_all = []
#
# for j in range(len(member_details)):
# """ candidate_bolts1 is the list which will store all the combination of diameter and grade of bolt which can
# be used for the connection of that member. It will be empty for every value of j. the assignment of this
# variable to an empty list will be done after adding this list to another list which stores such list for all
# the members. it will look as follows:
# candidate_bolts1 = [[recommended_bolt of 1st dia-grade combination],
# [recommended_bolt of 2nd dia-grade combination],[recommended_bolt of 3rd dia-grade combination],....]"""
# candidate_bolts1 = []
#
# """ member_detail_iter is the variable having detail of that member
# e.g ['Angles', 70, 8, 410, 250, 'tension', 0, 858, 55.5]
# for which the iteration of the bolt design is to run """
# member_detail_iter = member_details[j]
#
# """ member_t_fu_fy is the list of tuples of t, fu, fy of the member under consideration """
# if member_detail_iter[0] in ['Angles', 'Channels', 'Star Angles']:
# member_t_fu_fy = [(member_detail_iter[2], member_detail_iter[3], member_detail_iter[4])]
# elif member_detail_iter[0] in ['Back to Back Angles', 'Back to Back Channels']:
# member_t_fu_fy = [(member_detail_iter[2], member_detail_iter[3], member_detail_iter[4])] * 2
#
# """connection_plates_t_fu_fy_iter is the list of tuples of the plate and members containing
# their (thickness,fu,fy) like [(12, 410, 250), (8, 410, 250)]. The first tuple should be the detail of the
# gusset plate and the following are the member detail. Number of tuples will be 3 for back to back conn"""
# connection_plates_t_fu_fy_iter = [tuple(gusset_plate_t_fu_fy)] + member_t_fu_fy
#
# """note that the first entry i.e. the 0th index is the thickness of gusset and the subsequent are
# member e.g. thickness_connection_plates_t_iter = [12, 8]"""
# if member_detail_iter[0] in ['Angles', 'Channels', 'Star Angles']:
# thickness_connection_plates_t_iter = [connection_plates_t_fu_fy_iter[0][0],
# connection_plates_t_fu_fy_iter[1][0]]
# elif member_detail_iter[0] in ['Back to Back Angles', 'Back to Back Channels']:
# thickness_connection_plates_t_iter = [connection_plates_t_fu_fy_iter[0][0],
# connection_plates_t_fu_fy_iter[1][0],
# connection_plates_t_fu_fy_iter[2][0]]
#
# """ design_load_all is the list of load for which the members are being designed and design_load_iter is the
# load for which the member under the current loop has to be designed """
#
# design_load_iter = round(max(abs(load_details[j]), (
# 0.3 * IS800_2007.cl_6_2_tension_yielding_strength(member_detail_iter[7],
# member_detail_iter[4])/1000)), 3)
#
# design_load_all = design_load_all + [design_load_iter]
#
# """ bolt_dia_iter is a list having all the input bolt diameter e.g [8, 10, 12, 20, 32] """
# bolt_dia_iter = bolts_details['Diameter']
# bolt_grade_iter = bolts_details['grade']
# for k in range(len(bolt_dia_iter)):
# bolt_dia1 = bolt_dia_iter[k]
#
# """ Now running a loop for every grade of bolts in the list of input grades of the bolt """
# for l in range(len(bolt_grade_iter)):
# bolt_grade1 = bolt_grade_iter[l]
#
# """ creating an instance named bolt1 from the bearing bolt class or friction bolt class
# depending upon the input """
# joint_len = 0
# mu_f1 = 0.2
# if bolts_details['type'] == 'Bearing':
# bolt1 = bearing_bolt(grade=bolt_grade1, bolt_dia=bolt_dia1,
# connection_plates_t_fu_fy=connection_plates_t_fu_fy_iter,
# connection_plates_t=thickness_connection_plates_t_iter,
# member_detail=member_detail_iter, joint_length=joint_len)
# else:
# bolt1 = friction_bolt(grade=bolt_grade1, bolt_dia=bolt_dia1,
# connection_plates_t_fu_fy=connection_plates_t_fu_fy_iter,
# connection_plates_t=thickness_connection_plates_t_iter,
# member_detail=member_detail_iter, mu_f=mu_f1)
#
# """ using large grip criteria as per Cl 10.3.3.2 of IS800:2007, ensuring the minimum dia bolt for which
# the loop should run """
# large_grip1 = False
# if bolt_dia1 <= sum(thickness_connection_plates_t_iter) / 8:
# large_grip1 = True
# """ coming out of the bolt grade loop """
# break
#
# """ Condition to ensure that the bolt dia selected will be able to be accommodated in the connected
# part of the member. number of bolt lines(no_rows) possible** = round_down((h1 - 2e_min)/gauge_dist) + 1
# here for simplicity gauge dist has been taken as the pitch.
# Note - rows means bolt lines along the direction of load applied
# columns means bolt line perpendicular to the direction of load applied """
# no_rows = round_down((member_detail_iter[8] - 2 * bolt1.edge_dist_provided) / bolt1.pitch_provided + 1)
# if no_rows < 1:
# """ coming out of the bolt grade loop """
# break
#
# """ the edge distance, gauge and pitch used are represented as follows by edge_dist1, gauge1
# and pitch1 . edge_dist2 is the distance towards the toe side of an angle"""
# edge_dist1 = bolt1.edge_dist_provided
# edge_dist2 = edge_dist1
# if no_rows == 1:
# gauge1 = 0
# else:
# gauge1 = min((member_detail_iter[8] - 2 * edge_dist1) / (no_rows - 1), bolt1.max_spacing)
#
# pitch1 = bolt1.pitch_provided
#
#
# """ finding the bolt capacity (bolt_capacity1) of the selected bolt and grade """
# bolt_capacity1 = 0
# if bolts_details['type'] == 'Bearing':
# bolt_capacity1 = bolt1.bearing_bolt_design_capacity()
# else:
# bolt_capacity1 = bolt1.friction_bolt_design_capacity()
#
# no_bolts1 = round_up((design_load_iter/bolt_capacity1), 1)
# """ there should at least be two numbers of bolts in a connection. if number of bolts are less than 2
# then the grade loop has to be broken because one bolt may not resist the rotation of member and in turn
# make the line of action of axial forces non-concurrent.
# For this it is mandatory that the list of grade is in ascending order """
# if no_bolts1 < 2:
# break
#
# for o in range(no_rows):
# no_rows1 = o+1
# no_column1 = round_up((no_bolts1/no_rows1), 1)
# """ Note - The arrangement of the bolts are in chain pattern not in staggered or diamond pattern
# therefore the number of bolts = rows*columns
# rows means bolt lines along the direction of load applied
# columns means bolt line perpendicular to the direction of load applied """
# no_bolts2 = no_rows1*no_column1
# """ now joint length = (columns - 1)*pitch """
# joint_len = (no_column1-1)*pitch1
# """if it is found that the joint length is less than 15d then that number of row is selected and
# the loop is broken. if the joint length exceeds 15d even after accommodating the bolts in the
# maximum possible number of rows then that maximum possible number of rows will be the selected
# number of rows"""
# if joint_len < 15*bolt_dia1:
# break
#
# """ calculating the total bolt capacity"""
# bolt_group_capacity1 = 0
# if bolts_details['type'] == 'Bearing':
# bolt_group_capacity1 = no_bolts2*bolt1.bearing_bolt_design_capacity()
# else:
# bolt_group_capacity1 = no_bolts2*bolt1.friction_bolt_design_capacity()
#
# """ increasing the number of bolts by increasing one one column in case the bolt group capacity is
# less than the design load. the no. of times the while loop iterates is limited to 10 in order to escape
# from entering into an infinite loop in any case """
# count1 = 1
# while bolt_group_capacity1 < design_load_iter and count1 < 10:
# count1 = count1+1
# no_column1 = no_column1 + 1
# no_bolts2 = no_rows1 * no_column1
# joint_len = (no_column1 - 1) * pitch1
# if bolts_details['type'] == 'Bearing':
# bolt_group_capacity1 = no_bolts2 * bolt1.bearing_bolt_design_capacity()
# else:
# bolt_group_capacity1 = no_bolts2 * bolt1.friction_bolt_design_capacity()
#
# """ ensuring that the member is not so much big that the bolt's end distance becomes grater than the
# maximum edge distance. here we are using the whole width of the connected member because we are looking
# on the maximum side of the edge distance not the minimum (we provide minimum spacing so that we
# get space to work ). edge_dist1 is the spacing from the end of the root radius to the center of the
# bolthole. whereas edge_dist2 is the distance from the bolt hole center to the end of the toe."""
# if no_rows1 == 1:
# if member_detail_iter[0] in ['Angles', 'Star Angles', 'Back to Back Angles']:
# edge_dist2 = member_detail_iter[8] - edge_dist1
# if edge_dist2 > bolt1.max_edge_dist:
# edge_dist2 = bolt1.max_edge_dist
# edge_dist1 = member_detail_iter[8] - edge_dist2
#
# if edge_dist1 > (bolt1.max_edge_dist - (member_detail_iter[1] - member_detail_iter[8])):
# print('edge distance exceeds the maximum edge distance')
# mem_width_too_large = True
# break
# elif member_detail_iter[0] in ['Channels', 'Back to Back Channels']:
# edge_dist1 = member_detail_iter[8] / 2
#
# if edge_dist1 > (bolt1.max_edge_dist - (member_detail_iter[1] - member_detail_iter[8]) / 2):
# print('edge distance exceeds the maximum edge distance')
# mem_width_too_large = True
# break
# else:
# if gauge1 >= bolt1.max_spacing:
# edge_dist1 = min(((member_detail_iter[8] - (no_rows - 1) * gauge1) / 2),
# bolt1.max_edge_dist)
#
# if (2 * edge_dist1 + (no_rows - 1) * gauge1) < member_detail_iter[8]:
# print('edge distance exceeds the maximum edge distance')
# mem_width_too_large = True
# break
#
# """ overlap_length is the length required from the end of the plate to accommodate the member """
# overlap_length = 2*edge_dist1 + (no_column1 - 1) * pitch1
#
# """ now we need to check for the tension or compression yielding capacity of the gusset plate on the
# area corresponding to the whitmore width. It is the width obtained by connecting the ends of two
# line segments extending from the first bolt towards the load side to the last bolt, making an angle
# of 30 degree or pi/6 radian from the direction of load on either side of the load direction.
# If the capacity thus obtained is less than the design action then a flag named safe_whitmore_section
# is generated. if flag is no, then the loop will be broken from grade, diameter, member loop and the
# iteration should continue for the plate loop with the next plate size. """
# whitmore_width = round((no_rows1-1)*gauge1 + 2*(joint_len*(math.tan(math.pi/6))), 2)
# whitmore_eff_width = round(whitmore_width - no_rows1*bolt1.bolt_hole_dia, 2)
# whitmore_area = round(whitmore_width*gusset_plate_t_fu_fy[0], 2)
# whitmore_eff_area = round(whitmore_eff_width*gusset_plate_t_fu_fy[0], 2)
#
# if member_detail_iter[5] == 'tension':
# gusset_yield_capacity = IS800_2007.cl_6_2_tension_yielding_strength(A_g=whitmore_area,
# f_y=gusset_plate_t_fu_fy[2])/1000
#
# gusset_rupture_capacity = IS800_2007.cl_6_3_1_tension_rupture_strength(A_n=whitmore_eff_area,
# f_u=gusset_plate_t_fu_fy[1])/1000
#
# if gusset_yield_capacity > design_load_iter and gusset_rupture_capacity > design_load_iter:
# safe_whitmore_section = True
# else:
# safe_whitmore_section = False
# """ coming out of grade of bolt loop """
# break
# elif member_detail_iter[5] == 'compression':
# """ here we are trying to find the factored design compression considering the stress reduction
# factor (kai) as 1 as per cl 7.1.2 of IS800:2007. It is equal to (eff. area * fy/gamma_m0) """
# gusset_yield_capacity = IS800_2007.cl_6_2_tension_yielding_strength(A_g=whitmore_eff_area,
# f_y=gusset_plate_t_fu_fy[2])/(0.9*1000)
# if gusset_yield_capacity > design_load_iter:
# safe_whitmore_section = True
# else:
# safe_whitmore_section = False
# """ coming out of grade of bolt loop """
# break
#
# """ now checking for block shear failure of members. t_db = block shear strength. If block shear failure
# can happen then the variable, block_shear_failure = True """
# block_shear_failure = False
# if member_detail_iter[0] in ['Angles', 'Star Angles', 'Back to Back Angles']:
# if member_detail_iter[0] in ['Angles', 'Star Angles']:
# if no_rows1 == 1:
# a_vg = (edge_dist1 + (no_column1 - 1) * pitch1) * member_detail_iter[2]
# a_vn = (edge_dist1 + (no_column1 - 1) * pitch1 - (no_column1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
# a_tg = (edge_dist2 + (no_rows1 - 1) * gauge1) * member_detail_iter[2]
# a_tn = (edge_dist2 + (no_rows1 - 1) * gauge1 - (no_rows1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
# else:
# a_vg = (edge_dist1 + (no_column1 - 1) * pitch1) * member_detail_iter[2]
# a_vn = (edge_dist1 + (no_column1 - 1) * pitch1 - (no_column1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
# a_tg = (edge_dist1 + (no_rows1 - 1) * gauge1) * member_detail_iter[2]
# a_tn = (edge_dist1 + (no_rows1 - 1) * gauge1 - (no_rows1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
#
# t_db = IS800_2007.cl_6_4_1_block_shear_strength(A_vg=a_vg, A_vn=a_vn, A_tg=a_tg, A_tn=a_tn,
# f_u=member_detail_iter[3],
# f_y=member_detail_iter[4])/1000
# elif member_detail_iter[0] == 'Back to Back Angles':
# if no_rows1 == 1:
# a_vg = (edge_dist1 + (no_column1 - 1) * pitch1) * member_detail_iter[2]
# a_vn = (edge_dist1 + (no_column1 - 1) * pitch1 - (no_column1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
# a_tg = (edge_dist2 + (no_rows1 - 1) * gauge1) * member_detail_iter[2]
# a_tn = (edge_dist2 + (no_rows1 - 1) * gauge1 - (no_rows1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
# else:
# a_vg = (edge_dist1 + (no_column1 - 1) * pitch1) * member_detail_iter[2]
# a_vn = (edge_dist1 + (no_column1 - 1) * pitch1 - (no_column1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
# a_tg = (edge_dist1 + (no_rows1 - 1) * gauge1) * member_detail_iter[2]
# a_tn = (edge_dist1 + (no_rows1 - 1) * gauge1 - (no_rows1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
#
# t_db = 2 * IS800_2007.cl_6_4_1_block_shear_strength(A_vg=a_vg, A_vn=a_vn, A_tg=a_tg,
# A_tn=a_tn,
# f_u=member_detail_iter[3],
# f_y=member_detail_iter[4])/1000
# if t_db < design_load_iter:
# block_shear_failure = True
# continue
# elif t_db > design_load_iter:
# block_shear_failure = False
# elif member_detail_iter[0] in ['Channels', 'Back to Back Channels']:
# if no_rows1 > 1:
# if member_detail_iter[0] == 'Channels':
# a_vg = (edge_dist1 + (no_column1 - 1) * pitch1) * member_detail_iter[2] * 2
# a_vn = (edge_dist1 + (no_column1 - 1) * pitch1 - (no_column1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2] * 2
# a_tg = (no_rows1 - 1) * gauge1 * member_detail_iter[2]
# a_tn = ((no_rows1 - 1) * gauge1 - (no_rows1 - 1) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
#
# t_db = IS800_2007.cl_6_4_1_block_shear_strength(A_vg=a_vg, A_vn=a_vn, A_tg=a_tg,
# A_tn=a_tn,
# f_u=member_detail_iter[3],
# f_y=member_detail_iter[4])/1000
#
# elif member_detail_iter[0] == 'Back to Back Channels':
# a_vg = (edge_dist1 + (no_column1 - 1) * pitch1) * member_detail_iter[2] * 2
# a_vn = (edge_dist1 + (no_column1 - 1) * pitch1 - (no_column1 - 0.5) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2] * 2
# a_tg = (no_rows1 - 1) * gauge1 * member_detail_iter[2]
# a_tn = ((no_rows1 - 1) * gauge1 - (no_rows1 - 1) * bolt1.bolt_hole_dia) * \
# member_detail_iter[2]
#
# t_db = 2 * IS800_2007.cl_6_4_1_block_shear_strength(A_vg=a_vg, A_vn=a_vn, A_tg=a_tg,
# A_tn=a_tn,
# f_u=member_detail_iter[3],
# f_y=member_detail_iter[4])/1000
# if t_db < design_load_iter:
# block_shear_failure = True
# continue
# elif t_db > design_load_iter:
# block_shear_failure = False
# elif no_rows1 == 1:
# block_shear_failure = False