1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-20 11:54:07 +03:00
occt/src/GCPnts/GCPnts_DistFunction.hxx
ifv 9c1519c4c5 0027108: GCPnt_TangentialDeflection does not respect linear deflection
Modification of algorithm in order to prevent violation of angular and curvature deflection condition for smooth intervals of curve.
Modification of algorithm for calculation of maximal deflection in command crvtpoints, crvpoints (CR25649)
Elementary bug fixing in algorithm GCPnts_UniformDeflection.gxx
Modification of test cases in order to set new reference parameters of shape triangulations
Some tests:
  bugs modalg_2 bug397
  mesh standard_incmesh C7, V3
  mesh standard_incmesh_parallel C7, V3
  mesh standard_mesh C7, V3
  mesh standard_shading V3
were modified by TODO with reference bug 27226, because some problems in meshing algorithm (package BRepMesh) were discovered when tessellation of edges was changed. These problems cannot be solved by modification of GCPnts_TangentialDeflection algorithm. New issue #27226 was created, see bugtracker for details.

Correction of test data

Test case for issue #27108

Modification of algorithm for improving performance

Correction of test cases
2016-06-16 14:58:40 +03:00

68 lines
2.5 KiB
C++

// Copyright (c) 2014-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GCPnts_DistFunction_HeaderFile
#define _GCPnts_DistFunction_HeaderFile
#include <gp_Lin.hxx>
#include <math_Function.hxx>
#include <math_MultipleVarFunction.hxx>
#include <Adaptor3d_Curve.hxx>
class gp_Pnt;
//! Class to define function, which calculates square distance between point on curve
//! C(u), U1 <= u <= U2 and line passing through points C(U1) and C(U2)
//! This function is used in any minimisation algorithm to define maximal deviation between curve and line,
//! which required one variable function without derivative (for ex. math_BrentMinimum)
class GCPnts_DistFunction : public math_Function
{
public:
Standard_EXPORT GCPnts_DistFunction(const Adaptor3d_Curve& theCurve,
const Standard_Real U1, const Standard_Real U2);
//
Standard_EXPORT GCPnts_DistFunction(const GCPnts_DistFunction& theOther);
Standard_EXPORT virtual Standard_Boolean Value (const Standard_Real X,
Standard_Real& F);
private:
GCPnts_DistFunction & operator = (const GCPnts_DistFunction & theOther);
const Adaptor3d_Curve& myCurve;
gp_Lin myLin;
Standard_Real myU1;
Standard_Real myU2;
};
//
//! The same as class GCPnts_DistFunction, but it can be used in minimization algorithms that
//! requires multi variable function
class GCPnts_DistFunctionMV : public math_MultipleVarFunction
{
public:
Standard_EXPORT GCPnts_DistFunctionMV(GCPnts_DistFunction& theCurvLinDist);
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X,
Standard_Real& F);
Standard_EXPORT virtual Standard_Integer NbVariables() const;
private:
GCPnts_DistFunctionMV & operator = (const GCPnts_DistFunctionMV & theOther);
GCPnts_DistFunction& myMaxCurvLinDist;
};
//
#endif // _GCPnts_DistFunction_HeaderFile