I've got a flat mesh resulting from a previous script (How to draw a PostGIS Polygon with holes into Blender using Python) :
I'd like to extrude this mesh by Region using Python (This can be done from Blender, in Edit mode, selecting the entire mesh, then from the mesh menu: Extrude --> Region)
Typically, i don't want to extrude individual faces showing the internal edges of the polygon like this :
Below is a script extruding the active mesh, but unfortunately it's using individual faces, and i couldn't adapt it to extrude Region :
import bmesh o = bpy.context.active_object me = o.data bm = bmesh.new() bm.from_mesh(me) faces = bm.faces[:] for face in faces: r = bmesh.ops.extrude_discrete_faces(bm, faces=[face]) bmesh.ops.translate(bm, vec=Vector((0,0,-3)), verts=r['faces'].verts) bm.to_mesh(me) me.update() bpy.context.scene.update()
Is there a way to adapt this script to extrude Region instead of individual faces ?