Closed mattsb42 closed 2 months ago
I got the auto-scaling working as part of fixing the general slot alignment issue. This is just a configuration issue now. I'm thinking this might fit into the same bucket as #6 .
The changes for #6 makes this Just Work now. Just need to find the right thing to assert on the input validation.
lol..oh; just need to make sure a single drawer isn't wider than the cabinet; right; because the autoscaling rows do all the magic now. Nice.
Cabinets require drawers to fully fill the cabinet width[1]. This was the simplest thing to check, but I could imagine wanting to have extra empty space between drawers, either for increased strength or just for aesthetics or fit. It shouldn't take a lot to make this work, just some math that I don't feel like figuring out right now.
To enable this, the drawer position function[2] needs to auto-scale for incomplete column fill. Right now it just starts in the top left corner and tiles down and to the right.
[1] https://github.com/mattsb42/screwfinity-rebuilt-openscad/blob/30ac25fb1ea624d32199d26072d0a0146119d17b/src/cabinet.scad#L35-L44
[2] https://github.com/mattsb42/screwfinity-rebuilt-openscad/blob/30ac25fb1ea624d32199d26072d0a0146119d17b/src/cabinet.scad#L128-L138