Comment by wincy
6 hours ago
Question for someone who is very far away from this kind of development - why does CAD software need a kernel that’s wholly separate from the UI? Why aren’t they the same thing? I just don’t understand the abstraction that necessitates writing the software this way.
It is much like a game might use a physics engine, or a new language might use the LLVM backend. To overly simplify, a CAD kernel will keep a list of operations (make a cube of this size here, drill a hole of this depth here, round these edges but not those). And combine that into a final volume. These responsibilities only get more and more complex as a part gets more complex - so using a pre-built engine allows CAD software to focus on tools and workflows to translate human instructions into lower-layer kernel geometry: the UI/UX. It also crosses into compatibility, if you use the same Kernel as another CAD it is much simpler to export/import from them. Otherwise you would have to reimplement their kernel (or enough of it), or be stuck exporting triangulated versions of the final volume - sort of like converting an image from vector to raster.
Same reason a browser uses a separate library for image decoding, or font rendering. A CAD kernel is a very complicated piece of heavily specialized math. The UI itself is there to let the user construct the input data for the CAD kernel and to display the resulting output. Doing that translation in a user-friendly way is already hard enough without having the kernel smeared out all over the rest of the application.