Sketcher: Solver Debug functionality: Ability to export a subsystem
=================================================================== It allows to export the c++ code to create a subsystem with the same information as the one solved using LM/DL/BGFS. In this commit the functionality is disabled (for production). To enable the functionality uncomment this line in planegcs/Constraints.h: //#define _GCS_EXTRACT_SOLVER_SUBSYSTEM_ When enabled, upon solving with LM/DL/BGFS, the c++ code to generate the subsystem is added to a subsystem.txt that is created in the FreeCAD execution directory. Note that the file is created in append mode, so it will append all normal/redundant solvings until the file is deleted. The resulting code can be directly pasted into a project similar to: https://github.com/abdullahtahiriyo/Eigen_LUPiv_Convergence Such a project only has libeigen as external dependency.
This commit is contained in:
@@ -200,6 +200,11 @@ void SubSystem::setParams(Eigen::VectorXd &xIn)
|
||||
pvals[i] = xIn[i];
|
||||
}
|
||||
|
||||
void SubSystem::getConstraintList(std::vector<Constraint *> &clist_)
|
||||
{
|
||||
clist_= clist;
|
||||
}
|
||||
|
||||
double SubSystem::error()
|
||||
{
|
||||
double err = 0.;
|
||||
|
||||
Reference in New Issue
Block a user