示例#1
0
def create_paraxial_design_view_v2(opt_model, dgm_type, gui_parent=None):
    refresh_gui, is_dark = get_defaults_from_gui_parent(gui_parent)
    fig = dgm.InteractiveDiagram(opt_model,
                                 dgm_type,
                                 refresh_gui=refresh_gui,
                                 do_draw_frame=True,
                                 do_draw_axes=True,
                                 aspect='auto',
                                 is_dark=is_dark)
    panel_fcts = [
        create_2d_figure_toolbar,
    ]
    if dgm_type == 'ht':
        # cmds = diagram.create_parax_design_commands(fig)
        cmds = None
        panel_fcts.append(create_diagram_controls_groupbox)
        panel_fcts.append(create_diagram_edge_actions_groupbox)
        panel_fcts.append(create_diagram_layers_groupbox)
    else:
        cmds = None
    view_width = 880
    view_ht = 660
    title = "Paraxial Design View"
    # panel_fcts = [create_2d_figure_toolbar,
    #               create_diagram_controls_groupbox,
    #               ]
    plotview.create_plot_view(gui_parent,
                              fig,
                              title,
                              view_width,
                              view_ht,
                              add_panel_fcts=panel_fcts,
                              commands=cmds,
                              drop_action=diagram.GlassDropAction())
示例#2
0
def create_paraxial_design_view_v2(opt_model, dgm_type, gui_parent=None):
    fig = dgm.InteractiveDiagram(opt_model,
                                 gui_parent.refresh_gui,
                                 dgm_type,
                                 do_draw_frame=True,
                                 do_draw_axes=True,
                                 aspect='auto',
                                 figsize=(5, 4))
    cmds = dgm.create_parax_design_commands(fig)
    view_width = 650
    view_ht = 500
    title = "Paraxial Design View V2"
    plotview.create_plot_view(gui_parent,
                              fig,
                              title,
                              view_width,
                              view_ht,
                              commands=cmds,
                              add_nav_toolbar=True)