UVShape.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Modeling-Cloth 作者: the3dadvantage 项目源码 文件源码
def total_length_selected(ed='empty', coords='empty', ob='empty'):
    '''Returns the total length of all edge segments'''
    if ob == 'empty':
        ob = bpy.context.object
    if coords == 'empty':    
        coords = get_coords(ob)
    if ed == 'empty':    
        ed = get_edge_idx(ob)
    edc = coords[ed]
    e1 = edc[:, 0]
    e2 = edc[:, 1]
    ee1 = e1 - e2
    sel = get_selected_edges(ob)    
    ee = ee1[sel]    
    leng = np.einsum('ij,ij->i', ee, ee)
    return np.sum(np.sqrt(leng))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号