g = {} SCR = r"C:\Users\User\AppData\Local\Temp\claude\D--Rhino-MCP-rhino-mcp-main\f46b47bc-9105-4079-9b62-fcbee31b26ae\scratchpad" exec(open(SCR + r"\cap.py", encoding="utf-8").read(), g) import scriptcontext as sc import io, json # 대표 철근 bbox want = ["P1-R-C8-x-1425", "P1-R-C9-x-1425L", "P1-R-C10-x+1275", "P1-R-C1-y+1525", "P1-R-C14-z18546", "P1-R-C18-x+575z18546", "P1-R-C15-z18421y+977.5", "P1-R-C17-z19796y+977.5"] bbs = {} for o in sc.doc.Objects: if o.Attributes.Name in want: bb = o.Geometry.GetBoundingBox(True) bbs[o.Attributes.Name] = [bb.Min.X, bb.Min.Y, bb.Min.Z, bb.Max.X, bb.Max.Y, bb.Max.Z] shots = [] CP = ["P1::코핑"] # O1 UM: 기초 철근 (조립용 철근 UM 없음) shots.append({"file": "O1.png", "layers": ["P1::철근::기초"], "solids": ["P1::기초"], "view": "Persp", "cam": [0, 0, 13300, 9500, -11500, 17500], "box": [-4800, -4800, 12100, 4800, 4800, 14400]}) # O2 j: C1~C6 정면 shots.append({"file": "O2.png", "layers": ["P1::철근::코핑::C%d" % i for i in range(1, 7)], "solids": CP, "view": "Front", "box": [-6700, -1700, 18100, 6700, 1700, 21300]}) # O3 C7: 바깥 2본(y±1525) / 보통 1본 shots.append({"file": "O3a.png", "layers": ["P1::철근::코핑::C7"], "names": ["y+1525", "y-1525"], "solids": CP, "view": "Front", "box": [-6700, -1700, 18100, 6700, 1700, 21300]}) shots.append({"file": "O3b.png", "layers": ["P1::철근::코핑::C7"], "names": ["C7-y+1000"], "solids": CP, "view": "Front", "box": [-6700, -1700, 18100, 6700, 1700, 21300]}) # O4 C8 스터럽: 측면 (Y-Z) shots.append({"file": "O4.png", "layers": ["P1::철근::코핑::C8"], "names": ["x-1425"], "solids": CP, "view": "Right", "box": [-1800, -1700, 18100, 1800, 1700, 21300]}) shots.append({"file": "O4b.png", "layers": ["P1::철근::코핑::C9"], "names": ["x-1425L"], "solids": CP, "view": "Right", "box": [-1800, -1700, 18100, 1800, 1700, 21300]}) # O5 C14~C17 평면 shots.append({"file": "O5.png", "layers": ["P1::철근::코핑::C%d" % i for i in (14, 15, 16, 17)], "solids": CP, "view": "Top", "box": [-6700, -1800, 18100, 6700, 1800, 21300]}) shots.append({"file": "O5b.png", "layers": ["P1::철근::코핑::C15", "P1::철근::코핑::C17"], "solids": CP, "view": "Front", "box": [-6700, -1800, 18100, 6700, 1800, 21300]}) # O6 C18 U형 shots.append({"file": "O6.png", "layers": ["P1::철근::코핑::C18"], "names": ["x+575z18546"], "solids": CP, "view": "Right", "box": [-1800, -1700, 18100, 1800, 1700, 21300]}) # O7 C8 굽힘 확대 b = bbs["P1-R-C8-x-1425"] shots.append({"file": "O7.png", "layers": ["P1::철근::코핑::C8"], "names": ["x-1425"], "solids": CP, "view": "Right", "box": [b[0] - 50, b[4] - 450, b[5] - 450, b[3] + 50, b[4] + 50, b[5] + 50]}) # O8 P3·P4 이음 링 (평면) shots.append({"file": "O8.png", "layers": ["P1::철근::기둥::P3", "P1::철근::기둥::P4"], "solids": ["P1::기둥"], "view": "Top", "box": [-1500, -1500, 14300, 1500, 1500, 18200]}) for s in shots: s['mode'] = 'Ghosted' out = [] for s in shots: try: out.append(g["run"](s)) except Exception as e: out.append("ERR " + s["file"] + " " + str(e)) g["restore"]() io.open(SCR + r"\ok_shots_log.txt", "w", encoding="utf-8").write("\n".join(out) + "\n" + json.dumps(bbs))