We love it when a community grabs hold of an idea and runs wild with it despite obvious practicality issues. Gridfinity by YouTuber [Zach Freedman] is one of those concepts. For the unaware, this is a simple storage system standard, defining boxes to hold your things. These boxes can be stacked and held in place in anything from a desk drawer to hanging off the side of a 3D printer. [Georgs Lazdāns] is one such Gridfinity user who wanted to create tool-specific holders without leaving the sofa. To do so, they made a web application using node.js and OpenCV to extract outlines for tools (or anything else) when photographed on a blank sheet of paper.
The OpenCV stack assumes that the object to be profiled will be placed on a uniformly colored paper with all parts of its outline visible. The first part of the stack uses a bilateral filter to denoise the image whilst keeping edge details.
Next, the image is converted to greyscale, blurred, and run through an adaptive threshold. This converts the image to monochrome, again preserving edge details. Finally, the Canny algorithm pulls out the paper contour. The object outline can be given an accurate scale with the paper contour and paper size specified. The second part of the process works similarly to extract the object outline. The second contour should follow the object pretty accurately. If it doesn’t, it can be manually tweaked in the editor. Once a contour is captured, it can be used to modify a blank Gridfinity base in the model editor.
With a few tweaks to the OpenCV parameters, we were able to create a usable profile from an image of a banana (obviously, Gridfinity is the perfect snack storage system). From there, inside the model editor, we adjusted the box outline to encompass it. Then, we cut out the traced profile to create our banana holder. The web app allows you to download an STL file, which can be fed into your slicer of choice. We would have printed the thing but accidentally ate the banana. Ah well.
More information can be found on the project’s GitHub page.
We’ve touched on Gridfinity before; here’s our first article. Of course, we can’t talk about making outlines of tools for storage without mentioning shadow boards. Finally, on the subject of the awesome OpenCV, it has many, many uses, including catching a dirty stinkin’ thief.
Thanks to [JohnU] for the tip!
Standard banana, standard(ish) dose of radioactivity
Should have consulted the standard banana for sure. I bought a plastic clam-shell banana holder at Aldi thinking how wonderful to have an nice bruise free fruit for lunch when I carry. It’s half straight then bends near the one end too much, mashing may get it in. Candy cane holder? It is yellow and has a monkey face on the top.
Seems easier to put the item in a scanner, convert the resulting image to black and white, covert to .svg format, and then import() it into OpenSCAD. Once there it can be linear-extruded, scaled if necessary, and subtracted from anything else (including a Gridfinity box) using difference().
That procedure is also a simple way to make formula-defined curved surfaces (like a parabola or a Gaussian bell shape) using any of the online formula plotters. Use either linear_extrude() or rotate_extrude() in conjunction with either union() or difference().