Compare commits
No commits in common. "ad069dbd72f668a9648127931153524bc409b96f" and "ead7c0bbc3776fcca81dd2e6218b0068bff4bf64" have entirely different histories.
ad069dbd72
...
ead7c0bbc3
@ -637,7 +637,7 @@ export function useEavesGableEdit(id) {
|
|||||||
parentId: roof.id,
|
parentId: roof.id,
|
||||||
fontSize: roof.fontSize,
|
fontSize: roof.fontSize,
|
||||||
stroke: '#1083E3',
|
stroke: '#1083E3',
|
||||||
strokeWidth: 4,
|
strokeWidth: 2,
|
||||||
name: LINE_TYPE.SUBLINE.HIP,
|
name: LINE_TYPE.SUBLINE.HIP,
|
||||||
textMode: roof.textMode,
|
textMode: roof.textMode,
|
||||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz, ...snap.attributes },
|
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz, ...snap.attributes },
|
||||||
@ -653,7 +653,7 @@ export function useEavesGableEdit(id) {
|
|||||||
parentId: roof.id,
|
parentId: roof.id,
|
||||||
fontSize: roof.fontSize,
|
fontSize: roof.fontSize,
|
||||||
stroke: '#1083E3',
|
stroke: '#1083E3',
|
||||||
strokeWidth: 4,
|
strokeWidth: 2,
|
||||||
name: LINE_TYPE.SUBLINE.HIP,
|
name: LINE_TYPE.SUBLINE.HIP,
|
||||||
textMode: roof.textMode,
|
textMode: roof.textMode,
|
||||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
||||||
@ -667,7 +667,7 @@ export function useEavesGableEdit(id) {
|
|||||||
hip.attributes = { ...hip.attributes, ...snap.attributes, planeSize: ns, actualSize: ns }
|
hip.attributes = { ...hip.attributes, ...snap.attributes, planeSize: ns, actualSize: ns }
|
||||||
}
|
}
|
||||||
|
|
||||||
// junctionExtended: ext hip 2개 + ridge 1개 제거 + 제거됐던 RG-1 + outer/inner hip 4개 복원
|
// junctionExtended: 추가만 했으므로 추가된 ext hip 2개 + ridge 1개만 제거 + 제거됐던 RG-1 복원
|
||||||
if (ridgeAtMid.ridge.__patternKind === 'junctionExtended') {
|
if (ridgeAtMid.ridge.__patternKind === 'junctionExtended') {
|
||||||
const extHips = Array.isArray(ridgeAtMid.ridge.__patternExtHips) ? ridgeAtMid.ridge.__patternExtHips : []
|
const extHips = Array.isArray(ridgeAtMid.ridge.__patternExtHips) ? ridgeAtMid.ridge.__patternExtHips : []
|
||||||
extHips.forEach((h) => {
|
extHips.forEach((h) => {
|
||||||
@ -675,11 +675,10 @@ export function useEavesGableEdit(id) {
|
|||||||
removeLine(h)
|
removeLine(h)
|
||||||
roof.innerLines = roof.innerLines.filter((il) => il !== h)
|
roof.innerLines = roof.innerLines.filter((il) => il !== h)
|
||||||
})
|
})
|
||||||
const removedRidgeSnaps = Array.isArray(ridgeAtMid.ridge.__removedRidgesSnapshot) ? ridgeAtMid.ridge.__removedRidgesSnapshot : []
|
const removedSnaps = Array.isArray(ridgeAtMid.ridge.__removedRidgesSnapshot) ? ridgeAtMid.ridge.__removedRidgesSnapshot : []
|
||||||
const removedHipSnaps = Array.isArray(ridgeAtMid.ridge.__removedHipsSnapshot) ? ridgeAtMid.ridge.__removedHipsSnapshot : []
|
|
||||||
removeLine(ridgeAtMid.ridge)
|
removeLine(ridgeAtMid.ridge)
|
||||||
roof.innerLines = roof.innerLines.filter((il) => il !== ridgeAtMid.ridge)
|
roof.innerLines = roof.innerLines.filter((il) => il !== ridgeAtMid.ridge)
|
||||||
removedRidgeSnaps.forEach((snap) => {
|
removedSnaps.forEach((snap) => {
|
||||||
if (!snap) return
|
if (!snap) return
|
||||||
const pts = [snap.x1, snap.y1, snap.x2, snap.y2]
|
const pts = [snap.x1, snap.y1, snap.x2, snap.y2]
|
||||||
const sz = calcLinePlaneSize({ x1: pts[0], y1: pts[1], x2: pts[2], y2: pts[3] })
|
const sz = calcLinePlaneSize({ x1: pts[0], y1: pts[1], x2: pts[2], y2: pts[3] })
|
||||||
@ -687,7 +686,7 @@ export function useEavesGableEdit(id) {
|
|||||||
parentId: roof.id,
|
parentId: roof.id,
|
||||||
fontSize: roof.fontSize,
|
fontSize: roof.fontSize,
|
||||||
stroke: '#1083E3',
|
stroke: '#1083E3',
|
||||||
strokeWidth: 4,
|
strokeWidth: 2,
|
||||||
name: LINE_TYPE.SUBLINE.RIDGE,
|
name: LINE_TYPE.SUBLINE.RIDGE,
|
||||||
textMode: roof.textMode,
|
textMode: roof.textMode,
|
||||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz, ...snap.attributes },
|
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz, ...snap.attributes },
|
||||||
@ -697,13 +696,6 @@ export function useEavesGableEdit(id) {
|
|||||||
restored.bringToFront()
|
restored.bringToFront()
|
||||||
roof.innerLines.push(restored)
|
roof.innerLines.push(restored)
|
||||||
})
|
})
|
||||||
removedHipSnaps.forEach((snap) => {
|
|
||||||
if (!snap) return
|
|
||||||
const hip = buildHipFromSnapshot(snap)
|
|
||||||
canvas.add(hip)
|
|
||||||
hip.bringToFront()
|
|
||||||
roof.innerLines.push(hip)
|
|
||||||
})
|
|
||||||
removeKerabHalfLabels(target.id)
|
removeKerabHalfLabels(target.id)
|
||||||
hideOriginalLengthText(target.id, false)
|
hideOriginalLengthText(target.id, false)
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
@ -827,7 +819,7 @@ export function useEavesGableEdit(id) {
|
|||||||
parentId: roof.id,
|
parentId: roof.id,
|
||||||
fontSize: roof.fontSize,
|
fontSize: roof.fontSize,
|
||||||
stroke: '#1083E3',
|
stroke: '#1083E3',
|
||||||
strokeWidth: 4,
|
strokeWidth: 2,
|
||||||
name: LINE_TYPE.SUBLINE.RIDGE,
|
name: LINE_TYPE.SUBLINE.RIDGE,
|
||||||
textMode: roof.textMode,
|
textMode: roof.textMode,
|
||||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
||||||
@ -870,7 +862,7 @@ export function useEavesGableEdit(id) {
|
|||||||
parentId: roof.id,
|
parentId: roof.id,
|
||||||
fontSize: roof.fontSize,
|
fontSize: roof.fontSize,
|
||||||
stroke: '#1083E3',
|
stroke: '#1083E3',
|
||||||
strokeWidth: 4,
|
strokeWidth: 2,
|
||||||
name: LINE_TYPE.SUBLINE.RIDGE,
|
name: LINE_TYPE.SUBLINE.RIDGE,
|
||||||
textMode: roof.textMode,
|
textMode: roof.textMode,
|
||||||
attributes: { roofId: roof.id, planeSize: ridgeSz, actualSize: ridgeSz },
|
attributes: { roofId: roof.id, planeSize: ridgeSz, actualSize: ridgeSz },
|
||||||
@ -886,7 +878,7 @@ export function useEavesGableEdit(id) {
|
|||||||
parentId: roof.id,
|
parentId: roof.id,
|
||||||
fontSize: roof.fontSize,
|
fontSize: roof.fontSize,
|
||||||
stroke: '#1083E3',
|
stroke: '#1083E3',
|
||||||
strokeWidth: 4,
|
strokeWidth: 2,
|
||||||
name: LINE_TYPE.SUBLINE.HIP,
|
name: LINE_TYPE.SUBLINE.HIP,
|
||||||
textMode: roof.textMode,
|
textMode: roof.textMode,
|
||||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
||||||
@ -924,21 +916,6 @@ export function useEavesGableEdit(id) {
|
|||||||
roof.innerLines = roof.innerLines.filter((il) => !ridgesToRemove.includes(il))
|
roof.innerLines = roof.innerLines.filter((il) => !ridgesToRemove.includes(il))
|
||||||
}
|
}
|
||||||
|
|
||||||
// [2240 KERAB-HIP-REMOVE 2026-05-19] 대전제: 케라바 외곽선 양 끝점(c1·c2) 에 붙은 hip 만 제거.
|
|
||||||
// outer1 (c1↔junction1), outer2 (c2↔junction2) — 사용자 선택 처마 양 끝점에서 만나는 hip
|
|
||||||
// inner (junction 너머) 는 보존. orphan extension 동반 정리, 스냅샷 첨부.
|
|
||||||
const hipsToRemove = [jp.outer1, jp.outer2]
|
|
||||||
ridge.__removedHipsSnapshot = hipsToRemove.map(snapshotHip)
|
|
||||||
for (const hip of hipsToRemove) {
|
|
||||||
removeOrphanExtensionsForHip(hip)
|
|
||||||
removeLine(hip)
|
|
||||||
}
|
|
||||||
roof.innerLines = roof.innerLines.filter((il) => !hipsToRemove.includes(il))
|
|
||||||
logger.log('[KERAB-HIP-REMOVE] outer only', {
|
|
||||||
outer1: `(${Math.round(jp.outer1.x1)},${Math.round(jp.outer1.y1)})→(${Math.round(jp.outer1.x2)},${Math.round(jp.outer1.y2)})`,
|
|
||||||
outer2: `(${Math.round(jp.outer2.x1)},${Math.round(jp.outer2.y1)})→(${Math.round(jp.outer2.x2)},${Math.round(jp.outer2.y2)})`,
|
|
||||||
})
|
|
||||||
|
|
||||||
canvas.add(ext1)
|
canvas.add(ext1)
|
||||||
canvas.add(ext2)
|
canvas.add(ext2)
|
||||||
canvas.add(ridge)
|
canvas.add(ridge)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user