Fixed several bugs when loading Arch objects from files

This commit is contained in:
Yorik van Havre
2012-04-12 11:35:24 -03:00
parent feaaa25c6f
commit cd2adf6a28
3 changed files with 48 additions and 34 deletions

View File

@@ -119,8 +119,9 @@ class _Window(ArchComponent.Component):
wstr = obj.WindowParts[(i*5)+2].split(',')
for s in wstr:
j = int(s[4:])
if len(obj.Base.Shape.Wires) >= j:
wires.append(obj.Base.Shape.Wires[j])
if obj.Base.Shape.Wires:
if len(obj.Base.Shape.Wires) >= j:
wires.append(obj.Base.Shape.Wires[j])
if wires:
max_length = 0
for w in wires:
@@ -143,6 +144,7 @@ class _Window(ArchComponent.Component):
if zof:
zov = fcvec.scaleTo(norm,zof)
shape.translate(zov)
print shape
shapes.append(shape)
obj.Shape = Part.makeCompound(shapes)
if not fcgeo.isNull(pl):