Hello. BRepTools will help you
BRepTools::Clean OCCT/src/BRepTools/BRepTools.hxx at master · Open-Cascade-SAS/OCCT
//! Removes all cached polygonal representation of the shape,
//! i.e. the triangulations of the faces of <S> and polygons on
//! triangulations and polygons 3d of the edges.
//! In case polygonal representation is the only available representation
//! for the shape (shape does not have geometry) it is not removed.
//! @param theShape [in] the shape to clean
//! @param theForce [in] allows removing all polygonal representations from the shape,
//! including polygons on triangulations irrelevant for the faces of the given shape.
Standard_EXPORT static void Clean (const TopoDS_Shape& theShape, const Standard_Boolean theForce = Standard_False);