How to connect all loose geometry vertex into plane with triangulate by python script
I use Blender 2.92.0
vertex.blend (350.7 KB)
How to connect all loose geometry vertex into plane with triangulate by python script
I use Blender 2.92.0
vertex.blend (350.7 KB)
Maybe have a look for BlenderGIS ?
Hooray!!! It’s working!!!
Thank you Okidoki, I looked in this addon, and i found how it’s working:
vertex_done.blend (355.7 KB)
Code:
import bpy;
from mathutils.geometry import delaunay_2d_cdt;
obj = bpy.context.active_object;
mesh = obj.data;
verts, edges, faces, overts, oedges, ofaces = delaunay_2d_cdt([v.co.to_2d() for v in mesh.vertices], [], [], 0, 0.1);
verts = [(v.x, v.y, mesh.vertices[overts[i][0]].co.z) for i, v in enumerate(verts)];
new_mesh = bpy.data.meshes.new(obj.data.name+"_new");
new_mesh.from_pydata(verts, edges, faces);
new_mesh.update();
new_obj = bpy.data.objects.new(obj.name+"_new", new_mesh);
new_obj.location = obj.location.copy();
new_obj.rotation_euler = obj.rotation_euler;
new_obj.scale = obj.scale;
bpy.context.scene.collection.objects.link(new_obj);
bpy.context.view_layer.objects.active = new_obj;
new_obj.select_set(True);
obj.select_set(False);