Skip to content

Commit

Permalink
Arch: Fixed bug in precasts + addressing recursive wall length issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed May 15, 2019
1 parent 96ee6fb commit b50ac86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Arch/ArchPrecast.py
Expand Up @@ -74,7 +74,7 @@ def setProperties(self,obj):
def onDocumentRestored(self,obj):

ArchComponent.Component.onDocumentRestored(self,obj)
_Precast.onDocumentRestored(self,obj)
_Precast.setProperties(self,obj)

def execute(self,obj):

Expand Down
8 changes: 7 additions & 1 deletion src/Mod/Arch/ArchWall.py
Expand Up @@ -732,11 +732,17 @@ def execute(self,obj):
l = obj.Base.Shape.Length
if obj.Length.Value != l:
obj.Length = l
self.oldLength = None # delete the stored value to prevent triggering base change below

def onBeforeChange(self,obj,prop):

if prop == "Length":
self.oldLength = obj.Length.Value

def onChanged(self,obj,prop):

if prop == "Length":
if obj.Base and obj.Length.Value:
if obj.Base and obj.Length.Value and hasattr(self,"oldLength") and (self.oldLength != None) and (self.oldLength != obj.Length.Value):
if obj.Base.isDerivedFrom("Part::Feature"):
if len(obj.Base.Shape.Edges) == 1:
import DraftGeomUtils
Expand Down

0 comments on commit b50ac86

Please sign in to comment.