From cb5b13309073ae7593bc537e8c14ab0bd4f15470 Mon Sep 17 00:00:00 2001 From: Lukas Treyer Date: Fri, 12 May 2017 10:54:44 +0200 Subject: 'Invalid'/ self intersecting BMFaces are apparently not added to the bmesh anymore? in the dxf importer there is a section that tests for selfintersecting quad faces and removes them; but here I now get an error, that the face has been removed.So for now I just wrap it in a try/except clause to make it work across several versions? --- io_import_dxf/dxfimport/do.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'io_import_dxf') diff --git a/io_import_dxf/dxfimport/do.py b/io_import_dxf/dxfimport/do.py index 3f80c3a1..3d474d25 100644 --- a/io_import_dxf/dxfimport/do.py +++ b/io_import_dxf/dxfimport/do.py @@ -509,7 +509,10 @@ class Do: ii = geometry.intersect_line_line(edge1, edge2, opposite1, opposite2) if ii is not None: if _is_on_edge(ii[0]): - bm.faces.remove(face) + try: + bm.faces.remove(face) + except Exception as e: + pass iv = bm.verts.new(ii[0]) bm.faces.new((verts[i], iv, verts[(i + 3) % 4])) bm.faces.new((verts[i + 1], iv, verts[i + 2])) -- cgit v1.2.3