// 查询点集中到指定面最近的点
static tag_t GetMinDistPoint(tag_t face, std::vector<tag_t>& points)
{
double dist = DBL_MAX;
double faceCenter[3] = { 0.0, 0.0, 0.0 };
GetFaceCenter(face, faceCenter);
tag_t minDistFace = NULL_TAG;
for (const auto& it : points)
{
double deltaDist = 0.0;
double pointCoord[3] = { 0.0, 0.0, 0.0 };
UF_CURVE_ask_point_data(it, pointCoord);
UF_VEC3_distance(faceCenter, pointCoord, &deltaDist);
if (deltaDist - dist < -0.001)
{
dist = deltaDist;
minDistFace = it;
}
}
return minDistFace;
}