- gp_Pnt aFLyPnt(aFlyoutPnt->x(), aFlyoutPnt->y(), aFlyoutPnt->z());
- double aDist = aCenter.Distance(aFLyPnt);
+ gp_Dir aBisector((aFirst.XYZ() + aSecond.XYZ()) * 0.5 - aCenter.XYZ());
+
+ gp_Pnt aFlyPnt(aFlyoutPnt->x(), aFlyoutPnt->y(), aFlyoutPnt->z());
+ gp_XYZ aFlyDir = aFlyPnt.XYZ() - aCenter.XYZ();
+ double aDist = aFlyDir.Dot(aBisector.XYZ());