4 ms·
I think this is amazing. I'd love to get to the point where we are with open source EDA with open source physical CAD. > Another downside is that solving this
by alright2565 2y ago
I think this is amazing. I'd love to get to the point where we are with open source EDA with open source physical CAD.
> Another downside is that solving this kind of matrix equation gets prohibitively slow when you have a lot of unknowns, which gives rise to the conventional wisdom that individual sketches should be small and simple.
I've gotten quite deep into this, and this is really not a problem in practice[1]
1. FreeCAD's main issues with constraint performance come from a redundant & unnecessary GUI layout algorithm, which falls over with just a few hundred constraints.
2. Eigen's sparse QR decomposition benchmarks at 18s for 2200 constraints, which is really not too bad
3. There are sparse QR decomposition libraries that can handle 500k-1M constraints in about 18s. I can't imagine a CAD sketch with more than a few thousand constraints.
[1]: https://github.com/FreeCAD/FreeCAD/issues/11498#issuecomment-1832892073 https://github.com/FreeCAD/FreeCAD/issues/11498#issuecomment...
- JBits 2y agoWithout knowing anything about CAD, it's surprising to me that the author didn't try any of these matrix solvers. Particularly since the case of non square matrices with iterative methods is common to many fields.
- aiksiongkoh 2y agoOndselSolver at https://github.com/Ondsel-Development/OndselSolver https://github.com/Ondsel-Development/OndselSolver can do redundant constraint removal and handle under constrained systems readily using direct Gauss Elimination on sparse matrices. It is used in FreeCAD and Ondsel ES for Assembly constraints.