Le0Michine / FusionGridfinityGenerator

Other
629 stars 40 forks source link

Not fitting with other bins #3

Closed SanderElsen closed 1 year ago

SanderElsen commented 1 year ago

It seems some dimensions are not according to the specs I find in other designs and on https://gridfinity.xyz/specification/ This causes these bins to not tile or stack properly with my other bins and bases. Is this by design or are there plans to align with other designs? Example from a 1x1x1 bin with a stacking lip: image

jwcoope commented 1 year ago

You need to change the offset for the inside of the lip, in my testing this is sketch 5. As it sits the offset generates a 2.25, changing that offset to 2 has bins fitting together perfectly with other gridfinity. I haven't given a look to the code to see how to fix yet, but should be easy enough. If someone doesn't do it in a few days I'll probably get to it. I just noticed this issue tonight as well and am just adjusting the sketch as a quick fix.

SanderElsen commented 1 year ago

I've investigated a bit more (I'm new to fusion 360 add-ins) and it seems the structure of the code is simply different from the specs I found. According to the specs a bin is made up of a 7mm base + n7mm body + 4.4mm lip if needed. Your code generates a 5mm base + n7mm body that the lip is carved into if I understand correctly. This results in a 6.4mm difference in height causing the problems with stacking I think.

I've tweaked the constants as you suggested and modified the code a bit to make them fit with other bins but it's a bit too dirty to share at the moment. If I find time this week I'll probably shoot a pull request but that change would make the new bins not fit properly with the old bins so that could be annoying for other users.

Just to be clear: I'm very thankful that you created this as it has already saved me a lot of time and got me into fusion 360 add-ins so I'm not complaining but trying to understand/help :D

jwcoope commented 1 year ago

FYI, I didn't create this, just working with it like you to get it back into tolerances. I've noticed too that the bins are a bit too tall and don't align with gridfinity spec, looks like they come out about .5-1mm too tall. I haven't changed the constant on the inside lip part, what constant did you change? Looking at it it appears to add bin_lip_wall_thickness and wallThickness to get the value of the offset.

SanderElsen commented 1 year ago

Ah right, did not pay attention to names 🤦 For the height I modified to the code to add 2mm in general and 4.4mm if there's a lip. (dirty but it works) And: BIN_LIP_CHAMFER = 0.19 BIN_LIP_WALL_THICKNESS = 0.19 This makes the upper part of the lip up to spec but it's missing the second chamfer.

jwcoope commented 1 year ago

Did a comparison of a 3u tall 1x1 generated (left) to a ZackFreedman original (right). Here's the results:

The bottom: image The second bottom camfer starts .10 too high and ends .25 too high.

The top : image Top is about 1.2 mm high

jwcoope commented 1 year ago

I'm new to github and how to post a fix.. i'll figure that out in a bit, but here's the fix for the bin_bottom_base not being exact. This does not fix the total height yet, still working on that.

./lib/gridfinityUtils/baseGenerator.py: Line69: --topExtrudeDepth = adsk.core.ValueInput.createByReal(0.23) Line69: ++topExtrudeDepth = adsk.core.ValueInput.createByReal(0.215) Line 103: --topExtrudeDepth = adsk.core.ValueInput.createByReal(0.27) Line 103: ++ topExtrudeDepth = adsk.core.ValueInput.createByReal(0.26)

EDIT: Figured out how to submit a fix and also the bin height issue, here's the pull request: #5

jwcoope commented 1 year ago

Just figured out the lip issue as well.

I believe all issues in this thread have been resolved in pull request #5

Le0Michine commented 1 year ago

thanks for bringing this up. Added size changes suggested in https://github.com/Le0Michine/FusionGridfinityGenerator/pull/5. When comparing to the original fusion files it looks like it should be a close match now

image image

Generated bin with dimensions 1x1x5 for comparison. There is a noticeable difference in lip shape, however from my experience it doesn't make a difference functionally. Let me know if you are still having issues with that