From 8dc29900246a8c2732a445b9b42593719f6a2e1b Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 20 Sep 2024 09:56:19 +0200 Subject: [PATCH] bos #42837: shape recognition - ensure compilation on different os --- CMakeLists.txt | 42 +++++++++++++++++++++- src/ShapeRecogn/Areas.hxx | 4 +-- src/ShapeRecogn/AreasBuilder.hxx | 4 +-- src/ShapeRecogn/MathOps.cxx | 15 ++++++-- src/ShapeRecogn/MathOps.hxx | 4 +-- src/ShapeRecogn/Nodes.hxx | 5 +-- src/ShapeRecogn/NodesBuilder.hxx | 4 +-- src/ShapeRecogn/PrimitiveType.hxx | 14 ++++---- src/ShapeRecogn/ShapeRecognDefines.hxx | 33 +++++++++++++++++ src/ShapeRecogn/ShapeRecognMesh.hxx | 5 ++- src/ShapeRecogn/ShapeRecognMeshBuilder.hxx | 5 ++- src/ShapeRecogn/Swig/ShapeRecognImpl.i | 3 ++ src/ShapeRecogn/Test/CMakeLists.txt | 2 +- src/ShapeRecogn/Test/ConeTest.cxx | 9 +++-- src/ShapeRecogn/Test/CylinderTest.cxx | 6 ++-- src/ShapeRecogn/Test/MathOpsTest.cxx | 2 +- src/ShapeRecogn/Test/MathOpsTest.hxx | 14 ++++---- src/ShapeRecogn/Test/SphereTest.cxx | 2 +- src/ShapeRecogn/Test/TestShapeRecogn.cxx | 1 + src/ShapeRecogn/Test/TorusTest.cxx | 2 +- 20 files changed, 133 insertions(+), 43 deletions(-) create mode 100644 src/ShapeRecogn/ShapeRecognDefines.hxx diff --git a/CMakeLists.txt b/CMakeLists.txt index cf1a05b5f..f817bca18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,7 +203,19 @@ IF(MEDCOUPLING_ENABLE_RENUMBER) ENDIF(MEDCOUPLING_ENABLE_RENUMBER) IF(MEDCOUPLING_ENABLE_SHAPERECOGN) - FIND_PACKAGE(BLAS REQUIRED) +IF(UNIX) + SET(CBLAS_ROOT_DIR $ENV{CBLAS_ROOT_DIR} CACHE PATH "Path to the LAPACK/CBLAS.") + IF(CBLAS_ROOT_DIR) + LIST(APPEND CMAKE_PREFIX_PATH "${CBLAS_ROOT_DIR}") + FIND_PACKAGE(CBLAS REQUIRED) + ELSE(CBLAS_ROOT_DIR) + FIND_PACKAGE(BLAS REQUIRED) + ENDIF(CBLAS_ROOT_DIR) + SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR} CACHE PATH "Path to the LAPACKE") + IF(LAPACK_ROOT_DIR) + SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR} CACHE PATH "Path to the LAPACK.") + LIST(APPEND CMAKE_PREFIX_PATH "${LAPACK_ROOT_DIR}") + ENDIF(LAPACK_ROOT_DIR) FIND_PACKAGE(LAPACK REQUIRED) FIND_LIBRARY(LAPACKE_LIB NAMES lapacke REQUIRED) SET(LAPACK_LIBRARIES ${LAPACKE_LIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) @@ -215,6 +227,34 @@ IF(MEDCOUPLING_ENABLE_SHAPERECOGN) MESSAGE(FATAL_ERROR "Error in Lapacke detection ! lapacke not found !") ENDIF(LAPACK_FOUND) SALOME_LOG_OPTIONAL_PACKAGE(Lapack MEDCOUPLING_ENABLE_SHAPERECOGN) +ELSEIF (MSVC) + SET(OPENBLAS_ROOT_DIR $ENV{OPENBLAS_ROOT_DIR} CACHE PATH "Path to the OpenBLAS.") + IF(OPENBLAS_ROOT_DIR) + LIST(APPEND CMAKE_PREFIX_PATH "${OPENBLAS_ROOT_DIR}") + FIND_PACKAGE(OpenBLAS REQUIRED) + ELSE(OPENBLAS_ROOT_DIR) + MESSAGE(FATAL "Could not find OpenBLAS") + ENDIF(OPENBLAS_ROOT_DIR) + SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR} CACHE PATH "Path to the LAPACKE") + IF(LAPACK_ROOT_DIR) + SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR} CACHE PATH "Path to the LAPACK.") + LIST(APPEND CMAKE_PREFIX_PATH "${LAPACK_ROOT_DIR}") + ENDIF(LAPACK_ROOT_DIR) + FIND_PACKAGE(LAPACK REQUIRED) + FIND_LIBRARY(LAPACKE_LIB NAMES openblas REQUIRED) + SET(LAPACK_LIBRARIES ${LAPACKE_LIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + FIND_PATH(LAPACKE_INCLUDE_DIRS NAMES lapacke.h HINTS ${LAPACK_LIBRARIES}) + IF(LAPACK_FOUND) + MESSAGE(STATUS "Lapacke libraries: ${LAPACK_LIBRARIES}") + MESSAGE(STATUS "Lapacke include dirs: ${LAPACKE_INCLUDE_DIRS}") + ELSE() + MESSAGE(FATAL_ERROR "Error in Lapacke detection ! lapacke not found !") + ENDIF(LAPACK_FOUND) + SALOME_LOG_OPTIONAL_PACKAGE(Lapack MEDCOUPLING_ENABLE_SHAPERECOGN) + +ElSE() + MESSAGE(FATAL "Not implemented") +ENDIF() ENDIF(MEDCOUPLING_ENABLE_SHAPERECOGN) IF(MEDCOUPLING_ENABLE_PYTHON) diff --git a/src/ShapeRecogn/Areas.hxx b/src/ShapeRecogn/Areas.hxx index 8e3158a56..fb55d683f 100644 --- a/src/ShapeRecogn/Areas.hxx +++ b/src/ShapeRecogn/Areas.hxx @@ -18,7 +18,7 @@ // #pragma once - +#include "ShapeRecognDefines.hxx" #include "PrimitiveType.hxx" #include "Nodes.hxx" @@ -46,7 +46,7 @@ namespace MEDCoupling std::vector nodeIds; }; - class Areas + class SHAPE_RECOGNITION_EXPORT Areas { public: Areas(const Nodes *nodes); diff --git a/src/ShapeRecogn/AreasBuilder.hxx b/src/ShapeRecogn/AreasBuilder.hxx index 679a93570..90b79b65e 100644 --- a/src/ShapeRecogn/AreasBuilder.hxx +++ b/src/ShapeRecogn/AreasBuilder.hxx @@ -21,10 +21,10 @@ #include "Nodes.hxx" #include "Areas.hxx" - +#include "ShapeRecognDefines.hxx" namespace MEDCoupling { - class AreasBuilder + class SHAPE_RECOGNITION_EXPORT AreasBuilder { public: AreasBuilder(const Nodes *nodes); diff --git a/src/ShapeRecogn/MathOps.cxx b/src/ShapeRecogn/MathOps.cxx index 099d7da1e..224d3c9df 100644 --- a/src/ShapeRecogn/MathOps.cxx +++ b/src/ShapeRecogn/MathOps.cxx @@ -21,8 +21,19 @@ #include "MCIdType.hxx" #include -#include -#include +#if defined(_MSC_VER) + #include + #define LAPACK_COMPLEX_CUSTOM + #define lapack_complex_float _Fcomplex + #define lapack_complex_double _Dcomplex + #include + #include + //#include + //#include +#else + #include + #include +#endif #include #include #include diff --git a/src/ShapeRecogn/MathOps.hxx b/src/ShapeRecogn/MathOps.hxx index a0ba03e3d..90b2e59c8 100644 --- a/src/ShapeRecogn/MathOps.hxx +++ b/src/ShapeRecogn/MathOps.hxx @@ -21,10 +21,10 @@ #include #include - +#include "ShapeRecognDefines.hxx" namespace MEDCoupling { - class MathOps + class SHAPE_RECOGNITION_EXPORT MathOps { public: static std::vector lstsq(std::vector &a, const std::vector &b); diff --git a/src/ShapeRecogn/Nodes.hxx b/src/ShapeRecogn/Nodes.hxx index fbd445736..4122fd303 100644 --- a/src/ShapeRecogn/Nodes.hxx +++ b/src/ShapeRecogn/Nodes.hxx @@ -22,17 +22,18 @@ #include #include "MEDCouplingUMesh.hxx" #include "PrimitiveType.hxx" +#include +#include "ShapeRecognDefines.hxx" namespace MEDCoupling { - class Nodes + class SHAPE_RECOGNITION_EXPORT Nodes { public: friend class NodesBuilder; Nodes(const MEDCouplingUMesh *mesh, const DataArrayInt64 *neighbors, const DataArrayInt64 *neighborsIdx); - ~Nodes() = default; mcIdType getNbNodes() const; const std::vector &getK1() const; diff --git a/src/ShapeRecogn/NodesBuilder.hxx b/src/ShapeRecogn/NodesBuilder.hxx index a58e06538..c61a98bde 100644 --- a/src/ShapeRecogn/NodesBuilder.hxx +++ b/src/ShapeRecogn/NodesBuilder.hxx @@ -24,12 +24,12 @@ #include #include "MEDCouplingUMesh.hxx" #include "PrimitiveType.hxx" - +#include "ShapeRecognDefines.hxx" namespace MEDCoupling { class Nodes; - class NodesBuilder + class SHAPE_RECOGNITION_EXPORT NodesBuilder { public: NodesBuilder(const MEDCouplingUMesh *); diff --git a/src/ShapeRecogn/PrimitiveType.hxx b/src/ShapeRecogn/PrimitiveType.hxx index 88f428932..ffa3be4df 100644 --- a/src/ShapeRecogn/PrimitiveType.hxx +++ b/src/ShapeRecogn/PrimitiveType.hxx @@ -22,10 +22,10 @@ #include #include #include - +#include "ShapeRecognDefines.hxx" namespace MEDCoupling { - enum class PrimitiveType : std::uint8_t + enum class SHAPE_RECOGNITION_EXPORT PrimitiveType : unsigned char { Plane = 0, Sphere = 1, @@ -35,13 +35,13 @@ namespace MEDCoupling Unknown = 5 }; - std::vector AllManagedPrimitives(); + SHAPE_RECOGNITION_EXPORT std::vector AllManagedPrimitives(); - std::vector AllManagedPrimitivesStr(); + SHAPE_RECOGNITION_EXPORT std::vector AllManagedPrimitivesStr(); - std::string ConvertPrimitiveToString(PrimitiveType type); + SHAPE_RECOGNITION_EXPORT std::string ConvertPrimitiveToString(PrimitiveType type); - PrimitiveType ConvertStringToPrimitive(const std::string& type); + SHAPE_RECOGNITION_EXPORT PrimitiveType ConvertStringToPrimitive(const std::string& type); - int ConvertPrimitiveToInt(PrimitiveType type); + SHAPE_RECOGNITION_EXPORT int ConvertPrimitiveToInt(PrimitiveType type); }; diff --git a/src/ShapeRecogn/ShapeRecognDefines.hxx b/src/ShapeRecogn/ShapeRecognDefines.hxx new file mode 100644 index 000000000..ff9e55d2a --- /dev/null +++ b/src/ShapeRecogn/ShapeRecognDefines.hxx @@ -0,0 +1,33 @@ +// Copyright (C) 2007-2024 CEA, EDF +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef __SHAPE_RECOGNITION_DEFINES_HXX__ +#define __SHAPE_RECOGNITION_DEFINES_HXX__ + +#ifdef WIN32 +# if defined shaperecogn_EXPORTS || TestShapeRecogn_EXPORTS +# define SHAPE_RECOGNITION_EXPORT __declspec(dllexport) +# else +# define SHAPE_RECOGNITION_EXPORT __declspec(dllimport) +# endif +#else +# define SHAPE_RECOGNITION_EXPORT +#endif + +#endif diff --git a/src/ShapeRecogn/ShapeRecognMesh.hxx b/src/ShapeRecogn/ShapeRecognMesh.hxx index efbb312e8..c6df41fb5 100644 --- a/src/ShapeRecogn/ShapeRecognMesh.hxx +++ b/src/ShapeRecogn/ShapeRecognMesh.hxx @@ -25,10 +25,10 @@ #include "MEDCouplingFieldInt32.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingRefCountObject.hxx" - +#include "ShapeRecognDefines.hxx" namespace MEDCoupling { - class ShapeRecognMesh : public RefCountObject + class SHAPE_RECOGNITION_EXPORT ShapeRecognMesh : public RefCountObject { friend class ShapeRecognMeshBuilder; @@ -61,7 +61,6 @@ namespace MEDCoupling protected: ShapeRecognMesh(); - ~ShapeRecognMesh() = default; private: MCAuto nodeK1; diff --git a/src/ShapeRecogn/ShapeRecognMeshBuilder.hxx b/src/ShapeRecogn/ShapeRecognMeshBuilder.hxx index ab20016ea..402131905 100644 --- a/src/ShapeRecogn/ShapeRecognMeshBuilder.hxx +++ b/src/ShapeRecogn/ShapeRecognMeshBuilder.hxx @@ -28,7 +28,7 @@ #include #include - +#include "ShapeRecognDefines.hxx" namespace MEDCoupling { class MEDCouplingFieldInt32; @@ -37,12 +37,11 @@ namespace MEDCoupling class ShapeRecognMesh; - class ShapeRecognMeshBuilder + class SHAPE_RECOGNITION_EXPORT ShapeRecognMeshBuilder { public: ShapeRecognMeshBuilder(MCAuto< MEDCouplingUMesh > mesh); ShapeRecognMeshBuilder(MEDCouplingUMesh *mesh); - ~ShapeRecognMeshBuilder() = default; const Nodes *getNodes() const; const Areas *getAreas() const; diff --git a/src/ShapeRecogn/Swig/ShapeRecognImpl.i b/src/ShapeRecogn/Swig/ShapeRecognImpl.i index 0d894c7ce..6d2b97f07 100644 --- a/src/ShapeRecogn/Swig/ShapeRecognImpl.i +++ b/src/ShapeRecogn/Swig/ShapeRecognImpl.i @@ -18,8 +18,11 @@ // %{ +#include +#include #include "ShapeRecognMesh.hxx" #include "ShapeRecognMeshBuilder.hxx" +#include "PrimitiveType.hxx" #include "Areas.hxx" #include diff --git a/src/ShapeRecogn/Test/CMakeLists.txt b/src/ShapeRecogn/Test/CMakeLists.txt index a7df4179a..be7145664 100644 --- a/src/ShapeRecogn/Test/CMakeLists.txt +++ b/src/ShapeRecogn/Test/CMakeLists.txt @@ -47,7 +47,7 @@ SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) IF(NOT MEDCOUPLING_MICROMED) SET(TESTSHAPE_RECOGN0 TestShapeRecogn) ADD_EXECUTABLE(${TESTSHAPE_RECOGN0} ${TestShapeRecogn_SOURCES}) - TARGET_LINK_LIBRARIES(${TESTSHAPE_RECOGN0} shaperecogn InterpKernelTestUtils medloader ${MEDFILE_C_LIBRARIES} ${HDF5_LIBRARIES} ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS}) + TARGET_LINK_LIBRARIES(${TESTSHAPE_RECOGN0} shaperecogn InterpKernelTestUtils medloader medcouplingcpp ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS} ${CBLAS_LIBRARIES}) INSTALL(TARGETS ${TESTSHAPE_RECOGN0} DESTINATION ${MEDCOUPLING_INSTALL_BINS}) diff --git a/src/ShapeRecogn/Test/ConeTest.cxx b/src/ShapeRecogn/Test/ConeTest.cxx index 2da2193b7..ca71391d4 100644 --- a/src/ShapeRecogn/Test/ConeTest.cxx +++ b/src/ShapeRecogn/Test/ConeTest.cxx @@ -26,6 +26,9 @@ #include "TestInterpKernelUtils.hxx" // getResourceFile() #include "ShapeRecognTest.hxx" +#include +#include +#include using namespace MEDCoupling; @@ -192,7 +195,7 @@ void ConeTest::testComputeConeProperties() void ConeTest::testFirstArea() { // primitive type - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Plane, areas->getPrimitiveType(0)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Plane, (int)areas->getPrimitiveType(0)); // node ids std::vector nodeIdsRef{ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, @@ -213,7 +216,7 @@ void ConeTest::testFirstArea() void ConeTest::testSecondArea() { // primitive type - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Plane, areas->getPrimitiveType(0)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Plane, (int)areas->getPrimitiveType(0)); // node ids std::vector nodeIdsRef = { 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, @@ -264,7 +267,7 @@ void ConeTest::testSecondArea() void ConeTest::testThirdArea() { // primitive type - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Cone, areas->getPrimitiveType(2)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Cone, (int)areas->getPrimitiveType(2)); // node ids std::vector nodeIdsRef{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, diff --git a/src/ShapeRecogn/Test/CylinderTest.cxx b/src/ShapeRecogn/Test/CylinderTest.cxx index 2e08bdf10..6b7fc7fb9 100644 --- a/src/ShapeRecogn/Test/CylinderTest.cxx +++ b/src/ShapeRecogn/Test/CylinderTest.cxx @@ -50,7 +50,7 @@ void CylinderTest::testNumberOfAreas() void CylinderTest::testFirstArea() { // primitive type - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Cylinder, areas->getPrimitiveType(0)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Cylinder, (int) areas->getPrimitiveType(0)); // node ids std::vector nodeIdsRef{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, @@ -108,7 +108,7 @@ void CylinderTest::testFirstArea() void CylinderTest::testSecondArea() { // primitive type - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Plane, areas->getPrimitiveType(1)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Plane, (int)areas->getPrimitiveType(1)); // node ids std::vector nodeIdsRef{ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, @@ -134,7 +134,7 @@ void CylinderTest::testSecondArea() void CylinderTest::testThirdArea() { // primitive type - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Plane, areas->getPrimitiveType(2)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Plane, (int)areas->getPrimitiveType(2)); // node ids std::vector nodeIdsRef{ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, diff --git a/src/ShapeRecogn/Test/MathOpsTest.cxx b/src/ShapeRecogn/Test/MathOpsTest.cxx index 6841fe097..82a27b96b 100644 --- a/src/ShapeRecogn/Test/MathOpsTest.cxx +++ b/src/ShapeRecogn/Test/MathOpsTest.cxx @@ -19,7 +19,7 @@ #include "MathOpsTest.hxx" #include "MathOps.hxx" - +#include using namespace MEDCoupling; void MathOpsTest::testLstsq() diff --git a/src/ShapeRecogn/Test/MathOpsTest.hxx b/src/ShapeRecogn/Test/MathOpsTest.hxx index 8cbc635f1..8b5b3fd27 100644 --- a/src/ShapeRecogn/Test/MathOpsTest.hxx +++ b/src/ShapeRecogn/Test/MathOpsTest.hxx @@ -37,12 +37,12 @@ namespace MEDCoupling CPPUNIT_TEST_SUITE_END(); public: - static void testLstsq(); - static void testLstsq2(); - static void testLstsqBig(); - static void testComputeCov(); - static void testComputePCAFirstAxis(); - static void testComputeAngles(); - static void testComputeBaseFromNormal(); + void testLstsq(); + void testLstsq2(); + void testLstsqBig(); + void testComputeCov(); + void testComputePCAFirstAxis(); + void testComputeAngles(); + void testComputeBaseFromNormal(); }; } diff --git a/src/ShapeRecogn/Test/SphereTest.cxx b/src/ShapeRecogn/Test/SphereTest.cxx index b219e1ad8..630f55c8c 100644 --- a/src/ShapeRecogn/Test/SphereTest.cxx +++ b/src/ShapeRecogn/Test/SphereTest.cxx @@ -47,7 +47,7 @@ void SphereTest::testArea() CPPUNIT_ASSERT_EQUAL(1, (int)areas->getNumberOfAreas()); // 8 double nodes so 147 - 6 nodes CPPUNIT_ASSERT_EQUAL(141, (int)areas->getNumberOfNodes(0)); - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Sphere, areas->getPrimitiveType(0)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Sphere, (int)areas->getPrimitiveType(0)); CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, areas->getRadius(0), 1E-2); std::array centerRef = {5.3, -6.7, -9.02}; std::array center = areas->getCenter(0); diff --git a/src/ShapeRecogn/Test/TestShapeRecogn.cxx b/src/ShapeRecogn/Test/TestShapeRecogn.cxx index 8d07cce9d..fb2e25e34 100644 --- a/src/ShapeRecogn/Test/TestShapeRecogn.cxx +++ b/src/ShapeRecogn/Test/TestShapeRecogn.cxx @@ -17,6 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#include "CppUnitTest.hxx" #include "MathOpsTest.hxx" #include "PlaneTest.hxx" #include "CylinderTest.hxx" diff --git a/src/ShapeRecogn/Test/TorusTest.cxx b/src/ShapeRecogn/Test/TorusTest.cxx index fecb7b364..32ab1c26c 100644 --- a/src/ShapeRecogn/Test/TorusTest.cxx +++ b/src/ShapeRecogn/Test/TorusTest.cxx @@ -46,7 +46,7 @@ void TorusTest::testArea() { CPPUNIT_ASSERT_EQUAL(275, (int)srMesh->getNodes()->getNbNodes()); CPPUNIT_ASSERT_EQUAL(1, (int)areas->getNumberOfAreas()); - CPPUNIT_ASSERT_EQUAL(PrimitiveType::Torus, areas->getPrimitiveType(0)); + CPPUNIT_ASSERT_EQUAL((int)PrimitiveType::Torus, (int)areas->getPrimitiveType(0)); // Some nodes are unknown CPPUNIT_ASSERT_EQUAL(272, (int)areas->getNumberOfNodes(0)); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.843297, areas->getMinorRadius(0), 1E-2); -- 2.39.2