Would love to read more about how these types of geometric problems are best approached.
>> Would love to read more about how these types of geometric problems are best approached.
Probably the most accessible NURBS kernel to learn from is the one in Solvespace. The entire source for the core NURBS is about 6KLoC:
https://github.com/solvespace/solvespace/tree/master/src/srf
My favorite file in there is ratpoly.cpp
It doesn't handle higher order NURBS or use knots. It's just the basics, but there are a lot of geometric algorithms in there. We're still trying to get the bugs out of NURBS booleans, but the high level algorithm is sound.
BTW it can also be compiled for web but that is incomplete.
Ugh, I wish I could read it but as I'm working in this space professionally reading GPLv3 code is... risky.
Been working in 2D with bezier implementation for our in-house CAD kernel. 3D parametric is limited at the moment, though.
Just because I’m curious, why the issue with reading GPL code? My understanding is that you would have to essentially directly copy and paste the code for the GPL license to apply to it.
Thanks, I'm a big fan of Solvespace, despite some small shortcomings that I usually am able to work around. I sometimes even use it to solve geometric problems. Much easier than doing it by hand.
I will have a look at the source code.