1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-16 10:54:53 +03:00

0022809: BRepIntCS does not find intersections of an ellipsoid and a line passing through it's apex (and near it)

This commit is contained in:
jgv 2012-03-19 16:12:21 +04:00 committed by bugmaster
parent e450f81883
commit cf8366718c
2 changed files with 17 additions and 2 deletions

View File

@ -216,7 +216,22 @@ void BRepTools::AddUVBounds(const TopoDS_Face& F,
}
P.SetCoord(u0,v0) ; Baux.Add(P);
P.SetCoord(u1,v1) ; Baux.Add(P);
B.Add(Baux);
Bnd_Box2d FinalBox;
Standard_Real aXmin, aYmin, aXmax, aYmax;
Baux.Get(aXmin, aYmin, aXmax, aYmax);
Standard_Real Tol2d = Precision::PConfusion();
if (Abs(aXmin - Umin) <= Tol2d)
aXmin = Umin;
if (Abs(aYmin - Vmin) <= Tol2d)
aYmin = Vmin;
if (Abs(aXmax - Umax) <= Tol2d)
aXmax = Umax;
if (Abs(aYmax - Vmax) <= Tol2d)
aYmax = Vmax;
FinalBox.Update(aXmin, aYmin, aXmax, aYmax);
B.Add(FinalBox);
}
}

View File

@ -120,7 +120,7 @@ void TopClass_FaceClassifier::Perform(TheFaceExplorer& Fexp,
}
}
if (!myClassifier.IsHeadOrEnd())
if (!myClassifier.IsHeadOrEnd() && aState != TopAbs_UNKNOWN)
break;
// Bad case for classification. Trying to get another segment.