This OpenSCAD module will calculate an inner bevel for an arbitrary part.
You need to specify the height of the z-plane at witch to create the bevel.
Replace the module part() with your own part.
This is based on an ingenious idea from GregFrost (http://www.thingiverse.com/thing:135408). He used it to create an (outer) bevel on a arbitrary shape.
The idea is to minkowski() a small square with the shape creating a slightly larger shape and subtracting the initial shape, creating a thin outline of the initial shape.
In a second step the from of the bevel is minkowski() with the outline.
Unfortionally there are two limitations to this:
- It is kind a slow as minkowski() and hull() are repeatedly used. Thus keep the number of faces for a circle ($fn) low.
- minkowski() is not implemented for cases where one of the forms is disjoint (e.g. two squares that are not touching) (WARNING: minkowski() and hull() is not implemented for 2d objects with holes!) So if you have more than on shape sticking out of the plane that are not touching you will have to calculate the inner bevel separately.
- This works only for parts that are perpendicular to the plane on witch the bevel will sit.