【发布时间】:2017-04-13 23:34:28
【问题描述】:
所以here 我们有一个带有签名面的多面体网格。但是如何将签名的面放入新的多面体网格中?简化:假设我们加载了一个 100 个面的网格,我们想从中挑选 50 个随机面并将它们放入一个新的网格中。如何在 CGAL 中做到这一点?
【问题讨论】:
标签: c++ boost geometry mesh cgal
所以here 我们有一个带有签名面的多面体网格。但是如何将签名的面放入新的多面体网格中?简化:假设我们加载了一个 100 个面的网格,我们想从中挑选 50 个随机面并将它们放入一个新的网格中。如何在 CGAL 中做到这一点?
【问题讨论】:
标签: c++ boost geometry mesh cgal
CGAL/Polygon_mesh_processing/connected_components.h 中有以下未记录的函数:
CGAL::internal::corefinement::extract_connected_components(
const Polyhedron& P,
const Adjacency_criterium& adjacent,
Output_iterator out);
Adjacency_criterium 是一个函数对象,如下所示:
struct AC_example{
bool
operator()(Polyhedron::Halfedge_handle h) const
{
bool incident_faces_in_the_same_component = .... ;
return incident_faces_in_the_same_component;
}
};
它必须为除补丁边框半边之外的所有部分返回 true。
Output_iterator是多面体的输出迭代器
在 CGAL 4.10 中,该函数移至 CGAL/internal/corefinemnt/connected_components.h。一个更好、更通用的功能正在开发中,应该会在即将发布的版本中发布。
【讨论】:
Output_iterator out 中可以包含什么? Polyhedron 有:faces_begin、halfedges_begin、planes_begin、points_begin - 我看不到一般的 output_begin 迭代器是什么意思?