Replacement for Graphic3d_Group::Polygon with Graphic3d_TOP_CONVEX

I'm porting some old V6.5 code to 7.x and stumbled over the use of Graphic3d_Group::Polygon with the Graphic3d_TOP_CONVEX flag for which i cannot find a direct replacement. Debugging the 7.x version where i'm trying to use Graphic3d_ArrayOfPolygons showed that now GL_POLYGON is used which doesn't support convex polygons.

Is there a simple replacement or is the only option to manually triangulate? If so, is there a simple tesselator in occt which accepts point/vertex lists for such cases? What is the idiomatic way to do this?

Kirill Gavrilov's picture

You may try using BRepMesh_Delaun for meshing 2D polygons, like it is done in case of OBJ import (RWObj_Reader::triangulatePolygon()), for example.