将 Blender 的 UV 矢量转换为 3D 坐标

Converting Blender's UV vectors into 3D coordinates

我已经使用 Blender 的 Bmesh 函数将 UV 矢量坐标转换为 3D 平面。使用 bmesh 创建更新的网格,

bm.faces.new((vert))

它创建了不受欢迎的面,或者更准确地说,函数生成的边和面不是预期的。

有没有办法使用 bmesh 不生成超过网格最大连接距离的边?

picture 显示左侧边和面的生成,以绿色标记,与我标记为 UV 展开的接缝相比。

每一张脸都有一个列表edges, an edge can give you it's length and if it's too long you can remove吧。删除其中一条边也会删除面。

f = bm.faces.new((vert))
for e in f.edges:
    if e.calc_length() > max_length:
        bm.edges.remove(e)

您还可以在使用两个顶点创建面之前获取它们之间的距离 (v1.co-v2.co).length,诀窍是知道哪些将作为边连接,哪些将对角线穿过面。