mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024005: Intersecting a slightly off angle plane with a cylinder takes 7+ seconds
Checking of possibility of bad result. Adding test case for issue CR24005 Correction of test case for issue CR24005
This commit is contained in:
@@ -1627,10 +1627,21 @@ Handle(Geom_Surface) Draft_Modification::NewSurface
|
||||
#endif
|
||||
return NewS;
|
||||
}
|
||||
if (Abs(Angle) > Precision::Angular()) {
|
||||
if (Abs(Angle) > Precision::Angular())
|
||||
{
|
||||
IntAna_QuadQuadGeo i2s;
|
||||
i2s.Perform(NeutralPlane,Cy,Precision::Angular(),Precision::Confusion());
|
||||
if (!i2s.IsDone() || i2s.TypeInter() != IntAna_Circle) {
|
||||
Standard_Boolean isIntDone = i2s.IsDone();
|
||||
|
||||
if(i2s.TypeInter() == IntAna_Ellipse)
|
||||
{
|
||||
const gp_Elips anEl = i2s.Ellipse(1);
|
||||
const Standard_Real aMajorR = anEl.MajorRadius();
|
||||
const Standard_Real aMinorR = anEl.MinorRadius();
|
||||
isIntDone = (aMajorR < 100000.0 * aMinorR);
|
||||
}
|
||||
|
||||
if (!isIntDone || i2s.TypeInter() != IntAna_Circle) {
|
||||
#ifdef DEB
|
||||
cout << "NewSurfaceCyl:Draft_Intersection_Neutral_Cylinder_NotDone" << endl;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user