각도 계산 수정, 지붕면 완료 시 외벽선 제거

This commit is contained in:
hyojun.choi 2024-10-29 12:56:38 +09:00
parent 0970dd95d0
commit 5daf989180
3 changed files with 11 additions and 2 deletions

View File

@ -170,7 +170,10 @@ export function useEavesGableEdit(id) {
})
const wallLines = canvas.getObjects().filter((obj) => obj.name === 'wallLine')
const removeTargets = canvas.getObjects().filter((obj) => obj.name === 'pitchText')
removeTargets.forEach((obj) => {
canvas.remove(obj)
})
wallLines.forEach((wallLine) => {
addPitchTextsByOuterLines()
const roof = drawRoofPolygon(wallLine)

View File

@ -130,6 +130,12 @@ export function useRoofAllocationSetting(id) {
setSurfaceShapePattern(roof, roofDisplay.column)
drawDirectionArrow(roof)
})
const removeTargets = canvas.getObjects().filter((obj) => obj.name === 'outerLinePoint' || obj.name === 'outerLine')
removeTargets.forEach((obj) => {
canvas.remove(obj)
})
closePopup(id)
}

View File

@ -268,7 +268,7 @@ export const getDegreeByChon = (chon) => {
export const getChonByDegree = (degree) => {
// tan(theta) = height / base
const radians = (degree * Math.PI) / 180
return Number(Number(Math.tan(radians) * 10).toFixed(1))
return Number(Number(Math.tan(radians) * 10).toFixed(2))
}
/**