kennetek / gridfinity-rebuilt-openscad

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

Added ability to customize tab sizes (d_tabw and d_tabh) + function for multiple equally sized bins #160

Closed Asger1002 closed 4 months ago

Asger1002 commented 5 months ago

Added a function ('cutEqualBins') for cutting several identical bins, with their size divided along the specified length. Unlike the 'cutEqual' function, one can specify the position of the bins as well. See point '1' in attached image.

Added two parameters in 'cut' (and the modules it calls) for specifying tab width and tab height. Tab width helps with some bins, where a narrower tab can make it easier to grab f.x. long screws from a bins, as in '3' in the attached image. Tab height refers to how much the tab 'sticks out', so it fits either wider labels, or narrower labels without wasting space ('4' in image).

Attached image shows:

  1. A line of equally sized bins
  2. A 1.5 wide bin, with default label size, which can be difficult to reach into.
  3. A 1.5 wide bin with a label size of 35, easier to reach into
  4. A 1.5 wide bin, with a default-width, centered label that has a height of 5mm.

I've done my best to check the functions for bugs and it all seems to be working without any issues. With that said, I've only used Openscad for a few days now, and never opened a pull request, so if something is missing or I haven't followed protocol, please let me know and I'll do my best to fix it.

numbered_illustration code_for_numbered_illustration

Ruudjhuu commented 4 months ago

Nice job, I like the modularity.

Your commits all have the same message, could you give them descriptive messages or squash them and 1 descriptive message?

If you don't know how, google interactive rebase.

Asger1002 commented 4 months ago

Nice job, I like the modularity.

Your commits all have the same message, could you give them descriptive messages or squash them and 1 descriptive message?

If you don't know how, google interactive rebase.

Thank you for your hint on the rebase, I think i've done that now; and squashed the commits together with 1 message describing what was done. I've pushed a new commit too, fixing the line i mentioned and adding a comment describing the functionality/inputs of the new CutEqualBins function, so it should be in line with the other user-facing functions.

If anything else is missing or not up to standard I'll be happy to fix it!

Ruudjhuu commented 4 months ago

If you make the test green, I can merge this. Great work!

Asger1002 commented 4 months ago

If you make the test green, I can merge this. Great work!

The test mentioned something about failure to remove trailing whitespaces. I've removed all of these from the code snippet it showed, but I cannot find a way for me to re-run the test for whether this works; it seems I need approval?

Apologies for using your time on this; I am simply too new to using github and proper development workflows.