Skip to content

Endless loop #21

Description

@Megidd

I ran the command:

./binpack 4 helmet.stl 2 Pharaoh.stl 10 Utah_teapot_solid.stl

But it took forever at this stage:

loading mesh... 148.879948ms
loading mesh... 86.407924ms
loading mesh... 1.248878ms
bin packing... 

Location

As far as I check by stepping through the code with debugger, the location of the endless loop is the recursive call to this function at this file and line:

// github.com/fogleman/pack3d/binpack/pack.go

func pack(items []Item, box Box, hash *SpatialHash, minVolume Vector) Result {
	// ...
				r[j] = pack(items, b[i][j], hash, minVolume) // Line 117
	// ...
}

Screenshot_20221114_154925

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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