Reinforcement
Reinforcement bars
-
Bending shape
To create rebar reinforcement you will need a bending shape first. Learn more in this article
-
Placement
In the second step, you will be placing the rebar. In other words, you need to create a placement. Learn more in this article
Rebar classes relationships
The relationships between classes related to rebar reinforcement are shown on the UML diagram below. The key takeaways are:
- 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.
- You can apply information to them, that are common for all elements, like attributes, layer, pen, stroke or 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.
classDiagram
direction BT
class AllplanElement{
<<Abstract>>
+CommonProperties CommonProperties
+Attributes Attributes
}
class ReinfElement{
<<Abstract>>
}
class BarPlacement{
int positionNumber
BendingShape BendingShape
BendingShape EndBendingShape
Matrix3D BendingShapeMatrix
Point3D StartPoint
Point3D EndPoint
Vector3D DistanceVector
Line3D RotationAxis
GetBarCount() int
SetLabel()
}
class CircularAreaElement{
int positionNumber
int steelGrade
Line3D RotationAxis
Polyline3D contourPoints
float outerAngleStart
float outerAngleEnd
float innerAngleStart
float innerAngleEnd
SetOverlap()
SetBarProperties()
}
class ExtrudeBarPlacement{
int PositionNumber
Path3D path
float crossBarDistance
AddCrossBendingShape()
AddLongitudinalBarProp()
Extrude()
}
class SweepBarPlacement{
int PositionNumber
Path3DList paths
float crossBarDistance
AddSectionBars()
}
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{
<<Enumeration>>
eAnchorage
eAngle
eStirrup
}
class BendingShapeType{
<<Enumeration>>
}
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
Read access
All the data specific to a rebar reinforcement, that exists in a drawing file, can be read
from the BaseElementAdapter
. Before
we get into details, you need to be aware of what adapter type you are accessing. Here
are the types you may encounter and what they are representing:
Adapter type | Representing... |
---|---|
BarsRepresentationLine_TypeUUID | the polyline of a single rebar in a certain UVS |
BarsRepresentation_TypeUUID1 | all the polylines of a placement in a certain UVS |
BarsLinearPlacement_TypeUUID | the placement itself (regardless of the UVS) |
BarsDefinition_TypeUUID | the rebar position |
Tip
To check the type, call GetElementAdapterType()
,
e.g. like:
In the database, these elements are organized in a hierarchy shown on the diagram below. Note the
cardinalities: a parent element can have one or more children, but a child can have only one parent.
This is logical, as e.g. the same rebar shape (BarsDefinition
) can be placed multiple times
with BarsLinearPlacement
.
erDiagram
BarsDefinition_TypeUUID ||--|{ BarsLinearPlacement_TypeUUID : "has"
BarsLinearPlacement_TypeUUID ||--|{ BarsRepresentation_TypeUUID : "has"
BarsRepresentation_TypeUUID ||--|{ BarsRepresentationLine_TypeUUID : "has"
Warning
When the element adapter is a result of selection, its type may depend on where the selection was done!
E.g. in a plan view (or UVS) you'll get BarsRepresentationLine_TypeUUID
and in an isometric view,
you'll get BarsLinearPlacement_TypeUUID
1.
Tip
You can use the ParentElementService
and ChildElementsService
to go through the hierarchy and get the adapter you really need.
Now, once you know what element adapters you may encounter, here are the ways of how you can use them to access the reinforcement related data:
-
Using the
BarPositionData
class. This gives you information related to the bending shape, such as mark number, diameter or total count. We recommend you to perform this on an element adapter of typeBarsDefinition_TypeUUID
Example
Construct the object from the
BaseElementAdapter
and then read its properties: -
Calling
GetElement()
on an element adapter of typeBarsLinearPlacement_TypeUUID
1 will give you theBarPlacement
object with all the data related to the placement.Info
Because it is a general function, not specific to reinforcement, we describe the implementation in detail in a separate article.
When you obtain the
BarPlacement
object this way, bear the following in mind:- The object does not contain the information about the start and end point of a placement.
Both
GetStartPoint()
andGetEndPoint()
methods will give you the origin (0,0,0). - The polyline of the BendingShape is located in its local coordinate system. Especially, if the same bending shape is used by multiple placements in a drawing file.
-
By calling
GetPlacementMatrix()
you can obtain a transformation matrix that transforms the bending shape from local to global coordinate system. This way you can obtain the geometry of the first rebar in a placement:
- The object does not contain the information about the start and end point of a placement.
Both