mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0029839: Modeling Algorithms - Unexpected Circle to BSpline surface extrema behavior
Extrema_ExtCS.cxx: treatment of small line segments is added; Extrema_GenExtCS.cxx: treatment of particular cases curve-quadric and conic-surface are added Extrema_GlobOptFuncCQuadric, Extrema_GlobOptFuncConicS: new distance functions for particular cases are added BOPAlgo_PaveFiller_5.cxx : treatment of large common parts edge-face is improved ElSLib.cxx : method TorusParameters(...) is modified to avoid divide by zero math_PSOParticlesPool.cxx : initialization of array is added
This commit is contained in:
@@ -1480,10 +1480,19 @@ void ElSLib::TorusParameters(const gp_Ax3& Pos,
|
||||
Standard_Real cosu = cos(U);
|
||||
Standard_Real sinu = sin(U);
|
||||
gp_Dir dx(cosu,sinu,0.);
|
||||
gp_Dir dP(x - MajorRadius * cosu,
|
||||
y - MajorRadius * sinu,
|
||||
z);
|
||||
V = dx.AngleWithRef(dP,dx^gp::DZ());
|
||||
gp_XYZ dPV(x - MajorRadius * cosu,
|
||||
y - MajorRadius * sinu,
|
||||
z);
|
||||
Standard_Real aMag = dPV.Modulus();
|
||||
if (aMag <= gp::Resolution())
|
||||
{
|
||||
V = 0.;
|
||||
}
|
||||
else
|
||||
{
|
||||
gp_Dir dP(dPV);
|
||||
V = dx.AngleWithRef(dP, dx^gp::DZ());
|
||||
}
|
||||
if (V < -1.e-16) V += PIPI;
|
||||
else if (V < 0) V = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user