new connection algorithm (partial)

coordinates are now signed
made open/close smarter
added some checks for bsp_layout::params_t