Commit Graph

14 Commits

Author SHA1 Message Date
minsung
0e4701de79 Sprint 36~39 — IFC Alignment/Camber + proc-macro 스캐폴딩 + 변단면 거더
## Sprint 36: IfcAlignment (IFC Phase 3b)
- write_straight_alignment(): 직선 horizontal(.LINE.) + 평지
  vertical(.CONSTANTGRADIENT.) 세그먼트 + IfcRelNests 계층.
- IfcAlignmentSegment × IfcAlignmentHorizontalSegment × IfcAlignmentVerticalSegment.
- Site aggregate 에 Bridge 와 Alignment 동시 포함.

## Sprint 37: IFC 거더 Camber 반영
- BridgeExportParams.camber_mid_mm 추가.
- camber > 0 일 때: 거더 1 개를 CAMBER_SEGMENTS(10) 세그먼트로 분할, 각 세그먼트
  Y 에 포물선 값 적용 → 곡선 거더 근사. Pset 는 첫 세그먼트에 한 번만 부착.
- viewer scene_params_to_ifc() 에서 camber_mid_mm 매핑.

## Sprint 38: cimery-macros 크레이트 (proc-macro 스캐폴딩)
- 신규 크레이트, proc-macro = true, deps: syn/quote/proc-macro2.
- #[derive(ParamSummary)] 구현:
  · 구조체 named field 의 PARAM_COUNT (usize) + PARAM_NAMES (&[&str]) 생성.
  · 선언 순서 보존, 빈 구조체 지원, tuple/enum 은 컴파일 에러.
- 테스트 3개 (tests/derive_test.rs).
- ADR-002 D 로드맵: #[param(unit, range, default)] 전면 attribute 는 후속.

## Sprint 39: 변단면 거더 (Variable Depth)
- SceneParams.variable_depth_mm (0~800mm) 추가.
- apply_variable_depth(mesh, z0, z1, max, girder_h):
  · lift(u) = 4·max·u·(span-u)/span²  (중앙에서 최대)
  · y_new = y + lift(u)·(1 - y/h)
  · 상면 y=h 는 고정, 소핏 y=0 을 최대 lift 만큼 올림. 연속교 중앙부
    web 축소 관례와 정합. camber 와 독립 조합 가능.
- build_bridge_scene / build_selectable_scene 거더 생성 루프에 각각 적용
  (거더 local 좌표계에서 먼저 → translate → camber 순).
- UI "변단면 (mm)" 슬라이더 (선형·기하 섹션).
- ProjectFile variable_depth_mm 필드 (default 0).

모든 테스트 통과: kernel 18 + ifc 20 + macros 3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 19:48:07 +09:00
minsung
693c95dc6f Sprint 35 — 뷰어 IFC 익스포트 연결 + Pset_BeamCommon
## 뷰어 통합
- `cimery-viewer` → `cimery-ifc` 의존성 추가.
- `project_file::scene_params_to_ifc()` 변환 함수:
  SceneParams 의 모든 파라미터(경간 수·교각 형식·skew·헌치·단면 종류·신축이음)
  를 BridgeExportParams 로 전부 매핑.
- egui 프로젝트 섹션에 "📤 IFC4X3 익스포트" 버튼.
  현재 파라미터 상태로 즉시 `projects/bridge.ifc` 생성.
- `project_file::default_ifc_path()` 헬퍼.

## Pset_BeamCommon (IFC Phase 3a)
- `write_pset_beam_common()`: 4개 속성
  · Reference (IFCIDENTIFIER) — 거더 라벨
  · Span (IFCLENGTHMEASURE) — mm
  · LoadBearing (IFCBOOLEAN) — .T.
  · IsExternal (IFCBOOLEAN) — .F.
- IFCRELDEFINESBYPROPERTIES 로 각 IFCBEAM 에 연결.
- `IfcSectionKind` public re-export (viewer 에서 직접 참조).

## 테스트
- pset_beam_common_attached_to_girders 추가. 17개 전체 통과.
- cargo check --workspace --features occt: 0 errors.

Phase 3 남은 로드맵:
- IfcAlignment + IfcLinearPlacement
- Camber 반영 (현재 직선 girder 만)
- Pset_BearingCommon, Pset_SlabCommon
- IfcElementAssembly 로 Pier(column+capbeam) 그룹화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 19:31:36 +09:00
minsung
567345e933 Sprint 34 — IFC4X3 Add2 익스포터 Phase 2
Phase 1(사각 profile·월드 원점) → Phase 2(정확 단면·skew·헌치·방호벽).

## 변경
### bridge_export.rs
- `IfcSectionKind` enum: PscI / SteelBox / Rectangle.
- `BridgeExportParams` 확장:
  · section_kind, skew_deg, haunch_depth, show_parapets, show_joints.
- `write_psc_i_profile()` 신설:
  · PSC-I 14점(top/bottom flange + web + haunch) 을
    `IFCARBITRARYCLOSEDPROFILEDEF` + `IFCPOLYLINE` 으로 출력.
  · 도심 중심화 (Y 를 h/2 만큼 아래로 평행이동) → beam 중심 배치와 정합.
  · start==end 점 복제로 profile close.
- `write_girder_profile()`: section_kind 따라 PSC-I / Rectangle 분기.
- `write_local_placement_skewed()`:
  · IFCAXIS2PLACEMENT3D RefDirection = (cos θ, 0, -sin θ) 로 Y축 회전 반영.
  · 교대·피어·받침에 적용. 거더·데크는 직선 유지(precast 관례).
- 헌치: deck Y = bearing_h + girder_h + haunch_depth + slab/2.
- 방호벽: IFCRAILING .GUARDRAIL. 좌/우 2개 (500×1200 × total_mm).

### 테스트
- psc_i_profile_is_used_by_default
- parapets_present_by_default / parapets_hidden_when_disabled
- rectangle_section_skips_psc_i
- skew_rotates_ref_direction (30° → cos30≈0.866 검증)
- haunch_moves_deck_up

16개 전체 통과.

Phase 3 로드맵(후속):
- IfcAlignment + IfcLinearPlacement (선형 기반 좌표)
- Camber 반영 (solid 변형 또는 여러 extrude 단면)
- Pset_BeamCommon·Pset_BearingCommon (Property Set)
- IfcElementAssembly 로 신축이음·격벽·피어(column+capbeam) 그룹화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 17:58:23 +09:00
minsung
7f14423bcd Sprint 33 — IFC4X3 Add2 익스포터 Phase 1 (cimery-ifc 신설)
P2 로드맵 (Gitea #4) 첫 단계. 교량·토목 현재 표준인 IFC4X3 Add2 로 익스포트.

## cimery-ifc 크레이트 구성
- src/guid.rs: IfcGloballyUniqueId 생성.
  UUIDv4 128비트 → buildingSMART base64 22자 인코딩.
- src/writer.rs: STEP Part21 텍스트 writer.
  IfcWriter(alloc/emit/write/finish), Ref(#N), lit, real, real3, ref_list.
  HEADER 블록(FILE_DESCRIPTION/FILE_NAME/FILE_SCHEMA='IFC4X3_ADD2') + DATA 블록.
- src/bridge_export.rs: 교량 하이레벨 API.
  BridgeExportParams(span·girder·slab·bearing 치수) + export_bridge() -> String.

## 생성 엔티티 (Phase 1)
계층:
  IfcProject
    └ IfcRelAggregates → IfcSite
        └ IfcRelAggregates → IfcBridge
            └ IfcRelContainedInSpatialStructure → elements[]

원소:
- IFCBEAM × (span_count × girder_count) — 거더
- IFCSLAB × 1 — 데크 슬래브 (전 구간 연속)
- IFCCOLUMN × (span_count-1) — 피어 기둥 (내부 지점만)
- IFCFOOTING × 2 — 교대 (양 끝)
- IFCBEARING × (span_count+1)×girder_count — IFC4X3 신규 엔티티

형상 단순화(Phase 1):
- IFCEXTRUDEDAREASOLID + IFCRECTANGLEPROFILEDEF 일률.
- Phase 2 에서 IFCARBITRARYCLOSEDPROFILEDEF 로 PSC-I 14점 단면 매핑 예정.

단위: IFCSIUNIT mm (+ radian·squareMetre·cubicMetre·second·kilogram).
배치: IfcLocalPlacement 월드 원점 기준 (선형·skew·camber 는 Phase 2).

## 테스트
10개 통과:
- guid: 22자 고정, 동일 UUID 동일 GUID, 문자셋 유효성.
- writer: shell 구조, REAL 포맷, ref_list 포맷.
- bridge_export: 단경간 핵심 엔티티 포함, 다경간 피어 개수, 거더 수 일치, STEP 구조.

## 통합
- workspace Cargo.toml: crates/ifc 추가.
- cimery-app: export_ifc_default IPC 커맨드 (tauri dialog .ifc save).
- main.rs invoke_handler 등록.

Phase 2 로드맵(후속 스프린트):
- IfcAlignment + IfcLinearPlacement (선형 좌표)
- 실제 단면 profile (PSC-I · SteelBox)
- Pset_BeamCommon·Pset_BearingCommon
- IfcPile·IfcExpansionJoint·IfcKerb(방호벽)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 17:02:51 +09:00
minsung
94ce89093f Sprint 31/32 — 헌치 + 속성 패널 카테고리 재정리
Sprint 31: Haunch (데크 헌치).
- SceneParams.haunch_depth (0~300mm, step 10mm).
- 거더 상부와 데크 soffit 사이 600mm×haunch_d×span 블록을 경간별·거더별
  자동 배치. COL_DECK 로 색상 통일.
- 데크 위치: girder_h + slab_thickness → girder_h + haunch_depth + slab_thickness.
  6군데(build_bridge_scene + build_selectable_scene 의 데크·신축이음·방호벽)
  일괄 수정.
- camber + skew 동시 적용.
- UI: "헌치 (mm)" 슬라이더.

Sprint 32: 속성 패널 재정리.
- 누적 11개 슬라이더가 한 섹션에 섞여 혼잡 → 5개 CollapsingHeader 분리:
  · 상부구조 (경간·거더 관련 5항목)
  · 바닥판 (슬래브·헌치)
  · 선형·기하 (경사각·솟음)
  · 하부구조 (교각 형식)
  · 추가 부재 (가로보·신축이음·격벽 — 기존 유지)
  · 표시 (선형·투영 — 기존 유지)
- ps!($ui, ...) 매크로 hygiene 수정: ui 명시적 매개변수화로 macro_rules
  기본 hygiene 의 외부 캡처 문제 회피.
- "경간" 라벨 중복(span_m vs span_count) 해소: "경간 길이"/"경간 수".

ProjectFile: haunch_depth 필드 추가 (default 0.0).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 15:19:00 +09:00
minsung
0013182835 Sprint 29/30 — 지점부 격벽 + 거더 솟음
Sprint 29: Diaphragm (지점부 격벽).
- SceneParams.show_diaphragms 토글 (default true).
- 모든 지점(교대+교각) 에서 인접 거더 사이 RC 벽 배치:
  · 두께(span 방향): 300mm
  · 높이: girder_h (거더 soffit ~ top)
  · 폭: spacing - 250mm (web clearance 양쪽 125mm)
  · 지점 Z 기준 중앙 배치, skew 회전 동시 적용
- build_bridge_scene + build_selectable_scene 양쪽 구현.
- COL_DIAPHRAGM 색상 추가 (concrete 계열).
- UI: "격벽 (Diaphragm)" 체크박스.

Sprint 30: Camber (거더 솟음).
- SceneParams.camber_mid_mm (0~200mm, step 5mm) 추가.
- apply_camber_mesh(mesh, z0, z1, mid_mm) 헬퍼:
  u = z - z0 ∈ [0, span], y_off = 4·mid·u·(span-u)/span² (포물선).
  지점(u=0 또는 u=span) 에서는 0, 중앙 u=span/2 에서 최대 mid.
- 거더·데크에 경간마다 독립 적용. 다경간 교량도 경간별 정확한 solog.
- UI: "솟음 (mm)" 슬라이더.

ProjectFile: show_diaphragms + camber_mid_mm 필드 (default 값으로 v2 호환).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 14:01:58 +09:00
minsung
471fac53b3 Sprint 27/28 — Skew + 방호벽 + 관련 메타 갱신
Sprint 27: 경사각(Skew) 지원.
- SceneParams.skew_deg (-30°~30°) 추가.
- rotate_y_around_z(mesh, rad, pivot_z) 헬퍼: Y축 중심, 임의 Z pivot 회전.
  정점·법선 동시 회전.
- 적용 대상: 교대·교각·받침·신축이음 (각 지점 pivot_z 기준).
- 거더·데크는 직선 유지 (precast 거더 스큐 교량의 일반 관례).
- UI: "경사각(°)" 슬라이더.

Sprint 28: 방호벽(Parapet) MVP.
- 데크 양 엣지(half_w, -half_w) 에 1200mm×500mm RC 박스 전 구간 연속 배치.
- Y 기준: 데크 상면 (girder_h + slab_thickness).
- 색: COL_ABUTMENT 재사용 (콘크리트 브라운).
- build_bridge_scene / build_selectable_scene 양쪽 추가.
  선택 가능 씬에서는 "방호벽 (좌/우)" 라벨.

ProjectFile v2: skew_deg 필드 (default 0.0).
PROGRESS.md: Sprint 25~28 정리.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 12:42:21 +09:00
minsung
824c18610b Sprint 23/24 — Tauri v2 앱 래핑 + salsa 0.16 증분 쿼리 백엔드
All checks were successful
Publish ParaWiki / build-and-deploy (push) Successful in 34s
Sprint 23: cimery-app을 Tauri v2 앱으로 전환.
- tauri.conf.json, capabilities/default.json, frontend/index.html 추가
- src/commands.rs: 7개 IPC 커맨드 (launch_viewer, 프로젝트 관리, USD/CSV 익스포트)
- 뷰어 사이드카: std::process::Command 방식 (PATH + exe-dir 탐색)
- release.yml: 3단계 멀티플랫폼 릴리스 워크플로로 교체

Sprint 24: cimery-incremental에 salsa 0.16 백엔드 추가.
- salsa_db.rs: BridgeQueryGroup + SalsaIncrementalDb<K>
- --features salsa-backend 로 활성화 (기본값: 수동 tracking, WASM 안전)
- IR 전 구조체 + Mesh + KernelError에 PartialEq/Eq 추가
- 테스트 20개 전부 통과 (수동 12 + salsa 8)
- cargo check --workspace 0 errors/warnings

기타: viewer/dsl 컴파일 경고 제거, wiki 실행 가이드 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 09:09:47 +09:00
minsung
1f9ca3a00f Sprint 14~22 — egui 리본 UI + OcctKernel B-rep + 가로보/신축이음 + 선형 좌표 + USD 익스포트 + WASM + CI/CD + 테스트 4층
Sprint 14: egui TopBottomPanel 리본 + CollapsingHeader SidePanel (상부구조·추가부재·선형·프로젝트)
Sprint 15: IncrementalDb 전 Feature 타입 확장 (girder→7종), dirty-tracking 20 unit tests
Sprint 16: Gitea + GitHub Actions CI/CD (check/test/clippy/fmt + 멀티플랫폼 릴리스)
Sprint 17: AlignmentTransform + AlignmentScene — 선형 국소 프레임 → 세계 좌표 변환
Sprint 18: OcctKernel 교각(16각형 기둥+코핑) + 교대(흉벽+푸팅+날개벽) B-rep
Sprint 19: CrossBeamIR + ExpansionJointIR — IR/DSL/kernel/scene 전 계층, sweep_profile_flat_x
Sprint 20: 테스트 4층 — Layer1 insta 스냅샷(7종), Layer2 기하 불변량(19), Layer3 두-커널(7), Layer4 proptest(7) — 61 tests pass
Sprint 21: cimery-usd PureRustKernel 실제 기하 변환 + BridgeExporter 증분 캐시
Sprint 22: viewer wasm feature + wasm-bindgen/web-sys + GitHub Actions Cloudflare Pages 배포

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 08:18:06 +09:00
minsung
0d21035050 PROGRESS: Sprint 4~8 완료 기록
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:55:52 +09:00
minsung
37221b9ca7 PROGRESS: OcctKernel B-rep 렌더 확인 기록
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 20:03:16 +09:00
minsung
0bc3f12688 OcctKernel 구현 — PSC-I B-rep sweep + BRepMesh 테셀레이션
- cimery-kernel/src/occt.rs: OcctKernel (--features occt 전용)
  - Workplane::xy().sketch()로 PSC-I 14-vertex 2D 프로파일 생성
  - Face::extrude(DVec3) → Solid (OCCT B-rep)
  - Mesher::try_new() + mesh() → 테셀레이션
  - cimery Mesh로 변환 (vertices/normals/indices)
  - 기타 Feature: PureRustKernel 위임
- kernel/Cargo.toml: glam 0.24 (opencascade-rs 동일 버전)
- cargo build --features occt 빌드 확인 완료

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 19:37:51 +09:00
minsung
62ddf3aea6 cimery Sprint 1 — Rust 워크스페이스 + 전 계층 파이프라인
8개 크레이트 구현, cargo test 32개 전부 통과:
- core: Mm/M 단위 newtype, UnitExt 리터럴, FeatureError
- ir: GirderIR + 전 단면 파라미터(PSC-I/U/SteelBox/PlateI) serde JSON
- dsl: Girder builder + 검증 (경간 범위·count·spacing)
- kernel: GeomKernel trait + StubKernel (box mesh, AABB)
- incremental: dirty-tracking IncrementalDb (salsa 업그레이드 경로 주석)
- evaluator: 상태 없는 IR→kernel 브리지
- usd: USDA 1.0 텍스트 익스포트 (CimeryBridgeAPI·GirderAPI schema)
- viewer: wgpu 22 + winit 0.30 컬러 삼각형 (Sprint 1 proof-of-concept)

Sprint 2 다음 단계:
- opencascade-rs로 StubKernel 교체 (실제 PSC-I sweep)
- viewer에서 Girder Mesh 렌더 + 카메라 orbit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 17:46:14 +09:00
minsung
3bd01e31c9 에이전트 협업 인프라 구축 — .claude/ 확장
All checks were successful
Publish ParaWiki / build-and-deploy (push) Successful in 29s
- PLAN.md · PROGRESS.md 도입: 병렬 에이전트 조정 지점
- CLAUDE.md 린화 + 에이전트 작업 흐름 섹션 (상세는 Output/guides/로 분리)
- Output/guides/cimery-dev-guide.md, obsidian-cli.md 신설
- Agents: cimery-architect-researcher, adr-drafter
- Commands: /plan, /progress, /adr, /research, /cimery-start
- Skill: plan-commit
- Hooks: raw/ 쓰기 차단, SessionStart PLAN/PROGRESS 주입,
  wiki/ADR 변경 시 log 갱신 알림, auto-approve (deny 훅 우선 유지)
- .gitignore: .claude/ 공유 자산 포함, 로컬 상태·바이너리만 유지 제외

Closes #3

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 17:21:11 +09:00