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

0026245: Unable to write SAT file by default

XSAlgo_AlgoContainer is corrected to return original shape if Shape Processing fails.
Handling of situation of absence of defined operator sequence is corrected to apply DirectFaces operator by default on writing, regardless of target format.
ShapeProcess is corrected to output warning if operator sequence is not defined in resource file, and to continue if one operator in sequence has failed.
Message names are made more meaningful.
This commit is contained in:
abv
2015-08-31 07:00:57 +03:00
committed by bugmaster
parent 00de4faf11
commit 881536e20e
4 changed files with 31 additions and 29 deletions

View File

@@ -129,7 +129,7 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape,
time++;
}
#endif
// if FromSTEP or FromIGES, do default ShapeFix
// if reading, do default ShapeFix
if ( ! strncmp ( pseq, "read.", 5 ) ) {
try {
OCC_CATCH_SIGNALS
@@ -157,11 +157,8 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape,
}
return context->Result();
}
// if ToSTEP or ToIGES, define sequence of DirectFaces
else if ( ! strcmp ( pseq, "write.step.sequence" ) ) {
rsc->SetResource ( str.ToCString(), "DirectFaces" );
}
else if ( ! strcmp ( pseq, "write.iges.sequence" ) ) {
// for writing, define default sequence of DirectFaces
else if ( ! strncmp ( pseq, "write.", 6 ) ) {
rsc->SetResource ( str.ToCString(), "DirectFaces" );
}
}
@@ -171,7 +168,7 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape,
rsc->SetResource ( "Runtime.MaxTolerance", maxTol );
if ( !ShapeProcess::Perform(context, seq) )
return TopoDS_Shape(); // Null shape
return shape; // return original shape
return context->Result();
}