Fix CalcCurvesIntersetions method issue, add test.