|
@@ -815,6 +815,14 @@ export default {
|
|
|
window.alert('请保证:1.框选区域内至少已存在一个点位;2.该点位高度与补点高度之间差距不超过高度差上限。该点位将作为点位生长起点。')
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ // 拿到框选区域中已存在点的datasetId(所有点都一样),并计算weight平均值
|
|
|
+ const pointDatasetId = pointInBrushList[0].datasetId
|
|
|
+ let pointWeightSum = 0
|
|
|
+ for (const pointInBrush of pointInBrushList) {
|
|
|
+ pointWeightSum += pointInBrush.weight
|
|
|
+ }
|
|
|
+ const pointWeight = pointWeightSum / pointInBrushList.length
|
|
|
|
|
|
// 开始补点
|
|
|
let activePointIdx = 0
|
|
@@ -922,6 +930,8 @@ export default {
|
|
|
x: neiPos.x,
|
|
|
y: neiPos.y,
|
|
|
z: this.formData.addPointHeight,
|
|
|
+ datasetId: pointDatasetId,
|
|
|
+ weight: pointWeight,
|
|
|
})
|
|
|
|
|
|
// 记录自己与其关系
|