diff --git a/src/Mod/Arch/exportIFC.py b/src/Mod/Arch/exportIFC.py index 413a70f768..6aa2ba8748 100644 --- a/src/Mod/Arch/exportIFC.py +++ b/src/Mod/Arch/exportIFC.py @@ -355,7 +355,14 @@ def export(exportList,filename,colors=None,preferences=None): # getting the representation - representation,placement,shapetype = getRepresentation(ifcfile,context,obj,forcebrep=(brepflag or preferences['FORCE_BREP']),colors=colors,preferences=preferences) + representation,placement,shapetype = getRepresentation( + ifcfile, + context, + obj, + forcebrep=(brepflag or preferences['FORCE_BREP']), + colors=colors, + preferences=preferences + ) if getstd: if isStandardCase(obj,ifctype): ifctype += "StandardCase" @@ -501,7 +508,7 @@ def export(exportList,filename,colors=None,preferences=None): sheet = obj.IfcProperties propertiesDic = {} categories = [] - n=2 + n = 2 cell = True while cell is True: if hasattr(sheet,'A'+str(n)): diff --git a/src/Mod/Arch/exportIFCHelper.py b/src/Mod/Arch/exportIFCHelper.py index 2cb35eead0..459dbdcca0 100644 --- a/src/Mod/Arch/exportIFCHelper.py +++ b/src/Mod/Arch/exportIFCHelper.py @@ -27,7 +27,7 @@ import math import FreeCAD -import Draft +# import Draft def getObjectsOfIfcType(objects, ifcType): @@ -41,14 +41,18 @@ def getObjectsOfIfcType(objects, ifcType): class SIUnitCreator: def __init__(self, file, text, type): - self.prefixes = ["EXA", "PETA", "TERA", "GIGA", "MEGA", "KILO", "HECTO", + self.prefixes = [ + "EXA", "PETA", "TERA", "GIGA", "MEGA", "KILO", "HECTO", "DECA", "DECI", "CENTI", "MILLI", "MICRO", "NANO", "PICO", "FEMTO", - "ATTO"] - self.unitNames = ["AMPERE", "BECQUEREL", "CANDELA", "COULOMB", + "ATTO" + ] + self.unitNames = [ + "AMPERE", "BECQUEREL", "CANDELA", "COULOMB", "CUBIC_METRE", "DEGREE CELSIUS", "FARAD", "GRAM", "GRAY", "HENRY", "HERTZ", "JOULE", "KELVIN", "LUMEN", "LUX", "MOLE", "NEWTON", "OHM", "PASCAL", "RADIAN", "SECOND", "SIEMENS", "SIEVERT", "SQUARE METRE", - "METRE", "STERADIAN", "TESLA", "VOLT", "WATT", "WEBER"] + "METRE", "STERADIAN", "TESLA", "VOLT", "WATT", "WEBER" + ] self.text = text self.SIUnit = file.createIfcSIUnit(None, type, self.getSIPrefix(), self.getSIUnitName()) @@ -101,7 +105,7 @@ class ContextCreator: self.project_data["map_projection"], self.project_data["map_zone"], SIUnit.SIUnit - ) + ) except: return None @@ -115,7 +119,7 @@ class ContextCreator: self.calculateXAxisAbscissa(), self.calculateXAxisOrdinate(), float(self.project_data["scale"]) - ) + ) except: return None