Пример #1
0
 def initialiseNutBolts(self):
     b = self.bolt
     n = self.nut
     for i in range(self.row * self.col):
         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.row * self.col):
         self.bolts1.append(Bolt(b.R, b.T, b.H, b.r))
         self.nuts1.append(Nut(n.R, n.T, n.H, n.r1))
Пример #2
0
 def initialiseNutBolts(self):
     '''
     Initializing the Nut and Bolt 
     '''
     b = self.bolt
     n = self.nut
     for i in range(self.row * self.col):
         self.bolts.append(Bolt(b.R, b.T, b.H, b.r))
         self.nuts.append(Nut(n.R, n.T, n.H, n.r1))
Пример #3
0
    def initialiseNutBolts(self):
        b = self.bolt
        n = self.nut
        for i in range(self.row * self.col):
            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):
            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):
            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):
            self.topclipbbolts.append(Bolt(b.R, b.T, b.H, b.r))
            self.topclipbnuts.append(Nut(n.R, n.T, n.H, n.r1))
Пример #4
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))
Пример #5
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from nut import Nut

sample_bot = Nut.from_config('sample.cfg')

sample.start_bot()
Пример #6
0
    def create3DBeamWebBeamWeb(self):
        '''self,uiObj,resultObj,dictbeamdata,dictcoldata):
        creating 3d cad model with beam web beam web

        '''
        ##### PRIMARY BEAM PARAMETERS #####
        pBeam_D = int(self.dictcoldata[QString("D")])
        pBeam_B = int(self.dictcoldata[QString("B")])
        pBeam_tw = float(self.dictcoldata[QString("tw")])
        pBeam_T = float(self.dictcoldata[QString("T")])
        pBeam_alpha = float(self.dictcoldata[QString("FlangeSlope")])
        pBeam_R1 = float(self.dictcoldata[QString("R1")])
        pBeam_R2 = float(self.dictcoldata[QString("R2")])
        pBeam_length = 800.0  # This parameter as per view of 3D cad model

        # beam = ISectionold(B = 140, T = 16,D = 400,t = 8.9, R1 = 14, R2 = 7, alpha = 98,length = 500)
        column = ISection(B=pBeam_B,
                          T=pBeam_T,
                          D=pBeam_D,
                          t=pBeam_tw,
                          R1=pBeam_R1,
                          R2=pBeam_R2,
                          alpha=pBeam_alpha,
                          length=pBeam_length,
                          notchObj=None)

        ##### SECONDARY BEAM PARAMETERS ######

        sBeam_D = int(self.dictbeamdata[QString("D")])
        sBeam_B = int(self.dictbeamdata[QString("B")])
        sBeam_tw = float(self.dictbeamdata[QString("tw")])
        sBeam_T = float(self.dictbeamdata[QString("T")])
        sBeam_alpha = float(self.dictbeamdata[QString("FlangeSlope")])
        sBeam_R1 = float(self.dictbeamdata[QString("R1")])
        sBeam_R2 = float(self.dictbeamdata[QString("R2")])

        # --Notch dimensions
        notchObj = Notch(R1=pBeam_R1,
                         height=(pBeam_T + pBeam_R1),
                         width=((pBeam_B - (pBeam_tw + 40)) / 2.0 + 10),
                         length=sBeam_B)
        # column = ISectionold(B = 83, T = 14.1, D = 250, t = 11, R1 = 12, R2 = 3.2, alpha = 98, length = 1000)
        beam = ISection(B=sBeam_B,
                        T=sBeam_T,
                        D=sBeam_D,
                        t=sBeam_tw,
                        R1=sBeam_R1,
                        R2=sBeam_R2,
                        alpha=sBeam_alpha,
                        length=500,
                        notchObj=notchObj)

        #### WELD,PLATE,BOLT AND NUT PARAMETERS #####

        fillet_length = self.resultObj['Plate']['height']
        fillet_thickness = self.resultObj['Weld']['thickness']
        plate_width = self.resultObj['Plate']['width']
        plate_thick = self.uiObj['Plate']['Thickness (mm)']
        bolt_dia = self.uiObj["Bolt"]["Diameter (mm)"]
        bolt_r = bolt_dia / 2
        bolt_R = self.bolt_R
        nut_R = bolt_R
        bolt_T = self.bolt_T
        bolt_Ht = self.bolt_Ht
        nut_T = self.nut_T
        nut_Ht = 12.2  # 150

        # plate = Plate(L= 300,W =100, T = 10)
        plate = Plate(L=fillet_length, W=plate_width, T=plate_thick)

        # Fweld1 = FilletWeld(L= 300,b = 6, h = 6)
        Fweld1 = FilletWeld(L=fillet_length,
                            b=fillet_thickness,
                            h=fillet_thickness)

        # bolt = Bolt(R = bolt_R,T = bolt_T, H = 38.0, r = 4.0 )
        bolt = Bolt(R=bolt_R, T=bolt_T, H=bolt_Ht, r=bolt_r)

        # nut =Nut(R = bolt_R, T = 10.0,  H = 11, innerR1 = 4.0, outerR2 = 8.3)
        nut = Nut(R=bolt_R, T=nut_T, H=nut_Ht, innerR1=bolt_r)

        gap = sBeam_tw + plate_thick + nut_T

        nutBoltArray = NutBoltArray(self.resultObj, nut, bolt, gap)
        beamwebconn = BeamWebBeamWeb(column, beam, notchObj, plate, Fweld1,
                                     nutBoltArray)
        beamwebconn.create_3dmodel()

        return beamwebconn
Пример #7
0
    def create3DColFlangeBeamWeb(self):
        '''
        Creating 3d cad model with column flange beam web connection

        '''
        # self.dictbeamdata  = self.fetchBeamPara()
        # self.resultObj = self.call_finCalculation()
        fillet_length = self.resultObj['Plate']['height']
        fillet_thickness = self.resultObj['Weld']['thickness']
        plate_width = self.resultObj['Plate']['width']
        plate_thick = self.uiObj['Plate']['Thickness (mm)']
        ##### BEAM PARAMETERS #####
        beam_D = int(self.dictbeamdata[QString("D")])
        beam_B = int(self.dictbeamdata[QString("B")])
        beam_tw = float(self.dictbeamdata[QString("tw")])
        beam_T = float(self.dictbeamdata[QString("T")])
        beam_alpha = float(self.dictbeamdata[QString("FlangeSlope")])
        beam_R1 = float(self.dictbeamdata[QString("R1")])
        beam_R2 = float(self.dictbeamdata[QString("R2")])
        beam_length = 500.0  # This parameter as per view of 3D cad model

        # beam = ISectionold(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=beam_length,
                        notchObj=None)

        ##### COLUMN PARAMETERS ######

        column_D = int(self.dictcoldata[QString("D")])
        column_B = int(self.dictcoldata[QString("B")])
        column_tw = float(self.dictcoldata[QString("tw")])
        column_T = float(self.dictcoldata[QString("T")])
        column_alpha = float(self.dictcoldata[QString("FlangeSlope")])
        column_R1 = float(self.dictcoldata[QString("R1")])
        column_R2 = float(self.dictcoldata[QString("R2")])

        # column = ISectionold(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,
                          notchObj=None)

        #### WELD,PLATE,BOLT AND NUT PARAMETERS #####

        fillet_length = self.resultObj['Plate']['height']
        fillet_thickness = self.resultObj['Weld']['thickness']
        plate_width = self.resultObj['Plate']['width']
        plate_thick = self.uiObj['Plate']['Thickness (mm)']
        bolt_dia = self.uiObj["Bolt"]["Diameter (mm)"]
        bolt_r = bolt_dia / 2
        # bolt_R = self.boltHeadDia_Calculation(bolt_dia) /2
        bolt_R = self.bolt_R
        # bolt_R = bolt_r + 7
        nut_R = bolt_R
        # bolt_T = self.boltHeadThick_Calculation(bolt_dia)
        bolt_T = self.bolt_T
        # bolt_T = 10.0 # minimum bolt thickness As per Indian Standard
        # bolt_Ht = self.boltLength_Calculation(bolt_dia)
        bolt_Ht = self.bolt_Ht
        # bolt_Ht =100.0 # minimum bolt length as per Indian Standard
        # nut_T = self.nutThick_Calculation(bolt_dia)# bolt_dia = nut_dia
        nut_T = self.nut_T
        # nut_T = 12.0 # minimum nut thickness As per Indian Standard
        nut_Ht = 12.2  #

        # plate = Plate(L= 300,W =100, T = 10)
        plate = Plate(L=fillet_length, W=plate_width, T=plate_thick)

        # Fweld1 = FilletWeld(L= 300,b = 6, h = 6)
        Fweld1 = FilletWeld(L=fillet_length,
                            b=fillet_thickness,
                            h=fillet_thickness)

        # bolt = Bolt(R = bolt_R,T = bolt_T, H = 38.0, r = 4.0 )
        bolt = Bolt(R=bolt_R, T=bolt_T, H=bolt_Ht, r=bolt_r)

        # nut =Nut(R = bolt_R, T = 10.0,  H = 11, innerR1 = 4.0, outerR2 = 8.3)
        nut = Nut(R=bolt_R, T=nut_T, H=nut_Ht, innerR1=bolt_r)

        gap = beam_tw + plate_thick + nut_T

        nutBoltArray = NutBoltArray(self.resultObj, nut, bolt, gap)

        colflangeconn = ColFlangeBeamWeb(column, beam, Fweld1, plate,
                                         nutBoltArray)
        colflangeconn.create_3dmodel()
        return colflangeconn
Пример #8
0
 def spawn_random_nut(self):
     nutx = random.randint(0, self.world.WIDTH_TILES-1)
     nuty = random.randint(0, self.world.HEIGHT_TILES-1)
     nut = Nut(nutx, nuty)
     self.world.nuts[nut.id] = nut