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

Objects locate outside bin #6

Open
XareniGalindo opened this issue Feb 28, 2022 · 0 comments
Open

Objects locate outside bin #6

XareniGalindo opened this issue Feb 28, 2022 · 0 comments

Comments

@XareniGalindo
Copy link

In my project, I want to pack image stacks (my packages) in a container using py3dbp. I can arrange them and know each image location inside the container I defined. After, I extract the locations of each image and try to use this information to place the "packages" in a NumPy array full of ones that is the same size as the container I defined previously. However, when I extract the image positions I notice that some of them are partially "outside" the bin, i.e if my bin is defined by:

final_image = Bin("final Image", 3300 , 3300, 17, 100000)

when I access some of the item's position and size information, I get the next

print(packer.items[514].position)
print(packer.items[514].width)
print(packer.items[514].height)
print(packer.items[514].depth)

Output: 
[Decimal('3278.000'), Decimal('264.000'), 0]
70.000
22.000
17.000

As you can see, the width of package 514 is bigger than the space left for it in the container, 70 against 22. My question is, How this can be possible? The package size corresponding to item 514 is the same as the image I want to locate. Besides, the list of unfitted objects is empty and the list of fitted objects corresponds to the total number of objects I have.

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

1 participant