mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025223: Wrong result done by projection algorithm
class ProjLib_ComputeApprox method ProjLib_ComputeApprox::ProjLib_ComputeApprox (const Handle(Adaptor3d_HCurve) & C, const Handle(Adaptor3d_HSurface) & S, const Standard_Real Tol ) Using Precision::PConfusion() as a 2d tolerance when shifting the projected curve. Test case for issue CR25223
This commit is contained in:
@@ -1072,9 +1072,14 @@ ProjLib_ComputeApprox::ProjLib_ComputeApprox
|
||||
}
|
||||
if (F.UCouture || (F.VCouture && SType == GeomAbs_Sphere))
|
||||
{
|
||||
gp_Pnt2d P2d = F.Value( UFirst );
|
||||
number = (Standard_Integer) (Floor((P2d.X()-u)/M_PI + Epsilon(M_PI)));
|
||||
du = -number*M_PI;
|
||||
Standard_Real aNbPer;
|
||||
gp_Pnt2d P2d = F.Value(UFirst);
|
||||
du = u - P2d.X();
|
||||
du = (du < 0) ? (du - Precision::PConfusion()) :
|
||||
(du + Precision::PConfusion());
|
||||
modf(du/M_PI, &aNbPer);
|
||||
number = (Standard_Integer)aNbPer;
|
||||
du = number*M_PI;
|
||||
}
|
||||
|
||||
if (!myBSpline.IsNull())
|
||||
|
Reference in New Issue
Block a user