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

0027264: Weird difference between two BRepTools::Write() overloads

Assume that the brep file contains DBRep_DrawableShape variable if the file header is absent

test cases
This commit is contained in:
isn
2016-07-11 12:52:59 +03:00
committed by bugmaster
parent b2fbf11a4f
commit 4aa09e317f
7 changed files with 104 additions and 2 deletions

View File

@@ -227,15 +227,29 @@ static Standard_Integer restore(Draw_Interpretor& di, Standard_Integer n, const
progress->Show();
Draw_SaveAndRestore* tool = Draw_First;
Draw_SaveAndRestore* aDBRepTool = NULL;
while (tool) {
if (!strcmp(typ,tool->Name())) break;
const char* toolName = tool->Name();
if (!strcmp(typ,toolName)) break;
if (!strcmp("DBRep_DrawableShape",toolName))
aDBRepTool = tool;
Draw::SetProgressBar(progress);
tool = tool->Next();
}
if (tool) {
if (!tool)
{
//assume that this file stores a DBRep_DrawableShape variable
tool = aDBRepTool;
in.seekg(0, ios::beg);
}
if (tool)
{
Handle(Draw_Drawable3D) D = tool->Restore(in);
Draw::Set(name,D,tool->Disp() && autodisp);
}
else {
di << "Cannot restore a " << typ;
return 1;