Exemplo n.º 1
0
def transferComponentSelection(selComponents, destMesh):
    '''
    transfers selection of components to destMesh
    '''

    selComponentsIds = [dt.getComponentId(component) for component in selComponents]
    
    componentType = selComponents[0].split('.')[1].split('[')[0]
    
    newComponents = ['%s.%s[%d]'%(destMesh, componentType, faceId) for faceId in selComponentsIds]
    
    return newComponents
Exemplo n.º 2
0
def flipSelection(selVerts, symDict):
    '''
    '''
    symDict2 = make2WaySymTable(symDict)
    selList = []
    
    for eachVert in selVerts:
        vertId = dt.getComponentId(eachVert)
        if vertId in symDict2.keys():
            selList.append(symDict2[vertId])
        else:
            # if this vert is assymetrical (i.e. on the center line)
            # just add it as well...
            selList.append(vertId)
    
    mesh = dt.getMeshName(selVerts[0])
    sel.selectVertsFromIdList(mesh, selList)
    
    return selList
Exemplo n.º 3
0
def flipSelection(selVerts, symDict):
    '''
    '''
    symDict2 = make2WaySymTable(symDict)
    selList = []

    for eachVert in selVerts:
        vertId = dt.getComponentId(eachVert)
        if vertId in symDict2.keys():
            selList.append(symDict2[vertId])
        else:
            # if this vert is assymetrical (i.e. on the center line)
            # just add it as well...
            selList.append(vertId)

    mesh = dt.getMeshName(selVerts[0])
    sel.selectVertsFromIdList(mesh, selList)

    return selList