1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024565: MgtBRep persistence bug

Fix of the persistence bug (exception with message "Persistant CurveRep is Null").
Creating new draw command for testing CR24565
Revert license header corruption
Correction for new draw command OCC24565
Test case for issue CR24565
This commit is contained in:
szy
2014-03-27 16:48:46 +04:00
committed by bugmaster
parent 505abfb89f
commit 3497d55234
4 changed files with 263 additions and 10 deletions

View File

@@ -69,6 +69,7 @@
#include <Standard_NullObject.hxx>
// szy 23.01.2014 (bug 24565) correction for edge which has null 3d curve representation
// Used for testing DownCast time
#define MgtBRepSpeedDownCast
@@ -904,13 +905,13 @@ MgtBRep_TranslateTool::UpdateEdge(const Handle(PTopoDS_HShape)& S1,
}
else if (PCR->IsCurve3D()) {
Handle(PBRep_Curve3D)& PC3D = (Handle(PBRep_Curve3D)&) PCR;
if (! PC3D->Curve3D().IsNull()) {
Handle(BRep_Curve3D) C3D =
new BRep_Curve3D(MgtBRep_TranslateTool::Translate(PC3D->Curve3D(), aMap),
// szy 23.01.2014: correction for edge which has null 3d curve representation
Handle(BRep_Curve3D) C3D =
new BRep_Curve3D(MgtBRep_TranslateTool::Translate(PC3D->Curve3D(), aMap),
MgtTopLoc::Translate(PC3D->Location(), aMap));
C3D->SetRange(PGC->First(), PGC->Last());
CR = C3D;
}
C3D->SetRange(PGC->First(), PGC->Last());
CR = C3D;
}
}
else if (PCR->IsRegularity()) {
@@ -994,10 +995,8 @@ MgtBRep_TranslateTool::UpdateEdge(const Handle(PTopoDS_HShape)& S1,
}
Standard_NullObject_Raise_if (CR.IsNull(), "Persistant CurveRep is Null");
if(!CR.IsNull()) {
lcr.Prepend(CR);
}
lcr.Prepend(CR);
PCR = PCR->Next();
}