简述思路
借助CGAL几何库,分为以下步骤:
- 曲面为surface mesh类型,因为要polygon processing接口,其他格式可以用copy_face_graph转换;
- 利用oriented_bounding_box求出有向bbox,参数加上use_convex_hull=true进行优化;
- 根据bbox求出mesh的法向量;
- 定义挤压处理的数据结构;
- 调用extrude_mesh返回。
问题
- 挤压处理的数据结构可以自行定义,接口是给上下曲面挤压方向;
接口原型
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>