src/compas_3gs/rhino/wrappers/modify_diagrams.py
def rhino_vertex_modify_fixity(diagram, vertices):
    """Modifies the fixity attribute(s) of selected vertices.

    """

    go = Rhino.Input.Custom.GetOption()
    go.SetCommandPrompt('Set axes Constraints')

    boolOptionA = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')
    boolOptionX = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')
    boolOptionY = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')
    boolOptionZ = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')

    go.AddOptionToggle('A', boolOptionA)
    go.AddOptionToggle('X', boolOptionX)
    go.AddOptionToggle('Y', boolOptionY)
    go.AddOptionToggle('Z', boolOptionZ)

    while True:
        opt = go.Get()
        if go.CommandResult() != Rhino.Commands.Result.Success:
            break
        if opt == Rhino.Input.GetResult.Option:  # keep picking options
            continue
        break

    if not vertices:
        return

    for vertex in vertices:
        if boolOptionA.CurrentValue:
            diagram.vertex_attribute(vertex, 'x_fix', True)
            diagram.vertex_attribute(vertex, 'y_fix', True)
            diagram.vertex_attribute(vertex, 'z_fix', True)

        else:
            diagram.vertex_attribute(vertex, 'x_fix', boolOptionX.CurrentValue)
            diagram.vertex_attribute(vertex, 'y_fix', boolOptionY.CurrentValue)
            diagram.vertex_attribute(vertex, 'z_fix', boolOptionZ.CurrentValue)
Modifies the fixity attribute(s) of selected vertices.

    
Modifies the fixity attribute(s) of selected vertices.
Modifies the fixity attribute ( s ) of selected vertices .
def rhino_vertex_modify_fixity(diagram, vertices):
    go = Rhino.Input.Custom.GetOption()
    go.SetCommandPrompt('Set axes Constraints')
    boolOptionA = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')
    boolOptionX = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')
    boolOptionY = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')
    boolOptionZ = Rhino.Input.Custom.OptionToggle(False, 'False', 'True')
    go.AddOptionToggle('A', boolOptionA)
    go.AddOptionToggle('X', boolOptionX)
    go.AddOptionToggle('Y', boolOptionY)
    go.AddOptionToggle('Z', boolOptionZ)
    while True:
        opt = go.Get()
        if go.CommandResult() != Rhino.Commands.Result.Success:
            break
        if opt == Rhino.Input.GetResult.Option:  
            continue
        break
    if not vertices:
        return
    for vertex in vertices:
        if boolOptionA.CurrentValue:
            diagram.vertex_attribute(vertex, 'x_fix', True)
            diagram.vertex_attribute(vertex, 'y_fix', True)
            diagram.vertex_attribute(vertex, 'z_fix', True)
        else:
            diagram.vertex_attribute(vertex, 'x_fix', boolOptionX.CurrentValue)
            diagram.vertex_attribute(vertex, 'y_fix', boolOptionY.CurrentValue)
            diagram.vertex_attribute(vertex, 'z_fix', boolOptionZ.CurrentValue)
def rhino_vertex_modify_fixity ( diagram , vertices ) : go = Rhino . Input . Custom . GetOption ( ) go . SetCommandPrompt ( 'Set axes Constraints' ) boolOptionA = Rhino . Input . Custom . OptionToggle ( False , 'False' , 'True' ) boolOptionX = Rhino . Input . Custom . OptionToggle ( False , 'False' , 'True' ) boolOptionY = Rhino . Input . Custom . OptionToggle ( False , 'False' , 'True' ) boolOptionZ = Rhino . Input . Custom . OptionToggle ( False , 'False' , 'True' ) go . AddOptionToggle ( 'A' , boolOptionA ) go . AddOptionToggle ( 'X' , boolOptionX ) go . AddOptionToggle ( 'Y' , boolOptionY ) go . AddOptionToggle ( 'Z' , boolOptionZ ) while True : opt = go . Get ( ) if go . CommandResult ( ) != Rhino . Commands . Result . Success : break if opt == Rhino . Input . GetResult . Option : continue break if not vertices : return for vertex in vertices : if boolOptionA . CurrentValue : diagram . vertex_attribute ( vertex , 'x_fix' , True ) diagram . vertex_attribute ( vertex , 'y_fix' , True ) diagram . vertex_attribute ( vertex , 'z_fix' , True ) else : diagram . vertex_attribute ( vertex , 'x_fix' , boolOptionX . CurrentValue ) diagram . vertex_attribute ( vertex , 'y_fix' , boolOptionY . CurrentValue ) diagram . vertex_attribute ( vertex , 'z_fix' , boolOptionZ . CurrentValue )
Modifies the fixity attribute(s) of selected vertices.
Modifies the fixity attribute ( s ) of selected vertices .
"""Modifies the fixity attribute(s) of selected vertices.

    """ # keep picking options
diagram
vertices