Check that the segments won't overwrite existing segments, collide with vertices or arrows, and that it won't cause any new twists".
Check that the segments won't overwrite existing segments, collide with vertices or arrows, and that it won't cause any new twists". Example of the latter: ╭─────╮ ╭─────╮ │ A │ │ A │ ╰─┬─┬─╯ ╰─┬─┬─╯ │ │ │ │ │ │ vs ╭─┼─╯ ╭───────╯ │ ╭─────┼─╯ │ ╭───╯ │ │ │ │ │ │ v v v v ╭───────╮ ╭───╮ ╭───────╮ ╭───╮ │ F │ │ G │ │ F │ │ G │ ╰───────╯ ╰───╯ ╰───────╯ ╰───╯
(Since version ) see corresponding Javadoc for more information.
Keep track of vertex regions, and horizontal and vertical edge segments as we move them around, so we can detect collisions.