如何将三角孔贴片转换为曲面网格
How to convert a triangulated hole patch to a surface mesh?
我有一个带有顶点和三角形的三角形孔补丁。现在如何将其转换为曲面网格?
我正在尝试使用两个不同的补丁部分填充网格中的一个孔。我有边界上所有点的顶点位置(z=0 的点(。使用它们,我使用以下代码对孔进行了三角测量(来自 https://doc.cgal.org/latest/Polygon_mesh_processing/Polygon_mesh_processing_2triangulate_polyline_example_8cpp-example.html(
std::vector<PointCGAL> polyline;
Mesh::Property_map<vertex_descriptor, std::string> name;
Mesh::Property_map<vertex_descriptor, PointCGAL> location =
mesh1.points();
BOOST_FOREACH(vertex_descriptor vd, mesh1.vertices()) {
if (location[vd].z() < 0.00001)
{
std::cout << "on Boundary" << endl;
polyline.push_back(PointCGAL(location[vd].x(),
location[vd].y(), location[vd].z()));
}
std::cout << location[vd] << std::endl;
}
typedef CGAL::Triple<int, int, int> Triangle_int;
std::vector<Triangle_int> patch;
patch.reserve(polyline.size() - 2); // there will be exactly n-2
triangles in the patch
CGAL::Polygon_mesh_processing::triangulate_hole_polyline(
polyline,
std::back_inserter(patch));
看看函数 polygon_soup_to_polygon_mesh((
相关文章:
- OpenCascade:从 IGES 读取修剪曲面
- 使用对象文件读取三角形数据网格
- 如何从 Skia 路径几何体中获取网格?
- CGAL:如何创建填充边界曲线的曲面网格?
- 检查 2D 网格的某个元素是否与另一个元素共享对角线、水平线或垂直线
- 创建具有两个视口的Qt3D C++场景,其中显示适当的不同网格
- 如何从 3D 曲面网格中删除自相交三角形?
- 在均匀网格中处理碰撞
- 更改高度贴图,使其在 4x4 网格上显示 16 个 hieghtmap
- 用于查找网格中最短路径的算法
- 循环通过网格获取温度,但不知道如何告诉程序停止循环
- 使用 glvertex4i 传递网格面索引时的顶点着色器错误
- 如何使用 sdl2 快速绘制像素网格?
- 如何使用条件计算 3D 网格中从一个点到另一个点的所有路径
- 使用 MFC 的表/网格
- CGAL 曲面网格 - 修改顶点坐标
- 如何将三角孔贴片转换为曲面网格
- Tetgen:从曲面的给定三角形开始,在不改变曲面连接性的情况下创建新网格
- CGAL 3D曲面网格生成设置初始点
- 哪些库适用于三维曲面网格