[2173] junction-extended 패턴 outer hip 제거 + strokeWidth SK와 통일 #867
@ -637,7 +637,7 @@ export function useEavesGableEdit(id) {
|
||||
parentId: roof.id,
|
||||
fontSize: roof.fontSize,
|
||||
stroke: '#1083E3',
|
||||
strokeWidth: 2,
|
||||
strokeWidth: 4,
|
||||
name: LINE_TYPE.SUBLINE.HIP,
|
||||
textMode: roof.textMode,
|
||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz, ...snap.attributes },
|
||||
@ -653,7 +653,7 @@ export function useEavesGableEdit(id) {
|
||||
parentId: roof.id,
|
||||
fontSize: roof.fontSize,
|
||||
stroke: '#1083E3',
|
||||
strokeWidth: 2,
|
||||
strokeWidth: 4,
|
||||
name: LINE_TYPE.SUBLINE.HIP,
|
||||
textMode: roof.textMode,
|
||||
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 }
|
||||
}
|
||||
|
||||
// junctionExtended: 추가만 했으므로 추가된 ext hip 2개 + ridge 1개만 제거 + 제거됐던 RG-1 복원
|
||||
// junctionExtended: ext hip 2개 + ridge 1개 제거 + 제거됐던 RG-1 + outer/inner hip 4개 복원
|
||||
if (ridgeAtMid.ridge.__patternKind === 'junctionExtended') {
|
||||
const extHips = Array.isArray(ridgeAtMid.ridge.__patternExtHips) ? ridgeAtMid.ridge.__patternExtHips : []
|
||||
extHips.forEach((h) => {
|
||||
@ -675,10 +675,11 @@ export function useEavesGableEdit(id) {
|
||||
removeLine(h)
|
||||
roof.innerLines = roof.innerLines.filter((il) => il !== h)
|
||||
})
|
||||
const removedSnaps = Array.isArray(ridgeAtMid.ridge.__removedRidgesSnapshot) ? ridgeAtMid.ridge.__removedRidgesSnapshot : []
|
||||
const removedRidgeSnaps = Array.isArray(ridgeAtMid.ridge.__removedRidgesSnapshot) ? ridgeAtMid.ridge.__removedRidgesSnapshot : []
|
||||
const removedHipSnaps = Array.isArray(ridgeAtMid.ridge.__removedHipsSnapshot) ? ridgeAtMid.ridge.__removedHipsSnapshot : []
|
||||
removeLine(ridgeAtMid.ridge)
|
||||
roof.innerLines = roof.innerLines.filter((il) => il !== ridgeAtMid.ridge)
|
||||
removedSnaps.forEach((snap) => {
|
||||
removedRidgeSnaps.forEach((snap) => {
|
||||
if (!snap) return
|
||||
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] })
|
||||
@ -686,7 +687,7 @@ export function useEavesGableEdit(id) {
|
||||
parentId: roof.id,
|
||||
fontSize: roof.fontSize,
|
||||
stroke: '#1083E3',
|
||||
strokeWidth: 2,
|
||||
strokeWidth: 4,
|
||||
name: LINE_TYPE.SUBLINE.RIDGE,
|
||||
textMode: roof.textMode,
|
||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz, ...snap.attributes },
|
||||
@ -696,6 +697,13 @@ export function useEavesGableEdit(id) {
|
||||
restored.bringToFront()
|
||||
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)
|
||||
hideOriginalLengthText(target.id, false)
|
||||
canvas.renderAll()
|
||||
@ -819,7 +827,7 @@ export function useEavesGableEdit(id) {
|
||||
parentId: roof.id,
|
||||
fontSize: roof.fontSize,
|
||||
stroke: '#1083E3',
|
||||
strokeWidth: 2,
|
||||
strokeWidth: 4,
|
||||
name: LINE_TYPE.SUBLINE.RIDGE,
|
||||
textMode: roof.textMode,
|
||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
||||
@ -862,7 +870,7 @@ export function useEavesGableEdit(id) {
|
||||
parentId: roof.id,
|
||||
fontSize: roof.fontSize,
|
||||
stroke: '#1083E3',
|
||||
strokeWidth: 2,
|
||||
strokeWidth: 4,
|
||||
name: LINE_TYPE.SUBLINE.RIDGE,
|
||||
textMode: roof.textMode,
|
||||
attributes: { roofId: roof.id, planeSize: ridgeSz, actualSize: ridgeSz },
|
||||
@ -878,7 +886,7 @@ export function useEavesGableEdit(id) {
|
||||
parentId: roof.id,
|
||||
fontSize: roof.fontSize,
|
||||
stroke: '#1083E3',
|
||||
strokeWidth: 2,
|
||||
strokeWidth: 4,
|
||||
name: LINE_TYPE.SUBLINE.HIP,
|
||||
textMode: roof.textMode,
|
||||
attributes: { roofId: roof.id, planeSize: sz, actualSize: sz },
|
||||
@ -916,6 +924,21 @@ export function useEavesGableEdit(id) {
|
||||
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(ext2)
|
||||
canvas.add(ridge)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user