표제란(도각) 값 공급 - `use_title_fields()` 문맥 변수 신설 — 회사 도각 폴더와 같은 방식이라 작도 엔진 6개의 서명을 고치지 않음. `frame_entities` 가 문맥값 위에 호출부 값(도면명)을 얹음. - 라우터가 도면 한 건을 그리기 전에 DB 값을 세움: 공사명·위치(projects), 용역회사(companies), 설계자(users). 못 채운 자리는 빈칸 — 도각 원본의 남의 값이 도면으로 나가지 않음. - 미공급 항목과 사유를 `_title_block_fields` 주석에 명시: 시행청·과업책임자· 분야별책임자는 DB 칸 부재(B02 마이그레이션 대기), 축척·사업량·연도기번은 임의 수치 금지, 설계일자는 채울 시점 정의 미결. CAD 회귀 6건 (87건 중 81 passed → 87 passed) - `window` 부재 5건: `notifyWindow()` 한 곳으로 모으고 `window` 없는 Node 시험에서는 통지를 건너뜀. `triggerReactUpdate` 가 이미 같은 이유로 시험을 건너뛰던 것과 같은 결. - `find-closest-entity`: 목의 호가 90°까지만 돌아 클릭점에서 147px 떨어져 있었음 — 시험 의도(호가 가장 가깝다)대로 3/4바퀴로 되돌림. - 선색 기대값 4건: 앱 기본 선색이 흰 종이 배경에 맞춰 검정으로 바뀐 뒤 상류 기대값 `#fff` 가 남아 있었음 — `getActiveLineColor()` 대조로 교체. - 좌표 NaN: 없어진 `TOOLBAR_WIDTH` 를 시험 보조가 아직 참조 — 입력 컨트롤러가 캔버스 bounding rect 를 쓰도록 바뀐 현행에 맞춤. - 호 각도 비교: 같은 각의 음수·2π 표기 차이라 [0, 2π) 정규화 후 대조. 검증: `npx vitest run` 87 passed / 0 failed, `npm run check-types`·`npm run build` 통과, `pytest tmp/tests/ -q` 131 passed / 0 failed(신규 `test_b07_title_block_fields.py` 4건 포함). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { EntityName } from '../entities/Entity.ts';
|
|
import type { JsonDrawingFileSerialized } from './import-export-handlers/export-entities-to-json.ts';
|
|
|
|
export const arcAndLineEntitiesMock: JsonDrawingFileSerialized = {
|
|
entities: [
|
|
{
|
|
id: 'ef6a4059-b477-4f53-af00-42241efae328',
|
|
type: EntityName.Line,
|
|
lineColor: '#fff',
|
|
lineWidth: 1,
|
|
layerId: 'e9d841dd-7ee4-4bd8-8cfd-b8381c73fd50',
|
|
shapeData: {
|
|
startPoint: {
|
|
x: 276.92367603039963,
|
|
y: 1172.4901562767805,
|
|
},
|
|
endPoint: {
|
|
x: 524.8487532291128,
|
|
y: 1172.4901562767805,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
id: '8656dec4-00ae-4042-ba67-1f7d0056079b',
|
|
type: EntityName.Arc,
|
|
lineColor: '#fff',
|
|
lineWidth: 1,
|
|
layerId: 'e9d841dd-7ee4-4bd8-8cfd-b8381c73fd50',
|
|
shapeData: {
|
|
center: {
|
|
x: 524.8487532291128,
|
|
y: 1015.5664802463798,
|
|
},
|
|
radius: 156.92367603040066,
|
|
startAngle: 0,
|
|
// 클릭점(393,1108)이 호 위(중심각 ≈145°)에 놓이도록 3/4바퀴를 쓴다 —
|
|
// 90°까지만 돌면 호가 클릭점에서 147px 떨어져 직선(64px)이 더 가깝다.
|
|
endAngle: (2 * Math.PI * 3) / 4,
|
|
counterClockwise: true,
|
|
},
|
|
},
|
|
],
|
|
layers: [
|
|
{
|
|
id: 'e9d841dd-7ee4-4bd8-8cfd-b8381c73fd50',
|
|
isLocked: false,
|
|
isVisible: true,
|
|
name: 'Default',
|
|
},
|
|
],
|
|
};
|