mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-18 14:27:39 +03:00
0021564: Intersection of two planar faces produces curve with too many poles
I ComputePurgedWLine() function: Excess points in walking line are deleted when: 1) Distance between neighboring points too small. 2) Points lie in one pipe without big jump on chord length. III Fixed problem with extremaPC with too close knot distribution to [minParam, maxParam] borders. IV ApproxInt_Approx.gxx New division criteria in intersection approximator. III Test case Test cases update to the new behavior. Test case for CR21564 Correction of test cases for issue CR21564
This commit is contained in:
@@ -105,12 +105,14 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
|
||||
// Workaround to work with:
|
||||
// blend, where knots may be moved from param space.
|
||||
Standard_Real aPeriodJump = 0.0;
|
||||
// Avoid prolem with too close knots.
|
||||
const Standard_Real aTolCoeff = (myusup - myuinf) * Precision::PConfusion();
|
||||
if (TheCurveTool::IsPeriodic(aCurve))
|
||||
{
|
||||
Standard_Integer aPeriodShift =
|
||||
Standard_Integer ((myuinf - aKnots(aFirstIdx)) / TheCurveTool::Period(aCurve));
|
||||
|
||||
if (myuinf < aKnots(aFirstIdx))
|
||||
if (myuinf < aKnots(aFirstIdx) - aTolCoeff)
|
||||
aPeriodShift--;
|
||||
|
||||
aPeriodJump = TheCurveTool::Period(aCurve) * aPeriodShift;
|
||||
@@ -124,7 +126,7 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
|
||||
for(anIdx = aFirstIdx; anIdx <= aLastIdx; anIdx++)
|
||||
{
|
||||
Standard_Real aKnot = aKnots(anIdx) + aPeriodJump;
|
||||
if (myuinf >= aKnot)
|
||||
if (myuinf >= aKnot - aTolCoeff)
|
||||
aFirstUsedKnot = anIdx;
|
||||
else
|
||||
break;
|
||||
@@ -133,7 +135,7 @@ void Extrema_GExtPC::Perform(const ThePoint& P)
|
||||
for(anIdx = aLastIdx; anIdx >= aFirstIdx; anIdx--)
|
||||
{
|
||||
Standard_Real aKnot = aKnots(anIdx) + aPeriodJump;
|
||||
if (myusup <= aKnot)
|
||||
if (myusup <= aKnot + aTolCoeff)
|
||||
aLastUsedKnot = anIdx;
|
||||
else
|
||||
break;
|
||||
|
Reference in New Issue
Block a user