Skip to content

Commit

Permalink
Arch: Fixed misc bugs in schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Oct 14, 2016
1 parent ccbd0f0 commit c3a6ac7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Arch/ArchCommands.py
Expand Up @@ -670,7 +670,7 @@ def pruneIncluded(objectslist):
for obj in objectslist:
toplevel = True
if obj.isDerivedFrom("Part::Feature"):
if not (Draft.getType(obj) in ["Window","Clone"]):
if not (Draft.getType(obj) in ["Window","Clone","Pipe"]):
for parent in obj.InList:
if parent.isDerivedFrom("Part::Feature"):
if not parent.isDerivedFrom("Part::Part2DObject"):
Expand Down
6 changes: 5 additions & 1 deletion src/Mod/Arch/ArchPipe.py
Expand Up @@ -205,7 +205,9 @@ def execute(self,obj):
FreeCAD.Console.PrintError(translate("Arch","Unable to build the pipe\n"))
else:
obj.Shape = sh
if not obj.Base:
if obj.Base:
obj.Length = w.Length
else:
obj.Placement = pl

def getWire(self,obj):
Expand Down Expand Up @@ -421,5 +423,7 @@ def GetResources(self):
return { 'MenuText': QT_TRANSLATE_NOOP("Arch_PipeTools",'Pipe tools'),
'ToolTip': QT_TRANSLATE_NOOP("Arch_PipeTools",'Pipe tools')
}
def IsActive(self):
return not FreeCAD.ActiveDocument is None

FreeCADGui.addCommand('Arch_PipeTools', _ArchPipeGroupCommand())
4 changes: 3 additions & 1 deletion src/Mod/Arch/ArchSchedule.py
Expand Up @@ -166,7 +166,7 @@ def execute(self,obj):
obj.Result.set("B"+str(i+2),str(val))
else:
vals = val.split(".")
sumval = None
sumval = 0
for o in objs:
if verbose:
l = o.Name+" ("+o.Label+"):"
Expand All @@ -177,6 +177,8 @@ def execute(self,obj):
d = getattr(d,v)
if verbose:
print d
if hasattr(d,"Value"):
d = d.Value
except:
FreeCAD.Console.PrintWarning(translate("Arch","Unable to retrieve value from object")+": "+o.Name+"."+".".join(vals)+"\n")
else:
Expand Down

0 comments on commit c3a6ac7

Please sign in to comment.