def setFromDict(self, dct): ''' Read member values from a dictionary.''' self.N = dct['N'] self.offsetN = dct['offsetN'] self.B = dct['B'] self.offsetB = dct['offsetB'] self.t = dct['t'] steelClassName = dct['steelClassName'] + '()' self.steel = eval(steelClassName) self.steel.setFromDict(dct['steel']) if dct['steelShapeClassName'] == "materials.astm_aisc.ASTM_materials.IShape": shape = dct['steelShape']['shape'] bf = shape['b'] tf = shape['tf'] tw = shape['tw'] hw = shape['hi'] name = shape['name'] steelShapeClassName = f"{dct['steelShapeClassName']}({bf}, {tf}, {tw}, {hw}, steel=self.steel, name='{name}')" else: steelShapeClassName = dct['steelShapeClassName'] + '()' self.steelShape = eval(steelShapeClassName) self.steelShape.setFromDict(dct['steelShape']) self.anchorGroup = ASTM_materials.AnchorGroup(steel=None, diameter=0.0, positions=[]) self.anchorGroup.setFromDict(dct['anchorGroup']) xyz = dct['origin'] self.origin = geom.Pos3d(xyz[0], xyz[1], xyz[2]) self.fc = dct['fc'] self.nShearBolts = dct['nShearBolts']
def getAnchorGroup(steel, diameter, squareSide, xCenter=0.0, yCenter=0.0): ''' Return four anchors in the corners of the square.''' delta = squareSide / 2.0 origin = geom.Pos3d(xCenter, yCenter, 0.0) positions = list() positions.append(origin + geom.Vector3d(delta, delta, 0.0)) positions.append(origin + geom.Vector3d(-delta, delta, 0.0)) positions.append(origin + geom.Vector3d(-delta, -delta, 0.0)) positions.append(origin + geom.Vector3d(delta, -delta, 0.0)) return ASTM_materials.AnchorGroup(steel, diameter, positions)
def setFromDict(self,dct): ''' Read member values from a dictionary.''' self.N= dct['N'] self.offsetN= dct['offsetN'] self.B= dct['B'] self.offsetB= dct['offsetB'] self.t= dct['t'] steelShapeClassName= dct['steelShapeClassName']+'()' self.steelShape= eval(steelShapeClassName) self.steelShape.setFromDict(dct['steelShape']) self.anchorGroup= ASTM_materials.AnchorGroup(steel= None, diameter= 0.0, positions= []) self.anchorGroup.setFromDict(dct['anchorGroup']) steelClassName= dct['steelClassName']+'()' self.steel= eval(steelClassName) self.steel.setFromDict(dct['steel']) xyz= dct['origin'] self.origin= geom.Pos3d(xyz[0],xyz[1],xyz[2]) self.fc= dct['fc'] self.nShearBolts= dct['nShearBolts']
positions.append(geom.Pos3d(x1, -y1, 0.0)) positions.append(geom.Pos3d(-x1, -y1, 0.0)) positions.append(geom.Pos3d(-x1, y1, 0.0)) rodMaterial = ASTM_materials.F1554gr36 #rodMaterial= ASTM_materials.F1554gr55 ## Bolt template boltTemplate = ASTM_materials.AnchorBolt(name='template', steel=rodMaterial, diameter=boltDiameter) ## Plate washer #plateWasher= ASTM_materials.SquarePlateWasher(boltTemplate) plateWasher = None anchorGroupLeft = ASTM_materials.AnchorGroup(steel=rodMaterial, diameter=boltDiameter, positions=positions, plateWasher=plateWasher) h_ef = .35 h_total = h_ef + 0.15 + 0.05 + 4.0 * boltDiameter # 150mm of concrete + 50mm grouting = total 200mm print(h_total) # Base plate B = math.ceil((steelShape.get('b') + 0.06) / 0.05) * 0.05 N = math.ceil((steelShape.get('h') + 0.06) / 0.05) * 0.05 # B = .6 # N = .4 # N =.4 reactionsFileName = 'uls_reactions.csv' basePlateGroup = bpd.getBasePlateGroupFromFile(B=B, N=N,