tamasmeszaros / libnest2d

2D irregular bin packaging and nesting library written in modern C++
GNU Lesser General Public License v3.0
312 stars 101 forks source link

Sample Code does not work at all #41

Open SneakyPeaky opened 3 years ago

SneakyPeaky commented 3 years ago

I tried running the sample code from the main page but it did not move any polygons and moved all of them in separate bins. Can you advice? 2021-08-31_124245_2

dougalharris commented 2 years ago

Hi, I have the same issue. I get no rotations or translations either when trying to get the output (always zero)...

// Retrieve resulting geometries
for (Item& r : input) {
    auto polygon = r.transformedShape();
    auto rotation=r.rotation();
    auto translation=r.translation();
}

thanks.

dougalharris commented 2 years ago

Ok figured out what was happening in my instance, had to define a threading type via a preprocessor definition, i used: LIBNEST2D_THREADING_std fixed the issue. Cheers.