Draft: made last commit more backward-compatible

This commit is contained in:
Yorik van Havre 2014-02-09 13:08:02 -02:00
parent 9ede51b2f6
commit 99902b22b7
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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