Skip to content

Reinforcement shape definition

3D bar shape

3D bar shape

To create 3D bar shapes like this we can use the ReinforcementShapeBuilder class. Creation of a shape definition can be done in two ways.

  • By using 2D bar shape geometry points or sides and local z-coordinates.
  • Or by using 3D bar shape geometry points or sides and a concrete cover in the front and back of the local coordinate system, which is defined by the transformation matrix.

In both cases we will use the BarShapeSideDataList data class to store the shape information (the points and concrete cover) as sides. Alternatively, we could use the BarShapePointDataList which stores the same kind of information, but as points.

In this case the points pnt1 to pnt4 are 2D points representing the column as seen from the front:

points numeration

shape_data = BarShapeSideDataList(
    [cover,
     (pnt1, pnt2, -cover, bending_roller),
     (pnt3, pnt4, -cover, bending_roller),
     (pnt4, pnt4,  cover + diameter, bending_roller, z_coord),
     (pnt4, pnt3,  cover, bending_roller, z_coord),
     (pnt2, pnt1,  cover, bending_roller, z_coord),
     cover])

shape_builder = AllplanReinf.ReinforcementShapeBuilder()

shape_builder.AddSides(shape_data)
shape_builder.SetSideLengthStart(side_length)
shape_builder.SetSideLengthEnd(side_length)

shape_props = ReinforcementShapeProperties.rebar(diameter_inside, bending_roller, steel_grade, concrete_grade,
                                                 AllplanReinf.BendingShapeType.Freeform)
shape = shape_builder.CreateShape(shape_props)
shape_data = BarShapeSideDataList([cover,
                                  (pnt1, pnt2, cover_inside, bending_roller),
                                  (pnt2, pnt3, cover, bending_roller),
                                  (pnt3, pnt4, cover, bending_roller),
                                  (pnt4, pnt5, cover_inside, bending_roller),
                                  (pnt5, pnt6, cover_inside, bending_roller),
                                  cover])

shape_builder = AllplanReinf.ReinforcementShapeBuilder(
                    shapePlaneMatrix=   RotationUtil(90, 0, 0).get_rotation_matrix(),
                    create3DShape=      True,
                    localZCoverFront=   cover,
                    localZCoverBack=    cover + diameter,
                    )

shape_builder.AddSides(shape_data)
shape_builder.SetSideLengthStart(side_length)
shape_builder.SetSideLengthEnd(side_length)

shape = shape_builder.CreateShape(shape_props)