List updated = algorithm.solve();
Connection current;
for (int i = 0; i < updated.size(); i++) {
Path path = (Path) updated.get(i);
current = (Connection) path.data;
current.revalidate();
PointList points = path.getPoints().getCopy();
Point ref1, ref2, start, end;
ref1 = new PrecisionPoint(points.getPoint(1));
ref2 = new PrecisionPoint(points.getPoint(points.size() - 2));