]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
porting to OOCT 6.4.0 PORTING_OCC64
authordkv <dkv@opencascade.com>
Sat, 13 Nov 2010 08:27:42 +0000 (08:27 +0000)
committerdkv <dkv@opencascade.com>
Sat, 13 Nov 2010 08:27:42 +0000 (08:27 +0000)
src/GEOM/GEOM_Engine.cxx
src/GEOM/GEOM_Engine.hxx
src/GEOMAlgo/BlockFix_UnionFaces.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI.h
src/GEOMImpl/GEOMImpl_IInsertOperations.cxx
src/GEOMImpl/GEOMImpl_IInsertOperations.hxx
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx
src/GEOM_I/GEOM_IInsertOperations_i.cc

index b0ea5a0c2dd3c1ebe149ffba50dc8b63f4cb03ee..8f361f38a56d6eb2782418435f73eace7b75c0d4 100644 (file)
 #include <TDataStd_ChildNodeIterator.hxx>
 #include <TFunction_Driver.hxx>
 #include <TFunction_DriverTable.hxx>
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_HArray1OfByte.hxx>
+#else
 #include <TDataStd_HArray1OfByte.hxx>
+#endif
 #include <TDataStd_ByteArray.hxx>
 #include <TDataStd_UAttribute.hxx>
 #include <TDF_ChildIterator.hxx>
 #include <TColStd_MapOfTransient.hxx>
 #include <TColStd_HSequenceOfInteger.hxx>
 
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx>
+#else 
 #include <Interface_DataMapIteratorOfDataMapOfIntegerTransient.hxx>
+#endif
 #include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
 
 #include <set>
@@ -195,8 +203,13 @@ GEOM_Engine::~GEOM_Engine()
     }
 
   //Close all documents not closed
+#if OCC_VERSION_LARGE >= 0x06030100
+  for(TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
+    Close(anItr.Key());
+#else
   for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
     Close(anItr.Key());
+#endif
 
   _mapIDDocument.Clear();
   _objects.Clear();
@@ -230,8 +243,13 @@ Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
 int GEOM_Engine::GetDocID(Handle(TDocStd_Document) theDocument)
 {
   if(theDocument.IsNull()) return -1;
+#if OCC_VERSION_LARGE >= 0x06030100
+  for(TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
+    if(anItr.Value() == theDocument) return anItr.Key();
+#else
   for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
     if(anItr.Value() == theDocument) return anItr.Key();
+#endif
 
   return -1;
 
@@ -744,7 +762,11 @@ Handle(TColStd_HSequenceOfAsciiString) GEOM_Engine::GetAllDumpNames() const
 #define TEXTURE_LABEL_DATA     5
 
 int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
-                            const Handle(TDataStd_HArray1OfByte)& theTexture,
+#if OCC_VERSION_LARGE >= 0x06030100
+                            const Handle(TColStd_HArray1OfByte)& theTexture,
+#else
+                           const Handle(TDataStd_HArray1OfByte)& theTexture,
+#endif
                             const TCollection_AsciiString& theFileName)
 {
   Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
@@ -789,11 +811,20 @@ int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
   return aTextureID;
 }
 
-Handle(TDataStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextureID,
+#if OCC_VERSION_LARGE >= 0x06030100
+Handle(TColStd_HArray1OfByte) 
+#else
+Handle(TDataStd_HArray1OfByte) 
+#endif
+GEOM_Engine::getTexture(int theDocID, int theTextureID,
                                                        int& theWidth, int& theHeight,
                                                        TCollection_AsciiString& theFileName)
 {
+#if OCC_VERSION_LARGE >= 0x06030100
+  Handle(TColStd_HArray1OfByte) anArray;
+#else
   Handle(TDataStd_HArray1OfByte) anArray;
+#endif
   theWidth = theHeight = 0;
 
   Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
@@ -1418,7 +1449,13 @@ void AddObjectColors (int                                             theDocID,
   }
 }
 
-static TCollection_AsciiString pack_data(const Handle(TDataStd_HArray1OfByte)& aData )
+static TCollection_AsciiString pack_data(const 
+#if OCC_VERSION_LARGE >= 0x06030100
+Handle(TColStd_HArray1OfByte)& 
+#else 
+Handle(TDataStd_HArray1OfByte)& 
+#endif
+aData )
 {
   TCollection_AsciiString stream;
   if (!aData.IsNull()) {
@@ -1446,7 +1483,11 @@ void AddTextures (int theDocID, TCollection_AsciiString& theScript)
       if (*it <= 0) continue;
       Standard_Integer aWidth, aHeight;
       TCollection_AsciiString aFileName;
+#if OCC_VERSION_LARGE >= 0x06030100
+      Handle(TColStd_HArray1OfByte) aTexture = engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
+#else
       Handle(TDataStd_HArray1OfByte) aTexture = engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
+#endif
       if (aWidth > 0 && aHeight > 0 && !aTexture.IsNull() && aTexture->Length() > 0 ) {
         TCollection_AsciiString aCommand = "\n\t";
         aCommand += "texture_map["; aCommand += *it; aCommand += "] = ";
index 5a0d1176a21fe0846abe45916b72dc199a4e99e1..f25ba4aa13f82849bbb419ed0bbe01632e026778 100644 (file)
 #include "GEOM_Object.hxx"
 #include "GEOM_DataMapOfAsciiStringTransient.hxx"
 
-#include <Interface_DataMapOfIntegerTransient.hxx> 
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
+#if  OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_DataMapOfIntegerTransient.hxx>
+#else 
+#include <Interface_DataMapOfIntegerTransient.hxx>
+#endif
 #include <Resource_DataMapOfAsciiStringAsciiString.hxx>
 #include <TDocStd_Document.hxx>
 #include <TColStd_HArray1OfInteger.hxx>
 #include <list>
 #include <vector>
 
+#if  OCC_VERSION_LARGE >= 0x06030100
+class Handle_TColStd_HArray1OfByte;
+#else 
 class Handle_TDataStd_HArray1OfByte;
+#endif
+
 
 struct TVariable{
   TCollection_AsciiString myVariable;
@@ -133,13 +149,23 @@ class GEOM_Engine
 
   Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
 
+#if OCC_VERSION_LARGE >= 0x06030100
   Standard_EXPORT int addTexture(int theDocID, int theWidth, int theHeight,
+                                 const Handle(TColStd_HArray1OfByte)& theTexture,
+                                 const TCollection_AsciiString& theFileName = "");
+
+  Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theDocID, int theTextureID,
+                                                            int& theWidth, int& theHeight,
+                                                            TCollection_AsciiString& theFileName);
+#else 
+   Standard_EXPORT int addTexture(int theDocID, int theWidth, int theHeight,
                                  const Handle(TDataStd_HArray1OfByte)& theTexture,
                                  const TCollection_AsciiString& theFileName = "");
 
-  Standard_EXPORT Handle(TDataStd_HArray1OfByte) getTexture(int theDocID, int theTextureID,
+   Standard_EXPORT Handle(TDataStd_HArray1OfByte) getTexture(int theDocID, int theTextureID,
                                                             int& theWidth, int& theHeight,
                                                             TCollection_AsciiString& theFileName);
+#endif
 
   Standard_EXPORT std::list<int> getAllTextures(int theDocID);
 
@@ -151,7 +177,11 @@ class GEOM_Engine
  private:
 
   Handle(GEOM_Application)  _OCAFApp;
+#if OCC_VERSION_LARGE >= 0x06030100
+  TColStd_DataMapOfIntegerTransient _mapIDDocument;
+#else
   Interface_DataMapOfIntegerTransient _mapIDDocument;
+#endif
   int _UndoLimit;
   GEOM_DataMapOfAsciiStringTransient _objects;
 
index c610a4f7e6a1092c737f23ddad8063c1774c7ad4..45b1963e34a9f6aa4fc393fdbc619329dd0cbfc3 100644 (file)
 #include <ShapeFix_Wire.hxx>
 #include <ShapeFix_Edge.hxx>
 
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
+
+#if OCC_VERSION_LARGE < 0x06040000
 #include <IntPatch_TheIIIntOfIntersection.hxx>
+#else
+#include <IntPatch_ImpImpIntersection.hxx>
+#endif
 
 #include <BRep_Tool.hxx>
 #include <BRep_Builder.hxx>
@@ -617,7 +627,11 @@ Standard_Boolean BlockFix_UnionFaces::IsSameDomain(const TopoDS_Face& aFace,
 #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
       OCC_CATCH_SIGNALS;
 #endif
+#if OCC_VERSION_LARGE < 0x06040000
       IntPatch_TheIIIntOfIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec);
+#else
+      IntPatch_ImpImpIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec);
+#endif
       if (!anIIInt.IsDone() || anIIInt.IsEmpty())
         return false;
 
index 3196289e5fb2b854a5e38850812ab4f6c0438131..012b9ab45decf4c9957cf58f54e9bbe3761dd6fb 100644 (file)
 #include <SVTK_ViewModel.h>
 
 // OCCT Includes
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
 #include <AIS_Drawer.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
 
 #include <GEOMImpl_Types.hxx>
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_HArray1OfByte.hxx>
+#else
 #include <Graphic3d_HArray1OfBytes.hxx>
+#endif
 
 
 //================================================================
@@ -788,8 +798,12 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
                       Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) );
                       if ( hasColor ) aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB );
                       Standard_Integer aWidth, aHeight;
-                      Handle(Graphic3d_HArray1OfBytes) aTexture = GeometryGUI::getTexture( getStudy(), aTextureId, aWidth, aHeight );
-                      if ( !aTexture.IsNull() ) {
+#if OCC_VERSION_LARGE >= 0x06030100
+                      Handle(TColStd_HArray1OfByte) aTexture = GeometryGUI::getTexture( getStudy(), aTextureId, aWidth, aHeight );
+#else
+                     Handle(Graphic3d_HArray1OfBytes) aTexture = GeometryGUI::getTexture( getStudy(), aTextureId, aWidth, aHeight );
+#endif
+                     if ( !aTexture.IsNull() ) {
                         static int TextureId = 0;
                         Handle(Prs3d_PointAspect) aTextureAspect = new Prs3d_PointAspect(aQuanColor,
                                                                                          ++TextureId,
index 3ee06d2df0446cf0429fa66da9abdc63f5048206..37edd9adc8884faa2d19c3a69ab1b2a7d05f3211 100644 (file)
 #include <Aspect_TypeOfMarker.hxx>
 #include <OSD_SharedLibrary.hxx>
 #include <NCollection_DataMap.hxx>
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_HArray1OfByte.hxx>
+#else
 #include <Graphic3d_HArray1OfBytes.hxx>
+#endif
 
 #include <utilities.h>
 
@@ -1428,10 +1432,19 @@ QString GeometryGUI::engineIOR() const
   return "";
 }
 
-Handle(Graphic3d_HArray1OfBytes) GeometryGUI::getTexture( SalomeApp_Study* theStudy, int theId, int& theWidth, int& theHeight )
+#if OCC_VERSION_LARGE >= 0x06030100
+Handle(TColStd_HArray1OfByte) 
+#else
+Handle(Graphic3d_HArray1OfBytes) 
+#endif
+GeometryGUI::getTexture( SalomeApp_Study* theStudy, int theId, int& theWidth, int& theHeight )
 {
   theWidth = theHeight = 0;
+#if OCC_VERSION_LARGE >= 0x06030100
+  Handle(TColStd_HArray1OfByte) aTexture;
+#else
   Handle(Graphic3d_HArray1OfBytes) aTexture;
+#endif
   if ( theStudy ) {
     TextureMap aTextureMap = myTextureMap[ theStudy->studyDS()->StudyId() ];
     aTexture = aTextureMap[ theId ];
@@ -1443,7 +1456,11 @@ Handle(Graphic3d_HArray1OfBytes) GeometryGUI::getTexture( SalomeApp_Study* theSt
         if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
           theWidth  = aWidth;
           theHeight = aHeight;
-          aTexture  = new Graphic3d_HArray1OfBytes( 1, aStream->length() );
+#if OCC_VERSION_LARGE >= 0x06030100
+          aTexture  = new TColStd_HArray1OfByte( 1, aStream->length() );
+#else
+         aTexture  = new Graphic3d_HArray1OfBytes( 1, aStream->length() );
+#endif
           for ( int i = 0; i < aStream->length(); i++ )
             aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
           aTextureMap[ theId ] = aTexture;
index 4e4dd392155b0a3b366671f115c8b5c7abf717d6..7eeb299629b973c561ae935b1d7f17b28647347b 100644 (file)
 #include <QMap>
 
 // OCCT Includes
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
 #include <gp_Ax3.hxx>
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_HArray1OfByte.hxx>
+#else
 #include <Graphic3d_HArray1OfBytes.hxx>
+#endif
 
 // IDL headers
 #include "SALOMEconfig.h"
@@ -77,8 +87,11 @@ public:
   virtual LightApp_Displayer* displayer();
   virtual void                initialize( CAM_Application* );
   virtual QString             engineIOR() const;
-
+#if OCC_VERSION_LARGE >= 0x06030100
+  static Handle(TColStd_HArray1OfByte) getTexture( SalomeApp_Study*, int, int&, int& );
+#else
   static Handle(Graphic3d_HArray1OfBytes) getTexture( SalomeApp_Study*, int, int&, int& );
+#endif
 
   static bool                 InitGeomGen();
 
@@ -162,8 +175,11 @@ public:
   static GEOM::GEOM_Gen_var   myComponentGeom;   // GEOM engine!!!
 
 private:  
-
+#if OCC_VERSION_LARGE >= 0x06030100
+  typedef QMap<long, Handle(TColStd_HArray1OfByte)> TextureMap;
+#else
   typedef QMap<long, Handle(Graphic3d_HArray1OfBytes)> TextureMap;
+#endif
   typedef QMap<long, TextureMap> StudyTextureMap;
   typedef QMap<QString, GEOMGUI*> GUIMap;
 
index efb8255fa11b2e6e157c705ffe7817e0fd29dd60..8b78ff439a896947c6ec85542c7449b23826eb58 100644 (file)
 #include <TopoDS_Vertex.hxx>
 #include <BRep_Tool.hxx>
 #include <gp_Pnt.hxx>
+
+
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_HArray1OfByte.hxx>
+#else
 #include <TDataStd_HArray1OfByte.hxx>
+#endif
 
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
@@ -551,8 +557,12 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
   SetErrorCode(KO);
 
   if (theTextureFile.IsEmpty()) return 0;
-
+#if OCC_VERSION_LARGE >= 0x06030100
+  Handle(TColStd_HArray1OfByte) aTexture;
+#else
   Handle(TDataStd_HArray1OfByte) aTexture;
+#endif
+
 
   FILE* fp = fopen(theTextureFile.ToCString(), "r");
   if (!fp) return 0;
@@ -593,8 +603,11 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
 
   if (bytedata.empty() || bytedata.size() != lines.size()*lenbytes)
     return 0;
-
+#if OCC_VERSION_LARGE >= 0x06030100
+  aTexture = new TColStd_HArray1OfByte(1, lines.size()*lenbytes);
+#else
   aTexture = new TDataStd_HArray1OfByte(1, lines.size()*lenbytes);
+#endif
   std::list<unsigned char>::iterator bdit;
   int i;
   for (i = 1, bdit = bytedata.begin(); bdit != bytedata.end(); ++bdit, ++i)
@@ -606,7 +619,12 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
 }
   
 int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight, 
-                                           const Handle(TDataStd_HArray1OfByte)& theTexture)
+#if OCC_VERSION_LARGE >= 0x06030100
+                                           const Handle(TColStd_HArray1OfByte)&
+#else
+                                          const Handle(TDataStd_HArray1OfByte)&
+#endif 
+                                          theTexture)
 {
   SetErrorCode(KO);
   int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture);
@@ -614,12 +632,20 @@ int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight,
   return aTextureId;
 }
 
-Handle(TDataStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theTextureId,
+#if OCC_VERSION_LARGE >= 0x06030100
+Handle(TColStd_HArray1OfByte) 
+#else
+Handle(TDataStd_HArray1OfByte) 
+#endif
+GEOMImpl_IInsertOperations::GetTexture(int theTextureId,
                                                                       int& theWidth, int& theHeight)
 {
   SetErrorCode(KO);
-  
+#if OCC_VERSION_LARGE >= 0x06030100
+  Handle(TColStd_HArray1OfByte) aTexture;
+#else
   Handle(TDataStd_HArray1OfByte) aTexture;
+#endif
   theWidth = theHeight = 0;
   TCollection_AsciiString aFileName;
 
index 691594fb46db7d2947c372fb1f61953c5bdc946a..1e9707ec4e37b61fabf34e609129142b99e91247 100644 (file)
 #include <Resource_Manager.hxx>
 #include <list>
 
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
+
+#if OCC_VERSION_LARGE >= 0x06030100
+class Handle_TColStd_HArray1OfByte;
+#else
 class Handle_TDataStd_HArray1OfByte;
+#endif
 
 class GEOMImpl_IInsertOperations : public GEOM_IOperations {
  public:
@@ -62,11 +73,21 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations {
 
   Standard_EXPORT int LoadTexture(const TCollection_AsciiString& theTextureFile);
   
+#if OCC_VERSION_LARGE >= 0x06030100
+  Standard_EXPORT int AddTexture(int theWidth, int theHeight, 
+                                 const Handle(TColStd_HArray1OfByte)& theTexture);
+
+  Standard_EXPORT Handle(TColStd_HArray1OfByte) GetTexture(int theTextureId, 
+                                                            int& theWidth, int& theHeight);
+#else
   Standard_EXPORT int AddTexture(int theWidth, int theHeight, 
                                  const Handle(TDataStd_HArray1OfByte)& theTexture);
 
   Standard_EXPORT Handle(TDataStd_HArray1OfByte) GetTexture(int theTextureId, 
                                                             int& theWidth, int& theHeight);
+#endif
+
+
 
   Standard_EXPORT std::list<int> GetAllTextures();
   
index 7706ab3c9f154bc479b04ee80d9bfe63014ca482..75eeac642324475fb49c920f0fda16bba0829475 100644 (file)
 #include "utilities.h"
 
 // OCCT Includes
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
 #include <AIS_Drawer.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <Graphic3d_AspectMarker3d.hxx>
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_HArray1OfByte.hxx>
+#else
 #include <Graphic3d_HArray1OfBytes.hxx>
+#endif
+
 
 // QT Includes
 #include <QColorDialog>
@@ -256,7 +267,11 @@ void GEOMToolsGUI::OnAutoColor()
       else {
         Standard_Integer aWidth, aHeight;
         aCurPointAspect->GetTextureSize( aWidth, aHeight );
-        Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
+#if OCC_VERSION_LARGE >= 0x06030100
+        Handle(TColStd_HArray1OfByte) aTexture = aCurPointAspect->GetTexture();
+#else
+       Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
+#endif
         aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aQuanColor, 1, aWidth, aHeight, aTexture ) );
       }
       ic->SetLocalAttributes( io, aCurDrawer );
@@ -359,7 +374,11 @@ void GEOMToolsGUI::OnColor()
                   else {
                     Standard_Integer aWidth, aHeight;
                     aCurPointAspect->GetTextureSize( aWidth, aHeight );
-                    Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
+#if OCC_VERSION_LARGE >= 0x06030100
+                    Handle(TColStd_HArray1OfByte) aTexture = aCurPointAspect->GetTexture();
+#else
+                   Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
+#endif
                     aCurDrawer->SetPointAspect(new Prs3d_PointAspect(aColor, 1, aWidth, aHeight, aTexture));
                   }
                   ic->SetLocalAttributes(io, aCurDrawer);
index 7da155b552db5af5517c8053e05b3740e09efd55..b7d83ede41bd355918c1d0354e99bb9cae65989f 100644 (file)
 #include <SALOME_ListIO.hxx>
 #include <SALOME_ListIteratorOfListIO.hxx>
 
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
+
 #include <QButtonGroup>
 #include <QGridLayout>
 #include <QHBoxLayout>
@@ -320,7 +327,11 @@ void GEOMToolsGUI_MarkerDlg::addTexture( int id, bool select ) const
 {
   if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
     int tWidth, tHeight;
+#if OCC_VERSION_LARGE >= 0x06030100
+    Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture( getStudy(), id, tWidth, tHeight );
+#else
     Handle(Graphic3d_HArray1OfBytes) texture = GeometryGUI::getTexture( getStudy(), id, tWidth, tHeight );
+#endif
     if ( !texture.IsNull() && texture->Length() == tWidth*tHeight/8 ) {
       QImage image( tWidth, tHeight, QImage::Format_Mono );
       image.setColor( 0, qRgba( 0, 0, 0, 0   ) );
index 382465d83750c3a7ce3010c51199d37ecfa1b01a..f3f30d3506c8ea8b50f924875fd86a95d9625554 100644 (file)
 #include "GEOM_Engine.hxx"
 #include "GEOM_Object.hxx"
 
+
+#include <Standard_Version.hxx>
+#ifdef OCC_VERSION_SERVICEPACK
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8 | OCC_VERSION_SERVICEPACK)
+#else
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#endif
+
 #include <TColStd_HSequenceOfAsciiString.hxx>
+#if OCC_VERSION_LARGE >= 0x06030100
+#include <TColStd_HArray1OfByte.hxx>
+#else
 #include <TDataStd_HArray1OfByte.hxx>
+#endif
 
 //=============================================================================
 /*!
@@ -228,9 +240,17 @@ CORBA::Long GEOM_IInsertOperations_i::AddTexture(CORBA::Long theWidth, CORBA::Lo
                                                 const SALOMEDS::TMPFile& theTexture)
 {
   GetOperations()->SetNotDone();
+#if OCC_VERSION_LARGE >= 0x06030100
+  Handle(TColStd_HArray1OfByte) aTexture;
+#else
   Handle(TDataStd_HArray1OfByte) aTexture;
+#endif
   if ( theTexture.length() > 0 ) {
+#if OCC_VERSION_LARGE >= 0x06030100
+    aTexture = new TColStd_HArray1OfByte( 1, theTexture.length() );
+#else
     aTexture = new TDataStd_HArray1OfByte( 1, theTexture.length() );
+#endif
     for ( int i = 0; i < theTexture.length(); i++ )
       aTexture->SetValue( i+1, (Standard_Byte)theTexture[i] );
   }
@@ -242,7 +262,11 @@ SALOMEDS::TMPFile* GEOM_IInsertOperations_i::GetTexture(CORBA::Long theID,
                                                        CORBA::Long& theHeight)
 {
   int aWidth, aHeight;
+#if OCC_VERSION_LARGE >= 0x06030100
+  Handle(TColStd_HArray1OfByte) aTextureImpl = GetOperations()->GetTexture( theID, aWidth, aHeight );
+#else
   Handle(TDataStd_HArray1OfByte) aTextureImpl = GetOperations()->GetTexture( theID, aWidth, aHeight );
+#endif 
   theWidth  = aWidth;
   theHeight = aHeight;
   SALOMEDS::TMPFile_var aTexture;