From 53eb0dd7585643113713a43ee56dfe3c374a34ee Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 17 Aug 2015 20:27:19 -0300 Subject: [PATCH] Arch: Minor fix in OBJ exporter - fixes #2216 --- src/Mod/Arch/importOBJ.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Mod/Arch/importOBJ.py b/src/Mod/Arch/importOBJ.py index 9e2aa271d..2282d2aaa 100644 --- a/src/Mod/Arch/importOBJ.py +++ b/src/Mod/Arch/importOBJ.py @@ -44,10 +44,16 @@ def getIndices(shape,offset): flist = [] curves = None for e in shape.Edges: - if not isinstance(e.Curve,Part.Line): - if not curves: - curves = shape.tessellate(1) - FreeCAD.Console.PrintWarning(translate("Arch","Found a shape containing curves, triangulating\n")) + try: + if not isinstance(e.Curve,Part.Line): + if not curves: + curves = shape.tessellate(1) + FreeCAD.Console.PrintWarning(translate("Arch","Found a shape containing curves, triangulating\n")) + break + except: # unimplemented curve type + curves = shape.tessellate(1) + FreeCAD.Console.PrintWarning(translate("Arch","Found a shape containing curves, triangulating\n")) + break if curves: for v in curves[0]: vlist.append(" "+str(round(v.x,p))+" "+str(round(v.y,p))+" "+str(round(v.z,p)))