def create_long_steel(self): steel_list = [] if self.AnchorBend: fst_shape = self.shape_longitudinal_steel(self.FirstDia, self.Length, self.AnchorBendLength, self.AnchorBend) else: fst_shape = self.shape_longitudinal_steel(self.FirstDia, self.Length, self.AnchorLength) cover = self.ConcreteCover + self.FirstDia / 2 + self.StirDiameter fst_point_f = AllplanGeo.Point3D(0, 0, cover) fst_point_t = AllplanGeo.Point3D(0, self.Width, cover) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, fst_shape, fst_point_f, fst_point_t, cover, cover, self.FirstNum)) other_shape = self.shape_longitudinal_steel( self.OtherDia, self.Length, -self.SlotLength - self.OtherHeadCover) distance = 0 for num in range(self.LongBarLines - 1): distance += self.BarDistance oth_point_f = AllplanGeo.Point3D(0, 0, cover + distance) oth_point_t = AllplanGeo.Point3D(0, self.Width, cover + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, other_shape, oth_point_f, oth_point_t, cover, cover, self.FirstNum)) return steel_list
def create_waist_steel(self): steel_list = [] waist_length = (self.Length - self.CutLength - 2 * self.WaistHeadCover) / 2 waist_shape = self.shape_waist_steel(self.WaistBarDia, self.WaistHeadCover, self.CutPosition, self.CutBarExtend) m_waist_shape = self.shape_waist_steel( self.WaistBarDia, self.CutPosition + self.CutLength, self.Length - self.WaistHeadCover, self.CutBarExtend, True) cover = self.ConcreteCover + self.StirDiameter distance = 0 for x in range(self.WaistNum): point_f = AllplanGeo.Point3D(0, 0, self.WaistPosition + distance) point_t = AllplanGeo.Point3D(0, self.Width, self.WaistPosition + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, waist_shape, point_f, point_t, cover, cover, 2)) m_point_f = AllplanGeo.Point3D(0, 0, self.WaistPosition + distance) m_point_t = AllplanGeo.Point3D(0, self.Width, self.WaistPosition + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, m_waist_shape, m_point_f, m_point_t, cover, cover, 2)) distance += self.WaistDistance return steel_list
def create_stirrup(self): stirrup_list = [] point_f_1 = AllplanGeo.Point3D(self.SlotLength, 0, 0) point_t_1 = AllplanGeo.Point3D(self.CutPosition, 0, 0) #构模 shape_stirrup = self.shape_stirrup() #箍筋 stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, shape_stirrup, point_f_1, point_t_1, self.HeadCover, self.EndCover, self.StirDistance, 3)) #判断间距添加箍筋 if self.cut_pos_1 - self.last_pos_1 > self.StirDistance / 2 \ and self.cut_pos_1 - self.last_pos_1 < self.StirDistance + self.StirDiameter: point_cnt_1 = AllplanGeo.Point3D( self.last_pos_1 + self.StirDistance / 2, 0, 0) point_cnt_2 = AllplanGeo.Point3D(self.cut_pos_1, 0, 0) vec = AllplanGeo.Vector3D( AllplanGeo.Point3D(0, 0, 0), AllplanGeo.Point3D(self.StirDistance / 2, 0, 0)) s_shape = AllplanReinf.BendingShape(shape_stirrup) s_shape.Move( AllplanGeo.Vector3D(AllplanGeo.Point3D(self.cut_pos_1, 0, 0))) stirrup_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_cnt_1, point_cnt_2, s_shape)) point_f_2 = AllplanGeo.Point3D(self.CutPosition + self.CutLength, 0, 0) point_t_2 = AllplanGeo.Point3D(self.Length - self.SlotLength, 0, 0) stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 1, shape_stirrup, point_t_2, point_f_2, self.HeadCover, self.EndCover, self.StirDistance, 3)) if self.cut_pos_2 - self.last_pos_2 > self.StirDistance / 2 \ and self.cut_pos_2 - self.last_pos_2 < self.StirDistance + self.StirDiameter: point_cnt_3 = AllplanGeo.Point3D(self.CutPosition + self.CutLength, 0, 0) point_cnt_4 = AllplanGeo.Point3D(self.Length - self.SlotLength, 0, 0) vec = AllplanGeo.Vector3D( AllplanGeo.Point3D(0, 0, 0), AllplanGeo.Point3D(self.StirDistance / 2, 0, 0)) s_shape = AllplanReinf.BendingShape(shape_stirrup) s_shape.Move( AllplanGeo.Vector3D( AllplanGeo.Point3D( self.CutPosition + self.CutLength + self.EndCover, 0, 0))) stirrup_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_cnt_3, point_cnt_4, s_shape)) return stirrup_list
def create_stirrup(self): stirrup_list = [] #构模 shape_stirrup = self.shape_stirrup(self.StirrupType) point_f_1 = AllplanGeo.Point3D(0, 0, 0) point_t_1 = AllplanGeo.Point3D(self.StirDenseRegionLength, 0, 0) stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, shape_stirrup, point_f_1, point_t_1, self.StirBothEndLength, 0, self.StirDenseRegionDistance, 3)) point_f_2 = AllplanGeo.Point3D( self.Length - self.StirDenseRegionLength, 0, 0) point_t_2 = AllplanGeo.Point3D(self.Length, 0, 0) stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, shape_stirrup, point_f_2, point_t_2, 0, self.StirBothEndLength, self.StirDenseRegionDistance, 2)) point_f = AllplanGeo.Point3D(self.StirDenseRegionLength, 0, 0) point_t = AllplanGeo.Point3D(self.Length - self.StirDenseRegionLength, 0, 0) stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, shape_stirrup, point_f, point_t, self.StirDenseRegionDistance / 2, self.StirDenseRegionDistance / 2, self.StirrupSparseRegionDistance, 3)) if steel_modify(self.Length - 2 * self.StirDenseRegionLength, self.StirDiameter, self.StirrupSparseRegionDistance, self.StirDenseRegionDistance / 2, self.StirDenseRegionDistance / 2): point_cnt_1 = AllplanGeo.Point3D(self.StirDenseRegionLength, 0, 0) point_cnt_2 = AllplanGeo.Point3D(self.Length, 0, 0) vec = AllplanGeo.Vector3D( AllplanGeo.Point3D(0, 0, 0), AllplanGeo.Point3D(self.StirrupSparseRegionDistance / 2, 0, 0)) s_shape = AllplanReinf.BendingShape(shape_stirrup) s_shape.Move( AllplanGeo.Vector3D( AllplanGeo.Point3D( self.Length - self.StirDenseRegionLength, 0, 0))) stirrup_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_cnt_1, point_cnt_2, s_shape)) return stirrup_list
def create_longitudinal_steel(self): steel_list = [] rebar_prop = { 'diameter': self.VertSteelDia, 'bending_roller': math.pi * 3 * self.VertSteelDia / 40, 'steel_grade': self.VertSteelGrade, 'concrete_grade': self.ConcreteGrade, 'bending_shape_type': AllplanReinf.BendingShapeType.LongitudinalBar } cover = ConcreteCoverProperties(0, 0, 0, self.VertBottomCover) longitudinal = LongitudinalSteel(cover, rebar_prop) steel_shape = longitudinal.shape_extend_steel( length=self.Height, extend=self.VertExtendLength, extend_side=2, vertical=True) point_f_1 = AllplanGeo.Point3D( 0, self.StirFrontCover + self.StirDiameter + self.VertSteelDia, 0) point_t_1 = AllplanGeo.Point3D( self.Length, self.StirFrontCover + self.StirDiameter + self.VertSteelDia, 0) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, steel_shape, point_f_1, point_t_1, self.StirSideCover + self.StirDiameter + self.VertSteelDia, self.StirSideCover + self.StirDiameter + self.VertSteelDia, self.VertDistance, 4)) point_f_2 = AllplanGeo.Point3D( 0, self.Width - (self.StirFrontCover + self.StirDiameter + self.VertSteelDia), 0) point_t_2 = AllplanGeo.Point3D( self.Length, self.Width - (self.StirFrontCover + self.StirDiameter + self.VertSteelDia), 0) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, steel_shape, point_f_2, point_t_2, self.StirSideCover + self.StirDiameter + self.VertSteelDia, self.StirSideCover + self.StirDiameter + self.VertSteelDia, self.VertDistance, 4)) return steel_list
def create_reinforcement(self, build_ele): ''' Create the reinforcement element 构造并添加增强构建函数 Args: build_ele: build_ele.get_parameter_dict() build_ele: .pyp文件内的 Name标签的参数字典 ''' reinforcement = [] #参数 #-箍筋参数 high_den_distance = build_ele['HighDensityDistance'] #加密区间距 low_den_distance = build_ele['LowDensityDistance'] #非加密区间距 #-箍筋坐标 head_high_den_point_f = AllplanGeo.Point3D(0, 0, 0) #加密区头部起点 head_high_den_point_t = AllplanGeo.Point3D(self.height * 2, 0, 0) #加密区头部终点 tail_high_den_point_f = AllplanGeo.Point3D( self.length - self.height * 2, 0, 0) #加密区尾部起点 tail_high_den_point_t = AllplanGeo.Point3D(self.length, 0, 0) #加密区尾部终点 low_den_point_f = AllplanGeo.Point3D(self.height * 2, 0, 0) #非加密区起点 low_den_point_t = AllplanGeo.Point3D(self.length - self.height * 2, 0, 0) #非加密区终点 #-底筋参数 bottom_bar_extend = build_ele['BottomBarExtendLength'] #底筋伸出长度 bottom_bar_diameter = build_ele['BottomBarDiameter'] #底筋直径 bottom_bar_cnt = build_ele['BottomBarCount'] #底筋数量 bottom_bar_distance = build_ele['BottomBarDistance'] #底筋间距 stir_concrete_cover = build_ele['StirrupConcreteCover'] #箍筋保护层厚度 stir_diameter = build_ele['StirrupDiameter'] #箍筋直径 #-底筋坐标 bottom_bar_point_f = AllplanGeo.Point3D( 0, stir_concrete_cover + stir_diameter + bottom_bar_diameter / 2, stir_concrete_cover + stir_diameter + bottom_bar_diameter / 2) #底筋起点 bottom_bar_point_t = AllplanGeo.Point3D( 0, self.width - stir_concrete_cover - stir_diameter - bottom_bar_diameter / 2, stir_concrete_cover + stir_diameter + bottom_bar_diameter / 2) #底筋终点 #-顶筋参数 top_bar_extend = build_ele['TopBarExtendLength'] #顶筋伸出长度 top_bar_diameter = build_ele['TopBarDiameter'] #顶筋直径 top_bar_cnt = build_ele['TopBarCount'] #顶筋数量 top_bar_distance = build_ele['TopBarDistance'] #顶筋间距 #-顶筋坐标 f_top_bar_point_f = AllplanGeo.Point3D( 0, stir_concrete_cover + stir_diameter + bottom_bar_diameter / 2, stir_concrete_cover + stir_diameter + bottom_bar_diameter / 2 + 200) f_top_bar_point_t = AllplanGeo.Point3D( 0, stir_concrete_cover + stir_diameter + bottom_bar_diameter / 2, self.height) b_top_bar_point_f = AllplanGeo.Point3D( 0, self.width - stir_concrete_cover - stir_diameter - bottom_bar_diameter / 2, stir_concrete_cover + stir_diameter + bottom_bar_diameter / 2 + 200) b_top_bar_point_t = AllplanGeo.Point3D( 0, self.width - stir_concrete_cover - stir_diameter - bottom_bar_diameter / 2, self.height) #构模 shape_stirrup = self.shape_stirrup(build_ele) #箍筋 shape_bottom_bar = self.shape_bar(build_ele, bottom_bar_diameter, bottom_bar_extend) #底筋 shape_top_bar = self.shape_bar(build_ele, top_bar_diameter, top_bar_extend) #顶筋 #添加箍筋到加密区头部 reinforcement.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, shape_stirrup, head_high_den_point_f, head_high_den_point_t, 0, 0, high_den_distance)) #添加箍筋到加密区尾部 reinforcement.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 1, shape_stirrup, tail_high_den_point_f, tail_high_den_point_t, 0, 0, high_den_distance)) #添加箍筋到非加密区 reinforcement.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 2, shape_stirrup, low_den_point_f, low_den_point_t, 0, 0, low_den_distance)) #添加底筋到梁底部 reinforcement.append( LinearBarBuilder.create_linear_bar_placement_from_by_dist_count( 3, shape_bottom_bar, bottom_bar_point_f, bottom_bar_point_t, 0, bottom_bar_distance, bottom_bar_cnt)) #添加前侧顶筋 reinforcement.append( LinearBarBuilder.create_linear_bar_placement_from_by_dist_count( 4, shape_top_bar, f_top_bar_point_f, f_top_bar_point_t, 0, top_bar_distance, top_bar_cnt)) #添加后侧顶筋 reinforcement.append( LinearBarBuilder.create_linear_bar_placement_from_by_dist_count( 5, shape_top_bar, b_top_bar_point_f, b_top_bar_point_t, 0, top_bar_distance, top_bar_cnt)) return reinforcement
def create_tie_steel(self): steel_list = [] cover = ConcreteCoverProperties(self.StirSideCover + self.StirDiameter, self.StirSideCover + self.StirDiameter, 0, 0) rebar_prop = { 'diameter': self.TieBarDia, 'bending_roller': 0, 'steel_grade': self.TieBarGrade, 'concrete_grade': self.ConcreteGrade, 'bending_shape_type': AllplanReinf.BendingShapeType.LongitudinalBar } tie = Stirrup(cover, rebar_prop) tie_shape = tie.shape_tie_steel(self.Width + 3 * self.StirDiameter + 2 * self.TieBarDia, 4 * self.TieBarDia, RotationAngles(225, 0, 90), hook=self.TieBendingLength, degrees=self.TieBarAngle) distance = 0 for x in range(self.WaistRows): point_f_1 = AllplanGeo.Point3D( -self.StirDiameter, -1.5 * self.StirDiameter - self.TieBarDia, self.WaistPosition + self.WaistBarDiameter + distance) point_t_1 = AllplanGeo.Point3D( self.StirDenseRegionLength - self.StirDiameter, -1.5 * self.StirDiameter - self.TieBarDia, self.WaistPosition + self.WaistBarDiameter + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, tie_shape, point_f_1, point_t_1, self.StirBothEndLength, 0, self.StirDenseRegionDistance, 3)) point_f_2 = AllplanGeo.Point3D( self.Length - self.StirDenseRegionLength - self.StirDiameter, -1.5 * self.StirDiameter - self.TieBarDia, self.WaistPosition + self.WaistBarDiameter + distance) point_t_2 = AllplanGeo.Point3D( self.Length - self.StirDiameter, -1.5 * self.StirDiameter - self.TieBarDia, self.WaistPosition + self.WaistBarDiameter + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, tie_shape, point_f_2, point_t_2, 0, self.StirBothEndLength, self.StirDenseRegionDistance, 2)) point_f = AllplanGeo.Point3D( self.StirDenseRegionLength - self.StirDiameter, -1.5 * self.StirDiameter - self.TieBarDia, self.WaistPosition + self.WaistBarDiameter + distance) point_t = AllplanGeo.Point3D( self.Length - self.StirDenseRegionLength - self.StirDiameter, -1.5 * self.StirDiameter - self.TieBarDia, self.WaistPosition + self.WaistBarDiameter + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, tie_shape, point_f, point_t, self.StirDenseRegionDistance / 2, self.StirDenseRegionDistance / 2, self.StirrupSparseRegionDistance, 3)) if steel_modify(self.Length - 2 * self.StirDenseRegionLength, self.StirDiameter, self.StirrupSparseRegionDistance, self.StirDenseRegionDistance / 2, self.StirDenseRegionDistance / 2): point_cnt_1 = AllplanGeo.Point3D(self.StirDenseRegionLength, 0, 0) point_cnt_2 = AllplanGeo.Point3D(self.Length, 0, 0) vec = AllplanGeo.Vector3D( AllplanGeo.Point3D(0, 0, 0), AllplanGeo.Point3D(self.StirrupSparseRegionDistance / 2, 0, 0)) s_shape = AllplanReinf.BendingShape(tie_shape) s_shape.Move( AllplanGeo.Vector3D( AllplanGeo.Point3D( self.Length - self.StirDenseRegionLength - self.StirDiameter, -1.5 * self.StirDiameter - self.TieBarDia, self.WaistPosition + self.WaistBarDiameter + distance))) steel_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_cnt_1, point_cnt_2, s_shape)) distance += self.WaistDistance return steel_list
def create_waist_steel(self): steel_list = [] cover = ConcreteCoverProperties(self.StirSideCover + self.StirDiameter, self.StirSideCover + self.StirDiameter, 0, 0) rebar_prop = { 'diameter': self.WaistBarDiameter, 'bending_roller': 0, 'steel_grade': self.WaistBarSteelGrade, 'concrete_grade': self.ConcreteGrade, 'bending_shape_type': AllplanReinf.BendingShapeType.LongitudinalBar } waist = LongitudinalSteel(cover, rebar_prop) if self.AnchorHead90_W and not self.AnchorTail90_W: waist_shape = waist.shape_hook_steel(length=self.Length, hook=15 * self.WaistBarDiameter, left=self.AnchorHead_W, right=self.AnchorTail_W, rotate=90, hook_side=4) elif not self.AnchorHead90_W and self.AnchorTail90_W: waist_shape = waist.shape_hook_steel(length=self.Length, hook=15 * self.WaistBarDiameter, left=self.AnchorHead_W, right=self.AnchorTail_W, rotate=90, hook_side=5) elif self.AnchorHead90_W and self.AnchorTail90_W: waist_shape = waist.shape_hook_steel(length=self.Length, hook=15 * self.WaistBarDiameter, left=self.AnchorHead_W, right=self.AnchorTail_W, rotate=90, hook_side=3) else: waist_shape = waist.shape_extend_steel(length=self.Length, left=self.AnchorHead_W, right=self.AnchorTail_W, extend_side=3) distance = 0 for x in range(self.WaistRows): W_point_f = AllplanGeo.Point3D( 0, self.StirDiameter + self.StirSideCover, self.WaistPosition + distance) W_point_t = AllplanGeo.Point3D( 0, self.Width - self.StirSideCover - self.StirDiameter, self.WaistPosition + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, waist_shape, W_point_f, W_point_t, 0, 0, 2)) distance += self.WaistDistance return steel_list
def create_longitudinal_steel(self): steel_list = [] cover = ConcreteCoverProperties(self.StirSideCover + self.StirDiameter, self.StirSideCover + self.StirDiameter, self.StirUpsCover + self.StirDiameter, self.StirUpsCover + self.StirDiameter) rebar_prop = { 'bending_roller': 0, 'steel_grade': self.SteelGrade, 'concrete_grade': self.ConcreteGrade, 'bending_shape_type': AllplanReinf.BendingShapeType.LongitudinalBar } rebar_prop.update({'diameter': self.BarDiameter_B1}) longit_B1 = LongitudinalSteel(cover, rebar_prop) rebar_prop.update({'diameter': self.BarDiameter_BO}) longit_BO = LongitudinalSteel(cover, rebar_prop) rebar_prop.update({'diameter': self.BarDiameter_T1}) longit_T1 = LongitudinalSteel(cover, rebar_prop) rebar_prop.update({'diameter': self.BarDiameter_TO}) longit_TO = LongitudinalSteel(cover, rebar_prop) if self.AnchorHead90_T1 and not self.AnchorTail90_T1: T1_steel_shape = longit_T1.shape_hook_steel( self.Length, 15 * self.BarDiameter_T1, left=self.AnchorHead_T1, right=self.AnchorTail_T1, hook_side=4, rotate=90, mirror=True) elif not self.AnchorHead90_T1 and self.AnchorTail90_T1: T1_steel_shape = longit_T1.shape_hook_steel( self.Length, 15 * self.BarDiameter_T1, left=self.AnchorHead_T1, right=self.AnchorTail_T1, hook_side=5, rotate=90, mirror=True) elif self.AnchorHead90_T1 and self.AnchorTail90_T1: T1_steel_shape = longit_T1.shape_hook_steel( self.Length, 15 * self.BarDiameter_T1, left=self.AnchorHead_T1, right=self.AnchorTail_T1, hook_side=3, rotate=90, mirror=True) else: T1_steel_shape = longit_B1.shape_extend_steel( self.Length, left=self.AnchorHead_T1, right=self.AnchorTail_T1, extend_side=3) T1_point_f = AllplanGeo.Point3D( 0, self.StirDiameter + self.StirSideCover, self.Height - (self.StirUpsCover + self.StirDiameter)) T1_point_t = AllplanGeo.Point3D( 0, self.Width - self.StirSideCover - self.StirDiameter, self.Height - (self.StirUpsCover + self.StirDiameter)) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, T1_steel_shape, T1_point_f, T1_point_t, 0, 0, self.BarNumber_T1)) if self.TopSecondRowLongBar: if self.AnchorHead90_TO and not self.AnchorTail90_TO: TO_steel_shape = longit_TO.shape_hook_steel( self.Length, 15 * self.BarDiameter_TO, left=self.AnchorHead_TO, right=self.AnchorTail_TO, hook_side=4, rotate=90, mirror=True) elif self.AnchorTail90_TO and not self.AnchorHead90_TO: TO_steel_shape = longit_TO.shape_hook_steel( self.Length, 15 * self.BarDiameter_TO, left=self.AnchorHead_TO, right=self.AnchorTail_TO, hook_side=5, rotate=90, mirror=True) elif self.AnchorHead90_TO and self.AnchorTail90_TO: TO_steel_shape = longit_TO.shape_hook_steel( self.Length, 15 * self.BarDiameter_TO, left=self.AnchorHead_TO, right=self.AnchorTail_TO, hook_side=3, rotate=90, mirror=True) else: TO_steel_shape = longit_TO.shape_extend_steel( self.Length, left=self.AnchorHead_TO, right=self.AnchorTail_TO, extend_side=3) TO_point_f = AllplanGeo.Point3D( 0, self.StirDiameter + self.StirSideCover, self.Height - (self.StirUpsCover + self.StirDiameter + self.TopBarDistance)) TO_point_t = AllplanGeo.Point3D( 0, self.Width - self.StirSideCover - self.StirDiameter, self.Height - (self.StirUpsCover + self.StirDiameter + self.TopBarDistance)) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, TO_steel_shape, TO_point_f, TO_point_t, 0, 0, self.BarNumber_TO)) if self.AnchorHead90_B1 and not self.AnchorTail90_B1: B1_steel_shape = longit_B1.shape_hook_steel( self.Length, 15 * self.BarDiameter_B1, left=self.AnchorHead_B1, right=self.AnchorTail_B1, hook_side=4, rotate=90) elif self.AnchorTail90_B1 and not self.AnchorHead90_B1: B1_steel_shape = longit_B1.shape_hook_steel( self.Length, 15 * self.BarDiameter_B1, left=self.AnchorHead_B1, right=self.AnchorTail_B1, hook_side=5, rotate=90) elif self.AnchorHead90_B1 and self.AnchorTail90_B1: B1_steel_shape = longit_B1.shape_hook_steel( self.Length, 15 * self.BarDiameter_B1, left=self.AnchorHead_B1, right=self.AnchorTail_B1, hook_side=3, rotate=90) else: B1_steel_shape = longit_B1.shape_extend_steel( self.Length, left=self.AnchorHead_B1, right=self.AnchorTail_B1, extend_side=3) B1_point_f = AllplanGeo.Point3D(0, self.StirDiameter + self.StirSideCover, self.StirUpsCover + self.StirDiameter) B1_point_t = AllplanGeo.Point3D( 0, self.Width - self.StirSideCover - self.StirDiameter, self.StirUpsCover + self.StirDiameter) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, B1_steel_shape, B1_point_f, B1_point_t, 0, 0, self.BarNumber_B1)) if self.BottomSecondRowLongBar: if self.AnchorHead90_BO and not self.AnchorTail90_BO: BO_steel_shape = longit_BO.shape_hook_steel( self.Length, 15 * self.BarDiameter_BO, left=self.AnchorHead_BO, right=self.AnchorTail_BO, hook_side=4, rotate=90) elif self.AnchorTail90_BO and not self.AnchorHead90_BO: BO_steel_shape = longit_BO.shape_hook_steel( self.Length, 15 * self.BarDiameter_BO, left=self.AnchorHead_BO, right=self.AnchorTail_BO, hook_side=5, rotate=90) elif self.AnchorHead90_BO and self.AnchorTail90_BO: BO_steel_shape = longit_BO.shape_hook_steel( self.Length, 15 * self.BarDiameter_BO, left=self.AnchorHead_BO, right=self.AnchorTail_BO, hook_side=3, rotate=90) else: BO_steel_shape = longit_BO.shape_extend_steel( self.Length, left=self.AnchorHead_BO, right=self.AnchorTail_BO, extend_side=3) BO_point_f = AllplanGeo.Point3D( 0, self.StirDiameter + self.StirSideCover, self.StirUpsCover + self.StirDiameter + self.BottomBarDistance) BO_point_t = AllplanGeo.Point3D( 0, self.Width - self.StirSideCover - self.StirDiameter, self.StirUpsCover + self.StirDiameter + self.BottomBarDistance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_count( 0, BO_steel_shape, BO_point_f, BO_point_t, 0, 0, self.BarNumber_BO)) return steel_list
def create_tie_steel(self): steel_list = [] tie_shape = self.shape_tie_steel(self.Width, 4 * self.TieBarDia) distance = 0 for x in range(self.WaistNum): point_f_x = AllplanGeo.Point3D( self.SlotLength + self.StirDiameter, 0, self.WaistPosition - 2 * self.TieBarDia + distance) point_t_x = AllplanGeo.Point3D( self.CutPosition + self.StirDiameter, 0, self.WaistPosition - 2 * self.TieBarDia + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, tie_shape, point_f_x, point_t_x, self.HeadCover, self.EndCover, self.TieBarRatio * self.StirDistance, 3)) if self.cut_pos_1 - self.last_pos_1 > self.StirDistance / 2 \ and self.cut_pos_1 - self.last_pos_1 < self.StirDistance + self.StirDiameter: point_cnt_1 = AllplanGeo.Point3D( self.last_pos_1 + self.StirDistance / 2, 0, 0) point_cnt_2 = AllplanGeo.Point3D(self.cut_pos_1, 0, 0) vec = AllplanGeo.Vector3D( AllplanGeo.Point3D(0, 0, 0), AllplanGeo.Point3D(self.StirDistance / 2, 0, 0)) s_shape = AllplanReinf.BendingShape(tie_shape) s_shape.Move( AllplanGeo.Vector3D( AllplanGeo.Point3D( self.cut_pos_1 + self.StirDiameter, 0, self.WaistPosition - 2 * self.TieBarDia + distance))) steel_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_cnt_1, point_cnt_2, s_shape)) distance += self.WaistDistance distance = 0 for y in range(self.WaistNum): point_f_y = AllplanGeo.Point3D( self.CutPosition + self.CutLength + self.StirDiameter, 0, self.WaistPosition - 2 * self.TieBarDia + distance) point_t_y = AllplanGeo.Point3D( self.Length - self.SlotLength + self.StirDiameter, 0, self.WaistPosition - 2 * self.TieBarDia + distance) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, tie_shape, point_t_y, point_f_y, self.HeadCover, self.EndCover, self.TieBarRatio * self.StirDistance, 3)) if self.cut_pos_2 - self.last_pos_2 > self.StirDistance / 2 \ and self.cut_pos_2 - self.last_pos_2 < self.StirDistance + self.StirDiameter: point_cnt_3 = AllplanGeo.Point3D( self.CutPosition + self.CutLength, 0, 0) point_cnt_4 = AllplanGeo.Point3D(self.Length - self.SlotLength, 0, 0) vec = AllplanGeo.Vector3D( AllplanGeo.Point3D(0, 0, 0), AllplanGeo.Point3D(self.StirDistance / 2, 0, 0)) s_shape = AllplanReinf.BendingShape(tie_shape) s_shape.Move( AllplanGeo.Vector3D( AllplanGeo.Point3D( self.CutPosition + self.CutLength + self.EndCover + self.StirDiameter, 0, self.WaistPosition - 2 * self.TieBarDia + distance))) steel_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_cnt_3, point_cnt_4, s_shape)) distance += self.WaistDistance return steel_list
def create_tie_steel(self): steel_list = [] rebar_prop = { 'diameter': self.TieSteelDia, 'bending_roller': math.pi * 3 * self.TieSteelDia / 40, 'steel_grade': self.TieSteelGrade, 'concrete_grade': self.ConcreteGrade, 'bending_shape_type': AllplanReinf.BendingShapeType.LongitudinalBar } cover = ConcreteCoverProperties(self.StirFrontCover - self.SleeveThick, self.StirFrontCover - self.SleeveThick, 0, 0) cover_1 = ConcreteCoverProperties(self.StirFrontCover, self.StirFrontCover, 0, 0) sleeve_tie = Stirrup(cover, rebar_prop) tie = Stirrup(cover_1, rebar_prop) sleeve_tie_shape = sleeve_tie.shape_tie_steel( length=self.Width, width=4 * self.TieSteelDia, rotate=RotationAngles(225, 0, 90), hook=self.TieSteelHook, degrees=self.TieSideHookAngle) tie_shape = tie.shape_tie_steel(length=self.Width, width=4 * self.TieSteelDia, rotate=RotationAngles(225, 0, 90), hook=self.TieSteelHook, degrees=self.TieSideHookAngle) count = int( (self.Length - 2 * (self.StirSideCover + self.StirDiameter + self.VertSteelDia) - self.TieSteelDia) / self.VertDistance) + 1 bar_distance = ( self.Length - 2 * (self.StirSideCover + self.StirDiameter + self.VertSteelDia) - self.TieSteelDia) / count distance = 0 for x in range(count + 1): point_f_1 = AllplanGeo.Point3D( self.StirSideCover + self.StirDiameter + distance, 0, self.StirDiameter) point_t_1 = AllplanGeo.Point3D( self.StirSideCover + self.StirDiameter + distance, 0, self.SleeveAreaLength + self.StirDiameter) point_f_2 = AllplanGeo.Point3D( self.StirSideCover + self.StirDiameter + distance, 0, self.SleeveAreaLength + self.StirDiameter) point_t_2 = AllplanGeo.Point3D( self.StirSideCover + self.StirDiameter + distance, 0, self.DensAreaLength + self.StirDiameter) point_f = AllplanGeo.Point3D( self.StirSideCover + self.StirDiameter + distance, 0, self.DensAreaLength + self.StirDiameter) point_t = AllplanGeo.Point3D( self.StirSideCover + self.StirDiameter + distance, 0, self.Height + self.StirDiameter) distance += bar_distance if not self.TieHeadVisual and x == 0: continue if not self.TieTailVisual and x == count: continue steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, sleeve_tie_shape, point_f_1, point_t_1, self.StirUpsCover, 0, self.StirDenseDistance, 3)) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, tie_shape, point_f_2, point_t_2, self.StirDenseDistance / 2, 0, self.StirDenseDistance, 3)) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, tie_shape, point_f, point_t, 0, self.StirUpsCover, self.StirSparseDistance, 2)) return steel_list
def create_stirrup(self): stirrup_list = [] rebar_prop = { 'diameter': self.StirDiameter, 'bending_roller': math.pi * 3 * self.StirDiameter / 40, 'steel_grade': self.StirSteelGrade, 'concrete_grade': self.ConcreteGrade, 'bending_shape_type': AllplanReinf.BendingShapeType.Stirrup } #保护层混凝土属性 sleeve_cover = ConcreteCoverProperties( self.StirFrontCover - self.SleeveThick, self.StirFrontCover - self.SleeveThick, self.StirSideCover - self.SleeveThick, self.StirSideCover - self.SleeveThick) cover = ConcreteCoverProperties(self.StirFrontCover, self.StirFrontCover, self.StirSideCover, self.StirSideCover) sleeve_stirrup = Stirrup(sleeve_cover, rebar_prop) stirrup = Stirrup(cover, rebar_prop) if self.StirExtend: if self.StirExtendSide == 1: sleeve_stir_shape = sleeve_stirrup.shape_stirrup( self.Length, self.Width, self.StirExtendLength, 1) stir_shape = stirrup.shape_stirrup(self.Length, self.Width, self.StirExtendLength, 1) elif self.StirExtendSide == 2: sleeve_stir_shape = sleeve_stirrup.shape_stirrup( self.Length, self.Width, self.StirExtendLength, 2) stir_shape = stirrup.shape_stirrup(self.Length, self.Width, self.StirExtendLength, 2) elif self.StirExtendSide == 3: sleeve_stir_shape = sleeve_stirrup.shape_stirrup( self.Length, self.Width, self.StirExtendLength, 3) stir_shape = stirrup.shape_stirrup(self.Length, self.Width, self.StirExtendLength, 3) elif self.StirExtendSide == 4: sleeve_stir_shape = sleeve_stirrup.shape_stirrup( self.Length, self.Width, self.StirExtendLength, 4) stir_shape = stirrup.shape_stirrup(self.Length, self.Width, self.StirExtendLength, 4) else: sleeve_stir_shape = sleeve_stirrup.shape_stirrup( self.Length, self.Width) stir_shape = stirrup.shape_stirrup(self.Length, self.Width) point_f_1 = AllplanGeo.Point3D(0, 0, 0) point_t_1 = AllplanGeo.Point3D(0, 0, self.SleeveAreaLength) stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, sleeve_stir_shape, point_f_1, point_t_1, self.StirUpsCover, 0, self.StirDenseDistance, 3)) point_f_2 = AllplanGeo.Point3D(0, 0, self.SleeveAreaLength) point_t_2 = AllplanGeo.Point3D(0, 0, self.DensAreaLength) stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, stir_shape, point_f_2, point_t_2, self.StirDenseDistance / 2, 0, self.StirDenseDistance, 3)) point_f = AllplanGeo.Point3D(0, 0, self.DensAreaLength) point_t = AllplanGeo.Point3D(0, 0, self.Height) stirrup_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, stir_shape, point_f, point_t, 0, self.StirUpsCover, self.StirSparseDistance, 2)) return stirrup_list
def create_vertical_steel(self): steel_list = [] cover = [ self.Length_BA, self.Length_BA, self.Length_BA, self.Length_BA ] rebar_prop = { 'diameter': self.HoriSteelDia, 'bending_roller': 0, 'steel_grade': self.HoriSteelGrade, 'concrete_grade': self.ConcreteGrade, 'bending_shape_type': AllplanReinf.BendingShapeType.LongitudinalBar } longit = LongitudinalSteel(cover, rebar_prop) if self.BendingAnchor: steel_vert_1 = longit.shape_anchor_steel( self.Height, self.Length_TA, self.BendPosition, self.BendLength, self.BendWidth, 2, False, True) steel_vert_2 = longit.shape_anchor_steel( self.Height, self.Length_TA, self.BendPosition, self.BendLength, self.BendWidth, 2, True, True) else: steel_vert_1 = steel_vert_2 = longit.shape_extend_steel( length=self.Height, extend=self.Length_TA, extend_side=2, vertical=True) point_f_1 = AllplanGeo.Point3D(0, self.HoriFrontCover + self.HoriSteelDia, 0) point_t_1 = AllplanGeo.Point3D(self.Length, self.HoriFrontCover + self.HoriSteelDia, 0) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, steel_vert_1, point_f_1, point_t_1, self.VertSideCover, self.VertSideCover, self.VertDistance, 3)) point_f_2 = AllplanGeo.Point3D( 0, self.Width - self.HoriFrontCover - self.HoriSteelDia, 0) point_t_2 = AllplanGeo.Point3D( self.Length, self.Width - self.HoriFrontCover - self.HoriSteelDia, 0) steel_list.append( LinearBarBuilder.create_linear_bar_placement_from_to_by_dist( 0, steel_vert_2, point_f_2, point_t_2, self.VertSideCover, self.VertSideCover, self.VertDistance, 3)) if steel_modify(self.Length, self.VertSteelDia, self.VertDistance, self.VertSideCover, self.VertSideCover): point_f_3 = AllplanGeo.Point3D(0, 0, 0) point_t_3 = AllplanGeo.Point3D(self.Length, 0, 0) vec = AllplanGeo.Vector3D( AllplanGeo.Point3D(0, 0, 0), AllplanGeo.Point3D(self.VertDistance / 2, 0, 0)) s_shape_1 = AllplanReinf.BendingShape(steel_vert_1) s_shape_1.Move( AllplanGeo.Vector3D( AllplanGeo.Point3D(self.Length - self.VertSideCover, self.HoriFrontCover + self.HoriSteelDia, 0))) s_shape_2 = AllplanReinf.BendingShape(steel_vert_2) s_shape_2.Move( AllplanGeo.Vector3D( AllplanGeo.Point3D( self.Length - self.VertSideCover, self.Width - self.HoriFrontCover - self.HoriSteelDia, 0))) steel_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_f_3, point_t_3, s_shape_1)) steel_list.append( AllplanReinf.BarPlacement(0, 1, vec, point_f_3, point_t_3, s_shape_2)) return steel_list