I have imported an SVG keyboard layout into Blender (2.83), which arrives as filled curves in the XY plane.
For each key, after converting the curve to mesh, I have managed to dissolve some edges with bmesh.
# tris to ngons, separating the bottom from the top edges = [e for e in bm.edges if e.verts.co.y != e.verts.co.y] bmesh.ops.dissolve_edges(bm, edges=edges)
This leaves each key with a quad and a polygon, or ngon, with either 5 or 6 vertices/edges.
I want to subdivide the ngons "vertically" using the existing vertices to make quads (2 quads if 5 verts, 3 quads if 6 verts). I have worked out how to find them, or delete the ngon and keep the edges but am no closer to a solution.
for f in bm.faces: if len(f.verts) > 4: bmesh.ops.delete(bm, geom=[f], context='FACES_ONLY')
In one version of the SVG I manually added extra vertices at the bottom to help create the required edges, but wonder if this useful or pointless (bad pun).
How do I convert these polygons (ngons) with more than 4 sides to quads, adding only vertical edges?