kennetek / gridfinity-rebuilt-openscad

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

fix magnet hole position on 1/2 grid bins #150

Closed Wuppdich closed 2 months ago

Wuppdich commented 5 months ago

fixes #149, possibly also fixes #105.

magnet hole positions now respect the calculated or manually set grid division

Bildschirmfoto vom 2024-01-23 12-44-47e

only looks good on 1/2 grid bins. smaller divisions are too small for magnets.

image

Ruudjhuu commented 4 months ago

Magnetholes create 4 holes per grid unit afaik. I see two in your pictures. Could you enlighten me on what I'm missing? Does this still work with larger than normal grid units and normal grid units?

Wuppdich commented 2 months ago

The magnet holes are simply rotated with offset around an origin, creating a square pattern:

grafik grafik

This results in non-equal base-divisions using the y-division to determine the edge-lenght of the square magnet-hole arrangement!

grafik

My solution creates ugly geometry when y-base-division != 1, which i didn't notice before. (see image above with div_base_y set to 2)

Normal grid units are not affected by this change:

grafik

I don't know how to create larger than normal grid units. Setting div_base_x or y to 0.5 acts like it's been set to 1.

As my little hack is sufficient for my own needs, but not fit for general application and i have no interest in changing the underlying logic to properly accommodate non-square base-divisions, I am going to close this PR.