Turro75 wrote: ↑Sat Jul 14, 2018 10:28 am
I know it's not easy at all. Then falling down in the Hamish's algorithm could be an option but I think it will invalidate the your solver works.
I could say an easy way could be evaluating the impact of a constraint over an obj.
I.e. Circular edge locks 5dof but 1 axis rotation is left free. Lock rotation fix even the 6th dof so the obj is fully locked so it should be joined to the father as a subassembly. We could try to compile a list of effect for each constraints and see if a simple math does the job.
User could put redundant constraints to rigids. So a lot of checks are needed to eliminate them. Example: User fixes parts with 2 circularEdgeConstraints
and is not using lock rotation. If axes are different, rigid will has no DOF anymore, if axes are equal, still one DOF remains.
We will risk, that in special cases, the solver will fail. So everything we do, has to take care of all possible cases as solver has to work everytime...
Turro75 wrote: ↑Sat Jul 14, 2018 10:28 am
Another idea would be adding the six dof to each rigid, 1 means free and 0 means locked. When domovecalc add vectors it could be easy multiply each axis movement to the relevant dof, a similar approach could be done with rotation. Another check is if dof is globally locked or only relative to constrained obj.
How about?
Perhaps one idea more:
ATM solver has most problems with long chains of constrained rigids. Necessary number of solversteps is growing fast.
There are two good examples.
Your recent assembly and Manuel's crankshaft. I should be possible to detect long chains (ending up somewhere but not to fixed rigids) and solve those chains later step by step after solving some others which are closer (less constraint hops) to fixed parts. Such a solution would not harm the flexibility of the solver in other cases, which is important.