#include "CurveCreator_Utils.h"
+#include <GEOMUtils.hxx>
+
#include <gp_Pln.hxx>
#include <ProjLib.hxx>
#include <ElSLib.hxx>
+//=======================================================================
+// function : ConvertClickToPoint()
+// purpose : Returns the point clicked in 3D view
+//=======================================================================
+void CurveCreator_Utils::ConvertPointToClick( const gp_Pnt& thePoint,
+ Handle(V3d_View) theView,
+ int& x, int& y )
+{
+ theView->Convert(thePoint.X(), thePoint.Y(), thePoint.Z(), x, y );
+}
+
//=======================================================================
// function : ConvertClickToPoint()
//=======================================================================
gp_Pnt CurveCreator_Utils::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView )
{
+ return GEOMUtils::ConvertClickToPoint( x, y, aView );
+ /*
V3d_Coordinate XEye, YEye, ZEye, XAt, YAt, ZAt;
aView->Eye( XEye, YEye, ZEye );
gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project( PlaneOfTheView, ConvertedPoint );
gp_Pnt ResultPoint = ElSLib::Value( ConvertedPointOnPlane.X(), ConvertedPointOnPlane.Y(), PlaneOfTheView );
return ResultPoint;
+ */
}