add a missing check for OCC version

This commit is contained in:
tomate44
2018-07-05 16:06:54 +02:00
committed by wmayer
parent eae378431c
commit 32db13241b

View File

@@ -3423,8 +3423,10 @@ TopoDS_Shape TopoShape::defeaturing(const std::vector<TopoDS_Shape>& s) const
{
if (this->_Shape.IsNull())
Standard_Failure::Raise("Base shape is null");
if (OCC_VERSION_HEX < 0x070300)
throw Base::RuntimeError("Defeaturing is not supported on OCC < 7.3.0.");
#if OCC_VERSION_HEX < 0x070300
(void)s;
throw Base::RuntimeError("Defeaturing is available only in OCC 7.3.0 and up.");
#else
BRepAlgoAPI_Defeaturing defeat;
defeat.SetRunParallel(true);
defeat.SetShape(this->_Shape);
@@ -3445,4 +3447,5 @@ TopoDS_Shape TopoShape::defeaturing(const std::vector<TopoDS_Shape>& s) const
// defeat.DumpWarnings(aSStream);
// }
return defeat.Shape();
#endif
}