【问题标题】:How to split a Polyhedron mesh into a set of diferent Polyhedron having signed faces?如何将多面体网格拆分为一组具有签名面的不同多面体?
【发布时间】:2017-04-13 23:34:28
【问题描述】:

所以here 我们有一个带有签名面的多面体网格。但是如何将签名的面放入新的多面体网格中?简化:假设我们加载了一个 100 个面的网格,我们想从中挑选 50 个随机面并将它们放入一个新的网格中。如何在 CGAL 中做到这一点?

【问题讨论】:

    标签: c++ boost geometry mesh cgal


    【解决方案1】:

    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。一个更好、更通用的功能正在开发中,应该会在即将发布的版本中发布。

    【讨论】:

    • 太棒了!您能否提供最小的使用示例?并且还提供关于“补丁边界半边”在 3D 网格方面的含义的参考?
    • Output_iterator out 中可以包含什么? Polyhedron 有:faces_beginhalfedges_beginplanes_beginpoints_begin - 我看不到一般的 output_begin 迭代器是什么意思?
    • 也许我不明白你最初的问题。我的理解是,您想在模型中为每个段创建一个多面体。在这种情况下,output iterator 在这里收集多面体,并且补丁边界的半边是位于不同段的两个面之间的半边。
    猜你喜欢
    • 1970-01-01
    • 2010-12-22
    • 1970-01-01
    • 2014-03-10
    • 2015-10-23
    • 2015-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多