You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
927 B
22 lines
927 B
#pragma once
|
|
#include <vector>
|
|
#include <primitive_descriptor.h>
|
|
|
|
namespace internal
|
|
{
|
|
|
|
struct fillet_config_t {
|
|
double segment_ratio = 0.05 ;// 圆角切除量占相邻两段中较短段弦长的比例
|
|
double min_turn_angle_deg = 0.5; // 低于此角度(度)的衔接处视为共线,跳过
|
|
bool is_axis = false;
|
|
double max_fillet_turn_angle_deg = 135.0; // 超过此转角不做圆角
|
|
double min_fillet_radius = 1e-3; // 圆角半径下限
|
|
};
|
|
|
|
// 对 2D profile / axis 多段线的衔接顶点插入微小圆角弧,实现 G1 连续。
|
|
void insert_polyline_corner_fillets(const polyline_descriptor_t& profile,
|
|
std::vector<vector3d>& out_points,
|
|
std::vector<double>& out_bulges,
|
|
const fillet_config_t& cfg = {});
|
|
|
|
} // namespace internal
|