kennetek / gridfinity-rebuilt-openscad

A ground-up rebuild of the stock gridfinity bins in OpenSCAD
Other
1.13k stars 164 forks source link

Can bins `gridz` param support decimals? #193

Open GCheung55 opened 1 month ago

GCheung55 commented 1 month ago

Bins gridz parameter currently does not support decimals. There is a computation error where the bins height does not add up to an expected height, for example 1x1x2 bin should have a height of 17.8mm, however, the actual result is 17.5mm.

Making the gridz support decimal places, corresponding to setting the gridz define to be overall external height, can help compensate.

In my testing, changing gridz parameter at line 36 of gridfinity-rebuilt-bins.scad to the following supports decimals. Note that it could introduce rounding issues if gridz define is not anything besides overall external height.

gridz = 6; // .01