From 62f003d35aaa3475e4df28059984a579a46b0f01 Mon Sep 17 00:00:00 2001 From: ahnyongjoo Date: Wed, 28 Oct 2026 11:56:15 +0900 Subject: [PATCH] =?UTF-8?q?docs(rebar):=20=EC=9C=84=EC=B9=98=20=EC=95=88?= =?UTF-8?q?=EB=82=B4=20=EB=B0=8F=20Rhino=20=EC=A7=81=EC=A0=91=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=20=EB=8F=84=EA=B5=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- 00_위치안내.md | 18 ++++++++++++++++++ Code/tools/rhino_call.py | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 00_위치안내.md create mode 100644 Code/tools/rhino_call.py diff --git a/00_위치안내.md b/00_위치안내.md new file mode 100644 index 0000000..58f7ab7 --- /dev/null +++ b/00_위치안내.md @@ -0,0 +1,18 @@ +# Pier_T_rebar 위치 안내 (2026-10-28) + +기준 폴더: `D:\★Pier 자료\pier_v1\Pier_T_rebar` (이 아래만 작업·관리. 상위 pier_v1은 수정 금지) + +| 찾는 것 | 위치 | +|---|---| +| 작업 규칙·담당 범위·인수인계 | `CLAUDE.md`, `CLAUDE.local.md`, `HANDOFF.md` | +| Rhino 작업 배경·KDS 규칙 | `CLAUDE_rhino배경.md` | +| 철근 모델(.3dm)·검토 파일 (운곡·산외·옥성·Ramp-A) | `검토파일\<교량>\` (운곡교 모델: `검토파일\철근 모델랑 운곡교P1_바이브코딩\`) | +| 심수석님 검토본(복사본) | `심수석님 검토 파일\` | +| 4개교 공통사항·교량별 항목 합본(엑셀) | `검토파일\4개교_공통사항_종합.xlsx` | +| 철근 생성·검토 프로그램 | `Code\rebar_pipeline`, `Code\review_pipeline`, `Code\pier-program` | +| Rhino 서버 코드 | `Code\rhino_mcp` (Rhino 8 연결: `Rhino_MCP_연결실행.bat`) | +| Rhino 직접 호출 도구(MCP 도구가 없을 때) | `Code\tools\rhino_call.py` | +| 산출 문서 | `DOC\01_기획 … 06_보고서` | +| 날짜별 관리리스트(이전·변경 기록) | `DOC\04_실행\실행_관리리스트_*.xlsx` | +| 미해결 목록(OPEN)·메모리 사본 | `context-migration\` | +| 백업·되돌리기 자료 | `backup\` (Git 제외) | diff --git a/Code/tools/rhino_call.py b/Code/tools/rhino_call.py new file mode 100644 index 0000000..6b34e83 --- /dev/null +++ b/Code/tools/rhino_call.py @@ -0,0 +1,37 @@ +r"""Rhino 소켓 서버(포트 9876)에 직접 명령을 보낸다. MCP 도구가 세션에 없을 때 쓴다. + +사용: python rhino_call.py get_scene_info + python rhino_call.py execute_code "" + python rhino_call.py execute_code @파일경로.py +""" +import json +import socket +import sys + + +def call(cmd_type, params=None, host="127.0.0.1", port=9876, timeout=300): + with socket.create_connection((host, port), timeout=timeout) as s: + s.sendall(json.dumps({"type": cmd_type, "params": params or {}}).encode("utf-8")) + buf = b"" + while True: + chunk = s.recv(1 << 20) + if not chunk: + break + buf += chunk + try: + return json.loads(buf.decode("utf-8")) + except ValueError: + continue + return json.loads(buf.decode("utf-8")) + + +if __name__ == "__main__": + sys.stdout.reconfigure(encoding="utf-8") + t = sys.argv[1] + p = {} + if t == "execute_code": + code = sys.argv[2] + if code.startswith("@"): + code = open(code[1:], encoding="utf-8").read() + p = {"code": code} + print(json.dumps(call(t, p), ensure_ascii=False, indent=1)[:6000])