Arch: import IFC and helper, code formating, E265 block comment should start with '# '
This commit is contained in:
@@ -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.
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -677,7 +677,7 @@ def get2DShape(representation,scaling=1000):
|
||||
if rot.Angle:
|
||||
pla.Rotation = rot
|
||||
for r in preresult:
|
||||
#r.Placement = pla
|
||||
# r.Placement = pla
|
||||
result.append(r)
|
||||
else:
|
||||
result = preresult
|
||||
|
||||
Reference in New Issue
Block a user