Skip to content

Commit

Permalink
Arch: import IFC and helper, code formating, E265 block comment shoul…
Browse files Browse the repository at this point in the history
…d start with '# '
  • Loading branch information
berndhahnebach committed Aug 29, 2019
1 parent 99fa0b3 commit d54bff6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Arch/importIFC.py
Expand Up @@ -625,7 +625,7 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None):
continue
# 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"]))
# print("Setting attribute",attribute["name"],"to",getattr(product, attribute["name"]))
setattr(obj, attribute["name"], getattr(product, attribute["name"]))
# TODO: ArchIFCSchema.IfcProducts uses the IFC version from the FreeCAD prefs.
# This might not coincide with the file being opened, hence some attributes are not properly read.
Expand Down Expand Up @@ -762,7 +762,7 @@ def insert(filename,docname,skip=[],only=[],root=None,preferences=None):
# color

if FreeCAD.GuiUp and (pid in colors) and hasattr(obj.ViewObject,"ShapeColor"):
#if preferences['DEBUG']: print(" setting color: ",int(colors[pid][0]*255),"/",int(colors[pid][1]*255),"/",int(colors[pid][2]*255))
# if preferences['DEBUG']: print(" setting color: ",int(colors[pid][0]*255),"/",int(colors[pid][1]*255),"/",int(colors[pid][2]*255))
obj.ViewObject.ShapeColor = colors[pid]

# if preferences['DEBUG'] is on, recompute after each shape
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Arch/importIFCHelper.py
Expand Up @@ -455,7 +455,7 @@ def getIfcProperties(ifcfile, pid, psets, d):
"""builds valid property values for FreeCAD"""

for pset in psets.keys():
#print("reading pset: ",pset)
# print("reading pset: ",pset)
psetname = ifcfile[pset].Name
if six.PY2:
psetname = psetname.encode("utf8")
Expand All @@ -477,7 +477,7 @@ def getIfcProperties(ifcfile, pid, psets, d):
if e.NominalValue.Unit:
pvalue += e.NominalValue.Unit
d[pname+";;"+psetname] = ptype+";;"+pvalue
#print("adding property: ",pname,ptype,pvalue," pset ",psetname)
# print("adding property: ",pname,ptype,pvalue," pset ",psetname)
return d


Expand Down Expand Up @@ -677,7 +677,7 @@ def getCurveSet(ent):
if rot.Angle:
pla.Rotation = rot
for r in preresult:
#r.Placement = pla
# r.Placement = pla
result.append(r)
else:
result = preresult
Expand Down

0 comments on commit d54bff6

Please sign in to comment.