fix unsupported geometry crashs, add visual feedback for unsupported geometry and fix crash on both parts in subassemblys

This commit is contained in:
Stefan Tröger
2013-12-22 10:40:03 +01:00
parent 61a47d7c22
commit 66f9afbef3
8 changed files with 549 additions and 456 deletions

View File

@@ -188,7 +188,7 @@ int Dogleg<Kernel>::solve(typename Kernel::MappedEquationSystem& sys, Functor& r
unused=0;
counter=0;
int maxIterNumber = 5000;//MaxIterations * xsize;
int maxIterNumber = 10000;//MaxIterations * xsize;
number_type diverging_lim = 1e6*err + 1e12;
do {
@@ -219,11 +219,11 @@ int Dogleg<Kernel>::solve(typename Kernel::MappedEquationSystem& sys, Functor& r
//get the update step
calculateStep(g, sys.Jacobi, sys.Residual, h_dl, delta);
#ifdef USE_LOGGING
BOOST_LOG(log)<< "Step in iter "<<iter<<std::endl
<< "Step: "<<h_dl.transpose()<<std::endl
<< "Jacobi: "<<sys.Jacobi<<std::endl;
#endif
// #ifdef USE_LOGGING
// BOOST_LOG(log)<< "Step in iter "<<iter<<std::endl
// << "Step: "<<h_dl.transpose()<<std::endl
// << "Jacobi: "<<sys.Jacobi<<std::endl;
// #endif
// calculate the linear model
dL = sys.Residual.norm() - (sys.Residual + sys.Jacobi*h_dl).norm();
@@ -262,10 +262,10 @@ int Dogleg<Kernel>::solve(typename Kernel::MappedEquationSystem& sys, Functor& r
nu = 2*nu;
}
#ifdef USE_LOGGING
BOOST_LOG(log)<<"Result of step dF: "<<dF<<", dL: "<<dL<<std::endl
<< "New Residual: "<< sys.Residual.transpose()<<std::endl;
#endif
// #ifdef USE_LOGGING
// BOOST_LOG(log)<<"Result of step dF: "<<dF<<", dL: "<<dL<<std::endl
// << "New Residual: "<< sys.Residual.transpose()<<std::endl;
// #endif
if(dF > 0 && dL > 0) {

View File

@@ -355,7 +355,7 @@ void SystemSolver<Sys>::solveCluster(boost::shared_ptr<Cluster> cluster, Sys& sy
bool done = false;
if(!has_cycle) {
//if(!has_cycle) {
#ifdef USE_LOGGING
BOOST_LOG(log)<< "non-cyclic system dedected: solve rotation only";
#endif
@@ -392,7 +392,7 @@ void SystemSolver<Sys>::solveCluster(boost::shared_ptr<Cluster> cluster, Sys& sy
done = false;
}
}
};
//};
//not done already? try it the hard way!
if(!done) {