Replies: 2 comments 3 replies
-
I have thoughts, but few lessons learned, unfortunately. When I did those early-day writings, a lot of that stuff seemed to be just around the corner. But as it turns out, everyone's right when they say that CAD kernels are hard. I spent most of my effort since then figuring out how to represent shapes in a way that is robust and makes it easy to manipulate them (and, frankly, going down the wrong direction for extended lengths of time, more than once). I've made lots of progress in that regard, but that is basically still the core of what I'm doing. But as that work progresses, and the complexity of models that are practical to express slowly increases, I'm starting to butt up against selectors again. Basically, the way it works now, you can only select something by knowing exactly what you're selecting, i.e. you need a
Based on past experience, I suppose the implementation will go something like this:
I will also look into existing designs along the way, but my experience has been that it is almost never possibly to cleanly apply them to a non-trivial system like Fornjot. But stuff like that serves as inspiration, which always comes in handy on step 4 of that process I outlined. |
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing. You linked some nice detailed discussions! 👍 I know what you meant w.r.t. steps 3, 4, 5. 👹 It seems to me there is a sort of a "meta optimization" tuning parameter; namely; how much of a mess to tolerate before recognizing the current iteration's design isn't sufficient. I think of step 7 as something akin to an asymptote -- you get closer to "done" over time. Also, as user uptake improves, the (cost - benefit) of a breaking change decreases. Meaning quite often, at some point, a breaking change doesn't seem worth it. This to me seems to explain why many libraries and languages sort of run their course... to a point at which their design decisions are mostly fully realized and they have to accept who they are now, warts and all. :) Back to the particulars ... I just noticed that CadQuery has tagging (perhaps similar to Fornjot's
This expands my very rough taxonomy of selectors to be something like a two dimensional grid:
|
Beta Was this translation helpful? Give feedback.
-
Context: I went back and reviewed some of the "early days" writings you did about your motivations. Existing CAD kernels and layers on top of them have many usability problems. For example, while Python's CadQuery appears easy at the beginning, this perceived ease-of-use falls apart when using selectors.
For example, in CadQuery, something as conceptually simple as "select the inner circular edge of this hole" seems difficult -- not just for me -- but for many, based on some internet searching. I got something to work but it feels very brittle. Here is a code sample that offer as a counter example of good API design:
Specifics: Have you considered writing down (even for only 5 minutes) any thinking you've done about selectors? I'm talking about selecting edges, faces, and so on. Key design criteria might include:
What else is important? I'm relatively new to the fundamentals of the fundamental abstractions of BREP.
P.S. I've used some libraries / tools that handle selectors elegantly. It seems like much could be learned by thinking about the lessons learned of CSS, though I don't hold up its API as world-class.
Beta Was this translation helpful? Give feedback.
All reactions