From 13b1c8dfe8f88b8d09bc54950803a65e1d770e0f Mon Sep 17 00:00:00 2001 From: minsung Date: Tue, 14 Apr 2026 20:15:51 +0900 Subject: [PATCH] =?UTF-8?q?abutment:=20X/Z=20=EB=B0=A9=ED=96=A5=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=E2=80=94=20=ED=9D=89=EB=B2=BD=EC=9D=B4=20?= =?UTF-8?q?=EA=B2=BD=EA=B0=84=EC=97=90=20=EC=88=98=EC=A7=81=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=B0=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kernel/abutment.rs: - 흉벽(breast wall): X=횡단(bw_w), Y=높이(bw_h), Z=두께(bw_t) — 올바른 방향 - 기초(footing): X=횡단(ft_w), Y=두께(ft_t), Z=경간방향(ft_l) - 날개벽(wing wall): ±X 방향으로 연장 viewer/lib.rs: unused imports 제거 (경고 해소) Co-Authored-By: Claude Opus 4.6 (1M context) --- cimery/crates/kernel/src/abutment.rs | 48 ++++++++++++++++++++-------- cimery/crates/viewer/src/lib.rs | 3 -- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/cimery/crates/kernel/src/abutment.rs b/cimery/crates/kernel/src/abutment.rs index 68c4d25..e2cc595 100644 --- a/cimery/crates/kernel/src/abutment.rs +++ b/cimery/crates/kernel/src/abutment.rs @@ -20,27 +20,49 @@ pub fn build_abutment_mesh(ir: &AbutmentIR) -> Result { let mut parts: Vec = Vec::new(); - // Breast wall: along transverse (Z), thickness along span (X), height (Y) - parts.push(sweep::centred_box(0.0, bw_h * 0.5, bw_t * 0.5, bw_h * 0.5, bw_w)); - - // Footing: below grade, spans along X (span direction) + // Coordinate convention (bridge): X=transverse, Y=vertical, Z=along span + // + // Breast wall: WIDE along X (bw_w), TALL along Y (bw_h), THIN along Z (bw_t) + // → profile in XY plane, swept bw_t along Z { + let hw = bw_w * 0.5; let profile = vec![ - [-ft_l * 0.5, -ft_t], - [ ft_l * 0.5, -ft_t], - [ ft_l * 0.5, 0.0 ], - [-ft_l * 0.5, 0.0 ], + [-hw, 0.0 ], + [ hw, 0.0 ], + [ hw, bw_h], + [-hw, bw_h], ]; - parts.push(sweep::sweep_profile_flat(&profile, ft_w)); + parts.push(sweep::sweep_profile_flat(&profile, bw_t)); } - // Wing walls (left and right) - for side in [&ir.wing_wall_left, &ir.wing_wall_right] { + // Footing: WIDE along X (ft_w), thin along Y (ft_t), LENGTH along Z (ft_l) + // → profile in XY plane, swept ft_l along Z + { + let hw = ft_w * 0.5; + let profile = vec![ + [-hw, -ft_t], + [ hw, -ft_t], + [ hw, 0.0 ], + [-hw, 0.0 ], + ]; + parts.push(sweep::sweep_profile_flat(&profile, ft_l)); + } + + // Wing walls: extend transversely (±X) from abutment ends. + // Left wing: from X = -bw_w/2 extending further in -X + // Right wing: from X = +bw_w/2 extending further in +X + for (side, sign) in [(&ir.wing_wall_left, -1.0_f32), (&ir.wing_wall_right, 1.0_f32)] { let wl = side.length as f32; let wh = side.height as f32; let wt = side.thickness as f32; - // Simplified: vertical rectangle, oriented in XY, length along Z - parts.push(sweep::centred_box(0.0, wh * 0.5, wt * 0.5, wh * 0.5, wl)); + // Profile in XY: length wl, height wh; swept wt along Z + let x_start = sign * bw_w * 0.5; + let x_end = x_start + sign * wl; + let (xl, xr) = if x_start < x_end { (x_start, x_end) } else { (x_end, x_start) }; + let profile = vec![ + [xl, 0.0], [xr, 0.0], [xr, wh], [xl, wh], + ]; + parts.push(sweep::sweep_profile_flat(&profile, wt)); } Ok(sweep::merge_meshes(parts)) diff --git a/cimery/crates/viewer/src/lib.rs b/cimery/crates/viewer/src/lib.rs index 79ca973..67f6afa 100644 --- a/cimery/crates/viewer/src/lib.rs +++ b/cimery/crates/viewer/src/lib.rs @@ -24,13 +24,10 @@ use winit::{ window::{Window, WindowId}, }; use wgpu::util::DeviceExt; -use cimery_core::{MaterialGrade, SectionType}; -use cimery_ir::{FeatureId, GirderIR, PscISectionParams, SectionParams}; #[cfg(feature = "occt")] use cimery_kernel::OcctKernel; #[cfg(not(feature = "occt"))] use cimery_kernel::PureRustKernel; -use cimery_kernel::GeomKernel; use camera::{Camera, StandardView}; use glam;