abutment: X/Z 방향 수정 — 흉벽이 경간에 수직으로 배치
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) <noreply@anthropic.com>
This commit is contained in:
@@ -20,27 +20,49 @@ pub fn build_abutment_mesh(ir: &AbutmentIR) -> Result<Mesh, KernelError> {
|
||||
|
||||
let mut parts: Vec<Mesh> = 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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user