|
|
|
@ -25,13 +25,13 @@ typedef enum { |
|
|
|
// double value; // Use 0 to represent an empty body
|
|
|
|
// } constant_descriptor_t;
|
|
|
|
|
|
|
|
// Plane descriptor
|
|
|
|
typedef struct { |
|
|
|
// Plane descriptor
|
|
|
|
typedef struct { |
|
|
|
//vector3d point; // The base point of the plane
|
|
|
|
//vector3d normal; // The normal of the plane
|
|
|
|
vector2d local_aabb_min; |
|
|
|
vector2d local_aabb_max; |
|
|
|
} plane_descriptor_t; |
|
|
|
vector2d local_aabb_min; |
|
|
|
vector2d local_aabb_max; |
|
|
|
} plane_descriptor_t; |
|
|
|
|
|
|
|
// Sphere descriptor
|
|
|
|
typedef struct { |
|
|
|
@ -156,10 +156,10 @@ inline constexpr cylinder_descriptor_t unit_cylinder{ |
|
|
|
/// @brief 单位正方形 profile
|
|
|
|
inline const polyline_descriptor_t unit_square_profile = [] { |
|
|
|
static const std::vector<vector3d> points = { |
|
|
|
//{-0.5, -0.5, 0.0},
|
|
|
|
//{0.5, -0.5, 0.0},
|
|
|
|
//{0.5, 0.5, 0.0},
|
|
|
|
//{-0.5, 0.5, 0.0}
|
|
|
|
{-0.5, -0.5, 0.0}, |
|
|
|
{0.5, -0.5, 0.0}, |
|
|
|
{0.5, 0.5, 0.0}, |
|
|
|
{-0.5, 0.5, 0.0} |
|
|
|
|
|
|
|
//{-1.5, -1.5, 0.0},
|
|
|
|
//{1.5, -1.5, 0.0},
|
|
|
|
@ -170,19 +170,19 @@ inline const polyline_descriptor_t unit_square_profile = [] { |
|
|
|
//{2.0, -0.430871, 0.902414 }, // 局部坐标: (-1, -1)
|
|
|
|
//{2.0, 0.430871, -0.902414} // 局部坐标: (1, -1)
|
|
|
|
|
|
|
|
{0.0, 0.430871, -0.902414}, |
|
|
|
{0.0, -0.430871, 0.902414 }, |
|
|
|
{2.0, 0.1, -0.6}, |
|
|
|
{2.0, 0.430871, -0.902414} |
|
|
|
//{0.0, 0.430871, -0.902414},
|
|
|
|
//{0.0, -0.430871, 0.902414 },
|
|
|
|
//{2.0, 0.1, -0.6},
|
|
|
|
//{2.0, 0.430871, -0.902414}
|
|
|
|
|
|
|
|
//{0.0, 0.430871, -0.902414}, // 局部坐标: (1, 1)
|
|
|
|
//{1.0, -0.430871, 0.902414 },
|
|
|
|
//{6.0, 0.430871, -0.902414} // 局部坐标: (1, -1)
|
|
|
|
}; |
|
|
|
// static const std::vector<double> bulges = {0.4, -0.8, 1.0, -0.5};
|
|
|
|
static const std::vector<double> bulges = {0.4, -0.8, 1.0, -0.5}; |
|
|
|
// static const std::vector<double> bulges = {-0.4, 0.8, 0.0, -0.5}; // polyline ERROR
|
|
|
|
// static const std::vector<double> bulges = {0.0, 0.0, -0.5, 0.0}; // helixline ERROR
|
|
|
|
static const std::vector<double> bulges = {0.0, 0.0, 1.0, 0.0}; // helixline ERROR
|
|
|
|
//static const std::vector<double> bulges = {0.0, 0.0, 1.0, 0.0}; // helixline ERROR
|
|
|
|
polyline_descriptor_t desc; |
|
|
|
desc.point_number = 4; |
|
|
|
desc.points = const_cast<vector3d*>(points.data()); |
|
|
|
@ -195,12 +195,12 @@ inline const polyline_descriptor_t unit_square_profile = [] { |
|
|
|
|
|
|
|
inline const std::vector<vector3d> unit_axis_points = { |
|
|
|
{0.0, 0.0, -0.5}, |
|
|
|
{0.0, 6.0, 6.0 } |
|
|
|
{1.0, 0.0, 1.0 } |
|
|
|
//{4.0, 0.0, 1.0}
|
|
|
|
//{4.0, 0.0, -1.0}
|
|
|
|
}; |
|
|
|
|
|
|
|
inline const std::vector<double> unit_axis_bulges = {0.0}; |
|
|
|
inline const std::vector<double> unit_axis_bulges = {0.0, 0.0}; |
|
|
|
|
|
|
|
inline const polyline_descriptor_t unit_polyline_axis = [] { |
|
|
|
polyline_descriptor_t desc; |
|
|
|
|