Skip to content

Commit

Permalink
add a missing check for OCC version
Browse files Browse the repository at this point in the history
  • Loading branch information
tomate44 authored and wwmayer committed Jul 29, 2018
1 parent 3c049e4 commit b40c1f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Mod/Part/App/TopoShape.cpp
Expand Up @@ -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);
Expand All @@ -3445,4 +3447,5 @@ TopoDS_Shape TopoShape::defeaturing(const std::vector<TopoDS_Shape>& s) const
// defeat.DumpWarnings(aSStream);
// }
return defeat.Shape();
#endif
}

0 comments on commit b40c1f1

Please sign in to comment.