+#include <ShapeFix_EdgeProjAux.hxx>
+static Standard_Integer OCC24370 (Draw_Interpretor& di, Standard_Integer argc,const char ** argv)
+{
+ if (argc < 5) {
+ di<<"Usage: " << argv[0] << " invalid number of arguments"<<"\n";
+ return 1;
+ }
+
+ TopoDS_Shape aSh = DBRep::Get(argv[1]);
+ if (aSh.IsNull()) {
+ di << argv[0] << " Error: Null input edge\n";
+ return 1;
+ }
+ const TopoDS_Edge& anEdge = TopoDS::Edge (aSh);
+
+ Handle(Geom2d_Curve) aC = DrawTrSurf::GetCurve2d(argv[2]);
+ if (aC.IsNull()) {
+ di << argv[0] << " Error: Null input curve\n";
+ return 1;
+ }
+
+ Handle(Geom_Surface) aS = DrawTrSurf::GetSurface(argv[3]);
+ if (aS.IsNull()) {
+ di << argv[0] << " Error: Null input surface\n";
+ return 1;
+ }
+
+ Standard_Real prec = Draw::Atof(argv[4]);
+
+ //prepare data
+ TopoDS_Face aFace;
+ BRep_Builder aB;
+ aB.MakeFace (aFace, aS, Precision::Confusion());
+ aB.UpdateEdge (anEdge, aC, aFace, Precision::Confusion());
+ aB.Range (anEdge, aFace, aC->FirstParameter(), aC->LastParameter());
+
+ //call algorithm
+ ShapeFix_EdgeProjAux aProj (aFace, anEdge);
+ aProj.Compute (prec);
+
+ Standard_Boolean isfirstdone = aProj.IsFirstDone();
+ Standard_Boolean islastdone = aProj.IsLastDone();
+
+ Standard_Real first = 0.;
+ Standard_Real last = 0.;
+ Standard_Integer isfirstdoneInteger = 0;
+ Standard_Integer islastdoneInteger = 0;
+
+
+ if (isfirstdone) {
+ first = aProj.FirstParam();
+ isfirstdoneInteger = 1;
+ }
+
+ if (islastdone) {
+ last= aProj.LastParam();
+ islastdoneInteger = 1;
+ }
+
+ di << isfirstdoneInteger << " "<< islastdoneInteger << " "<< first << " "<< last << " \n";
+
+ return 0;
+}
+