ostat / gridfinity_extended_openscad

Gridfinity Extended OpenSCAD Model
https://docs.ostat.com/docs/openscad/gridfinity-extended
MIT License
169 stars 18 forks source link

1X1 Cup - Front missing #51

Closed lsd87 closed 2 weeks ago

lsd87 commented 2 weeks ago

Using the basic cup (default design) and setting width X to 1.0 the front of the cup is missing, bit like having a wall cut out Set the width to say 1.1 the front wall is correct. Set the mm width to 42 the front wall is correct Set the mm width to 41.9 the front wall has the hole so I assume when set to 1 unit there's a rounding down so less than 42mm but not sure why Using with Openscad 2024.09.30

1x1-missing

ostat commented 2 weeks ago

This was a bug thanks for raising. When the bin is smaller than 1 gf unit (42mm) the side lip is meant to be cut away to allow easier access to the bin. A bug was introduced recently when I re-positioned the default location of the bin, resulting it it being off by 0.5 units (21mm)

fixed in 679f603

image

lsd87 commented 2 weeks ago

Hi Chris

Thanks for coming back, noticed that when selecting X 1.0 on the new version then there’s 2 cut-outs on the sides, set the size to 42mm they disappear

Also

I can raise an issue (if you want J) about the click label, they don’t fit – I think the recess is back to far.

Found the attached scad file from somewhere that works but does not have all the great options your version has

Thanks

Leigh

From: chris heazlewood @.*** Sent: 08 October 2024 12:17 To: ostat/gridfinity_extended_openscad Cc: lsd87; Author Subject: Re: [ostat/gridfinity_extended_openscad] 1X1 Cup - Front missing (Issue #51)

This was a bug thanks for raising. When the bin is smaller than 1 gf unit (42mm) the side lip is meant to be cut away to allow easier access to the bin. A bug was introduced recently when I re-positioned the default location of the bin, resulting it it being off by 0.5 units (21mm)

fixed in https://github.com/ostat/gridfinity_extended_openscad/commit/679f603bf0c43f49c78cc39907cb7024ed05cf88 679f603

image.png (view on web) https://github.com/user-attachments/assets/e65ddbf0-5aee-40bd-8485-590ff9a75be2

— Reply to this email directly, view it on GitHub https://github.com/ostat/gridfinity_extended_openscad/issues/51#issuecomment-2399444148 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFYWD7RJB2BV5PDO7SXAS3Z2OWI3AVCNFSM6AAAAABPPY2H36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJZGQ2DIMJUHA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AEFYWD7UV55KWHFVLTZ2GHDZ2OWI3A5CNFSM6AAAAABPPY2H36WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUPASOLI.gif Message ID: @.***>

ostat commented 2 weeks ago

Thanks for coming back, noticed that when selecting X 1.0 on the new version then there’s 2 cut-outs on the sides, set the size to 42mm they disappear

I suspect this might be an OpenSCAD bug. When you use the up and down arrows in the customiser, it will sometimes not be an exact value. So while it might say 1.0, the value is really 0.9999999999. You can verify by typing in the desired number and see if it fixes it.

I can raise an issue (if you want J) about the click label, they don’t fit – I think the recess is back to far. Found the attached scad file from somewhere that works but does not have all the great options your version has

Yes please create a bug, I can take a look when I get some time. If you can include the link to scad file in the ticket that would help. Thanks mate. I see you created #53

lsd87 commented 2 weeks ago

Bit of info - If I change from the default (2.0) to 1.0 using the down arrow button, at 1.0 you get the side notches. Change to 1.1 with the up arrow, notches get removed, set back to 1.0 they return Enter 1 manually and then click up (1.1) and then down back to 1.0 the notches do not appear. Go down to (down arrow) 0.9, notches appear, go back up to 1.0 using up arrow they disappear SO once you have set 1.0 manually it SCAD appears to remember its 1.0 and not 0.999999....

ostat commented 2 weeks ago

That sounds about right. The error is a common programming bug related to floating point numbers. Pressing the up or down arrow many times the error accumulates. I could solve it in the script two ways.

I run into this type of error quite a bit in OpenSCAD, I always just ignore it as it's easy fixed. But it might be worth putting in a fix for others who might not realise the cause.

lsd87 commented 2 weeks ago

Looks like option 2 0.99 might be the easiest option

BTW. I assume the cuts are for getting your fingers in when you have a narrow cup

ostat commented 2 weeks ago

I added rounding to dimensions that should fix the issue. fixed in 4dc4eb1