Using the script below I encounter the same non-orthogonal corners as already asked here, but my bmesh is three dimensional, not flat.
Is my current skin modifier approach even the best solution or is there another which doesn't even raise the corner problem at all?
import bpy
vertices=[[0,0,0],[0,0,1],[0,1,1]]
edges=[[0,1],[1,2]]
faces = []
name = "my_bmesh"
mesh = bpy.data.meshes.new(name)
obj = bpy.data.objects.new(name, mesh)
coll = bpy.data.collections.get("Collection")
coll.objects.link(obj)
bpy.context.view_layer.objects.active = obj
mesh.from_pydata(vertices, edges, faces)
Add skin modifier
mod_skin = obj.modifiers.new('Skin', 'SKIN')
Add radius
dim = (0.3, 0.3)
for v in obj.data.skin_vertices[0].data:
v.radius = dim
