Algorithm to split self-intersected Path2D into several not self-intersected paths?

前端 未结 3 1865
眼角桃花
眼角桃花 2021-02-06 13:24

I need to get rid of self-intersections in a shape. Shape is constructed from an array of points, so all segments of that shape are lines. (only lines, no curves and arcs

3条回答
  •  独厮守ぢ
    2021-02-06 13:30

    If Area is not working for you, you could try using a GLUtessellator to decompose your Shape into a set of triangles, or (using the GL_LINE_LOOP option) just the boundary edges.

提交回复
热议问题