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

How do you include padding? #48

Open
ErfolgreichCharismatisch opened this issue Dec 26, 2022 · 3 comments
Open

How do you include padding? #48

ErfolgreichCharismatisch opened this issue Dec 26, 2022 · 3 comments

Comments

@ErfolgreichCharismatisch

How do you include padding, keeping a minimum distance between boxes?

@fgasnier71
Copy link

Trick: You need to virtually increase all box dimensions by half the space you need between all the boxes, increase your container dimensions by 1 time the space, perform your calculation, and display your boxes with their original sizes.

@ErfolgreichCharismatisch
Copy link
Author

ErfolgreichCharismatisch commented Dec 30, 2022

Yes, that's a good idea, I thought about that. But it also adds padding where boxes connect to the room, which I don't want. Only between boxes. Because I use it for 3D nesting to remove elements and to separate the pieces I have a minimum space.

@fgasnier71
Copy link

I do that in https://github.com/treeDiM/StackBuilder and it works great.

Before making your palletization computation, you need to increase by 1 space the length +width dimensions of your container, but after the computation, you need to offset every box position by -0.5*space.

x -= 0.5 * space;
y = -0.5 * space;

Then, you do have a set of boxes with spaces that do lean on your stacking area boundaries.

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

No branches or pull requests

2 participants