- surface 생성 시 padding / margin polygon 검증 로직 추가
This commit is contained in:
parent
e99236fd30
commit
eb48e11a5d
@ -171,7 +171,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
case LINE_TYPE.SUBLINE.RIDGE:
|
case LINE_TYPE.SUBLINE.RIDGE:
|
||||||
return data.ridgeIntvl / 10
|
return data.ridgeIntvl / 10
|
||||||
default:
|
default:
|
||||||
return 60
|
return 60 / 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//선택 배치면 배열`
|
//선택 배치면 배열`
|
||||||
@ -241,13 +241,23 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
} else {
|
} else {
|
||||||
let offsetLength = canvasSetting.roofSizeSet === '3' ? -30 : (trestleDetail.eaveIntvl / 10) * -1
|
let offsetLength = canvasSetting.roofSizeSet === '3' ? -30 : (trestleDetail.eaveIntvl / 10) * -1
|
||||||
setSurfaceShapePattern(roof, roofDisplay.column, true, roof.roofMaterial) //패턴 변경
|
setSurfaceShapePattern(roof, roofDisplay.column, true, roof.roofMaterial) //패턴 변경
|
||||||
|
// let offsetPoints = createPaddingPolygon(createRoofPolygon(roof.points), roof.lines).vertices //안쪽 offset
|
||||||
let offsetPoints = null
|
let offsetPoints = null
|
||||||
|
console.log(roof, roof.getCurrentPoints())
|
||||||
|
const polygon = createRoofPolygon(roof.getCurrentPoints())
|
||||||
|
const originPolygon = new QPolygon(roof.getCurrentPoints(), { fontSize: 0 })
|
||||||
|
|
||||||
if (['south', 'west'].includes(roof.direction)) {
|
let result = createPaddingPolygon(polygon, roof.lines).vertices
|
||||||
offsetPoints = createPaddingPolygon(createRoofPolygon(roof.getCurrentPoints()), roof.lines).vertices //안쪽 offset
|
|
||||||
|
//margin polygon 의 point가 기준 polygon의 밖에 있는지 판단한다.
|
||||||
|
const allPointsOutside = result.every((point) => !originPolygon.inPolygon(point))
|
||||||
|
|
||||||
|
if (allPointsOutside) {
|
||||||
|
offsetPoints = createMarginPolygon(polygon, roof.lines).vertices
|
||||||
} else {
|
} else {
|
||||||
offsetPoints = createMarginPolygon(createRoofPolygon(roof.getCurrentPoints()), roof.lines).vertices //안쪽 offset
|
offsetPoints = createPaddingPolygon(polygon, roof.lines).vertices
|
||||||
}
|
}
|
||||||
|
|
||||||
//모듈설치영역?? 생성
|
//모듈설치영역?? 생성
|
||||||
|
|
||||||
const surfaceId = uuidv4()
|
const surfaceId = uuidv4()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user