by meindnoch · 3y ago · 0 comments
Based on the docs, you've only implemented some very basic topological operations (and rendering, for some reason). The hard part is going to be implementing the rest: boolean operations, offset surfaces, lofted surfaces, blended surfaces, etc. and then there's the problem of version control / edit history. Efficiently and accurately implementing each of these can be a year-long research project in itself... You need a solid understanding of 3D topology, numerical methods, 3D differential geometry, etc.
Nevertheless, I wish you luck! I will check back in a year or so.
https://github.com/ricosjp/truck/issues/5
The last comment in that thread is me pointing to a related discussion about a bug in solvespace. Someone tried to cut a cone shape out of a flat surface and the boolean failed because of the degenerate normal at the vertex of the cone. It was days of discussion to select which few lines of code would be best to fix it.
BTW the solvespace NURBS kernel is under 10kloc and is fairly simple for what it's capable of. The bugs can be crazy to track down and require a deep understanding of what's going on in the code and geometry, but oh so rewarding to fix if that's your kind of puzzle.
The core problem isn't memory safety, it's due to difficulties with the mathematical foundation of NURBS surfaces. For example, the intersection of two NURBS surfaces can't be exactly represented by a NURBS curve.
And then you export. Rather than exporting the entire procedural tree (which would require shipping the entire kernel), you approximate the curves with NURBS trimming curves. When you import from another CAD tool you need to deal with edges that only intersect within a given tolerance, and sometimes that tolerance is awful (Catia, I'm looking at you). Operations on toleranced edges are a huge source of complications.
And so on and so on. It would all be so much easier if the NURBS math could be exact
The simple explanation is the capability to model 3D shapes in a way that you can output the data to the rest of the manufacturing process. Hence what manifacturing process you target at least partially dictates your constraints.
The output could be - engineering drawings, CNC machines, 3D printers. Or another 3D modeling application down the pipeline.
In a way ”CAD kernel” alone is a worthless as a spec since it’s too general, just like ”a vehicle” is a useless spec for engineering.
CAD kernel- for modeling what, by whom, and where.
Naturally questions of numerical robustness and exactness of presentation soon enter the picture. How large or precise features do you need to model, for example.
Maybe SolidWorks handles it better.
It's also tricky to implement a kernel in a good, modular, well-designed manner. Take a look at OpenCASCADE, the kernel used by FreeCAD. And holding back FreeCAD. It's been in development for 24 years and it hasn't hit anywhere close to Parasolid yet.
But yeah, 100% this. Anyone familiar with the space knows these programs are massively complex and require years of work and knowledge - at least the polygonal approach :) Implicit surfaces / f-rep on the other hand... <3
Edit: Durr: 株式会社RICOS / RICOS Co. Ltd.
Right now... almost all CAD programs are designed for professionals, and the hobbyist versions are just cut-down professional CAD programs. The biggest exception I see is SketchUp, which has a very simple and direct way of drawing directly on objects, and it's very easy to pick up, but it has no understanding of solids, parametric measurements, assemblies, or any of that. And so SketchUp is super popular with woodworkers, home remodeling agencies, small businesses, all these people we wouldn't normally think of as "big professional CAD users" even if that means they lose out on some of the improvements that professional CAD packages have (especially because SketchUp really hasn't changed much in over a decade).
A 3D solid parametric modeler with the ease of use of getting started with SketchUp. SketchUp with solids. I can dream.
I see "hobbyists" as "prosumers", they want the same tools the professional use. Take a look at photography or wood working for example, people are spend thousands on professional level tools. I don't believe there is a market for hobbyist only cad software, that would be like making a camera that is only useful for hobbyist photographers. If it's good enough for a hobbyist it's good for a professional.
CAD for casual users, and true amateurs? Yes there is a market for that.
SketchUp, most professional CAD modelers would think it is basically unusable. No constraints? No parametric modeling of any kind? No actual conception of solids (just faces and lines)? You just draw directly on the models without a 2D Sketch first, or dragging in a primitive? And yet... SketchUp is still really popular, within its own niche. It's not something you'd find anywhere on a "best CAD programs" list, but if you are an interior designer, or another field with simple 3D needs, odds are you'll find SketchUp everywhere.
So... it doesn't have to be a powerful CAD program to find an audience. It just has to be a tool that provides CAD to people who are in a very different field than CAD modelers.
Another example that I'm banging my head against: BobCAD-CAM. The 3D capabilities compared to most modelers are... pretty garbage. But if you are just trying to machine simple parts on a router, I will admit that if you don't stretch its capabilities, it is pretty fast and simple, and the integrated CAM is functional. I wouldn't really recommend it to anyone over separate tools (a CAD designer would hate it, a professional CAM user would hate it, but someone who is neither might find it a good tool that at least gets the job done).
Both are really focused on UX, and license a kernel
Its good that author of Plasticity (@nkalen on HN) had finally switched[0] to use Parasolid (and abandoned previous plans to use Russian C3D kernel) after Russia started full scale invasion of Ukraine in 2022[1]... in eight years since Russia invaded Ukraine in 2014.[2]
N.B. https://en.wikipedia.org/wiki/Russo-Ukrainian_War
[0] https://news.ycombinator.com/item?id=30696305
Plasticity though is gorgeous, especially for a solo developer. Wow.
For other stuff like designing miniatures and stuff, I dunno, I don't do very much of that