-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
aTool.SetShape(theOriginalShape);
aTool.Perform();
- if (aTool.ErrorStatus() != 0)
- StdFail_NotDone::Raise("GEOMAlgo_RemoverWebs failed!");
-
- theOutShape = aTool.Result();
+ if (aTool.ErrorStatus() == 0) { // OK
+ theOutShape = aTool.Result();
- // as GEOMAlgo_RemoverWebs always produces compound, lets simplify it
- // for the case, if it contains only one sub-shape
- TopTools_ListOfShape listShapeRes;
- GEOMUtils::AddSimpleShapes(theOutShape, listShapeRes);
- if (listShapeRes.Extent() == 1) {
- theOutShape = listShapeRes.First();
+ // as GEOMAlgo_RemoverWebs always produces compound, lets simplify it
+ // for the case, if it contains only one sub-shape
+ TopTools_ListOfShape listShapeRes;
+ GEOMUtils::AddSimpleShapes(theOutShape, listShapeRes);
+ if (listShapeRes.Extent() == 1) {
+ theOutShape = listShapeRes.First();
+ }
}
+ else if (aTool.ErrorStatus() == 11) // invalid argument (contains non-solids), do nothing
+ theOutShape = theOriginalShape;
+ else // error
+ StdFail_NotDone::Raise("GEOMAlgo_RemoverWebs failed!");
return Standard_True;
}
AddParam( theParams, "Wire", aCI.GetOriginal() );
AddParam( theParams, "Vertexes", aCI.GetShapes() );
break;
+ case REMOVE_INTERNAL_FACES:
+ theOperationName = "REMOVE_WEBS";
+ AddParam( theParams, "Selected shape", aCI.GetOriginal() );
+ break;
default:
return false;
}