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

Modeling - Bounding BSpline periodic tolerance issue #468

Update BndLib_Add3dCurve to check the periodic case u1-u2 matching with period
This commit is contained in:
Pasukhin Dmitry
2025-03-31 11:29:38 +01:00
committed by GitHub
parent 52a93a3bdd
commit ea34d5b2b7
3 changed files with 17 additions and 3 deletions

View File

@@ -215,9 +215,13 @@ void BndLib_Add3dCurve::Add(const Adaptor3d_Curve& C,
u2 = Bsaux->LastParameter();
// modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___
}
const Standard_Real anU2Periodic =
Bsaux->IsPeriodic() ? (u2 - (Bsaux->LastParameter() - Bsaux->FirstParameter())) : u2;
Standard_Real aSegmentTol = 2. * Precision::PConfusion();
if (Abs(u2 - u1) < aSegmentTol)
aSegmentTol = Abs(u2 - u1) * 0.01;
if (Abs((anU2Periodic - u1) < aSegmentTol))
{
aSegmentTol = Abs(anU2Periodic - u1) * 0.01;
}
Bsaux->Segment(u1, u2, aSegmentTol);
Bs = Bsaux;
}