From 57999cb78d5eb0964ba3a81de73a04f539771bce Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 10 Jun 2014 23:13:23 -0300 Subject: [PATCH] Arch: More minor fixes --- src/Mod/Arch/ArchCommands.py | 7 +++++-- src/Mod/Arch/importIFC.py | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index d119870f7..82dc6d5c7 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -600,11 +600,13 @@ def check(objectslist,includehidden=False): def getTuples(data,scale=1,placement=None,normal=None,close=True): """getTuples(data,[scale,placement,normal,close]): returns a tuple or a list of tuples from a vector or from the vertices of a shape. Scale can indicate a scale factor""" + rnd = True import Part if isinstance(data,FreeCAD.Vector): if placement: data = placement.multVec(data) - data = DraftVecUtils.rounded(data) + if rnd: + data = DraftVecUtils.rounded(data) return (data.x*scale,data.y*scale,data.z*scale) elif isinstance(data,Part.Shape): t = [] @@ -626,7 +628,8 @@ def getTuples(data,scale=1,placement=None,normal=None,close=True): if placement: if not placement.isNull(): pt = placement.multVec(pt) - pt = DraftVecUtils.rounded(pt) + if rnd: + pt = DraftVecUtils.rounded(pt) t.append((pt.x*scale,pt.y*scale,pt.z*scale)) if close: # faceloops must not be closed, but ifc profiles must. diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 6c65b4e36..94556cf40 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -1036,6 +1036,7 @@ def export(exportList,filename): if not fdata: if obj.isDerivedFrom("Part::Feature"): print " Error retrieving the shape of object ", obj.Label + unprocessed.append(obj) continue else: if DEBUG: print " No geometry" @@ -1081,11 +1082,9 @@ def export(exportList,filename): ifctype = "IfcBuildingElementProxy" extra = ["ELEMENT"] - if representation: - p = ifc.addProduct( ifctype, representation, storey=parent, placement=placement, name=name, description=descr, extra=extra ) + p = ifc.addProduct( ifctype, representation, storey=parent, placement=placement, name=name, description=descr, extra=extra ) if p: - # removing openings if SEPARATE_OPENINGS and gdata: for o in obj.Subtractions: @@ -1102,7 +1101,7 @@ def export(exportList,filename): else: unprocessed.append(obj) else: - if DEBUG: print "IFC export: object type ", otype, " is not supported yet." + if DEBUG: print "Object type ", otype, " is not supported yet." ifc.write() @@ -1131,6 +1130,7 @@ def export(exportList,filename): FreeCAD.ActiveDocument.recompute() if unprocessed: + print "" print "WARNING: Some objects were not exported. See importIFC.unprocessed"