|
|
|
@ -128,6 +128,12 @@ export default class Measure extends ItemTypeLine { |
|
|
|
// 创建完线之后,创建 label
|
|
|
|
afterCreateLine(line: THREE.Mesh, startPoint: THREE.Object3D, endPoint: THREE.Object3D) { |
|
|
|
super.afterCreateLine(line, startPoint, endPoint) |
|
|
|
if (!startPoint.userData.center) { |
|
|
|
startPoint.userData.center = [] |
|
|
|
} |
|
|
|
if (!startPoint.userData.center.includes(endPoint.uuid)) { |
|
|
|
startPoint.userData.center.push(endPoint.uuid) |
|
|
|
} |
|
|
|
|
|
|
|
const p0 = startPoint.position |
|
|
|
const p1 = endPoint.position |
|
|
|
|