1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0026570: Crash on attempt to rotate a shape.

An extended draw-command trotate (ttranslate, tmirror, ...) by an additional parameter "-copy".
New check of edge range is added in BRepCheck/BRepCheck_Edge.cxx
The same checking is added in ShapeAnalysis_Edge.cxx
Fixing this problem is added in ShapeFix_Wire.cxx
GeomLib::SameRange(...) and BRepTools_TrsfModification::NewCurve2d(...) are modified to avoid exception in TrimmedCurve
This commit is contained in:
vro
2015-08-19 10:25:11 +03:00
committed by bugmaster
parent 472433e2c7
commit 4e882c7153
13 changed files with 264 additions and 25 deletions

View File

@@ -971,14 +971,27 @@ void GeomLib::SameRange(const Standard_Real Tolerance,
if(aCCheck->IsPeriodic())
{
TC = new Geom2d_TrimmedCurve( CurvePtr, FirstOnCurve, LastOnCurve );
if(Abs(LastOnCurve - FirstOnCurve) > Precision::PConfusion())
{
TC = new Geom2d_TrimmedCurve( CurvePtr, FirstOnCurve, LastOnCurve );
}
else
{
TC = new Geom2d_TrimmedCurve( CurvePtr, CurvePtr->FirstParameter(), CurvePtr->LastParameter() );
}
}
else
{
const Standard_Real Udeb = Max(CurvePtr->FirstParameter(), FirstOnCurve);
const Standard_Real Ufin = Min(CurvePtr->LastParameter(), LastOnCurve);
TC = new Geom2d_TrimmedCurve( CurvePtr, Udeb, Ufin );
if(Abs(Ufin - Udeb) > Precision::PConfusion())
{
TC = new Geom2d_TrimmedCurve( CurvePtr, Udeb, Ufin );
}
else
{
TC = new Geom2d_TrimmedCurve( CurvePtr, CurvePtr->FirstParameter(), CurvePtr->LastParameter());
}
}
//