如何将多面体网格拆分为一组具有签名面的不同多面体?
How to split a Polyhedron mesh into a set of diferent Polyhedron having signed faces?
所以 here 我们有一个带有签名面的多面体网格。但是如何将签名的面孔放入新的多面体网格中呢?简单来说:假设我们加载了一个 100 面的网格,我们想从中随机挑选 50 个面并将它们放入一个新的网格中。如何在 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;
}
};
它必须 return 对于除补丁边界半边之外的所有边都为真。
Output_iterator
是 Polyhedron
的输出迭代器
在 CGAL 4.10 中,函数移动到 CGAL/internal/corefinemnt/connected_components.h
。一个更好、更通用的功能正在开发中,应该会在即将发布的版本中发布。
所以 here 我们有一个带有签名面的多面体网格。但是如何将签名的面孔放入新的多面体网格中呢?简单来说:假设我们加载了一个 100 面的网格,我们想从中随机挑选 50 个面并将它们放入一个新的网格中。如何在 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;
}
};
它必须 return 对于除补丁边界半边之外的所有边都为真。
Output_iterator
是 Polyhedron
在 CGAL 4.10 中,函数移动到 CGAL/internal/corefinemnt/connected_components.h
。一个更好、更通用的功能正在开发中,应该会在即将发布的版本中发布。