Posso farlo meno denso, e dare uno spessore alle linee proporzionale alla distanza
import pymesh
import svgwrite
import sys
def _proj(v):
return v[0], v[2]
def main(mesh_file, output_file):
mesh = pymesh.load_mesh(mesh_file)
dwg = svgwrite.Drawing(filename=output_file)
for face in mesh.faces:
dwg.add(dwg.polyline(map(
lambda v_idx: _proj(mesh.vertices[v_idx]),
face
)))
dwg.save()
if __name__ == '__main__':
main(*sys.argv[1:3])