Arch: Solved bug in Structure

This commit is contained in:
Yorik van Havre
2019-08-26 15:39:22 -03:00
parent f16f58c040
commit 9cd5a7ee5e
2 changed files with 6 additions and 5 deletions

View File

@@ -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)

View File

@@ -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"):