chore(rebar): Pier_T_rebar 작업 폴더 초기 구성 및 외부 의존 파일 통합
- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환 - Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용 - pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관) - worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md) - D:\Rhino-MCP 경로 참조를 새 위치로 치환 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
964a841de1
3978 files changed
+58013356
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import sys; sys.path.insert(0,"./pylib"); sys.stdout.reconfigure(encoding='utf-8')
|
||||
import rhino3dm, numpy as np, math
|
||||
m=rhino3dm.File3dm.Read('m.3dm'); byidx={l.Index:l.FullPath for l in m.Layers}
|
||||
L=('P1::받침대좌','P1::받침패드','P1::교량받침','P1::솔플레이트')
|
||||
res={}
|
||||
for o in m.Objects:
|
||||
p=byidx.get(o.Attributes.LayerIndex)
|
||||
if p not in L: continue
|
||||
g=o.Geometry
|
||||
pts=[]
|
||||
try:
|
||||
for fi in range(len(g.Faces)):
|
||||
k=g.Faces[fi].GetMesh(rhino3dm.MeshType.Any)
|
||||
if k is None: continue
|
||||
pts+= [(v.X,v.Y,v.Z) for v in k.Vertices]
|
||||
except Exception as e:
|
||||
bb=g.GetBoundingBox(); pts=[(bb.Min.X,bb.Min.Y,bb.Min.Z),(bb.Max.X,bb.Max.Y,bb.Max.Z)]
|
||||
P=np.array(pts)
|
||||
xy=P[:,:2]-P[:,:2].mean(axis=0)
|
||||
# find rotation minimizing bbox area
|
||||
best=None
|
||||
for ang in np.arange(-10,10.01,0.05):
|
||||
a=math.radians(ang); R=np.array([[math.cos(a),-math.sin(a)],[math.sin(a),math.cos(a)]])
|
||||
q=xy@R.T; w=q[:,0].max()-q[:,0].min(); h=q[:,1].max()-q[:,1].min()
|
||||
if best is None or w*h<best[0]: best=(w*h,ang,w,h)
|
||||
res.setdefault(p,[]).append((o.Attributes.Name,round(best[2],1),round(best[3],1),round(best[1],2),round(P[:,2].min(),1),round(P[:,2].max(),1),round(P[:,0].mean()),round(P[:,1].mean())))
|
||||
for p in L:
|
||||
print('=====',p)
|
||||
for r in sorted(res.get(p,[]),key=lambda r:r[0]): print(' ',r)
|
||||
Reference in new issue
Block a user