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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user