- BRepCheck_Analyzer ana (aShape, Standard_False);
- if (!ana.IsValid()) {
- //algoritm thru section creats on the arcs invalid shapes gka
- ShapeFix_ShapeTolerance aSFT;
- aSFT.LimitTolerance(aShape,Precision::Confusion(),Precision::Confusion());
- Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape);
- aSfs->SetPrecision(Precision::Confusion());
- aSfs->Perform();
- aShape = aSfs->Shape();
- //ana.Init(aShape, Standard_False);
- //if (!ana.IsValid())
- // Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
+ if ( !GEOMUtils::CheckShape(aShape) && !GEOMUtils::FixShapeTolerance(aShape) ) {
+ //algorithm through section creates on the arcs invalid shapes gka
+ // Standard_ConstructionError::Raise("Algorithm has produced an invalid shape result");