#pragma once #include #include namespace internal { struct fillet_config_t { double segment_ratio = 0.05 ;// 圆角切除量占相邻两段中较短段弦长的比例 double min_turn_angle_deg = 0.5; // 低于此角度(度)的衔接处视为共线,跳过 // 最小圆角半径。 double min_fillet_radius = 0.0; // 当锐角过尖(turn_angle > max_fillet_angle_deg), // 即使达到 min_fillet_radius 也无法避免自相交时的处理策略: // true → 跳过该顶点(保留原始尖角,不插入圆弧) // false → 用最大允许 trim 插入圆弧(会有轻微自相交,但尽力修复) bool is_axis = false; }; // 对 2D profile / axis 多段线的衔接顶点插入微小圆角弧,实现 G1 连续。 void insert_polyline_corner_fillets(const polyline_descriptor_t& profile, std::vector& out_points, std::vector& out_bulges, const fillet_config_t& cfg = {}); } // namespace internal