Can anyone help me with this?
I’m creating a simple geometry for a cabinet (link to the model below), and right now the number of doors is a separate parameter.
However, I would like to make the number of doors adjust automatically based on the cabinet length, while keeping the door length between 18" and 24". I’ve tried clamp, ceiling, I’ve written down the calculations necessary, but I just couldn’t figure it out alone. Can anyone help me out?
For this kind of thing, rather than thinking about an expression (and creating a formula), I often like using lines and the points in lines to determine where to copy something.
Because there are a few key requirements for this, it’s going to be a little complex (considering origin gaps and spacing between doors that change size), but here is how I would do it: Trimble Creator
First, we can use a line the length of the cabinet, then I divide that line using the “curve to polyline” node (set to “approx segment length”). Then we can use a “copy using vectors” node to copy the door to the points (vectors) in that new divided line.
There is still a little bit of math to determine what that door length is, but that isn’t too hard once we know the number of points and the length of the line. (We could also do it this way: Trimble Creator, which makes the graph itself simpler, but I figured that the way I linked above would make a little more sense without dogpiling some more concepts all at once!)
Let me know if you need anything else!
This is more than perfect, thank you so much!!! And thank you for the explanation!!!