Пример #1
0
    def initialiseNutBolts(self):
        b = self.bolt
        n = self.nut
        if not self.flag:
            self.column = self.col
        else:
            self.column = int(self.col * 2)
        for i in range(self.row * self.column):
            bolt_len_required = float(b.T + self.sgap)
            b.H = bolt_len_required + (5 - bolt_len_required) % 5
            self.bolts.append(Bolt(b.R, b.T, b.H, b.r))
            self.nuts.append(Nut(n.R, n.T, n.H, n.r1))

        for i in range(self.brow * self.bcol):
            bolt_len_required = float(b.T + self.sbgap)
            b.H = bolt_len_required + (5 - bolt_len_required) % 5
            self.bbolts.append(Bolt(b.R, b.T, b.H, b.r))
            self.bnuts.append(Nut(n.R, n.T, n.H, n.r1))

        for i in range(self.topcliprow * self.topclipcol):
            bolt_len_required = float(b.T + self.tgap)
            b.H = bolt_len_required + (5 - bolt_len_required) % 5
            self.topclipbolts.append(Bolt(b.R, b.T, b.H, b.r))
            self.topclipnuts.append(Nut(n.R, n.T, n.H, n.r1))

        for i in range(self.topclipbrow * self.topclipbcol):
            bolt_len_required = float(b.T + self.tbgap)
            b.H = bolt_len_required + (5 - bolt_len_required) % 5
            self.topclipbbolts.append(Bolt(b.R, b.T, b.H, b.r))
            self.topclipbnuts.append(Nut(n.R, n.T, n.H, n.r1))
Пример #2
0
 def initialiseNutBolts(self):
     b = self.bolt
     n = self.nut
     p = self.intermittentPlate
     for i in np.arange(self.row * self.no_intermitent_connections):
         bolt_len_required = float(self.gap)
         b.H = bolt_len_required + 10
         self.bolts.append(Bolt(b.R, b.T, b.H, b.r))
         self.nuts.append(Nut(n.R, n.T, n.H, n.r1))
         self.boltsabv.append(Bolt(b.R, b.T, b.H, b.r))
         self.nutsabv.append(Nut(n.R, n.T, n.H, n.r1))
     for i in np.arange(self.no_intermitent_connections):
         self.plates.append(Plate(p.L, p.W, p.T))
Пример #3
0
 def initialise_nut_bolts(self):
     b = self.bolt
     n = self.nut
     for i in np.arange(self.row * self.col):
         bolt_len_required = float(b.T + self.gap)
         b.H = bolt_len_required + (5 - bolt_len_required) % 5
         self.bolts.append(Bolt(b.R, b.T, b.H, b.r))
         self.nuts.append(Nut(n.R, n.T, n.H, n.r1))
Пример #4
0
 def initialiseNutBolts_BF(self):
     '''
     :return: This initializes required number of bolts and nuts for below flange.
     '''
     b_BF = self.bolt
     n_BF = self.nut
     for j in range(self.numOfboltsF):
         bolt_length_required = float(n_BF.H + self.nutSpaceF)
         b_BF.H = bolt_length_required + 10
         self.bolts_BF.append(Bolt(b_BF.R, b_BF.T, b_BF.H, b_BF.r))
         self.nuts_BF.append(Nut(n_BF.R, n_BF.T, n_BF.H, n_BF.r1))
Пример #5
0
    def initialise_nut_bolts(self):
        b = self.bolt
        n = self.nut
        for i in range(self.row * self.col):
            bolt_len_required = float(b.T + self.gap)
            b.H = bolt_len_required + (5 - bolt_len_required) % 5
            self.bolts.append(Bolt(b.R, b.T, b.H, b.r))
            self.nuts.append(Nut(n.R, n.T, n.H, n.r1))

    # Newly added
        for i in range(self.cRow * self.cCol):
            bolt_len_required = float(b.T + self.cGap)
            b.H = bolt_len_required + (5 - bolt_len_required) % 5
            self.cBolts.append(Bolt(b.R, b.T, b.H, b.r))
            self.cNuts.append(Nut(n.R, n.T, n.H, n.r1))
        for i in range(self.cRow * self.cCol):
            bolt_len_required = float(b.T + self.cGap)
            b.H = bolt_len_required + (5 - bolt_len_required) % 5
            self.cBolts1.append(Bolt(b.R, b.T, b.H, b.r))
            self.cNuts1.append(Nut(n.R, n.T, n.H, n.r1))
Пример #6
0
 def initialiseNutBolts(self):
     '''
     Initializing the Nut and Bolt
     '''
     b = self.bolt
     n = self.nut
     for i in range(self.row * self.col):
         bolt_len_required = float(b.T + self.gap)
         b.H = bolt_len_required + (5 - bolt_len_required) % 5
         self.bolts.append(Bolt(b.R, b.T, b.H, b.r))
         self.nuts.append(Nut(n.R, n.T, n.H, n.r1))
Пример #7
0
 def initialiseNutBolts_Web(self):
     '''
     :return: This initializes required number of bolts and nuts for web bolting.
     '''
     b_W = self.bolt
     n_W = self.nut
     for k in range(self.numOfboltsW):
         bolt_length_required = float(n_W.H + self.nutSpaceW)
         b_W.H = bolt_length_required + 10
         self.bolts_W.append(Bolt(b_W.R, b_W.T, b_W.H, b_W.r))
         self.nuts_W.append(Nut(n_W.R, n_W.T, n_W.H, n_W.r1))
Пример #8
0
 def initialiseNutBolts(self):
     '''
     Initialise the Nut and Bolt 
     '''
     b = self.bolt
     n = self.nut
     for i in range(self.numOfBolts):
         bolt_length_required = float(b.T + self.gap)
         b.H = bolt_length_required + (bolt_length_required - 5) % 5
         self.bolts.append(Bolt(b.R, b.T, b.H, b.r))
         self.nuts.append(Nut(n.R, n.T, n.H, n.r1))
Пример #9
0
    def initialiseNutBolts_AF(self):
        '''
        :return: This initializes required number of bolts and nuts for above flange.
        '''
        b_AF = self.bolt
        n_AF = self.nut

        for i in range(self.numOfboltsF):
            bolt_length_required = float(n_AF.H +
                                         self.nutSpaceF)  #todo: anjali
            b_AF.H = bolt_length_required + (bolt_length_required - 5) % 5
            self.bolts_AF.append(Bolt(b_AF.R, b_AF.T, b_AF.H, b_AF.r))
            # print("bolt", b_AF.R, b_AF.T, b_AF.H, b_AF.r)
            self.nuts_AF.append(Nut(n_AF.R, n_AF.T, n_AF.H, n_AF.r1))
Пример #10
0
if __name__ == '__main__':
    from cad.items.bolt import Bolt
    from cad.items.nut import Nut
    import numpy

    from OCC.gp import gp_Pnt
    from OCC.Display.SimpleGui import init_display

    display, start_display, add_menu, add_function_to_menu = init_display()

    nutboltArrayOrigin = numpy.array([0., 0., 0.])
    gaugeDir = numpy.array([0.0, 1.0, 0])
    pitchDir = numpy.array([1.0, 0.0, 0])

    bolt = Bolt(R=12, T=5, H=6, r=6)
    nut = Nut(R=bolt.R, T=bolt.T, H=bolt.T + 1, innerR1=bolt.r)
    nut_space = 10 + 5 + nut.T  # member.T + plate.T + nut.T
    Obj = '6'
    boltDir = numpy.array([0, 0, 1.0])
    numOfboltsF = 24
    plateAbvFlangeL = 100

    nut_bolt_array = NutBoltArray_BF(Obj, nut, bolt, numOfboltsF, nut_space)

    nut_bolt_array.placeBF(nutboltArrayOrigin, pitchDir, gaugeDir, boltDir, plateAbvFlangeL)
    nut_bolt_array.create_modelBF()

    array = nut_bolt_array.get_modelsBF()

    Point = gp_Pnt(0.0, 0.0, 0.0)
Пример #11
0
    from OCC.Core.Graphic3d import Graphic3d_NOT_2D_ALUMINUM
    from utilities import osdag_display_shape
    # from cad.common_logic import CommonDesignLogic

    from OCC.gp import gp_Pnt
    from OCC.Display.SimpleGui import init_display

    display, start_display, add_menu, add_function_to_menu = init_display()

    Obj = 'Star Angles'  #'Back to Back Channels'  # 'Channels'  #'  #'Angles'  #      or 'Back to Back Angles' 'Channels' or

    # weld_size = 6
    # s = max(15, weld_size)

    plate = GassetPlate(L=360 + 50, H=205.0, T=10, degree=30)
    bolt = Bolt(R=8, T=5, H=6, r=3)
    nut = Nut(R=bolt.R, T=bolt.T, H=bolt.T + 1, innerR1=bolt.r)
    intermittentPlate = Plate(L= 2*125 , W=70, T=plate.T)

    if Obj == 'Channels' or Obj == 'Back to Back Channels':
        member = Channel(B=50, T=6.6, D=125, t=3, R1=6.0, R2=2.4, L=4000)
        # plate_intercept = plate.L - s - 50
        if Obj == 'Channels':
            nut_space = member.t + plate.T + nut.T  # member.T + plate.T + nut.T
        else:
            nut_space = 2 * member.t + plate.T + nut.T  # 2*member.T + plate.T + nut.T
        # plateObj = 0.0

        nut_bolt_array = NutBoltArray(Obj, nut, bolt, nut_space)
        intermittentConnection = IntermittentNutBoltPlateArray(Obj, nut, bolt, intermittentPlate, nut_space)
Пример #12
0
    from cad.items.groove_weld import GrooveWeld
    from cad.MomentConnections.CCEndPlateCAD.nutBoltPlacement import NutBoltArray

    import OCC.Core.V3d

    from OCC.gp import gp_Pnt
    from OCC.Display.SimpleGui import init_display

    display, start_display, add_menu, add_function_to_menu = init_display()

    column = ISection(B=250, T=12.7, D=400, t=9.1, R1=11, R2=5.5, alpha=94, length=1000, notchObj=None)
    endPlate = Plate(L=column.D, W=column.B, T=45)
    flangeWeld = GrooveWeld(b=column.T, h=20, L=column.B)
    webWeld = GrooveWeld(b=column.t, h=20, L=column.D - 2 * column.T)

    bolt = Bolt(R=14, T=10, H=13, r=8)
    nut = Nut(R=bolt.R, T=bolt.T, H=bolt.T + 1, innerR1=bolt.r)
    nut_space = 2 * endPlate.T + nut.T  # member.T + plate.T + nut.T
    Obj = '6'

    nut_bolt_array = NutBoltArray(Obj, nut, bolt, nut_space)

    CCEndPlate = CCEndPlateCAD(column, endPlate, flangeWeld, webWeld, nut_bolt_array)

    CCEndPlate.create_3DModel()
    column = CCEndPlate.get_column_models()
    plates = CCEndPlate.get_plate_models()
    welds = CCEndPlate.get_weld_models()
    nutBolts = CCEndPlate.get_nut_bolt_models()

    Point = gp_Pnt(0.0, 0.0, 0.0)