algorithmic modeling for Rhino
So here's my shot at a Fillet Box component.
I tried to make it as self-explanatory as I could (hover cursor over inputs/outputs/component icon), but there are probably some things I should mention:
• If you just want softer edges on your boxes for 'nicer' rendering, you should consider using "ApplyEdgeSoftening" (In "Render Tools" on the Rhino toolbar:
• The component fillets Boxes, NOT Breps! (unless the box-shaped Brep is aligned with all world axes).
It does return a Brep.
If your Box is actually a box-shaped Brep, you can convert it to a Box by creating a Plane from two of its edges (any two edges, as long as they're not (anti-) parallel) and use that as the base plane of the [BoundingBox] of your box-shaped Brep.
• The component will appear in the Surface > Util tab.
• I didn't implement much input- or error checking, so best only feed the component valid Boxes.
• The fillet radius is limited to half of the box' shortest edge. Setting a radius bigger than that changes nothing.
Also, if you set a radius that is smaller than the 'ModelAbsoluteTolerance', it will be discarded (no fillet): the input Box simply gets converted to a Brep.
• While the calculation times are already quite long (should be around a second for 100 filleted boxes), the display of these filleted boxes makes it even slower~:/
To provide some possible answers on how to reduce that, you could set the GH "Preview Mesh Quality" (using the light blue sphere icon on the far right of the Canvas toolbar) to "Low Quality" or even "Disable Meshing".
Alternatively, you could switch the component's functionality to "chamfer" via the component menu (right click the icon). This will reduce calculation (and display-) time with about a third or so.
• The component message only shows up after you've switched functionality once. This is intentional(-ly left that way), since the goal really was to fillet boxes.
I hope it's of use to someone.