This commit is contained in:
BianLzhaoMin 2025-11-21 09:57:49 +08:00
parent ae62f665ce
commit 3c0ff6ca59
1 changed files with 23 additions and 11 deletions

View File

@ -770,18 +770,30 @@ if (!modelUrl || !modelUrl.endsWith('.dxf')) {
console.log('画半圆', item)
// 线
if (item.start_point && item.end_point && item.center && item.radius) {
const arcPoints = this.generateArcPoints(
item.center,
item.radius,
item.start_point,
item.end_point,
const line = new BMapGL.Polyline(
[
new BMapGL.Point(item.start_point[0], item.start_point[1]),
new BMapGL.Point(item.end_point[0], item.end_point[1]),
],
{
strokeColor: 'red',
strokeWeight: 2,
strokeOpacity: 0.8,
},
)
const arcPolyline = new BMapGL.Polyline(arcPoints, {
strokeColor: 'red',
strokeWeight: 2,
strokeOpacity: 0.8,
})
this.map.addOverlay(arcPolyline)
this.map.addOverlay(line)
// const arcPoints = this.generateArcPoints(
// item.center,
// item.radius,
// item.start_point,
// item.end_point,
// )
// const arcPolyline = new BMapGL.Polyline(arcPoints, {
// strokeColor: 'red',
// strokeWeight: 2,
// strokeOpacity: 0.8,
// })
// this.map.addOverlay(arcPolyline)
} else {
//
const circle = new BMapGL.Circle(