From e81a384f8dd8bfa82dea9d7cf2d2e4cea07917ec Mon Sep 17 00:00:00 2001 From: Postur Date: Thu, 10 Dec 2020 18:39:08 +0000 Subject: [PATCH] feature add --- operators/mesh_delaunay_voronoi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/operators/mesh_delaunay_voronoi.py b/operators/mesh_delaunay_voronoi.py index 9d85f268..c01c30a1 100644 --- a/operators/mesh_delaunay_voronoi.py +++ b/operators/mesh_delaunay_voronoi.py @@ -78,7 +78,11 @@ def execute(self, context): # 3 => like 2 but with extra edges to make valid BMesh faces. ''' log.info("Triangulate {} points...".format(len(mesh.vertices))) - verts, edges, faces, overts, oedges, ofaces = delaunay_2d_cdt([v.co.to_2d() for v in mesh.vertices], [], [], 0, 0.1) + edgeVerts=[] + for e in mesh.edges: + if e.use_edge_sharp: + edgeVerts.append([e.vertices[0],e.vertices[1]]) + verts, edges, faces, overts, oedges, ofaces = delaunay_2d_cdt([v.co.to_2d() for v in mesh.vertices], edgeVerts, [], 0, 0.1) verts = [ (v.x, v.y, mesh.vertices[overts[i][0]].co.z) for i, v in enumerate(verts)] #retrieve z values log.info("Getting {} triangles".format(len(faces))) log.info("Create mesh...")