diff --git a/src/ifcpatch/ifcpatch/recipes/Fix12DToRevitTINs.py b/src/ifcpatch/ifcpatch/recipes/Fix12DToRevitTINs.py index 63e54e5261..f4b88c8b9b 100644 --- a/src/ifcpatch/ifcpatch/recipes/Fix12DToRevitTINs.py +++ b/src/ifcpatch/ifcpatch/recipes/Fix12DToRevitTINs.py @@ -15,10 +15,10 @@ class Patcher: # The solution will merge vertices closer than 10mm to prevent dense # portions of the TIN at a minor sacrifice of surveying accuracy. It # will also triangulate all meshes to prevent non-coplanar surfaces, and - # delete any obtuse triangles where one of their angles is less than 0.3 - # degrees. Therefore the result will contain some minor "holes" in the - # TIN, but these holes will only be in dense triangles that Revit can't - # handle anyway and won't affect most coordination tasks. + # delete any obtuse triangles where one of their XY angles is less than + # 0.3 degrees. Therefore the result will contain some minor "holes" in + # the TIN, but these holes will only be in dense triangles that Revit + # can't handle anyway and won't affect most coordination tasks. # # This patch is designed to only work on 12D IFC exports. It also # requires you to run it using Blender, as the geometric modification @@ -47,7 +47,7 @@ class Patcher: bmesh.ops.triangulate(bm, faces=bm.faces[:], quad_method='BEAUTY', ngon_method='BEAUTY') bm.faces.ensure_lookup_table() for polygon in bm.faces: - v1, v2, v3 = [v.co for v in polygon.verts] + v1, v2, v3 = [v.co.to_2d() for v in polygon.verts] d1 = degrees((v2-v1).angle(v3-v1)) d2 = degrees((v3-v2).angle(v1-v2)) d3 = degrees((v1-v3).angle(v2-v3))