make constraint validation consistent to evaluation
This commit is contained in:
@@ -5792,8 +5792,9 @@ bool SketchObject::evaluateConstraints() const
|
||||
return false;
|
||||
}
|
||||
|
||||
if(constraints.size()>0){
|
||||
if (!Constraints.scanGeometry(geometry)) return false;
|
||||
if (!constraints.empty()) {
|
||||
if (!Constraints.scanGeometry(geometry))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -5802,7 +5803,7 @@ bool SketchObject::evaluateConstraints() const
|
||||
void SketchObject::validateConstraints()
|
||||
{
|
||||
std::vector<Part::Geometry *> geometry = getCompleteGeometry();
|
||||
const std::vector<Sketcher::Constraint *>& constraints = Constraints.getValues();
|
||||
const std::vector<Sketcher::Constraint *>& constraints = Constraints.getValuesForce();
|
||||
|
||||
std::vector<Sketcher::Constraint *> newConstraints;
|
||||
std::vector<Sketcher::Constraint *>::const_iterator it;
|
||||
@@ -5816,6 +5817,9 @@ void SketchObject::validateConstraints()
|
||||
Constraints.setValues(newConstraints);
|
||||
acceptGeometry();
|
||||
}
|
||||
else if (!Constraints.scanGeometry(geometry)) {
|
||||
Constraints.acceptGeometry(geometry);
|
||||
}
|
||||
}
|
||||
|
||||
std::string SketchObject::validateExpression(const App::ObjectIdentifier &path, boost::shared_ptr<const App::Expression> expr)
|
||||
|
||||
Reference in New Issue
Block a user