Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package OpenSceneGraph for openSUSE:Factory checked in at 2022-07-05 12:09:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/OpenSceneGraph (Old) and /work/SRC/openSUSE:Factory/.OpenSceneGraph.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "OpenSceneGraph" Tue Jul 5 12:09:52 2022 rev:21 rq:986744 version:3.6.5 Changes: -------- --- /work/SRC/openSUSE:Factory/OpenSceneGraph/OpenSceneGraph.changes 2022-04-30 22:53:18.296286523 +0200 +++ /work/SRC/openSUSE:Factory/.OpenSceneGraph.new.1548/OpenSceneGraph.changes 2022-07-05 12:10:26.748639944 +0200 @@ -1,0 +2,6 @@ +Mon Jul 4 22:32:11 UTC 2022 - Stefan Br??ns <[email protected]> + +- Fix build with OpenCASCADE 7.6, add + 0001-Use-non-deprecated-methods-to-access-OpenCascade-Tri.patch + +------------------------------------------------------------------- New: ---- 0001-Use-non-deprecated-methods-to-access-OpenCascade-Tri.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ OpenSceneGraph.spec ++++++ --- /var/tmp/diff_new_pack.kTCl30/_old 2022-07-05 12:10:27.180640564 +0200 +++ /var/tmp/diff_new_pack.kTCl30/_new 2022-07-05 12:10:27.184640570 +0200 @@ -51,6 +51,8 @@ # PATCH-FIX-OPENSUSE - fix build with asio >= 1.14.0, https://github.com/openscenegraph/OpenSceneGraph/issues/921 Patch0: 0001-Replace-boost-bind-usage-with-std-bind.patch Patch1: 0002-Replace-obsoleted-asio-basic_stream_socket-get_io_se.patch +# PATCH-FIX-UPSTREAM - Fix build with OCCT 7.6 +Patch2: 0001-Use-non-deprecated-methods-to-access-OpenCascade-Tri.patch BuildRequires: cmake BuildRequires: curl-devel BuildRequires: ffmpeg-devel @@ -216,6 +218,7 @@ %patch0 -p1 %patch1 -p1 %endif +%patch2 -p1 for file in *.md *.txt; do sed -i "s/\r//g" "$file" ++++++ 0001-Use-non-deprecated-methods-to-access-OpenCascade-Tri.patch ++++++ >From 54a2d77d56a7d459315cef6de46c853eefc3def4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> Date: Tue, 5 Jul 2022 00:23:38 +0200 Subject: [PATCH] Use non-deprecated methods to access OpenCascade Triangulation elements The Triangles() and Nodes() accessors have been deprecated in favor of the Triangle(index) and Node(index) methods, available since OCC 7.2.0, i.e. for over 5 years. The Nodes() method has been removed with OCC 7.6.0, and Triangles() is also slated for removal (currently). Use the non-deprecated methods, and also fix the types of the index variables to Standard_Integer. --- .../OpenCASCADE/ReaderWriterOpenCASCADE.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp index 91a142200..1b0198d90 100644 --- a/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp +++ b/src/osgPlugins/OpenCASCADE/ReaderWriterOpenCASCADE.cpp @@ -168,7 +168,6 @@ osg::ref_ptr<osg::Geometry> ReaderWritterOpenCASCADE::OCCTKReader::_createGeomet // create one osg primitive set osg::ref_ptr<osg::DrawElementsUInt> triangleStrip = new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES, 0); - unsigned int noOfTriangles = 0; osg::ref_ptr<osg::Geometry> geom = new osg::Geometry; @@ -204,14 +203,14 @@ osg::ref_ptr<osg::Geometry> ReaderWritterOpenCASCADE::OCCTKReader::_createGeomet Handle (Poly_Triangulation) triangulation = BRep_Tool::Triangulation(face, location); if (!triangulation.IsNull()) { - int noOfNodes = triangulation->NbNodes(); + Standard_Integer noOfNodes = triangulation->NbNodes(); // Store vertices. Build vertex array here - for(int j = 1; j <= triangulation->NbNodes(); j++) + for (Standard_Integer j = 1; j <= triangulation->NbNodes(); j++) { // populate vertex list // Ref: http://www.opencascade.org/org/forum/thread_16694/?forum=3 - gp_Pnt pt = (triangulation->Nodes())(j).Transformed(transformation * location.Transformation()); + gp_Pnt pt = triangulation->Node(j).Transformed(transformation * location.Transformation()); vertexList->push_back(osg::Vec3(pt.X(), pt.Y(), pt.Z())); // populate color list @@ -221,25 +220,21 @@ osg::ref_ptr<osg::Geometry> ReaderWritterOpenCASCADE::OCCTKReader::_createGeomet } } - /// now we need to get face indices for triangles - // get list of triangle first - const Poly_Array1OfTriangle& triangles = triangulation->Triangles(); - //No of triangles in this triangulation - noOfTriangles = triangulation->NbTriangles(); + Standard_Integer noOfTriangles = triangulation->NbTriangles(); Standard_Integer v1, v2, v3; - for (unsigned int j = 1; j <= noOfTriangles; j++) + for (Standard_Integer j = 1; j <= noOfTriangles; j++) { /// If face direction is reversed then we add verticews in reverse order /// order of vertices is important for normal calculation later if (face.Orientation() == TopAbs_REVERSED) { - triangles(j).Get(v1, v3, v2); + triangulation->Triangle(j).Get(v1, v3, v2); } else { - triangles(j).Get(v1, v2, v3); + triangulation->Triangle(j).Get(v1, v2, v3); } triangleStrip->push_back(index + v1 - 1); triangleStrip->push_back(index + v2 - 1); -- 2.36.1
