diff --git a/primitive_process/interface/subface/simple/extrude_polyline_side_face.hpp b/primitive_process/interface/subface/simple/extrude_polyline_side_face.hpp index b7b94a3..d0c39e6 100644 --- a/primitive_process/interface/subface/simple/extrude_polyline_side_face.hpp +++ b/primitive_process/interface/subface/simple/extrude_polyline_side_face.hpp @@ -9,8 +9,8 @@ namespace internal { // ==================== 前置声明:辅助函数 ==================== -paired_model_matrix compute_polyline_bottom_cap_matrix(const polyline_descriptor_t& desc); -paired_model_matrix compute_polyline_top_cap_matrix(const polyline_descriptor_t& desc); +paired_model_matrix compute_polyline_bottom_cap_matrix(const extrude_polyline_geometry_t& geom); +paired_model_matrix compute_polyline_top_cap_matrix(const extrude_polyline_geometry_t& geom); // ==================== Polyline 拉伸侧面 ==================== @@ -77,13 +77,14 @@ struct extrude_polyline_side_face_t : subface { internal::paired_model_matrix get_bottom_cap_matrix() const { assert(geometry_ptr); - return compute_polyline_bottom_cap_matrix(geometry_ptr->descriptor.axis); + // 传入完整几何对象,使 calculate_tangent() 能正确处理圆弧段 + return compute_polyline_bottom_cap_matrix(*geometry_ptr); } internal::paired_model_matrix get_top_cap_matrix() const { assert(geometry_ptr); - return compute_polyline_top_cap_matrix(geometry_ptr->descriptor.axis); + return compute_polyline_top_cap_matrix(*geometry_ptr); } }; diff --git a/primitive_process/src/subface/geometry/extrude_helixline_geometry.cpp b/primitive_process/src/subface/geometry/extrude_helixline_geometry.cpp index 1faab2d..2952aa1 100644 --- a/primitive_process/src/subface/geometry/extrude_helixline_geometry.cpp +++ b/primitive_process/src/subface/geometry/extrude_helixline_geometry.cpp @@ -31,13 +31,12 @@ void extrude_helixline_geometry_t::build() << "original profile points: " << profile_desc.point_number << ", after fillet: " << filleted_desc.point_number << "\n"; - + const auto& matrix_handle = this->axis_to_world.matrix(); const Eigen::Vector3d N = -matrix_handle.col(0); - const Eigen::Vector3d T = (matrix_handle.col(2) * this->axis_geom.height - + this->axis_geom.radius * this->axis_geom.total_theta * matrix_handle.col(1)) + const Eigen::Vector3d B = (this->axis_geom.height * matrix_handle.col(1) + - this->axis_geom.radius * this->axis_geom.total_theta * matrix_handle.col(2)) .normalized(); - const Eigen::Vector3d B = N.cross(T); // 构建 profile 几何数据(使用插入圆角后的 descriptor) aabb_t_dim<2> profile_aabb;