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

0033751: Shape Healing - Use static values in case of an absent Resource file

If a Resource file with parameters for ShapeFix is absent, use static parameters instead if possible.
This commit is contained in:
anv
2024-06-27 16:09:48 +01:00
committed by Pasukhin Dmitry
parent 100d03d273
commit f39f9838e4
3 changed files with 11 additions and 10 deletions

View File

@@ -104,17 +104,12 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape,
if (aContext.IsNull())
{
Standard_CString aRscfile = Interface_Static::CVal(thePrscfile);
if (aRscfile != nullptr && strlen(aRscfile) == 0)
aContext = new ShapeProcess_ShapeContext(theShape, aRscfile);
if (!aContext->ResourceManager()->IsInitialized())
{
aContext = new ShapeProcess_ShapeContext(theShape, nullptr);
// If resource file wasn't found, use static values instead
Interface_Static::FillMap(aContext->ResourceManager()->GetMap());
}
else
{
if (!aRscfile)
aRscfile = thePrscfile;
aContext = new ShapeProcess_ShapeContext(theShape, aRscfile);
}
aContext->SetDetalisation(theDetalisationLevel);
}
aContext->SetNonManifold(theNonManifold);