Sprint 25/26 — 단면 분기 수정 + 다경간 + 피어 배치
Sprint 25: build_selectable_scene 의 SectionType::PscI 하드코딩 제거. - p.section_type 에 따라 PscI / SteelBox 분기 (build_bridge_scene 과 동일 로직). - 사용자가 단면 형식 전환 시 정상 반영. Sprint 26: 다경간 + 교각 배치 (ParaWiki 교각 wiki Phase 1 MVP). - SceneParams: span_count (1~5) + pier_type (SingleColumn/MultiColumn) 추가. - span_m 의미 변경: 전체 교량 길이 → 경간당 길이. total = span_m × span_count. - pier_ir_for_params() helper: 기본 사각 기둥·2m CSB·2.5m TB·5m column_height. - build_bridge_scene / build_selectable_scene: · 거더: 경간마다 독립 세트 (span_count × girder_count 개) · 데크 슬래브: 전 구간 연속 1개 · 받침: 모든 지점 (교대 2 + 교각 span_count-1) · 교각: 내부 지점 span_count-1 개 (새 기능) · 교대: 양 끝 (z=-800, z=total_mm) · 가로보: 경간마다 반복 · 신축이음: 모든 지점 (선택적) - build_background_scene + scene_extents: total_mm 기준으로 ground·alignment 길이 확장. - project_file: version=2, span_count·pier_type 필드 추가 (v1 호환 default 값). - UI ribbon: "경간 수" 슬라이더 + "교각 형식" T/π 선택. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,15 +30,22 @@ pub struct ProjectFile {
|
||||
pub cross_beam_interval_m: f64,
|
||||
#[serde(default = "default_true")]
|
||||
pub show_expansion_joints: bool,
|
||||
/// Sprint 26: 다경간
|
||||
#[serde(default = "default_span_count")]
|
||||
pub span_count: usize,
|
||||
#[serde(default = "default_pier_type")]
|
||||
pub pier_type: String, // "single" | "multi"
|
||||
}
|
||||
|
||||
fn default_true() -> bool { true }
|
||||
fn default_cross_beam_interval() -> f64 { 5.0 }
|
||||
fn default_span_count() -> usize { 1 }
|
||||
fn default_pier_type() -> String { "single".into() }
|
||||
|
||||
impl ProjectFile {
|
||||
pub fn from_params(name: &str, p: &SceneParams) -> Self {
|
||||
Self {
|
||||
version: 1,
|
||||
version: 2,
|
||||
name: name.to_owned(),
|
||||
span_m: p.span_m,
|
||||
girder_count: p.girder_count,
|
||||
@@ -53,6 +60,11 @@ impl ProjectFile {
|
||||
show_cross_beams: p.show_cross_beams,
|
||||
cross_beam_interval_m: p.cross_beam_interval_m,
|
||||
show_expansion_joints: p.show_expansion_joints,
|
||||
span_count: p.span_count,
|
||||
pier_type: match p.pier_type {
|
||||
cimery_core::PierType::MultiColumn => "multi".into(),
|
||||
_ => "single".into(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +83,11 @@ impl ProjectFile {
|
||||
show_cross_beams: self.show_cross_beams,
|
||||
cross_beam_interval_m: self.cross_beam_interval_m,
|
||||
show_expansion_joints: self.show_expansion_joints,
|
||||
span_count: self.span_count,
|
||||
pier_type: match self.pier_type.as_str() {
|
||||
"multi" => cimery_core::PierType::MultiColumn,
|
||||
_ => cimery_core::PierType::SingleColumn,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user