sk2
This commit is contained in:
parent
24ae965d7c
commit
80e555d653
@ -440,8 +440,8 @@ export const skeletonBuilder = (roofId, canvas, textMode) => {
|
||||
*/
|
||||
const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
if (!skeleton?.Edges) return []
|
||||
let roof = canvas?.getObjects().find((object) => object.id === roofId)
|
||||
let wall = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.WALL && obj.attributes.roofId === roofId)
|
||||
const roof = canvas?.getObjects().find((object) => object.id === roofId)
|
||||
const wall = canvas.getObjects().find((obj) => obj.name === POLYGON_TYPE.WALL && obj.attributes.roofId === roofId)
|
||||
let skeletonLines = []
|
||||
let findPoints = [];
|
||||
|
||||
@ -766,6 +766,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
});
|
||||
};
|
||||
|
||||
console.log("wallBaseLines", wall.baseLines)
|
||||
// const sortedWallLines = sortCurrentRoofLines(wall.lines);
|
||||
// roofLines의 방향에 맞춰 currentRoofLines 조정 후 정렬
|
||||
const alignedCurrentRoofLines = alignLineDirection(currentRoofLines, roofLines);
|
||||
@ -784,16 +785,19 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
//wall.baseLine은 움직인라인
|
||||
const movedLines = []
|
||||
|
||||
|
||||
wallLines.forEach((wallLine, index) => {
|
||||
// 조건에 맞는 라인들만 필터링
|
||||
const validWallLines = wallLines.filter((wallLine, index) => wallLine.idx - 1 === index);
|
||||
|
||||
|
||||
// const roofLine = sortedRoofLines[index];
|
||||
// const currentRoofLine = sortedCurrentRoofLines[index];
|
||||
// const moveLine = sortedWallBaseLines[index]
|
||||
// const wallBaseLine = sortedWallBaseLines[index]
|
||||
validWallLines.forEach((wallLine, index) => {
|
||||
|
||||
const roofLine = sortRoofLines[index];
|
||||
const originalIndex = wallLines.indexOf(wallLine);
|
||||
const roofLine = sortRoofLines[originalIndex];
|
||||
const currentRoofLine = currentRoofLines[originalIndex];
|
||||
const moveLine = wall.baseLines[originalIndex];
|
||||
const wallBaseLine = wall.baseLines[originalIndex];
|
||||
|
||||
// const roofLine = sortRoofLines[index];
|
||||
|
||||
if(roofLine.attributes.wallLine !== wallLine.id || (roofLine.idx - 1) !== index ){
|
||||
console.log("wallLine2::::", wallLine.id)
|
||||
@ -804,9 +808,9 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
||||
return false
|
||||
}//roofLines.find(line => line.attributes.wallLineId === wallLine.attributes.wallId);
|
||||
|
||||
const currentRoofLine = currentRoofLines[index];
|
||||
const moveLine = wall.baseLines[index]
|
||||
const wallBaseLine = wall.baseLines[index]
|
||||
// const currentRoofLine = currentRoofLines[index];
|
||||
// const moveLine = wall.baseLines[index]
|
||||
// const wallBaseLine = wall.baseLines[index]
|
||||
//console.log("wallBaseLine", wallBaseLine);
|
||||
|
||||
//roofline 외곽선 설정
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user