Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

Asger1002
Copy link
Contributor

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
Copy link
Collaborator

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.

…iple bins.

Additions:
- ability to change height of tab, i.e. stickout, for thinner/thicker labels. Specified in mm.

- ability to change width of tab, for longer/shorter tabs that don't span the full bin width. Specified in mm.

- 'CuEqualBins' function for cutting multiple equally-sized bins given:
* amount of bins (in x and y directions)
* length (in x and y directions, specified in gridfinity-bases),
* starting position (lower left of first bin, in gridfinity bases)
- Added comments describing CutEqualBins functionality
- Fixed a single line of missing code as described in a github comment
@Asger1002
Copy link
Contributor Author

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
Copy link
Collaborator

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

Pre-merge test showed a failure in removing 'trailing whitespace'. Some whitespaces removed in an attempt to pass this.
@Asger1002
Copy link
Contributor Author

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.

@Ruudjhuu Ruudjhuu merged commit 2f2567d into kennetek:main Feb 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants