Fillet #501
Replies: 5 comments 6 replies
-
I was talking to @jess about this because she's looking to add fillets, and I came back to this and realised there's still some thinking to do on how to be specific about which edge is being selected for the fillet, and to make sure that we have a way of selecting each edge on a given extrusion. Take these stdlib names with a grain of salt, we can probably iterate on these for clarity but here's the idea. |
Beta Was this translation helpful? Give feedback.
-
Okay so if you think about Chatgpt as thinking what 95% of the world would assume is the intuitive way to do this and autocomplete the code I asked it what it thought of different approaches, let me know what you think of these I kinda like heres what it said ==== Certainly! When designing a syntax for referencing edges in CAD operations, especially for a programming language, it's essential to ensure that the syntax is not only intuitive but also unambiguous. Here are some alternative approaches to consider:
The chosen approach should balance ease of use, expressiveness, and the ability to handle complex cases without ambiguity. It should also be designed with the user's mental model in mind, matching how they think about the geometry they're working with. |
Beta Was this translation helpful? Give feedback.
-
I have a wild idea. I was talking with @jessfraz and mentioned that this is going to get super complex, once the user starts cutting away more and more material from the base model (or adding), that creates more and more edges that they can potentially fillet. How do you tag these new edges? Sometimes it's not so bad (like the example above), but sometimes one cut can create 14 edges, for example. Is it possible that we create the tags everytime someone does a command, and the user return them? Let me try to explain. Now let's say I do a cut that is at a really bizarre angle and asymmetric. This would create a cut like so: That one simple extrude created 8 new edges in the body (technically 9, because it cut the previous edge into 2 pieces). It also created three new faces. So what if we (in the engine) tagged all those new face and edges ourselves, that the user could get by calling some function? Forgive my code, I didn't look up the sketch on face stuff yet. Consider this still pseudocode.
So what I'm accomplishing in the code is:
This would output something like this: The only reason I thought of this, is because this was a way of me trying to capture all or most use cases. If I extruded three more times at random orientations/angles into this box, each one of those commands would still return more edges/faces for me to use. So ideally, this would work most of the time. The tricky part is how we (Zoo) label all of those edges.
I'm certain this requires a lot of work on the backend to have returned items from a command, but just something I thought of. |
Beta Was this translation helpful? Give feedback.
-
Relying to jess
I do really like having a generic fillet function that takes edges, and then having a number of utils for finding those edges
Probably still need something dedicated for filleting all edges surrounding face, just because I'm guessing the engine will want the face_id, not all the edge ids
Too brittle, if you update the sketch, you indexes will all be out of whack.
No different from indexes right, just named indexes? tags should be on the callExpression
Two ways of doing this
This sounds like cadQuery's "selectors" and I'm open to it, but I worry if done incorrectly it would be brittle. |
Beta Was this translation helpful? Give feedback.
-
Replying to Josh. Because things can get so complicated with "boolean" type operations of solids, I have been trying to bang the drum of Segments with tags HAVE to be the base abstraction for all modeling i.e. you should not be able to just instance a cube for example because you have no way of accessing edges and faces after the fact with anything other than something like indexes. which is horrible from a readability perspective. If you take two solids and combine them in some boolean operations, as long as you have tags that enable you to reference each edge and face of the two solids going into the boolean operation then you will still be able to access each edge and face individually after the operation, no matter how complex they are for the simple reason that the face tags are transferred in the process. I do like your ideas in that I think getting "metadata" from modeling operations, so getting all of the new edges created from a cut is very cool. But I wouldn't want to promote it as a best practice for selecting edges for fillets. Easier to describe with diagrams so let me try re-create you example. The two input shapes with each of the important face taged When we cut the left hand shape into the right hand shape, the faces of are transfered. This allows us to select any of the old or new edges with the tags we already have. Why I like this so much is because it's stable, for example if we focus on the edgeBetween 1 and 4 If we were to start drag the object that's being subtracted to the left, if we go far enough, this edge will disappear as it "falls off" the other solid. so trying to fillet that edge might return an error or warning depending on how we setup up, but what we don't want to do is start filleting random edges unexpectedly.
What I do really like about your ideas though is returning an array, I think it would be wise for a Main emphasis on the above is "stable", I really want to solve the "brittle" model problem. That in part is going to have to be by letting users have if statements for handling cases where edges etc faces disappear after adjusting a parameter or other errors, but we can eliminate a lot of the problems ahead of time with good API design. And the above is the best I have to offer atm. Also linking this for posterity, since some of these ideas were discussed, long from 😬 |
Beta Was this translation helpful? Give feedback.
-
Description
A tool that enables the user to create a fillet (rounded edge) on any edge of the body.
Functionality
OR
Supporting Docs/Images
PseudoKCL
Beta Was this translation helpful? Give feedback.
All reactions