WARNING: Long and mindbreaking postTurro75 wrote: ↑Mon Jul 23, 2018 6:50 pmlet's wait for a prototype, consider the axis are mainly the ref axis of a constraint.
i.e. in circular edge the remaining dof will be one rot axis, the same used for the constraint.
if another circular edge is defined on the same rigid, we have to compare the axis of the second constraint of the the one above, if the axis is the same (within tolerance) to the one above we can ignore it and the object is still free to rotate around it or if is is different it doesn't matter how, the rigid become fully constrained. this is more or less the logic we need.
I already mapped all constraints, only single point coincident is not yet mapped.
ATM it is intended as a way to split assembly in small subassemblies allowing placement and eventually animate resulting dof of each rigid. of course if your intention is integrating it in the solving process, it would be a big overhead.
I had a similar way of thinking recently, but that way also improves the 6DOF model processing...
platform1(fixed) + cylynders are added to the computation.
To determine the allowed movement+rotation we have to move the hierarchy using father pointer up to a rigid that don't have any free DOF and tempfixed.
cylynders are sphere constrained to platform, which is fixed (no DOF and tempfixed from the start), so we stop the chain. Sphere constraint places the cylinders to the refPoint and allows rotation to any direction. Every cylinder is processed by its own chain (platform+cylinder in that case x6 times)
Move to child rigids for all that have all fathers tempfixed -> pistons in our case.
For every added rigid (piston) we build the processing chain up to a rigid which have no DOF and is tempfixed. Every chain is calculated by its own after that.
For piston case: father is cylinder - still have DOF (rotation), add it to the chain. Next father is platform1, which is fixed and no DOF, add it to the chain, stop the loop.
While processing the chain, tempfixed flag is set to False, to allow movement since rigids in the chain still have DOF left, besides the last one (which can actually stay tempfixed).
Processing the chain, ideally only piston should be moved in place since the cylinder is already in the needed place, but I think the solver might still rotate the cylinder. Am I right @kbwbw?
== Lets assume that pistons are not connected between themselves and are connected only to the top platform, which is not true in the model ==
At that stage all pistons and cylinders are in place, only the platform2 should be added, and here is the interesting part:
Platform2 is the only added part, so we start building the chain up to a fixed rigid with no DOF (platform1), which means all the rigids will be in calculation, which is the same as today, BUT!!!
While trying to rotate the piston to match needed place in the platform2, the algorithm should see that the piston don't have DOF in the rotation it needs to rotate, so the algo goes up the father chain to find a part that CAN rotate in needed direction, cylinder in that case and process the rotation on the found chain alltogether (similar to a single rigid built out of 2 rigids).
It sounds like we can just add all the rigids to the calculation and that's it, but in the flow I described the algorithm will be the same for all the models, without knowing if the model can be resolved easily or not.
The algorithm will also recognize 6 parts that might be moved together as a single rigid, which I believe will improve the performance as well.
For real life scenarios where most of the parts can't move, the chains back to non-movable parts will be very short and resolve quickly.