diff --git a/plugins/3d/oce/loadmodel.cpp b/plugins/3d/oce/loadmodel.cpp index e60e311786..79ddca3ce9 100644 --- a/plugins/3d/oce/loadmodel.cpp +++ b/plugins/3d/oce/loadmodel.cpp @@ -80,6 +80,8 @@ #include <TDF_Tool.hxx> #include <TDataStd_Name.hxx> +#include <Standard_Version.hxx> + #include "plugins/3dapi/ifsg_all.h" @@ -1116,8 +1118,10 @@ bool processFace( const TopoDS_Face& face, DATA& data, SGNODE* parent, else S3D::AddSGNodeRef( vshape.GetRawPtr(), ocolor ); +#if OCC_VERSION_HEX < 0x070600 const TColgp_Array1OfPnt& arrPolyNodes = triangulation->Nodes(); const Poly_Array1OfTriangle& arrTriangles = triangulation->Triangles(); +#endif std::vector< SGPOINT > vertices; std::vector< int > indices; @@ -1126,14 +1130,22 @@ bool processFace( const TopoDS_Face& face, DATA& data, SGNODE* parent, for( int i = 1; i <= triangulation->NbNodes(); i++ ) { +#if OCC_VERSION_HEX < 0x070600 gp_XYZ v( arrPolyNodes(i).Coord() ); +#else + gp_XYZ v( triangulation->Node(i).Coord() ); +#endif vertices.emplace_back( v.X(), v.Y(), v.Z() ); } for( int i = 1; i <= triangulation->NbTriangles(); i++ ) { int a, b, c; +#if OCC_VERSION_HEX < 0x070600 arrTriangles( i ).Get( a, b, c ); +#else + triangulation->Triangle(i).Get(a, b, c); +#endif a--; if( reverse )