fix(B07): 유역도에서 노선을 살리고 방위표·정보표 배치와 절취면을 정리한다
노선이 유역 해칭 아래에 깔려 보이지 않았다. polyline_entity에 width를 더해 노선만 굵게(3) 그리고, 그리기 순서를 해칭·정보표 다음으로 옮긴다. bbox 계산에는 그대로 포함시켜 오른쪽 칸 위치는 흔들리지 않는다. 오른쪽 칸을 방위표(맨 위) → 유역 정보표(아래로 쌓기) 순으로 바꾸고 방위표를 14mm에서 26mm로 키운다. 도면 오른쪽 위 구석에 따로 놓던 옛 배치는 걷어낸다. 등고선·세류선 절취가 경계 바깥 점을 하나씩 물고 나와 외곽이 들쭉날쭉했다. Liang-Barsky 선분 절취로 바꿔 끝점이 경계 위에 정확히 놓이게 하고, 그만큼 두었던 물림 여유(_CLIP_SLACK 14mm)를 없앤다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -60,12 +60,13 @@ def _line_entity(
|
||||
end: tuple[float, float],
|
||||
layer_id: str,
|
||||
color: str,
|
||||
width: int = 1,
|
||||
) -> dict[str, Any]:
|
||||
return {
|
||||
"id": str(uuid5(_ENTITY_NS, seed)),
|
||||
"type": "Line",
|
||||
"lineColor": color,
|
||||
"lineWidth": 1,
|
||||
"lineWidth": width,
|
||||
"layerId": layer_id,
|
||||
"shapeData": {
|
||||
"startPoint": {"x": start[0], "y": start[1]},
|
||||
@@ -81,6 +82,7 @@ def polyline_entity(
|
||||
color: str,
|
||||
suffix: str = "",
|
||||
dash: list[int] | None = None,
|
||||
width: int = 1,
|
||||
) -> dict[str, Any] | None:
|
||||
"""점열을 openwebcad PolyLine(자식 Line 묶음)으로 직렬화한다 (점 2개 미만이면 None)."""
|
||||
if len(points) < 2:
|
||||
@@ -89,7 +91,7 @@ def polyline_entity(
|
||||
children = []
|
||||
for index in range(len(points) - 1):
|
||||
child = _line_entity(
|
||||
f"{seed_base}:{index}", points[index], points[index + 1], layer_id, color
|
||||
f"{seed_base}:{index}", points[index], points[index + 1], layer_id, color, width
|
||||
)
|
||||
if dash:
|
||||
child["lineDash"] = dash
|
||||
|
||||
Reference in New Issue
Block a user