Skip to content

Commit

Permalink
fix: fixes recompute of slab and footing reinforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
SurajDadral committed Jan 4, 2025
1 parent 68ddd38 commit eeb5b5b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions FootingReinforcement/FootingReinforcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ def makeFootingReinforcement(
footingReinforcementGroup.ViewObject
)

footingReinforcementGroup.IsMakeOrEditRequired = False
footingReinforcementGroup.MeshCoverAlong = mesh_cover_along
footingReinforcementGroup.Facename = facename
footingReinforcementGroup.Structure = structure
Expand Down Expand Up @@ -699,7 +698,6 @@ def editFootingReinforcement(
column_sec_hook_extension arguments is a tuple.
Syntax: (<value_for_sec_xdir_rebars>, <value_for_sec_ydir_rebars>).
"""
footingReinforcementGroup.IsMakeOrEditRequired = False
footingReinforcementGroup.MeshCoverAlong = mesh_cover_along
if facename:
footingReinforcementGroup.Facename = facename
Expand Down
4 changes: 0 additions & 4 deletions FootingReinforcement/FootingReinforcementObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,14 +942,12 @@ def onChanged(self, obj, prop):
if prop != "IsMakeOrEditRequired" and obj.IsMakeOrEditRequired:
obj.IsMakeOrEditRequired = False
self.makeOrEditFootingReinforcement(obj)
obj.IsMakeOrEditRequired = True

def execute(self, obj):
pass

def makeOrEditFootingReinforcement(self, obj):
"""Create or update Footing Reinforcement"""
obj.IsMakeOrEditRequired = False
mesh_cover_along = obj.MeshCoverAlong
facename = obj.Facename
structure = obj.Structure
Expand Down Expand Up @@ -1549,7 +1547,6 @@ def makeOrEditFootingReinforcement(self, obj):

self.addColumnsGroups(obj.ReinforcementGroups[1], columns_container)
FreeCAD.ActiveDocument.recompute()
obj.IsMakeOrEditRequired = True

def removeColumnReinforcement(self, column):
"""Remove column reinforcement from footing"""
Expand All @@ -1573,7 +1570,6 @@ def removeColumnReinforcement(self, column):

def removeSlabReinforcement(self, slab):
"""Remove slab reinforcement from footing"""
slab.IsMakeOrEditRequired = False
for rebar in slab.Group:
base_name = rebar.Base.Name
FreeCAD.ActiveDocument.removeObject(rebar.Name)
Expand Down
2 changes: 1 addition & 1 deletion SlabReinforcement/SlabReinforcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ def editSlabReinforcement(
Default is None
"""
# Update value of SlabReinforcementGroup
slabReinforcementGroup.IsMakeOrEditRequired = False
slabReinforcementGroup.MeshCoverAlong = mesh_cover_along

if structure:
Expand Down Expand Up @@ -600,4 +599,5 @@ def editSlabReinforcement(
slabReinforcementGroup.CrossDistributionRebarsSpacing = (
cross_distribution_rebars_amount_spacing_value
)
FreeCAD.ActiveDocument.recompute()
return slabReinforcementGroup
1 change: 0 additions & 1 deletion SlabReinforcement/SlabReinforcementObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ def onChanged(self, obj, prop):
if prop != "IsMakeOrEditRequired" and obj.IsMakeOrEditRequired:
obj.IsMakeOrEditRequired = False
self.makeOrEditSlabReinforcement(obj)
obj.IsMakeOrEditRequired = True

def execute(self, obj):
pass
Expand Down

0 comments on commit eeb5b5b

Please sign in to comment.