Skip to content

Commit

Permalink
Arch: import IFC, pep8, add and delete some spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Aug 21, 2019
1 parent a56d3c4 commit e634209
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Mod/Arch/importIFC.py
Expand Up @@ -23,9 +23,9 @@

from __future__ import print_function

__title__ = "FreeCAD IFC importer - Enhanced ifcopenshell-only version"
__title__ = "FreeCAD IFC importer - Enhanced ifcopenshell-only version"
__author__ = "Yorik van Havre","Jonathan Wiedemann","Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"
__url__ = "http://www.freecadweb.org"

import six
import os
Expand Down Expand Up @@ -728,7 +728,7 @@ def insert(filename,docname,skip=[],only=[],root=None):
obj.addProperty("App::PropertyLink","IfcProperties","Component","Stores IFC properties as a spreadsheet")

ifc_spreadsheet = Arch.makeIfcSpreadsheet()
n=2
n = 2
for c in psets.keys():
o = ifcfile[c]
if DEBUG: print("propertyset Name",o.Name,type(o.Name))
Expand Down Expand Up @@ -868,7 +868,7 @@ def insert(filename,docname,skip=[],only=[],root=None):
for host,children in groups.items():
if ifcfile[host].is_a("IfcStructuralAnalysisModel"):
# print(host, ' --> ', children)
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup","AnalysisModel")
obj = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup","AnalysisModel")
objects[host] = obj
if host in objects.keys():
cobs = []
Expand Down Expand Up @@ -908,7 +908,7 @@ def insert(filename,docname,skip=[],only=[],root=None):
grp_name = ifcfile[host].is_a() + "_" + str(ifcfile[host].id())
if six.PY2:
grp_name = grp_name.encode("utf8")
grp = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup",grp_name)
grp = FreeCAD.ActiveDocument.addObject("App::DocumentObjectGroup",grp_name)
grp.Label = grp_name
objects[host] = grp
for child in children:
Expand Down Expand Up @@ -1122,7 +1122,7 @@ def insert(filename,docname,skip=[],only=[],root=None):
for key in list(fcmats.keys()):
if key.startswith(name) \
and "DiffuseColor" in mdict and "DiffuseColor" in fcmats[key].Material \
and mdict["DiffuseColor"] == fcmats[key].Material["DiffuseColor"]:
and mdict["DiffuseColor"] == fcmats[key].Material["DiffuseColor"]:
mat = fcmats[key]
add_material = False
# add a new material object
Expand Down

0 comments on commit e634209

Please sign in to comment.