From 99902b22b7bda1bb92caf5341a3ef536bcd94682 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 9 Feb 2014 13:08:02 -0200 Subject: [PATCH] Draft: made last commit more backward-compatible --- src/Mod/Draft/Draft.py | 5 ++++- src/Mod/Draft/DraftGeomUtils.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index c2ac83a67..09c083053 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -4050,7 +4050,10 @@ class _Shape2DView(_DraftObject): for g in groups[5:]: edges.append(g) #return Part.makeCompound(edges) - return DraftGeomUtils.cleanProjection(Part.makeCompound(edges),obj.Tessellation) + if hasattr(obj,"Tessellation"): + return DraftGeomUtils.cleanProjection(Part.makeCompound(edges),obj.Tessellation) + else: + return DraftGeomUtils.cleanProjection(Part.makeCompound(edges)) def createGeometry(self,obj): import DraftGeomUtils diff --git a/src/Mod/Draft/DraftGeomUtils.py b/src/Mod/Draft/DraftGeomUtils.py index 5491aa031..59d2bcfb4 100755 --- a/src/Mod/Draft/DraftGeomUtils.py +++ b/src/Mod/Draft/DraftGeomUtils.py @@ -1794,7 +1794,7 @@ def curvetowire(obj,steps): p0 = p return edgelist -def cleanProjection(shape,tessellate): +def cleanProjection(shape,tessellate=False): "returns a valid compound of edges, by recreating them" # this is because the projection algorithm somehow creates wrong shapes. # they dispay fine, but on loading the file the shape is invalid