1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024988: Wrong result done by projection algorithm

Wrong border 1.0e-9 jump has deleted. Added periodicity information when projecting to surface.
Period "jump" bug fixes.

AppCont_LeastSquare conversion to non cdl class.
AppCont_Function + AppCont_FunctionTool combined in one class providing the same functionality and converted to non cdl.
Testcase modification.

Test cases for issue CR24988

Fixed incorrect comparison.
This commit is contained in:
aml
2014-12-04 15:04:22 +03:00
committed by bugmaster
parent e8feb725a4
commit 368cdde60e
37 changed files with 1164 additions and 1704 deletions

View File

@@ -62,7 +62,7 @@ end;
generic class ComputeLine, MyGradient;
generic class ComputeCLine, MyLeastSquare;
generic class ComputeCLine;
----------------------------------------------
---Algorithms for BSpline curves construction:
@@ -108,10 +108,10 @@ end;
-----------------------------------------------------------------
class FitAndDivide instantiates ComputeCLine from Approx
(Function from AppCont, FunctionTool from AppCont);
(Function from AppCont);
class FitAndDivide2d instantiates ComputeCLine from Approx
(Function2d from AppCont, FunctionTool2d from AppCont);
(Function from AppCont);
class SameParameter from Approx ;

View File

@@ -15,8 +15,7 @@
-- commercial license or contractual agreement.
generic class ComputeCLine from Approx
(MultiLine as any;
LineTool as any)
(MultiLine as any)
---Purpose: Approximate a continous MultiLine with a cutting.
-- The Tool of the line is the tool from AppCont.
@@ -29,11 +28,6 @@ uses ParametrizationType from Approx,
Vector from math
private class MyLeastSquare instantiates LeastSquare from AppCont
(MultiLine,
LineTool);
is
@@ -160,7 +154,7 @@ currenttol3d: Real;
currenttol2d: Real;
mycut: Boolean;
myfirstC: Constraint;
mylastC: Constraint;
mylastC: Constraint;
end ComputeCLine;

View File

@@ -19,7 +19,7 @@
#include <Approx_ParametrizationType.hxx>
#include Approx_MyLeastSquare_hxx
#include <AppCont_LeastSquare.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <AppParCurves_Constraint.hxx>
#include <Approx_Status.hxx>
@@ -89,8 +89,8 @@ void Approx_ComputeCLine::Perform(const MultiLine& Line)
Standard_Boolean Finish = Standard_False,
begin = Standard_True, Ok = Standard_False;
Standard_Real thetol3d = Precision::Confusion(), thetol2d = Precision::Confusion();
UFirst = LineTool::FirstParameter(Line);
ULast = LineTool::LastParameter(Line);
UFirst = Line.FirstParameter();
ULast = Line.LastParameter();
Standard_Real TolU = (ULast-UFirst)*1.e-05;
Standard_Real myfirstU = UFirst;
Standard_Real mylastU = ULast;
@@ -219,8 +219,7 @@ Standard_Boolean Approx_ComputeCLine::Compute(const MultiLine& Line,
for (deg = mydegremin; deg <= mydegremax; deg++) {
AppParCurves_MultiCurve mySCU(deg+1);
Approx_MyLeastSquare LSquare(Line, Ufirst, Ulast, myfirstC, mylastC,
deg, NbPoints);
AppCont_LeastSquare LSquare(Line, Ufirst, Ulast, myfirstC, mylastC, deg, NbPoints);
mydone = LSquare.IsDone();
if (mydone) {
LSquare.Error(Fv, TheTol3d, TheTol2d);