feat(B07): 기본 도면층 이름을 국문으로 바꾸고 방위표 템플릿을 정리한다

도면층 17종을 프로젝트가 이미 쓰는 용어로 맞춘다 — 원지반·계획선·구조물·
암 경계선·수량 산출표·도각·등고선·계류·노선·배수유역·유역 제원·표제·
그래프 격자·측점표·유토곡선·그래프 축·운반 구간. CAD 앱의 'Default'와
'New layer'도 기본·새 도면층으로 바꾼다. layerId는 그대로다.

방위표 템플릿(00_template_compass.json)에 원본 DXF의 표제란 글자 4개가
도면 반대편에 남아 있었다. 이 때문에 템플릿 bbox가 183x262mm로 부풀어,
긴 변을 14mm에 맞추는 compass_entities()가 방위표를 1.1x1.8mm로 줄여
놓고 있었다. 글자를 지우니 bbox 20.5x32.9mm, 방위표가 8.7x14mm로 나온다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-31 15:07:14 +09:00
co-authored by Claude Opus 5
parent 8ae61af7dd
commit 6a2c5d9f7b
9 changed files with 50 additions and 139 deletions
@@ -534,11 +534,11 @@ def build_cross_drawing(
}
],
"layers": [
_layer(GROUND_LAYER_ID, "Existing Ground", locked=True),
_layer(DESIGN_LAYER_ID, "Design Plan"),
_layer(STRUCTURE_LAYER_ID, "Structure"),
_layer(ROCK_LAYER_ID, "Rock Boundary"),
_layer(CROSS_TABLE_LAYER_ID, "Quantity Table"),
_layer(FRAME_LAYER_ID, "Frame", locked=True),
_layer(GROUND_LAYER_ID, "원지반", locked=True),
_layer(DESIGN_LAYER_ID, "계획선"),
_layer(STRUCTURE_LAYER_ID, "구조물"),
_layer(ROCK_LAYER_ID, "암 경계선"),
_layer(CROSS_TABLE_LAYER_ID, "수량 산출표"),
_layer(FRAME_LAYER_ID, "도각", locked=True),
],
}
@@ -391,12 +391,12 @@ def build_watershed_drawing(
"format": DRAWING_FORMAT,
"entities": entities,
"layers": [
_layer(CONTOUR_LAYER_ID, "Contours", locked=True),
_layer(STREAM_LAYER_ID, "Streams", locked=True),
_layer(ROUTE_LAYER_ID, "Route"),
_layer(BASIN_LAYER_ID, "Drainage Basins"),
_layer(TABLE_LAYER_ID, "Basin Info"),
_layer(TITLE_LAYER_ID, "Title"),
_layer(FRAME_LAYER_ID, "Frame", locked=True),
_layer(CONTOUR_LAYER_ID, "등고선", locked=True),
_layer(STREAM_LAYER_ID, "계류", locked=True),
_layer(ROUTE_LAYER_ID, "노선"),
_layer(BASIN_LAYER_ID, "배수유역"),
_layer(TABLE_LAYER_ID, "유역 제원"),
_layer(TITLE_LAYER_ID, "표제"),
_layer(FRAME_LAYER_ID, "도각", locked=True),
],
}
@@ -675,10 +675,10 @@ def build_longitudinal_drawing(
"format": DRAWING_FORMAT,
"entities": entities,
"layers": [
_layer(GROUND_LAYER_ID, "Existing Ground", locked=True),
_layer(DESIGN_LAYER_ID, "Design Plan"),
_layer(LONG_GRID_LAYER_ID, "Graph Grid", locked=True),
_layer(LONG_TABLE_LAYER_ID, "Station Table"),
_layer(FRAME_LAYER_ID, "Frame", locked=True),
_layer(GROUND_LAYER_ID, "원지반", locked=True),
_layer(DESIGN_LAYER_ID, "계획선"),
_layer(LONG_GRID_LAYER_ID, "그래프 격자", locked=True),
_layer(LONG_TABLE_LAYER_ID, "측점표"),
_layer(FRAME_LAYER_ID, "도각", locked=True),
],
}
@@ -527,10 +527,10 @@ def build_mass_haul_drawing(
"format": DRAWING_FORMAT,
"entities": entities,
"layers": [
_layer(CURVE_LAYER_ID, "Mass Haul Curve"),
_layer(AXIS_LAYER_ID, "Graph Axis", locked=True),
_layer(BAND_LAYER_ID, "Haul Bands"),
_layer(TABLE_LAYER_ID, "Station Table"),
_layer(FRAME_LAYER_ID, "Frame", locked=True),
_layer(CURVE_LAYER_ID, "유토곡선"),
_layer(AXIS_LAYER_ID, "그래프 축", locked=True),
_layer(BAND_LAYER_ID, "운반 구간"),
_layer(TABLE_LAYER_ID, "측점표"),
_layer(FRAME_LAYER_ID, "도각", locked=True),
],
}
@@ -211,11 +211,11 @@ def build_cross_sheet(sheet: dict[str, Any], sections: list[dict[str, Any]]) ->
"entities": entities,
"cross_placements": placements,
"layers": [
_layer(GROUND_LAYER_ID, "Existing Ground", locked=True),
_layer(DESIGN_LAYER_ID, "Design Plan"),
_layer(STRUCTURE_LAYER_ID, "Structure"),
_layer(ROCK_LAYER_ID, "Rock Boundary"),
_layer(CROSS_TABLE_LAYER_ID, "Quantity Table"),
_layer(FRAME_LAYER_ID, "Frame", locked=True),
_layer(GROUND_LAYER_ID, "원지반", locked=True),
_layer(DESIGN_LAYER_ID, "계획선"),
_layer(STRUCTURE_LAYER_ID, "구조물"),
_layer(ROCK_LAYER_ID, "암 경계선"),
_layer(CROSS_TABLE_LAYER_ID, "수량 산출표"),
_layer(FRAME_LAYER_ID, "도각", locked=True),
],
}
@@ -1,9 +1,16 @@
import type {FC, MouseEvent} from 'react';
import type {Layer} from '../App.types.ts';
import {getNewLayer} from '../helpers/get-new-layer.ts';
import {getActiveLayerId, getEntities, getLayers, getSelectedEntities, setEntities, setSelectedEntityIds,} from '../state.ts';
import {Button} from './Button';
import {IconName} from './Icon/Icon.tsx';
import type { FC, MouseEvent } from 'react';
import type { Layer } from '../App.types.ts';
import { getNewLayer } from '../helpers/get-new-layer.ts';
import {
getActiveLayerId,
getEntities,
getLayers,
getSelectedEntities,
setEntities,
setSelectedEntityIds,
} from '../state.ts';
import { Button } from './Button';
import { IconName } from './Icon/Icon.tsx';
interface LayerManagerProps {
layers: Layer[];
@@ -152,9 +159,9 @@ export const LayerManager: FC<LayerManagerProps> = ({
))}
</div>
<Button
label="New layer"
label="새 도면층"
iconName={IconName.FolderPlus}
title="Create a new layer"
title="도면층을 새로 만든다"
onClick={(evt) => handleCreateNewLayer(evt)}
className="w-full mt-2"
/>
@@ -1,11 +1,11 @@
import type {Layer} from '../App.types.ts';
import {getLayers} from '../state.ts';
import type { Layer } from '../App.types.ts';
import { getLayers } from '../state.ts';
export function getNewLayer(): Layer {
return {
id: crypto.randomUUID(),
isLocked: false,
isVisible: true,
name: `New layer ${getLayers().length}${1}`,
name: `새 도면층 ${getLayers().length}${1}`,
};
}
+1 -1
View File
@@ -158,7 +158,7 @@ let layers: Layer[] = [
id: crypto.randomUUID(),
isLocked: false,
isVisible: true,
name: 'Default',
name: '기본',
},
];
@@ -1,103 +1,7 @@
{
"format": 6,
"source": "00_templete_compass.dxf",
"source": "00_templete_compass.dxf (원본 표제란 글자 제거)",
"entities": [
{
"id": "c369f176-bb8c-5443-9a30-13fc6d066777",
"type": "Text",
"lineColor": "#f5f7fa",
"lineWidth": 1,
"layerId": "-00.기본BOX TEXT",
"shapeData": {
"label": "편 입 용 지 도-2공구",
"basePoint": {
"x": 361.955095,
"y": 11.475749
},
"options": {
"textDirection": {
"x": 1.0,
"y": 0.0
},
"textAlign": "center",
"textColor": "#f5f7fa",
"fontSize": 2.5,
"fontFamily": "sans-serif"
}
}
},
{
"id": "6c0fec8e-6552-5fd7-b42e-6c5ba81706a7",
"type": "Text",
"lineColor": "#f5f7fa",
"lineWidth": 1,
"layerId": "-00.기본BOX TEXT",
"shapeData": {
"label": "25",
"basePoint": {
"x": 394.551355,
"y": 11.475749
},
"options": {
"textDirection": {
"x": 1.0,
"y": 0.0
},
"textAlign": "center",
"textColor": "#f5f7fa",
"fontSize": 2.5,
"fontFamily": "sans-serif"
}
}
},
{
"id": "eae5671b-6a91-5366-b4d0-79e78cbfd8ee",
"type": "Text",
"lineColor": "#f5f7fa",
"lineWidth": 1,
"layerId": "-00.기본BOX TEXT",
"shapeData": {
"label": "편 입 용 지 도-2공구",
"basePoint": {
"x": 210.910765,
"y": 272.575325
},
"options": {
"textDirection": {
"x": 1.0,
"y": 0.0
},
"textAlign": "center",
"textColor": "#f5f7fa",
"fontSize": 6.0,
"fontFamily": "sans-serif"
}
}
},
{
"id": "bed07227-3701-5adf-a87a-ccb03738be99",
"type": "Text",
"lineColor": "#f5f7fa",
"lineWidth": 1,
"layerId": "-00.기본BOX TEXT",
"shapeData": {
"label": "2,400",
"basePoint": {
"x": 228.696197,
"y": 11.102865
},
"options": {
"textDirection": {
"x": 1.0,
"y": 0.0
},
"textAlign": "left",
"textColor": "#f5f7fa",
"fontSize": 2.0,
"fontFamily": "sans-serif"
}
}
},
{
"id": "6d9397b2-28f9-534b-9b69-f309f7fe9846",
"type": "PolyLine",
@@ -1531,4 +1435,4 @@
"isLocked": false
}
]
}
}