gp_Pnt EyePoint(XEye, YEye, ZEye);
gp_Pnt AtPoint(XAt, YAt, ZAt);
+ if (EyePoint.Distance(AtPoint) < Precision::Confusion())
+ return gp_Pnt();
+
gp_Vec EyeVector(EyePoint, AtPoint);
gp_Dir EyeDir(EyeVector);
gp_Pnt ConvertedPoint(X, Y, Z);
gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView, ConvertedPoint);
- gp_Pnt ResultPoint = ElSLib::Value(ConvertedPointOnPlane.X(), ConvertedPointOnPlane.Y(),
+ return ElSLib::Value(ConvertedPointOnPlane.X(), ConvertedPointOnPlane.Y(),
PlaneOfTheView);
- return ResultPoint;
}
void PartSet_Tools::convertTo2D(const gp_Pnt& thePoint, FeaturePtr theSketch,