From 01f55fd3ae87e6cdf4e4b6107dd1d005cb7b4f7b Mon Sep 17 00:00:00 2001 From: skv Date: Wed, 9 Jul 2014 17:21:54 +0400 Subject: [PATCH] OCCT dev version porting (6.7.2) --- src/DDS/DDS.h | 3 --- src/DDS/DDS_DicGroup.h | 4 +--- src/DDS/DDS_DicItem.h | 4 +--- src/OCCViewer/OCCViewer_Trihedron.cxx | 13 ++++++++++++- src/OCCViewer/OCCViewer_Trihedron.h | 11 ++++++++++- 5 files changed, 24 insertions(+), 11 deletions(-) mode change 100755 => 100644 src/OCCViewer/OCCViewer_Trihedron.cxx diff --git a/src/DDS/DDS.h b/src/DDS/DDS.h index f6530348d..2d59c983d 100644 --- a/src/DDS/DDS.h +++ b/src/DDS/DDS.h @@ -26,7 +26,6 @@ #include #include -#include #define UNIT_SYSTEM_SI "SI" @@ -34,6 +33,4 @@ typedef enum { DDS_MT_OK, DDS_MT_WARNING, DDS_MT_ERROR, DDS_MT_ALARM, DDS_MT_INFO, DDS_MT_NONE } DDS_MsgType; -DEFINE_BASECOLLECTION(DDS_BaseColOfAsciiString,TCollection_AsciiString) - #endif diff --git a/src/DDS/DDS_DicGroup.h b/src/DDS/DDS_DicGroup.h index e8480beb8..5822d8afb 100644 --- a/src/DDS/DDS_DicGroup.h +++ b/src/DDS/DDS_DicGroup.h @@ -92,8 +92,6 @@ public: DEFINE_STANDARD_RTTI(DDS_DicGroup) }; -DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup)) -DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups, - TCollection_AsciiString, Handle(DDS_DicGroup)) +typedef NCollection_IndexedDataMap DDS_IndexedDataMapOfDicGroups; #endif diff --git a/src/DDS/DDS_DicItem.h b/src/DDS/DDS_DicItem.h index fa1f9db9c..a7fbcaeb9 100644 --- a/src/DDS/DDS_DicItem.h +++ b/src/DDS/DDS_DicItem.h @@ -258,8 +258,6 @@ public: DEFINE_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared) -DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicItems, Handle(DDS_DicItem)) -DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicItems, DDS_BaseCollectionOfDicItems, - TCollection_AsciiString, Handle(DDS_DicItem)) +typedef NCollection_IndexedDataMap DDS_IndexedDataMapOfDicItems; #endif diff --git a/src/OCCViewer/OCCViewer_Trihedron.cxx b/src/OCCViewer/OCCViewer_Trihedron.cxx old mode 100755 new mode 100644 index 6ffb84132..14ac128f7 --- a/src/OCCViewer/OCCViewer_Trihedron.cxx +++ b/src/OCCViewer/OCCViewer_Trihedron.cxx @@ -69,11 +69,21 @@ OCCViewer_Trihedron::~OCCViewer_Trihedron() /*! * Sets the bounding box (MinMax values). */ +#if OCC_VERSION_LARGE > 0x06070100 // for OCC-6.7.2 and higher version +void OCCViewer_Trihedron::bounds( Graphic3d_BndBox4f& theMinMax ) const +{ + Graphic3d_Vec4 aMinPt (-1.f, -1.f, -1.f, 1.f); + Graphic3d_Vec4 aMaxPt (1.f, 1.f, 1.f, 1.f); + + theMinMax.Add (aMinPt); + theMinMax.Add (aMaxPt); +} +#else void OCCViewer_Trihedron::bounds( Graphic3d_CBounds& aMinMax ) const { Standard_Real aXMin = -1, aYMin = -1, aZMin = -1; Standard_Real aXMax = 1, aYMax = 1, aZMax = 1; - + if( aMinMax.XMin > aXMin ) aMinMax.XMin = aXMin; if( aMinMax.YMin > aYMin ) aMinMax.YMin = aYMin; if( aMinMax.ZMin > aZMin ) aMinMax.ZMin = aZMin; @@ -81,6 +91,7 @@ void OCCViewer_Trihedron::bounds( Graphic3d_CBounds& aMinMax ) const if( aMinMax.YMax < aYMax ) aMinMax.YMax = aYMax; if( aMinMax.ZMax < aZMax ) aMinMax.ZMax = aZMax; } +#endif /*! * Redefined method. Calculates the object presentation. diff --git a/src/OCCViewer/OCCViewer_Trihedron.h b/src/OCCViewer/OCCViewer_Trihedron.h index 6cddc578d..72c7382b5 100644 --- a/src/OCCViewer/OCCViewer_Trihedron.h +++ b/src/OCCViewer/OCCViewer_Trihedron.h @@ -23,7 +23,12 @@ #include "OCCViewer.h" #include -#include +#include +#if OCC_VERSION_LARGE > 0x06070100 // for OCC-6.7.2 and higher version + #include +#else + #include +#endif #include /*! @@ -43,7 +48,11 @@ public: virtual void ComputeSelection( const Handle( SelectMgr_Selection )&, const Standard_Integer ); +#if OCC_VERSION_LARGE > 0x06070100 + virtual void bounds( Graphic3d_BndBox4f& ) const; +#else virtual void bounds( Graphic3d_CBounds& ) const; +#endif virtual void display(); -- 2.39.2