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

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
This commit is contained in:
ifv
2016-01-25 16:35:17 +03:00
committed by bugmaster
parent 6f21399c0d
commit 9c1519c4c5
32 changed files with 576 additions and 151 deletions

View File

@@ -0,0 +1,73 @@
// 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.
#include <GCPnts_DistFunction.hxx>
#include <gp_Pnt.hxx>
//=======================================================================
//function : MaxCurvLinDist
//purpose :
//=======================================================================
GCPnts_DistFunction::GCPnts_DistFunction(const Adaptor3d_Curve& theCurve,
const Standard_Real U1, const Standard_Real U2)
: myCurve(theCurve),
myU1(U1), myU2(U2)
{
gp_Pnt P1 = theCurve.Value(U1), P2 = theCurve.Value(U2);
myLin = gp_Lin(P1, P2.XYZ() - P1.XYZ());
}
//
//=======================================================================
//function : Value
//purpose :
//=======================================================================
Standard_Boolean GCPnts_DistFunction::Value (const Standard_Real X,
Standard_Real& F)
{
if (X < myU1 || X > myU2)
return Standard_False;
//
F = -myLin.SquareDistance(myCurve.Value(X));
return Standard_True;
}
//=======================================================================
//function : MaxCurvLinDistMV
//purpose :
//=======================================================================
GCPnts_DistFunctionMV::GCPnts_DistFunctionMV(GCPnts_DistFunction& theCurvLinDist)
: myMaxCurvLinDist(theCurvLinDist)
{
}
//=======================================================================
//function : Value
//purpose :
//=======================================================================
Standard_Boolean GCPnts_DistFunctionMV::Value (const math_Vector& X,
Standard_Real& F)
{
Standard_Boolean Ok = myMaxCurvLinDist.Value(X(1), F);
return Ok;
}
//=======================================================================
//function : NbVariables
//purpose :
//=======================================================================
Standard_Integer GCPnts_DistFunctionMV::NbVariables() const
{
return 1;
}