libnest2d
libnest2d copied to clipboard
Rectangle deformed after shapelike::rotate called with Clipper backend
Calling transformedShape on a rectangle item sometimes gives deformed shape. After debugging I find out that shapelike::rotate introduces small error even with X90 degrees rotation.
Change
auto cosa = rads.cos();
auto sina = rads.sin();
into
auto cosa = int(rads.cos());
auto sina = int(rads.sin());
fix this but it won't work on arbitrary rotation.
I encountered this problem in NfpPlacer, but BottomLeftPlacer works ok.
Is it an issue?