There you go @Rhino_Bulgaria:
hexagon_fillet.py (1.5 KB)
Two caveats:
- Before using the script select all your hexagons and join them into separate closed polylines.
- Currently for angles between 95 and 120 the radius is 3.0 mm. I could try to make it variable or set a different one, but. It’s 3:30 a.m. I need some sleep
Just like with @pascal’s script use _-RunPythonScript "full path to script"
to run it.
Or copy paste the code and run it from the RhinoPython editor.
Update:
One more caveat the polylines must have even number of sub-lines.
This reminds of the joke of the farmer and the scientist with the spherical chicken.
Update2:
Scrap that, it works for any number of polygon sides. How could I doubt myself
BEFORE:
AFTER:
1 Like
Thanks! It works without the warnign now. This really deserves to be part of the default Rhino tools.
This also looks promising. I was unsure whether it’s possible, but you just proved it that it can be done. I figured out that the resulting radii are 3 mm for smaller angles and 2 mm for greater angles (shown at the right side of the attached image). In order to create a more natural looking round transitions between the walls of hexagons or any other shapes, it would be good to have 2 mm radius for the smaller angles and 5 mm radius for the bigger angles (just like the fillets at the left side of the image).
Ideal would be if there is an option to set custom radius depending on the angle, so that people who look for something like radius of 1500 mm for architectural projects etc will also be happy.
Yes, I am working on this. I’m planning to expand this script into a command looking one. Where you can set the threshold angles and the radii from the command without going into the script.
Another issue that I encountered was when the lines are shorter than the radius, and when they become shorter after a fillet is applied to them on one of the ends.
1 Like
Looking forward to this to happen! I see a lot of potential in such command where the user could set custom radii and angles.
As for the cases where the radius will conflict with too short curves (after the Boolean operation), is there a way to still create the fillets on all other edges where the curves are long enough, while leaving the short curves without a fillet?
Currently in this code I explode the polygon and create the fillets from the resulting lines. Checking their angles by pairs. When you create one filler for a pair of lines you can check the length and the radius. That is fine, but you do not know at this point what will be the next fillet’s radius. So the line suddenly becomes shorter and you cannot apply fillet. At the end I assume all fillets are created successfully and use them to trim the lines. And if there is not enough fillets this trim operation fails. I need to come up with a solution to that when I find time.
If the trim is successful to all curves, except those that become too short to apply a fillet, and still leaving a fillet curve between those untrimmed short curves, that would be fine.
What about if there is a way to prioritize trimming of the curves with larger angle in-between, then apply fillets to them first, and lastly trim the curves with a smaller angle in-between?
That won’t work in this kind of objects.
If I order the lines by length the and try to fillet them by pairs they will not intersect
Is it possible to add a preview, so that the settings for the radii and angles could be adjusted during the command?
The only thing I can do is probably not finish the command immediately after applying all fillets and trimming. Where the parameters will be displayed but the command would still be active. It seems plausible. I need to see some examples of this being implemented.
Yes, something like the “FilletEdge” command that shows various settings in the command line would be great.
For Rhino 6 at least. To adapt corners of a polyline individually, just type in the command box: “Fillet”. Instead of “FilletCorners”, by which you fillet all the corners at once. Sometimes these simple things can be so difficult to find out
The idea for such tool is to make the process automatic for a large number of similar shapes, such like patterns. Applying “Fillet” to every individual pair of curves is what I had to do prior the time of my original post. And it’s the very reason why it took me many hours do complete the whole pattern consisting curves with variable size.