지붕덮개 그리기 로직 수정 중

This commit is contained in:
Jaeyoung Lee 2025-03-17 17:35:43 +09:00
parent b3af3cd0e0
commit 99a584f8cf
2 changed files with 2340 additions and 9 deletions

View File

@ -1679,10 +1679,11 @@ export function useMode() {
const offsetEdges = []
polygon.edges.forEach((edge, i) => {
const offset =
/* const offset =
lines[i % lines.length].attributes.offset === undefined || lines[i % lines.length].attributes.offset === 0
? 0.1
: lines[i % lines.length].attributes.offset
: lines[i % lines.length].attributes.offset*/
const offset = lines[i % lines.length].attributes.offset
const dx = edge.outwardNormal.x * offset
const dy = edge.outwardNormal.y * offset
offsetEdges.push(createOffsetEdge(edge, dx, dy))
@ -1717,10 +1718,12 @@ export function useMode() {
const offsetEdges = []
polygon.edges.forEach((edge, i) => {
const offset =
/*const offset =
lines[i % lines.length].attributes.offset === undefined || lines[i % lines.length].attributes.offset === 0
? 0.1
: lines[i % lines.length].attributes.offset
: lines[i % lines.length].attributes.offset*/
const offset = lines[i % lines.length].attributes.offset
const dx = edge.inwardNormal.x * offset
const dy = edge.inwardNormal.y * offset
offsetEdges.push(createOffsetEdge(edge, dx, dy))
@ -1769,6 +1772,8 @@ export function useMode() {
})
wall.lines = afterLine.concat(beforeLine)
wall.baseLines = wall.lines
wall.colorLines = []
//외벽선을 기준으로 polygon을 생성한다. 지붕선의 기준이 됨.
const divWallLines = []
@ -1947,6 +1952,7 @@ export function useMode() {
strokeWidth: wallStrokeWidth,
selectable: false,
})
wall.colorLines.push(wallLine)
canvas.add(wallLine)
})

File diff suppressed because it is too large Load Diff