From 99fa0b35cf2328cab28d817fe1fcd0e9bf5ed33f Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 29 Aug 2019 07:39:55 +0200 Subject: [PATCH] Arch: import IFC and helper, code formating, E261 at least two spaces before inline comment --- src/Mod/Arch/importIFC.py | 16 ++++++++-------- src/Mod/Arch/importIFCHelper.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 29b847e22b1c..923db85afb82 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -232,10 +232,10 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): # IfcOpenShell multiplies the precision value of the file by 100 # So we raise the precision by 100 too to compensate... - #ctxs = ifcfile.by_type("IfcGeometricRepresentationContext") - #for ctx in ctxs: - # if not ctx.is_a("IfcGeometricRepresentationSubContext"): - # ctx.Precision = ctx.Precision/100 + # ctxs = ifcfile.by_type("IfcGeometricRepresentationContext") + # for ctx in ctxs: + # if not ctx.is_a("IfcGeometricRepresentationSubContext"): + # ctx.Precision = ctx.Precision/100 # set default ifcopenshell options to work in brep mode from ifcopenshell import geom @@ -623,7 +623,7 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): for attribute in ArchIFCSchema.IfcProducts[product.is_a()]["attributes"]: if attribute["name"] == "Name": continue - #print("attribute:",attribute["name"]) + # print("attribute:",attribute["name"]) if hasattr(product, attribute["name"]) and getattr(product, attribute["name"]) and hasattr(obj,attribute["name"]): #print("Setting attribute",attribute["name"],"to",getattr(product, attribute["name"])) setattr(obj, attribute["name"], getattr(product, attribute["name"])) @@ -726,7 +726,7 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): if preferences['DEBUG']: print("property NominalValue",l.NominalValue.is_a(),type(l.NominalValue.is_a())) print("property NominalValue.wrappedValue",l.NominalValue.wrappedValue,type(l.NominalValue.wrappedValue)) - #print("l.NominalValue.Unit",l.NominalValue.Unit,type(l.NominalValue.Unit)) + # print("l.NominalValue.Unit",l.NominalValue.Unit,type(l.NominalValue.Unit)) ifc_spreadsheet.set(str('C'+str(n)), l.NominalValue.is_a()) if l.NominalValue.is_a() in ['IfcLabel','IfcText','IfcIdentifier','IfcDescriptiveMeasure']: if six.PY2: @@ -1075,8 +1075,8 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None): # Materials if preferences['DEBUG'] and materials: print("Creating materials...",end="") - #print("mattable:",mattable) - #print("materials:",materials) + # print("mattable:",mattable) + # print("materials:",materials) fcmats = {} for material in materials: # get and set material name diff --git a/src/Mod/Arch/importIFCHelper.py b/src/Mod/Arch/importIFCHelper.py index 0c2598c50be5..e647166905e7 100644 --- a/src/Mod/Arch/importIFCHelper.py +++ b/src/Mod/Arch/importIFCHelper.py @@ -579,8 +579,8 @@ def getVector(entity,scaling=1000): v = FreeCAD.Vector(tuple(entity.Coordinates)) else: v = FreeCAD.Vector(tuple(entity.Coordinates+[0])) - #if v: - # v.multiply(scaling) + # if v: + # v.multiply(scaling) return v