mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-06 12:47:51 +08:00
0033180: We had a problem calling the OCC library at the customer site, and the program crashed
Added status for thrusection operations and changed throw constructions to set of the status and break the function.
This commit is contained in:
@@ -443,7 +443,7 @@ Standard_Integer gener(Draw_Interpretor&, Standard_Integer n, const char** a)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char** a)
|
||||
Standard_Integer thrusections(Draw_Interpretor& di, Standard_Integer n, const char** a)
|
||||
{
|
||||
if (n < 6) return 1;
|
||||
|
||||
@@ -525,7 +525,30 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char*
|
||||
BRepTest_Objects::SetHistory(Generator->Wires(), *Generator);
|
||||
}
|
||||
else {
|
||||
std::cout << "Algorithm is not done" << std::endl;
|
||||
BRepFill_ThruSectionErrorStatus aStatus = Generator->GetStatus();
|
||||
switch (aStatus)
|
||||
{
|
||||
case BRepFill_ThruSectionErrorStatus_NotDone:
|
||||
di << "Algorithm is not done\n";
|
||||
break;
|
||||
case BRepFill_ThruSectionErrorStatus_NotSameTopology:
|
||||
di << "The input profiles should be all closed or all opened\n";
|
||||
break;
|
||||
case BRepFill_ThruSectionErrorStatus_ProfilesInconsistent:
|
||||
di << "Profiles inconsistent\n";
|
||||
break;
|
||||
case BRepFill_ThruSectionErrorStatus_WrongUsage:
|
||||
di << "Wrong usage of punctual sections\n";
|
||||
break;
|
||||
case BRepFill_ThruSectionErrorStatus_Null3DCurve:
|
||||
di << "Some edges have null 3d curve";
|
||||
break;
|
||||
case BRepFill_ThruSectionErrorStatus_Failed:
|
||||
di << "Algorithm has failed\n";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user