Skip to content

Commit

Permalink
Arch: Solved bug in Structure
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Aug 26, 2019
1 parent e9cbbb3 commit 3dac114
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/Mod/Arch/ArchIFC.py
Expand Up @@ -30,8 +30,9 @@ def onChanged(self, obj, prop):
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)
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Arch/ArchStructure.py
Expand Up @@ -947,12 +947,12 @@ def updateData(self,obj,prop):
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"):
Expand Down

0 comments on commit 3dac114

Please sign in to comment.