mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +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:
@@ -794,12 +794,26 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
|
||||
if(sae.HasPCurve(sbwd->Edge(i),face)) {
|
||||
Handle(Geom2d_Curve) C2d;
|
||||
Standard_Real fp2d,lp2d;
|
||||
if(sae.PCurve(sbwd->Edge(i),face,C2d,fp2d,lp2d)) {
|
||||
if(sae.PCurve(sbwd->Edge(i),face,C2d,fp2d,lp2d, Standard_False)) {
|
||||
if( fabs(First-fp2d)>Precision::PConfusion() ||
|
||||
fabs(Last-lp2d)>Precision::PConfusion() ) {
|
||||
fabs(Last-lp2d)>Precision::PConfusion() )
|
||||
{
|
||||
BRep_Builder B;
|
||||
B.SameRange(sbwd->Edge(i),Standard_False);
|
||||
}
|
||||
else if(!sae.CheckPCurveRange(First, Last, C2d))
|
||||
{
|
||||
//Replace pcurve
|
||||
TopLoc_Location L;
|
||||
const Handle(Geom_Surface)& S = BRep_Tool::Surface(face, L);
|
||||
ShapeBuild_Edge().RemovePCurve (sbwd->Edge(i), S, L);
|
||||
myFixEdge->FixAddPCurve ( sbwd->Edge(i), face, sbwd->IsSeam(i),
|
||||
myAnalyzer->Surface(), Precision() );
|
||||
if ( myFixEdge->Status ( ShapeExtend_DONE ) )
|
||||
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
|
||||
if ( myFixEdge->Status ( ShapeExtend_FAIL ) )
|
||||
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
myFixEdge->FixSameParameter ( sbwd->Edge(i), Face());
|
||||
|
Reference in New Issue
Block a user