횡단설계(B06) 다음을 상세설계 → 수량산출 → 설계도서 순으로 재배열하고, 폴더 번호가 흐름과 일치하도록 이름을 맞바꾼다. - B08_DesignDetail → B07_DesignDetail, B07_Quantity → B08_Quantity (파일 접두어·식별자·라우트·locale 키 전량 스왑) - STAGE_KEYS 4=DESIGN_DETAIL, 5=QUANTITY 스왑 + 라우터 stage 리터럴 교체 - CAD 마운트 /b08-cad → /b07-cad (main.py·vite proxy·iframe URL), openwebcad Toolbar 라벨 B07로 수정 후 재빌드 - 유지: openwebcad postMessage 프로토콜 aislo:b08:*·패키지명(내부 식별자) - 기존 프로젝트 storage 폴더 rename + project_manifest 갱신, DB project_workflow_stages stage_no 4↔5 행 스왑 완료 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import {LineEntity} from '../entities/LineEntity';
|
|
import {times} from './times';
|
|
import {Point} from '@flatten-js/core';
|
|
import {ANGLE_GUIDES_COLOR, ANGLE_GUIDES_DASH} from "../App.consts.ts";
|
|
import {getActiveLayerId} from "../state.ts";
|
|
|
|
export function getAngleGuideLines(
|
|
firstPoint: Point,
|
|
angleStep: number,
|
|
): LineEntity[] {
|
|
// Only for 180 degrees since we draw lines that are infinite in both directions,
|
|
// so we only need to fill half a circle to fill the complete circle
|
|
return times(180 / angleStep, i => {
|
|
const angle = i * angleStep;
|
|
const angleRad = angle * (Math.PI / 180);
|
|
const x = firstPoint.x + Math.cos(angleRad);
|
|
const y = firstPoint.y + Math.sin(angleRad);
|
|
const angleLine = new LineEntity(getActiveLayerId(),
|
|
new Point(
|
|
firstPoint.x - 10000 * (x - firstPoint.x),
|
|
firstPoint.y - 10000 * (y - firstPoint.y),
|
|
),
|
|
new Point(
|
|
firstPoint.x + 10000 * (x - firstPoint.x),
|
|
firstPoint.y + 10000 * (y - firstPoint.y),
|
|
),
|
|
);
|
|
angleLine.lineColor = ANGLE_GUIDES_COLOR;
|
|
angleLine.lineDash = ANGLE_GUIDES_DASH;
|
|
return angleLine
|
|
});
|
|
}
|