For `connect` type, if one end is floating, start from lower end point to higher end point (z cooridnates)