Files
cut-abstractions/tests/dev1/dataHandle/common/BlockBorderPoint.ts
2025-07-22 18:22:31 +08:00

39 lines
943 B
TypeScript

import type { PlaceBlock } from "../confClass"
/** 拖拉的小板顶点 */
export class BlockBorderPoint
{
/** 板 */
block: PlaceBlock
/** 原坐标x */
x: number
/** 原坐标y */
y: number
/** 大板坐标X */
placeX: number
/** 大板坐标Y */
placeY: number
/** 拖拉点距切割后板的坐标偏移x */
bx = 0
/** 拖拉点距切割后板的坐标偏移x */
by = 0
/** 在placed线框中的序号 */
curveIndex: number
/** 在板的位置: 10:基点(左下点);1:右下角;2:右上角;3:左上角; -1:表示异形非顶点 areaID */
posId: number
constructor(block: PlaceBlock, x: number, y: number, index: number, posId: number, bx = 0, by = 0)
{
this.block = block
this.x = x
this.y = y
this.placeX = (block ? block.placeX : 0) + x
this.placeY = (block ? block.placeY : 0) + y
this.curveIndex = index
this.posId = posId
this.bx = bx
this.by = by
}
}