Skip to content


Reinforcement bars

Rebar shape

Bar shape

Creating a rebar reinforcement with Allpln Python API begins with defining a bending shape of the rebar, which is represented by the BendingShape object. It contains informations like shape, diameter, steel grade, etc.

PythonParts framework offers numerous helper classes for defining the bending shape of a rebar. We describe them closely in this article.

Rebar placement

The second step is placing the rebar. To to do that we have to construct a placement object. The most general object representing a placement is the BarPlacement, but there are also special types of placements in Allplan, which are represented by different classes. To learn more about all of them, refer to this article.

Rebar classes relationships

The relationships of reinforcement placement classes are shown on the diagram below. It is worth notice, that:

  • All the classes representing rebar placement inherits from the AllplanElement class, which means that they can be used to create rebars in the drawing file (using the CreateElements function in an Interactor PythonPart or in a Standard PythonPart, by including the placement objects in the CreateElementResult object).
  • It also means, that you can apply information to them, that are common for all elements in a drawing file, like attributes or pen, stroke and color.
  • Almost all the placement classes are composed by the BendingShape. This is logical, since this class defines the shape of the bar we want to place
  • Helper classes, offered by the PythonPart framework to construct the shapes and placements more easily, are not shown on the diagram to keep it legible. Refer to the articles about placement and shape definition to learn about them.
direction BT

class AllplanElement{
    +CommonProperties CommonProperties
    +Attributes Attributes
class ReinfElement{
class BarPlacement{
    int positionNumber
    BendingShape BendingShape
    BendingShape EndBendingShape
    Matrix3D BendingShapeMatrix
    Point3D StartPoint
    Point3D EndPoint
    Vector3D DistanceVector
    Line3D RotationAxis

    GetBarCount() int
class CircularAreaElement{
    int positionNumber
    int steelGrade
    Line3D RotationAxis
    Polyline3D contourPoints
    float outerAngleStart
    float outerAngleEnd
    float innerAngleStart
    float innerAngleEnd

class ExtrudeBarPlacement{
    int PositionNumber
    Path3D path
    float crossBarDistance

class SweepBarPlacement{
    int PositionNumber
    Path3DList paths
    float crossBarDistance

class LongitudinalBarProperties{
    BendingShape shape
    float overlappingLength
    float startLength
class BendingShape{
    float Diameter
    int steelGrade
    BendingShapeType bendingShapeType
    float hookLengthStart
    float hookAngleStart
    HookType hookTypeStart
    float hookLengthEnd
    float hookAngleEnd
    HookType hookTypeEnd
    VecDoubleList BendingRoller
    Polyline3D ShapePolyline
class HookType{
class BendingShapeType{

ReinfElement --|> AllplanElement
BarPlacement --|> ReinfElement
ExtrudeBarPlacement --|> ReinfElement
SweepBarPlacement --|> ReinfElement
CircularAreaElement --|> ReinfElement
LongitudinalBarProperties "*" --o ExtrudeBarPlacement
BendingShape "1-2" --o BarPlacement
BendingShape "*" --o ExtrudeBarPlacement
BendingShape "*" --o SweepBarPlacement
BendingShape "1" --o LongitudinalBarProperties
HookType "2" --o BendingShape
BendingShapeType "1" --o BendingShape