Skip to content

Commit

Permalink
Create function to edit TwoTiesSixRebars in column
Browse files Browse the repository at this point in the history
  • Loading branch information
SurajDadral committed Jul 20, 2019
1 parent 992dad3 commit 7b9ef9a
Show file tree
Hide file tree
Showing 2 changed files with 364 additions and 12 deletions.
8 changes: 4 additions & 4 deletions ColumnReinforcement/SingleTie.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def editSingleTieFourRebars(

if change_rebar_type:
# Delete previously created LShaped rebars
for Rebar in rebar_group.RebarGroups[1].MainRebars:
for Rebar in rebar_group.RebarGroups[1].MainRebars[:2]:
base_name = Rebar.Base.Name
FreeCAD.ActiveDocument.removeObject(Rebar.Name)
FreeCAD.ActiveDocument.removeObject(base_name)
Expand All @@ -370,7 +370,7 @@ def editSingleTieFourRebars(
rebar_group.RebarGroups[1].addObjects(main_rebars)
else:
main_rebars = []
for Rebar in rebar_group.RebarGroups[1].MainRebars:
for Rebar in rebar_group.RebarGroups[1].MainRebars[:2]:
main_rebars.append(Rebar)
for i, coverAlong in enumerate(list_coverAlong):
editStraightRebar(
Expand Down Expand Up @@ -430,7 +430,7 @@ def editSingleTieFourRebars(

if change_rebar_type:
# Delete previously created Straight rebars
for Rebar in rebar_group.RebarGroups[1].MainRebars:
for Rebar in rebar_group.RebarGroups[1].MainRebars[:2]:
base_name = Rebar.Base.Name
FreeCAD.ActiveDocument.removeObject(Rebar.Name)
FreeCAD.ActiveDocument.removeObject(base_name)
Expand Down Expand Up @@ -463,7 +463,7 @@ def editSingleTieFourRebars(
rebar_group.RebarGroups[1].addObjects(main_rebars)
else:
main_rebars = []
for Rebar in rebar_group.RebarGroups[1].MainRebars:
for Rebar in rebar_group.RebarGroups[1].MainRebars[:2]:
main_rebars.append(Rebar)
for i, orientation in enumerate(list_orientation):
editLShapeRebar(
Expand Down
Loading

0 comments on commit 7b9ef9a

Please sign in to comment.