Arch: Fixed misc bugs in schedule
This commit is contained in:
parent
ccbd0f02af
commit
c3a6ac7a7d
|
@ -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"):
|
||||
|
|
|
@ -205,7 +205,9 @@ class _ArchPipe(ArchComponent.Component):
|
|||
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):
|
||||
|
@ -421,5 +423,7 @@ if FreeCAD.GuiUp:
|
|||
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())
|
||||
|
|
|
@ -166,7 +166,7 @@ class _ArchSchedule:
|
|||
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+"):"
|
||||
|
@ -177,6 +177,8 @@ class _ArchSchedule:
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user