From 56f76cf178960bdc2e2a2b1356aa348cdbd738ed Mon Sep 17 00:00:00 2001 From: ahnyongjoo Date: Wed, 28 Oct 2026 12:25:51 +0900 Subject: [PATCH] =?UTF-8?q?feat(rebar):=20=EC=9A=B4=EA=B3=A1=EA=B5=90=20?= =?UTF-8?q?=EB=9A=9C=EA=BB=91=20=E3=84=B7=EC=B2=A0=EA=B7=BC=20B5=C2=B7B11?= =?UTF-8?q?=20=EB=8B=A4=EB=A6=AC=EB=A5=BC=20=EC=9D=B4=EC=9D=8C=EC=9E=A5=20?= =?UTF-8?q?J=EB=A1=9C=20=EC=A1=B0=EC=A0=95(=EC=88=98=EC=A0=958)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- Code/tools/ungok_cap_leg_resize.py | 100 +++++++++++++++++++++++++++ context-migration/OPEN_미해결목록.md | 1 + 2 files changed, 101 insertions(+) create mode 100644 Code/tools/ungok_cap_leg_resize.py diff --git a/Code/tools/ungok_cap_leg_resize.py b/Code/tools/ungok_cap_leg_resize.py new file mode 100644 index 0000000..dbcf3f0 --- /dev/null +++ b/Code/tools/ungok_cap_leg_resize.py @@ -0,0 +1,100 @@ +# -*- coding: utf-8 -*- +# Rhino(IronPython, execute_code)에서 실행. 운곡교 기초 뚜껑 ㄷ철근(B5, B11)의 다리 길이를 이음장 J로 바꾼다. +# 중심선(P1-RC-*)을 다시 만들고 같은 반지름의 파이프(P1-R-*)로 교체한다. 속성·이름·레이어는 그대로 둔다. +# 주의: execute_code는 모듈 변수가 함수에서 보이지 않으므로 함수 하나에 모두 넣고, 중첩 def·컴프리헨션을 쓰지 않는다. +# 호출: res = run({"B5": 1050, "B11": 580}, True) # True=시험(문서 변경 없음), False=적용 + + +def run(J_BY_MARK, DRY): + import math + import Rhino + import Rhino.Geometry as rg + d = Rhino.RhinoDoc.ActiveDoc + tol = d.ModelAbsoluteTolerance + atol = d.ModelAngleToleranceRadians + out = [] + curves = {} + breps = {} + for o in d.Objects: + n = o.Name or "" + if n.startswith("P1-RC-B5-") or n.startswith("P1-RC-B11-"): + curves[n] = o + elif n.startswith("P1-R-B5-") or n.startswith("P1-R-B11-"): + breps[n] = o + done = 0 + for name in sorted(curves.keys()): + cobj = curves[name] + mark = name.split("-")[2] + if mark not in J_BY_MARK: + continue + jlen = J_BY_MARK[mark] + bobj = breps.get(name.replace("P1-RC-", "P1-R-", 1)) + if bobj is None: + out.append("no brep " + name) + continue + crv = cobj.Geometry + oldlen = crv.GetLength() + vol = rg.VolumeMassProperties.Compute(bobj.Geometry).Volume + rr = math.sqrt(vol / (math.pi * oldlen)) + segs = crv.DuplicateSegments() + lines = [] + arcs = [] + for s in segs: + if isinstance(s, rg.LineCurve): + lines.append(s) + else: + arcs.append(s) + if len(lines) != 3 or len(arcs) != 2: + out.append("FAIL segs %s %d/%d" % (name, len(lines), len(arcs))) + continue + ok, arc = arcs[0].TryGetArc() + r = arc.Radius + leg1 = lines[0] + mid = lines[1] + leg2 = lines[2] + ok1, ta, tb = rg.Intersect.Intersection.LineLine(leg1.Line, mid.Line) + ok2, tc, te = rg.Intersect.Intersection.LineLine(mid.Line, leg2.Line) + p1 = mid.Line.PointAt(tb) + p2 = mid.Line.PointAt(tc) + if leg1.PointAtStart.DistanceTo(p1) > leg1.PointAtEnd.DistanceTo(p1): + s1 = leg1.PointAtStart + else: + s1 = leg1.PointAtEnd + if leg2.PointAtStart.DistanceTo(p2) > leg2.PointAtEnd.DistanceTo(p2): + s2 = leg2.PointAtStart + else: + s2 = leg2.PointAtEnd + u1 = s1 - p1 + u1.Unitize() + u2 = s2 - p2 + u2.Unitize() + old1 = s1.DistanceTo(p1) + old2 = s2.DistanceTo(p2) + q1 = p1 + u1 * jlen + q2 = p2 + u2 * jlen + if crv.PointAtStart.DistanceTo(q1) <= crv.PointAtStart.DistanceTo(q2): + pts = [q1, p1, p2, q2] + else: + pts = [q2, p2, p1, q1] + pl = rg.PolylineCurve(pts) + nc = rg.Curve.CreateFilletCornersCurve(pl, r, tol, atol) + if nc is None: + out.append("FILLET FAIL " + name) + continue + pipes = rg.Brep.CreatePipe(nc, rr, False, rg.PipeCapMode.Flat, True, tol, atol) + if not pipes or len(pipes) == 0: + out.append("PIPE FAIL " + name) + continue + if DRY: + out.append(str((name, round(oldlen, 1), round(nc.GetLength(), 1), round(rr, 2), round(r, 1), round(old1, 1), round(old2, 1)))) + return out + d.Objects.Replace(cobj.Id, nc) + d.Objects.Replace(bobj.Id, pipes[0]) + o2 = d.Objects.FindId(cobj.Id) + a = o2.Attributes + a.SetUserString("design_length", "%.3f" % (2.0 * 0 + pl.GetLength())) + a.SetUserString("leg_resize", "J=%d (50%% lap, fck27 fy500) 2026-10-28" % jlen) + o2.CommitChanges() + done += 1 + out.append("replaced %d" % done) + return out diff --git a/context-migration/OPEN_미해결목록.md b/context-migration/OPEN_미해결목록.md index 990f4f8..55d85c1 100644 --- a/context-migration/OPEN_미해결목록.md +++ b/context-migration/OPEN_미해결목록.md @@ -53,3 +53,4 @@ | 43 | 산외 마크별 대조 이미지 완료(R-26, 불일치 없음). 운곡·Ramp-A 는 DXF 에서 형식별 상세 그림 추출 후 작성. 엑셀 백업 하루 1개 규칙 적용(백업_중간본 폴더는 사용자가 확인 후 삭제 가능) | | 44 | 운곡·Ramp-A 마크별 대조 완료(R-27·R-28). 운곡 도면↔도면 오류 D-10(형식 그림 j ↔ 재료표 J 빈칸) 설계자 확인 대기. 산외·옥성 대조 이미지 도면 그림을 원본 DXF 렌더로 교체 예정 | | 45 | 옥성 도면 오류 D-11(C15·C17 갈고리 방향 미표기)·D-12(B10 j 6곳 vs 그림 2곳)·D-13(C14·C16 형상 그림 없음) + 운곡 D-10 — 설계자 확인 대기. 모델 수정9 의 갈고리 방향은 가정값 | +| 46 | 운곡 D-10 일부 반영(2026-10-28, 수정8): 도면에 J가 없는 뚜껑 ㄷ철근 B5·B11 다리를 한계상태 이음장 엑셀(fck27·fy500·피복100·50% 이음·직선 인장 양호)로 산정해 B5=1,050, B11=580으로 교체(32·28본, 중심선 B5 9,494→11,194, B11 9,329→10,289). 아직 미반영: B2·B6·B7·B8·B10·C12·C13·P2·P3 (이음 짝·종류 확정 필요). 이음장 엑셀 입력은 마크별 fy·간격 확인 필요 |