diff --git a/plugins/3d/oce/loadmodel.cpp b/plugins/3d/oce/loadmodel.cpp index 4baaeabeca..c88496a414 100644 --- a/plugins/3d/oce/loadmodel.cpp +++ b/plugins/3d/oce/loadmodel.cpp @@ -71,6 +71,8 @@ #include #include +#include + #include "plugins/3dapi/ifsg_all.h" // log mask for wxLogTrace @@ -865,8 +867,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; @@ -875,14 +879,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.push_back( SGPOINT( 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 )