Jeroen's Project Journals

  • Gridfinity Creator

  • Online generator of Gridfinity components such as divider bins of any size with arbitrary internal compartments, light bins and base-plates. Generates STL files.

  • Gallery

Lots of progress!

2024-07-05

I’ve made a lot of progress in the development of GC in the past couple of months. To keep things organised and traceable I started making versioned releases on GitHub, and as of today the latest release is version 0.4.2.

Frontend redesign

First of all I redesigned the frontend, using my experience using Bootstrap in other projects (such as this site) to make a nicer design that is easier on the eye:

A view of the redesigned frontend with a header-bar in dark blue and a 'Home' tab in addition to the generator tabs. There are 2 new generator tabs: baseplate and holey-bin

This redesign set the stage for the introduction of pop-up help texts with pretty pictures to explain to users what the effect of different settings is:

The holey-bin generator tab, overlaid by a window explaining the use of the 'number of holes' parameters, including a render showing what happens when you increase the number of holes by 1 (the bin will suddenly jump in size from 1x1 to 2x1)

New generators

There are now 2 more generators: one for a basic base-plate and one for “holey bins”. The latter lets you create bins with a grid of holes, which lets you create for example a bin for screw-bit or battery storage:

3 1x1 size holey bins, showing different hole shapes (hexagonal, square and round)

New features

Raaco grid

At the request of a user I also introduced an “advanced settings” dialog that allows one to change the grid size. This is quite a niche use-case (this user wanted to print bins for the Raaco assortment boxes), so it’s not very prominent, and I won’t be heavily supporting it, but the option exists.

STEP generation

Another user requested the option to generate STEP files. This turned out to be really easy, since CadQuery supports this out of the box. So all that was needed was to add a dropdown for this to each generator that changes the extension of the filename to be generated (CQ uses the file extension to select the format)

Fancy magnet holes

There are now extra settings for the magnet holes, partly based on this GF Pressure Fit Collection, adding the option for smaller removal holes, offset from the actual magnet holes. In addition, you can now set the diameter of the magnet holes to accomodate differences in magnet sizes

Label tab for light bins

You can now add a label tab to light bins, but no compartments (yet, maybe someday)

Under the hood

Quite a few things changed under the hood to accomodate these changes, but also to ease further development. Some of these changes are in the way the templates are organized to enable the help-windows and to improve the layout of the generator settings. In addition, I had to introduce a browser-cookie to persist any change in the grid specification (for the Raaco option).

I also factored out some of the code that was duplicated in multiple generators and redid the lightbin generator, since it produced a mesh that Prusaslicer reported contained errors.

Future plans

Most recently, I changed how the generator settings forms are constructed. This used to be driven by the main template, which would request a collection of settings from the generator and then layout those settings in a fixed way. Now, each generator returns its own jinja template code, which the main template then renders in-place. This is to allow more sophisticated settings forms, for example for the holey-bin, where I want to allow the user to choose the main size-setting (set bin-size and fit as many holes as possible in that size, or set the number of holes and derive the bin-size from that).

Another change is a switch to the Gunicorn instead of Waitress for the server. The reason is very detailed: Since some of the generators may take quite long to process (especially) larger bins, I want to give the user some visual clue that their bin is being generated. Unfortunately there is currently no way to update the page the user sees after the file has been generated and downloaded. To enable this I need to use something called SocketIO, which is not supported by Waitress, but which is supported by Gunicorn. So now you know :).

I’m also thinking about switching to build123d instead of CadQuery as the CAD framework. These two are closely related, but apparently build123d is nicer to use. When working on the generator code I’m still often flummoxed by some of the quirks of CadQuery, and perhaps build123d will reduce my level of bafflement.