#include <Geom2d_TrimmedCurve.hxx>
#include <ElCLib.hxx>
#include <GeomLib.hxx>
+#include <Extrema_ExtPC.hxx>
//=======================================================================
//function : IsoIsDeg
IsTrimmed[0] = Standard_True;
f = f + dt;
myCurve = myCurve->Trim(f, l, Precision::Confusion());
- Vsingular[0] = ElCLib::Parameter(L, P);
+ // Searching the parameter on the basis curve for surface of revolution
+ Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance);
+ if (anExtr.IsDone())
+ {
+ Standard_Integer anIndex = 1;
+ while (!anExtr.IsMin(anIndex) && anIndex < anExtr.NbExt()) anIndex++;
+ Vsingular[0] = anExtr.Point(anIndex).Parameter();
+ }
+ else
+ Vsingular[0] = ElCLib::Parameter(L, P);
//SingularCase[0] = 3;
}
IsTrimmed[1] = Standard_True;
l = l - dt;
myCurve = myCurve->Trim(f, l, Precision::Confusion());
- Vsingular[1] = ElCLib::Parameter(L, P);
+ // Searching the parameter on the basis curve for surface of revolution
+ Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance);
+ if (anExtr.IsDone())
+ {
+ Standard_Integer anIndex = 1;
+ while (!anExtr.IsMin(anIndex) && anIndex < anExtr.NbExt()) anIndex++;
+ Vsingular[1] = anExtr.Point(anIndex).Parameter();
+ }
+ else
+ Vsingular[1] = ElCLib::Parameter(L, P);
//SingularCase[1] = 4;
}
}
--- /dev/null
+puts "================"
+puts "OCC25494"
+puts "================"
+puts ""
+#######################################################################
+# Wrong result obtained by projection algorithm
+#######################################################################
+
+restore [locate_data_file bug25494_s.draw] s
+restore [locate_data_file bug25494_c.draw] c
+
+project c2d c s
+
+dump c2d