From 9cd5a7ee5eb71897cbb339307159b569ce713b97 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 26 Aug 2019 15:39:22 -0300 Subject: [PATCH] Arch: Solved bug in Structure --- src/Mod/Arch/ArchIFC.py | 5 +++-- src/Mod/Arch/ArchStructure.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Mod/Arch/ArchIFC.py b/src/Mod/Arch/ArchIFC.py index d5b2616dde..87c6737a40 100644 --- a/src/Mod/Arch/ArchIFC.py +++ b/src/Mod/Arch/ArchIFC.py @@ -30,8 +30,9 @@ class IfcRoot: if prop == "IfcType": self.setupIfcAttributes(obj) self.setupIfcComplexAttributes(obj) - if obj.getGroupOfProperty(prop) == "IFC Attributes": - self.setObjIfcAttributeValue(obj, prop, obj.getPropertyByName(prop)) + if prop in obj.PropertiesList: + if obj.getGroupOfProperty(prop) == "IFC Attributes": + self.setObjIfcAttributeValue(obj, prop, obj.getPropertyByName(prop)) def setupIfcAttributes(self, obj): ifcTypeSchema = self.getIfcTypeSchema(obj.IfcType) diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index 051993977f..b18c787005 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -947,12 +947,12 @@ class _ViewProviderStructure(ArchComponent.ViewProviderComponent): p.append([n.x,n.y,n.z]) self.coords.point.setValues(0,len(p),p) self.pointset.numPoints.setValue(len(p)) - self.lineset.coordIndex.setValues(0,len(p)+1,range(len(p))+[-1]) + self.lineset.coordIndex.setValues(0,len(p)+1,list(range(len(p)))+[-1]) if hasattr(obj.ViewObject,"NodeType"): if (obj.ViewObject.NodeType == "Area") and (len(p) > 2): self.coords.point.set1Value(len(p),p[0][0],p[0][1],p[0][2]) - self.lineset.coordIndex.setValues(0,len(p)+2,range(len(p)+1)+[-1]) - self.faceset.coordIndex.setValues(0,len(p)+1,range(len(p))+[-1]) + self.lineset.coordIndex.setValues(0,len(p)+2,list(range(len(p)+1))+[-1]) + self.faceset.coordIndex.setValues(0,len(p)+1,list(range(len(p)))+[-1]) elif prop in ["IfcType"]: if hasattr(obj.ViewObject,"NodeType"):