路线增加防撞参数

This commit is contained in:
yyy 2025-07-03 10:15:54 +08:00
parent b26c03ba25
commit 3ebf399150

View File

@ -2227,8 +2227,24 @@ const isometricReplication = () => {
}
//
const equalDistanceReplicationSucceeded = (list) => {
state.allMapPointInfo.push(...list)
//
const duplicatePoints = []
const filteredList = list.filter((newItem) => {
const isDup = state.allMapPointInfo.some(
(item) =>
Number(item.locationX).toFixed(1) === Number(newItem.locationX).toFixed(1) &&
Number(item.locationY).toFixed(1) === Number(newItem.locationY).toFixed(1)
)
if (isDup) {
duplicatePoints.push(`(${newItem.locationX}, ${newItem.locationY})`)
}
return !isDup
})
state.allMapPointInfo.push(...filteredList)
addEditHistory()
if (duplicatePoints.length > 0) {
message.warning(`以下点已存在,未添加:${duplicatePoints.join('、')}`)
}
}
//
@ -2319,7 +2335,8 @@ const generateDetectionPoint = async () => {
startingSortNum: undefined,
endPointSortNum: undefined,
startToEndToward: 1, //
endToStartToward: 0 //
endToStartToward: 0, //
collisionAvoidanceFlag: 1 // 0 1
}
//
@ -2759,7 +2776,10 @@ const endDrawSelection = (event) => {
reverseSpeedLimit: 0.4,
toward: 0,
startingSortNum: state.startDrawPoint.sortNum,
endPointSortNum: endPoint.sortNum
endPointSortNum: endPoint.sortNum,
startToEndToward: 0, //
endToStartToward: 0, //
collisionAvoidanceFlag: 1 // 0 1
}
// 使 requestAnimationFrame
@ -2952,7 +2972,10 @@ const clickDrawSelectionArea = () => {
direction: 2, // 1. 2.,
forwardSpeedLimit: 1.5, //
reverseSpeedLimit: 0.4, //
toward: 0 // ( 0: 1: 2: 3:)
toward: 0, // ( 0: 1: 2: 3:)
startToEndToward: 0, //
endToStartToward: 0, //
collisionAvoidanceFlag: 1 // 0 1
}
state.selectedCurve = curve
state.mapRouteList.push(curve)
@ -3482,7 +3505,10 @@ const handleChooseRoute = async (item, index, type, e) => {
direction: 2, // 1. 2.,
forwardSpeedLimit: 1.5, //
reverseSpeedLimit: 0.4, //
toward: 0 // ( 0: 1: 2: 3:)
toward: 0, // ( 0: 1: 2: 3:)
startToEndToward: 0, //
endToStartToward: 0, //
collisionAvoidanceFlag: 1 // 0 1
}
let positionMapLineTwo = {
isSelected: false, //
@ -3512,7 +3538,10 @@ const handleChooseRoute = async (item, index, type, e) => {
direction: 2, // 1. 2.,
forwardSpeedLimit: 1.5, //
reverseSpeedLimit: 0.4, //
toward: 0 // ( 0: 1: 2: 3:)
toward: 0, // ( 0: 1: 2: 3:)
startToEndToward: 0, //
endToStartToward: 0, //
collisionAvoidanceFlag: 1 // 0 1
}
try {