Exemplo n.º 1
0
def rotate_surface():
    """Rotate the stl model."""
    if not check_surface():
        return
    itemlist = [ [ 'axis',0], ['angle','0.0'] ] 
    res,accept = widgets.inputDialog(itemlist,'Rotation Parameters').getResult()
    if accept:
        updateGUI()
        print res
        nodes,elems = PF['old_surface'] = PF['surface']
        F = Formex(nodes.reshape((-1,1,3)))
        nodes = F.rotate(float(res[1][1]),int(res[0][1])).f
        PF['surface'] = nodes,elems
        clear()
        show_changes(PF['old_surface'],PF['surface'])