|
@@ -276,18 +276,24 @@ export default function calcRoom(data, cad) {
|
|
|
})
|
|
|
|
|
|
if (test_debugger) {
|
|
|
- data.room.forEach(({ground}) => {
|
|
|
- console.log(ground.map(point => cad.processing.points.find(({id}) => id === point).ele.real))
|
|
|
- })
|
|
|
-
|
|
|
window.testCenterPoints && cad.processing.render.remove(...window.testCenterPoints)
|
|
|
window.testCenterPoints = _roomsPoints.map(points => {
|
|
|
- let point = getPolygonAreaCenter(points)
|
|
|
+ let point = getPolygonAreaCenter(points.map(point => ({...point, y: -point.y})))
|
|
|
let color = Color();
|
|
|
- let epoint = new Point({ fillColor: color, storkeColor: color, x: point.x, y: -point.y, renderer: cad.processing.render })
|
|
|
+ let epoint = new Point({ fillColor: color, storkeColor: color, x: point.x, y: point.y, renderer: cad.processing.render })
|
|
|
cad.processing.render.push(epoint)
|
|
|
return epoint
|
|
|
})
|
|
|
+
|
|
|
+ window.testCenterPoints.forEach((point, i) => {
|
|
|
+ let ground = {
|
|
|
+ room: data.room[i].ground.map(point => cad.processing.points.find(({id}) => id === point).ele.real),
|
|
|
+ center: point.real,
|
|
|
+ pointData: _roomsWalls[i],
|
|
|
+ lineData: _roomsPoints[i]
|
|
|
+ }
|
|
|
+ console.log(ground)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
|