Refactor all IFC functions into ArchIFC and preload attributes with expressions

* The import code will manually set 2x3 attributes
 * The import code will rely on "smart" attributes for ifc 4
 * ArchSite and ArchBuildingPart now support IFC
 * IfcSite lat/lon is left alone until I better understand how coords work
This commit is contained in:
Dion Moult
2019-01-27 23:21:04 +11:00
parent 3448bb477c
commit c85514b2cf
5 changed files with 184 additions and 152 deletions

View File

@@ -22,7 +22,7 @@
#* *
#***************************************************************************
import FreeCAD,Draft,ArchCommands,DraftVecUtils,sys
import FreeCAD,Draft,ArchCommands,DraftVecUtils,sys,ArchIFC
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
@@ -320,6 +320,7 @@ class BuildingPart:
self.setProperties(obj)
def setProperties(self,obj):
ArchIFC.setProperties(obj)
pl = obj.PropertiesList
if not "Height" in pl:
@@ -362,7 +363,7 @@ class BuildingPart:
self.oldPlacement = FreeCAD.Placement(obj.Placement)
def onChanged(self,obj,prop):
ArchIFC.onChanged(obj, prop)
if prop == "Height":
for child in obj.Group:
if Draft.getType(child) in ["Wall","Structure"]: