Skip to content

Objects locate outside bin  #6

@XareniGalindo

Description

@XareniGalindo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions