Exemplo n.º 1
0
def center_surface():
    """Center the stl model."""
    if not check_surface():
        return
    updateGUI()
    nodes,elems = PF['old_surface'] = PF['surface']
    F = Formex(nodes.reshape((-1,1,3)))
    center = F.center()
    nodes = F.translate(-center).f
    PF['surface'] = nodes,elems
    clear()
    show_changes(PF['old_surface'],PF['surface'])