Improved SPIP calculation of number of steps

* Moved calculation from dialog to algorithm class
* Not failing anymore if start and target are in the same triangle