Navigation

  • index
  • modules |
  • previous |
  • PLink 2.0.1 documentation »

plink – A Python/Tk link editor¶

Technical documentation of the Python objects that underly PLink. Of interest only to Marc, Nathan, or similar folks.

class plink.LinkEditor(root=None, no_arcs=False, callback=None, cb_menu=”, manifold=None, file_name=None, title=’PLink Editor’, show_crossing_labels=False)¶

A graphical link drawing tool based on the one embedded in Jeff Weeks’ original SnapPea program.

about()¶
active_crossing_data()¶

Return the tuple of edges crossed by the in and out arrows of the active vertex.

alert()¶
attach_cursor(reason=”)¶
build_menus()¶
build_plink_menus()¶
clear()¶
clear_text()¶
clicked_on_arrow(vertex)¶
copy_info(event)¶
crossed_arrows(arrow, ignore_list=[])¶

Return a tuple containing the arrows of the diagram which are crossed by the given arrow, in order along the given arrow.

cursor_on_arrow(point)¶
destroy_arrow(arrow)¶
detach_cursor(reason=”)¶
do_callback()¶
done(event=None)¶
double_click(event)¶

Event handler for mouse double-clicks.

end_dragging_state()¶
focus_in(event)¶
focus_out(event)¶
full_redraw()¶

Recolors and redraws all components, in DT order, and displays the legend linking colors to cusp indices.

generic_arrow(arrow)¶
generic_vertex(vertex)¶
goto_drawing_state(x1, y1)¶
goto_start_state()¶
hide_DT()¶
hide_labels()¶
howto()¶
key_press(event)¶

Handler for keypress events.

key_release(event)¶

Handler for keyrelease events.

load(file_name=None)¶
make_alternating()¶

Changes crossings to make the projection alternating. Requires that all components be closed.

mouse_moved(event)¶

Handler for mouse motion events.

move_active(x, y)¶
move_is_ok()¶
not_done()¶
notice_focus()¶
reflect()¶
reopen()¶
save()¶
save_image(file_type=’eps’, colormode=’color’)¶
set_info()¶
set_start_cursor(x, y)¶
set_view_mode()¶
shift_click(event)¶

Event handler for mouse shift-clicks.

show_DT()¶

Display the DT hit counters next to each crossing. Crossings that need to be flipped for the planar embedding have an asterisk.

show_labels()¶

Display the assigned labels next to each crossing.

single_click(event)¶

Event handler for mouse clicks.

unpickle(vertices, arrows, crossings, hot=None)¶
update_crossings(this_arrow)¶

Redraw any arrows which were changed by moving this_arrow.

update_info()¶
update_smooth()¶
verify_drag()¶
warn_arcs()¶
write_text(string)¶
zoom_in()¶
zoom_out()¶
zoom_to_fit()¶

This module exports the class Arrow which represents a (directed) line segment in a PL link diagram.

class plink.arrow.Arrow(start, end, canvas=None, style=’normal’, color=’black’)¶

An arrow in a PL link diagram.

draw(crossings=[], recurse=True, skip_frozen=True)¶
epsilon = 8¶
erase()¶

Prepare the arrow for the garbage collector.

expose(crossings=[])¶
find_segments(crossings, include_overcrossings=False, gapsize=9.0)¶

Return a list of segments that make up this arrow, each segment being a list of 4 coordinates [x0,y0,x1,y1]. The first segment starts at the start vertex, and the last one ends at the end vertex. Otherwise, endpoints are near crossings where this arrow goes under, leaving a gap between the endpoint and the crossing point. If the include_overcrossings flag is True, then the segments are also split at overcrossings, with no gap.

freeze()¶
frozen¶
hidden¶
hide()¶
make_faint()¶
reverse(crossings=[])¶
set_color(color)¶
set_end(vertex, crossings=[])¶
set_start(vertex, crossings=[])¶
too_close(vertex, tolerance=None)¶
vectorize()¶

This module exports the Crossing class, which represents a crossing in a link diagram, and the ECrossing class which represents an edge of the diagram passing through a crossing.

class plink.crossings.Crossing(over, under, is_virtual=False, label=None)¶

A pair of crossing arrows in a PL link diagram.

DT_hit(count, ecrossing)¶

Count the crossing, using DT conventions. Return True on the first hit if the count is odd and the crossing is shared by two components of the diagram. As a side effect, set the flipped attribute on the first hit.

clear_marks()¶
height(arrow)¶
locate()¶
mark_component(component)¶
reverse()¶
sign()¶
strand(arrow)¶
class plink.crossings.ECrossing(crossing, arrow)¶

A pair: (Crossing, Arrow), where the Arrow is involved in the Crossing. The ECrossings correspond 1-1 with edges of the link diagram.

goes_over()¶
pair()¶

Previous topic

Installing and running PLink

This Page

  • Show Source

Quick search

Navigation

  • index
  • modules |
  • previous |
  • PLink 2.0.1 documentation »
© Copyright 2009-present, Marc Culler, Nathan Dunfield and others. Created using Sphinx 1.6.2.