LinearBarPlacementBuilder
Implementation of the linear placement bar placement builder
StartEndPlacementRule
Canonical path: StdReinfShapeBuilder.LinearBarPlacementBuilder.StartEndPlacementRule
Bases: IntEnum
Rules for linear rebar placements, determining how rebars are distributed when the placement length is not an exact multiple of the spacing
AdaptDistance
class-attribute
instance-attribute
Spacing is adapted to match the placement length
AdditionalCover
class-attribute
instance-attribute
Spacing is preserved, concrete cover is increased at both ends
AdditionalCoverLeft
class-attribute
instance-attribute
Spacing is preserved, concrete cover at start is increased
calculate_length_of_regions
calculate_length_of_regions(
value_list: list[tuple[float, float, float]],
from_point: Point3D,
to_point: Point3D,
concrete_cover_left: float,
concrete_cover_right: float,
) -> list[tuple[Point3D, Point3D]]
Create list with the start and end points of individual linear placements (called regions), that compose one, greater linear placement. The points are calculated based on region's length, bar spacing to be applied in the region and the rebar diameter, that should be placed in the region. This is a helper function to be used in combination with the create_linear_bar_placement_from_to_by_dist function to create e.g., stirrups inside beams, where the spacing varies along the beam's axis.
Parameters:
-
value_list
(list[tuple[float, float, float]]
) –list with individual placement regions represented by tuples (region length, bar spacing, bar diameter). IMPORTANT: At least one region must have a zero length. Its length will be calculated by the function, so that the total sum of all region lengths equals the distance between start and end point.
-
from_point
(Point3D
) –Start point of the total parent
-
to_point
(Point3D
) –End point of the total
-
concrete_cover_left
(float
) –Concrete cover at the start point
-
concrete_cover_right
(float
) –Concrete cover at the end point
Returns:
check_placement_length_by_distance
Adjusts the length of the placement so that it is a multiple of the rebar spacing
Parameters:
-
length
(float
) –length of the placement
-
distance
(float
) –rebar spacing
Returns:
-
float
–Adjusted length of the placement
create_linear_bar_placement_from_by_dist_count
create_linear_bar_placement_from_by_dist_count(
position: int,
shape: BendingShape,
from_point: Point3D,
direction_point: Point3D,
concrete_cover: float,
bar_distance: float,
bar_count: int,
global_move: bool = True,
) -> BarPlacement
Create a linear rebar placement by:
- start point
- direction point
- bar count
- bar spacing
Parameters:
-
position
(int
) –Mark number
-
shape
(BendingShape
) –Shape for the placement
-
from_point
(Point3D
) –Start point of the placement
-
direction_point
(Point3D
) –Direction point
-
concrete_cover
(float
) –Concrete cover at the start
-
bar_distance
(float
) –Bar spacing
-
bar_count
(int
) –Bar count
-
global_move
(bool
, default:True
) –When set to True, the shape will be moved to the from_point of the placement. Recommended, if the shape is created in a local coordinate system, near (0,0,0)
Returns:
-
BarPlacement
–Bar placement
create_linear_bar_placement_from_to_by_count
create_linear_bar_placement_from_to_by_count(
position: int,
shape: BendingShape,
from_point: Point3D,
to_point: Point3D,
concrete_cover_left: float,
concrete_cover_right: float,
bar_count: int,
global_move: bool = True,
remove_count_left: int = 0,
remove_count_right: int = 0,
) -> BarPlacement
Create a linear rebar placement by:
- start point
- end point
- bar count
Parameters:
-
position
(int
) –Mark number
-
shape
(BendingShape
) –Shape for the placement
-
from_point
(Point3D
) –Start point of the placement
-
to_point
(Point3D
) –End point of the placement
-
concrete_cover_left
(float
) –Concrete cover at the left placement side
-
concrete_cover_right
(float
) –Concrete cover at the right placement side
-
bar_count
(int
) –Total count of rebars in the placement
-
global_move
(bool
, default:True
) –When set to True, the shape will be moved to the from_point of the placement. Recommended, if the shape is created in a local coordinate system, near (0,0,0)
-
remove_count_left
(int
, default:0
) –Count of rebars to be removed at the start
-
remove_count_right
(int
, default:0
) –Count of rebars to be removed at the end
Returns:
-
BarPlacement
–Bar placement
create_linear_bar_placement_from_to_by_dist
create_linear_bar_placement_from_to_by_dist(
position: int,
shape: BendingShape,
from_point: Point3D,
to_point: Point3D,
concrete_cover_left: float,
concrete_cover_right: float,
bar_distance: float,
start_end_rule: StartEndPlacementRule = StartEndPlacementRule.AdditionalCover,
global_move: bool = True,
) -> BarPlacement
Create a linear rebar placement by:
- start point
- end point
- bar spacing
Parameters:
-
position
(int
) –Mark number
-
shape
(BendingShape
) –Shape for the placement
-
from_point
(Point3D
) –Start point of the placement
-
to_point
(Point3D
) –End point of the placement
-
concrete_cover_left
(float
) –Concrete cover at the left placement side
-
concrete_cover_right
(float
) –Concrete cover at the right placement side
-
bar_distance
(float
) –Bar spacing
-
start_end_rule
(StartEndPlacementRule
, default:AdditionalCover
) –Rule for the adaption of the distance / start-end cover
-
global_move
(bool
, default:True
) –When set to True, the shape will be moved to the from_point of the placement. Recommended, if the shape is created in a local coordinate system, near (0,0,0)
Returns:
-
BarPlacement
–Bar placement