libnest2d icon indicating copy to clipboard operation
libnest2d copied to clipboard

Rectangle deformed after shapelike::rotate called with Clipper backend

Open shikui08 opened this issue 3 years ago • 0 comments

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?

shikui08 avatar Dec 30 '21 01:12 shikui08