Skip to content

Commit

Permalink
+ check input of approxSurface for obviously wrong values
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 25, 2015
1 parent b1ea3f7 commit 977411b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp
Expand Up @@ -118,6 +118,9 @@ class Module : public Py::ExtensionModule<Module>
try {
Py::Sequence l(o);
TColgp_Array1OfPnt clPoints(0, l.size()-1);
if (clPoints.Length() < uPoles * vPoles) {
throw Py::ValueError("Too less data points for the specified number of poles");
}

int index=0;
for (Py::Sequence::iterator it = l.begin(); it != l.end(); ++it) {
Expand Down

0 comments on commit 977411b

Please sign in to comment.