mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0029972: Intersection curve has a weird gap in the middle of it
1. The condition of WLine breaking (in IntWalk_IWalking algorithm) has become more independent of the input tolerance. 2. Currently the algorithm of IntPatch_Points of WLine processing depends on the algorithm of obtaining the WLine. 3. The methods IntSurf_LineOn2S::Add(...) and IntSurf_LineOn2S::SetUV(...) have become not inline (see the message ~0077431 in the issue #29866).
This commit is contained in:
@@ -303,14 +303,28 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC
|
||||
sprintf(name, "bc2d_%d_%d", indc, nbbc);
|
||||
DrawTrSurf::Set(name, theBezier2d);
|
||||
#endif
|
||||
gp_Vec2d FirstVec, SecondVec;
|
||||
FirstVec = gp_Vec2d(aPoles2d(1), aPoles2d(2));
|
||||
FirstVec.Normalize();
|
||||
const Standard_Real aSqNormToler = Epsilon(1.0)*Epsilon(1.0);
|
||||
gp_Vec2d FirstVec(aPoles2d(1), aPoles2d(2)), SecondVec;
|
||||
Standard_Real aVecSqNorm = FirstVec.SquareMagnitude();
|
||||
if (aVecSqNorm < aSqNormToler)
|
||||
{
|
||||
theIndbad = theIndfirst + 1;
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
FirstVec /= Sqrt(aSqNormToler);
|
||||
gp_Pnt2d MidPnt = aPoles2d(2);
|
||||
for (Standard_Integer k = 3; k <= aPoles2d.Upper(); k++)
|
||||
{
|
||||
SecondVec = gp_Vec2d(MidPnt, aPoles2d(k));
|
||||
SecondVec.Normalize();
|
||||
SecondVec.SetXY(aPoles2d(k).XY() - MidPnt.XY());
|
||||
aVecSqNorm = SecondVec.SquareMagnitude();
|
||||
if (aVecSqNorm < aSqNormToler)
|
||||
{
|
||||
theIndbad = theIndfirst + k - 1;
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
SecondVec /= Sqrt(aVecSqNorm);
|
||||
Standard_Real ScalProd = FirstVec * SecondVec;
|
||||
if (ScalProd < MinScalProd)
|
||||
{
|
||||
|
Reference in New Issue
Block a user