FIX: arrangement crash due to mutithread call to transformedShape

STUDIO-2653

Change-Id: I82031d3adbd95f8af04cb5f15b39d0621a40c7f3
(cherry picked from commit 065575c4845688ecb6293fa826e5f987f019d9fb)
This commit is contained in:
manch1n 2023-04-10 20:51:51 +08:00 committed by Lane.Wei
parent 6e797e7a99
commit 229b173894
1 changed files with 1 additions and 0 deletions

View File

@ -608,6 +608,7 @@ private:
Shapes nfps(stationarys.size());
Item slidingItem(sliding);
slidingItem.transformedShape();
__parallel::enumerate(stationarys.begin(), stationarys.end(), [&nfps, sliding, &slidingItem](const RawShape &stationary, size_t n) {
auto subnfp_r = noFitPolygon<NfpLevel::CONVEX_ONLY>(stationary, sliding);
correctNfpPosition(subnfp_r, stationary, slidingItem);