Merge remote-tracking branch 'origin/sub_laptop_4' into sub_laptop_3

This commit is contained in:
2026-09-27 20:44:03 +09:00
52 changed files with 457 additions and 53 deletions
@@ -32,6 +32,10 @@ _BASIS_HEAD_STYLE = {
}
_NUMBER = re.compile(r"^구-(\d+)$")
_BAD_NAME = re.compile(r'[\\/:*?"<>|\x00-\x1f]|\.\.')
# 도각 없는 빈 CAD 문서의 기본 도면층 — 없으면 B07 CAD 가 못 엶("Cannot read properties
# of undefined (reading 'length')") · CAD 쪽도 없으면 새로 채우지만(2026-09-27 sub1 고침)
# 뿌리도 처음부터 채움
_BLANK_LAYER = {"id": "기본", "name": "기본", "isVisible": True, "isLocked": False}
# ponytail: 저장은 한 번에 하나(프로세스 안 잠금) · 서버를 여럿 띄우면 파일 잠금으로
_LOCK = threading.Lock()
@@ -158,7 +162,7 @@ def create_structure(column: str) -> dict[str, Any]:
"판": 1,
"열": column,
"도번": f"구-{number:02d}",
"도면": {"format": 6, "entities": []},
"도면": {"format": 6, "entities": [], "layers": [dict(_BLANK_LAYER)]},
}
atomic_write_json(path, doc)
ensure_basis(column)
@@ -45,7 +45,13 @@ function stubDoc(kind: Kind, name: string): unknown {
합계줄: [],
보기: {},
}
: { format: 6, entities: [] };
: {
format: 6,
entities: [],
// 기본 도면층 하나 — 없으면 B07 CAD 가 못 엶("Cannot read properties of
// undefined (reading 'length')", 2026-09-27 실측)
layers: [{ id: "기본", name: "기본", isVisible: true, isLocked: false }],
};
}
export interface SideOptions {