OCC笔记:BRepMesh_IncrementalMesh的使用
1. 函数接口
2. 线性偏转与角度偏转
2.1. theLineDeflection:线性偏转
根据文档推导下
isRelative传入Standard_True时,theLineDeflection为相对值。
参看isRelative说明
//! @param isRelative if TRUE deflection used for discretization of
//! each edge will be * . Deflection
//! used for the faces will be the maximum deflection of their edges.
a对应圆心角,与推导的不一致,推导出来的a若是15度,则圆心角应该是30度,对应12条边。实际却大于12条,大概18条。occ提供的这个参数有点没搞懂,暂时就这样搁置这个问题吧。
2.2. theAngleDeflection: 角度偏转
Standard_Real angDeflection = TMP_PI * 60 / 180; //theta的一半为拆分边对应的圆心角,
假如对一圆面进行拆分
TMP_PI * 60 / 180; //表示是30度的圆心角,边数为360/30 = 12
TMP_PI * 120 / 180; //表示是60度的圆心角,边数为360/60 = 6
按文档推导下:
3.访问网格化信息
You can obtain information on the shape by first exploring it. To access triangulation of a face in the shape later, use BRepTool::Triangulation. To access a polygon, which is the approximation of an edge of the face, use BRepTool::PolygonOnTriangulation.