add solver.hpp

This commit is contained in:
Stefan Tröger
2013-05-01 19:25:23 +02:00
committed by Stefan Tröger
parent 36c474e8f4
commit 7a95658cdb
7 changed files with 1021 additions and 253 deletions

View File

@@ -66,7 +66,7 @@ void ConstraintGroup::addConstraint(Constraint* c)
//let's retrieve the solver if not already done
ItemAssembly* assembly = NULL;
if(!m_solver) {
if(!m_solver || !assembly) {
typedef std::vector<App::DocumentObject*>::iterator iter;
std::vector<App::DocumentObject*> vec = getInList();
@@ -86,6 +86,10 @@ void ConstraintGroup::addConstraint(Constraint* c)
Base::Console().Message("ConstraintGroup: Unable to retrieve assembly solver\n");
return;
};
if(!assembly) {
Base::Console().Message("ConstraintGroup: Unable to retrieve assembly\n");
return;
};
//init the constraint
c->init(m_solver);