高级检索

带圆弧的广义多边形布尔运算

Boolean Operations on Generalized Polygons with Arcs

  • 摘要: 传统解决带圆弧的多边形布尔运算需要对圆弧进行离散,存在精度低、速度慢等问题。为提升运算速度和精度,文中提出基于扫描线算法直接对带圆弧的广义多边形执行布尔运算。首先在圆弧最高(低)点处插入分裂点,进行积极边排序和环绕数计算,通过奇偶填充规则确定输出区域;然后基于扫描线算法对2个输入图形进行逐层处理,在一个扫描区域内利用包围盒排序算法进行碰撞检测,快速排除无交的情况(加速比为1.52),完成交点计算;最后执行交点检测、交点处理、扫描区域顶部处理等步骤,得到布尔运算结果的广义多边形。对500个工业加工零件的测试实验表明,与现有算法相比,文中算法不仅精度更高,而且速度更快,在500个测试案例中加速比为3.01。

     

    Abstract: Traditional approaches to Boolean operations on polygons with arcs typically involve discretizing the arcs, leading to issues such as low precision and slow computation speeds. To improve both efficiency and accuracy, this paper proposes a method based on the scanline algorithm to directly perform Boolean operations on generalized polygons with arcs. Initially, we insert split points at the highest (or lowest) points of the arcs, sort active edges, and compute winding numbers to determine the output area using the even-odd fill rule. Subsequently, we process the two input shapes in a layer by layer fashion based on the scanline algorithm. Within a scan region, we employ the bounding box sorting algorithm for collision detection to quickly eliminate non-intersecting cases (with a speedup of 1.52) and complete intersection point calculations. Finally, we perform intersection point detection, intersection point processing, and top-of-scan region handling steps to obtain the resulting generalized polygon. Experimental tests conducted on 500 industrial machining parts demonstrate that the proposed algorithm achieves not only higher accuracy but also faster computation speeds compared to existing methods, with an average speedup of 3.01 in 500 test cases.

     

/

返回文章
返回