Browse Source

AmrMapConvert 从 AMR 地图转换为 LCC 地图

jx-test
修宁 5 months ago
parent
commit
0d860072e2
  1. 8
      src/utils/AmrMapConvert.ts

8
src/utils/AmrMapConvert.ts

@ -464,17 +464,17 @@ function isStorePos(amrNode: any) {
// 根据方向,调整存储位的距离 // 根据方向,调整存储位的距离
function convertLinkStoreDistance(direction: string, storeNode: any) { function convertLinkStoreDistance(direction: string, storeNode: any) {
if (direction === 'up') { if (direction === 'up') {
storeNode.tf[0][2] -= 0.5 storeNode.tf[0][2] -= 1.2
} else if (direction === 'down') { } else if (direction === 'down') {
storeNode.tf[0][2] += 0.5 storeNode.tf[0][2] += 1.2
} else if (direction === 'left') { } else if (direction === 'left') {
storeNode.tf[0][0] -= 0.5 storeNode.tf[0][0] -= 1.2
storeNode.tf[1][1] = 90 // 90 度旋转 storeNode.tf[1][1] = 90 // 90 度旋转
} else if (direction === 'right') { } else if (direction === 'right') {
storeNode.tf[0][0] += 0.5 storeNode.tf[0][0] += 1.2
storeNode.tf[1][1] = 90 // 90 度旋转 storeNode.tf[1][1] = 90 // 90 度旋转
} }
} }

Loading…
Cancel
Save