From e77162f42f48f74cad0c7ef06906b58378671d8a Mon Sep 17 00:00:00 2001 From: mpa Date: Wed, 24 Feb 2016 16:46:43 +0300 Subject: [PATCH] Migration to OCCT 7.0 --- src/SMESH/SMESH_Mesh.hxx | 2 +- src/SMESHGUI/SMESHGUI_Filter.cxx | 27 ++------ src/SMESHGUI/SMESHGUI_Filter.h | 14 ++-- src/SMESHGUI/SMESHGUI_GEOMGenUtils.h | 6 +- src/SMESHGUI/SMESHGUI_IdPreview.cxx | 1 - src/SMESHGUI/SMESHGUI_IdPreview.h | 3 +- src/SMESHGUI/SMESHGUI_MergeDlg.cxx | 1 - src/SMESHGUI/SMESHGUI_MergeDlg.h | 2 +- src/SMESHGUI/SMESHGUI_SelectionOp.h | 4 +- src/SMESHGUI/SMESHGUI_VTKUtils.cxx | 1 - src/SMESHGUI/SMESHGUI_VTKUtils.h | 3 +- src/SMESHUtils/SMESH_MeshAlgos.cxx | 2 +- src/SMESH_I/SMESH_2smeshpy.cxx | 64 ++++++++----------- src/SMESH_I/SMESH_2smeshpy.hxx | 37 +++++------ src/SMESH_I/SMESH_Filter_i.cxx | 14 ++++ src/SMESH_I/SMESH_PythonDump.hxx | 2 +- src/StdMeshers/StdMeshers_Cartesian_3D.cxx | 8 +++ src/StdMeshers/StdMeshers_Distribution.cxx | 1 + src/StdMeshers/StdMeshers_ProjectionUtils.hxx | 4 +- .../StdMeshers_QuadToTriaAdaptor.hxx | 5 +- 20 files changed, 102 insertions(+), 99 deletions(-) diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index c6e521fa1..918e28fb5 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -53,7 +54,6 @@ class SMESH_Gen; class SMESHDS_Document; class SMESH_Group; -class TopTools_ListOfShape; class SMESH_subMesh; class SMESH_HypoFilter; class TopoDS_Solid; diff --git a/src/SMESHGUI/SMESHGUI_Filter.cxx b/src/SMESHGUI/SMESHGUI_Filter.cxx index c346e836e..05d003387 100755 --- a/src/SMESHGUI/SMESHGUI_Filter.cxx +++ b/src/SMESHGUI/SMESHGUI_Filter.cxx @@ -33,26 +33,13 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(SMESHGUI_Filter, VTKViewer_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_Filter, VTKViewer_Filter) - -IMPLEMENT_STANDARD_HANDLE(SMESHGUI_PredicateFilter, SMESHGUI_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter, SMESHGUI_Filter) - -IMPLEMENT_STANDARD_HANDLE(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter) - -IMPLEMENT_STANDARD_HANDLE(SMESHGUI_TriangleFilter, SMESHGUI_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter, SMESHGUI_Filter) - -IMPLEMENT_STANDARD_HANDLE(SMESHGUI_FacesFilter, SMESHGUI_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_FacesFilter, SMESHGUI_Filter) - -IMPLEMENT_STANDARD_HANDLE(SMESHGUI_VolumesFilter, SMESHGUI_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter, SMESHGUI_Filter) - -IMPLEMENT_STANDARD_HANDLE(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_Filter, VTKViewer_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter, SMESHGUI_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter, SMESHGUI_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_FacesFilter, SMESHGUI_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter, SMESHGUI_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter) /* Class : SMESHGUI_PredicateFilter diff --git a/src/SMESHGUI/SMESHGUI_Filter.h b/src/SMESHGUI/SMESHGUI_Filter.h index 235a0ef76..ec36f46d6 100755 --- a/src/SMESHGUI/SMESHGUI_Filter.h +++ b/src/SMESHGUI/SMESHGUI_Filter.h @@ -70,7 +70,7 @@ public: Standard_EXPORT virtual bool IsObjValid( const int ) const = 0; public: - DEFINE_STANDARD_RTTI(SMESHGUI_Filter) + OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_Filter,VTKViewer_Filter) }; /* @@ -99,7 +99,7 @@ private: SMESH::Predicate_var myPred; public: - DEFINE_STANDARD_RTTI(SMESHGUI_PredicateFilter) + OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter,SMESHGUI_Filter) }; /* @@ -121,7 +121,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - DEFINE_STANDARD_RTTI(SMESHGUI_QuadrangleFilter) + OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter,SMESHGUI_Filter) }; /* @@ -143,7 +143,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - DEFINE_STANDARD_RTTI(SMESHGUI_TriangleFilter) + OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter,SMESHGUI_Filter) }; /* @@ -165,7 +165,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - DEFINE_STANDARD_RTTI(SMESHGUI_FacesFilter) + OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_FacesFilter,SMESHGUI_Filter) }; /* @@ -187,7 +187,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter) + OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter,SMESHGUI_Filter) }; /* @@ -211,7 +211,7 @@ public: Standard_EXPORT static int GetId( SMDSAbs_GeometryType geom ); public: - DEFINE_STANDARD_RTTI(SMESHGUI_VolumeShapeFilter) + OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter,SMESHGUI_Filter) }; #endif // SMESHGUI_FILTER_H diff --git a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h index 2f6c4e462..f59609e07 100644 --- a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h +++ b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h @@ -33,12 +33,14 @@ // SALOME KERNEL includes #include +// GUI includes +#include + // IDL includes #include #include CORBA_SERVER_HEADER(GEOM_Gen) class SALOMEDSClient_SObject; -class Handle_SALOME_InteractiveObject; class QString; namespace SMESH @@ -53,7 +55,7 @@ namespace SMESH SMESHGUI_EXPORT GEOM::GEOM_Object_ptr GetSubShape( GEOM::GEOM_Object_ptr, long ); - SMESHGUI_EXPORT bool GetGeomEntries( Handle_SALOME_InteractiveObject& hypIO, + SMESHGUI_EXPORT bool GetGeomEntries( Handle(SALOME_InteractiveObject)& hypIO, QString& subGeom, QString& meshGeom); } diff --git a/src/SMESHGUI/SMESHGUI_IdPreview.cxx b/src/SMESHGUI/SMESHGUI_IdPreview.cxx index f3871d173..fae189aaa 100644 --- a/src/SMESHGUI/SMESHGUI_IdPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_IdPreview.cxx @@ -26,7 +26,6 @@ #include #include -#include #include #include diff --git a/src/SMESHGUI/SMESHGUI_IdPreview.h b/src/SMESHGUI/SMESHGUI_IdPreview.h index ff7e7db21..6c72b1fd5 100644 --- a/src/SMESHGUI/SMESHGUI_IdPreview.h +++ b/src/SMESHGUI/SMESHGUI_IdPreview.h @@ -28,12 +28,13 @@ #include #include +#include + #include class SALOME_Actor; class SMDS_Mesh; class SVTK_ViewWindow; -class TColStd_MapOfInteger; class vtkActor2D; class vtkLabeledDataMapper; class vtkMaskPoints; diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index 675aba3ff..e5dcf5d12 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -54,7 +54,6 @@ #include // OCCT includes -#include #include // IDL includes diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.h b/src/SMESHGUI/SMESHGUI_MergeDlg.h index b18e1b38b..5e827abc8 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.h +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.h @@ -35,6 +35,7 @@ // OCCT includes #include +#include // STL includes #include @@ -59,7 +60,6 @@ class SMESHGUI_SpinBox; class SMESH_Actor; class SUIT_SelectionFilter; class SVTK_Selector; -class TColStd_MapOfInteger; namespace SMESH { diff --git a/src/SMESHGUI/SMESHGUI_SelectionOp.h b/src/SMESHGUI/SMESHGUI_SelectionOp.h index 3ad9764e8..b60a88c07 100644 --- a/src/SMESHGUI/SMESHGUI_SelectionOp.h +++ b/src/SMESHGUI/SMESHGUI_SelectionOp.h @@ -40,8 +40,10 @@ #include #include CORBA_SERVER_HEADER(SMESH_Mesh) +// OCCT includes +#include + class SUIT_SelectionFilter; -class TColStd_MapOfInteger; class SVTK_ViewWindow; class SVTK_Selector; class SMESH_Actor; diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 323c9c154..b79e6955e 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -72,7 +72,6 @@ #include // OCCT includes -#include #include namespace SMESH diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.h b/src/SMESHGUI/SMESHGUI_VTKUtils.h index ffce8af75..b1159bd13 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.h +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.h @@ -40,7 +40,8 @@ #include #include -class TColStd_IndexedMapOfInteger; +// OCCT includes +#include class SALOMEDSClient_Study; diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index a9ad04af5..1776f3dd4 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -584,7 +584,7 @@ bool SMESH_ElementSearcherImpl::getIntersParamOnLine(const gp_Lin& lin { GC_MakeSegment edge( SMESH_TNodeXYZ( face->GetNode( i )), SMESH_TNodeXYZ( face->GetNode( (i+1)%nbNodes) )); - anExtCC.Init( lineCurve, edge); + anExtCC.Init( lineCurve, edge.Value() ); if ( anExtCC.NbExtrema() > 0 && anExtCC.LowerDistance() <= tol) { Quantity_Parameter pl, pe; diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 0344eb904..e6a757583 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -50,38 +50,22 @@ #include #endif - -IMPLEMENT_STANDARD_HANDLE (_pyObject ,Standard_Transient); -IMPLEMENT_STANDARD_HANDLE (_pyCommand ,Standard_Transient); -IMPLEMENT_STANDARD_HANDLE (_pyHypothesisReader,Standard_Transient); -IMPLEMENT_STANDARD_HANDLE (_pyGen ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pyMesh ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pySubMesh ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pyMeshEditor ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pyHypothesis ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pySelfEraser ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pyGroup ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pyFilter ,_pyObject); -IMPLEMENT_STANDARD_HANDLE (_pyAlgorithm ,_pyHypothesis); -IMPLEMENT_STANDARD_HANDLE (_pyComplexParamHypo,_pyHypothesis); -IMPLEMENT_STANDARD_HANDLE (_pyNumberOfSegmentsHyp,_pyHypothesis); - -IMPLEMENT_STANDARD_RTTIEXT(_pyObject ,Standard_Transient); -IMPLEMENT_STANDARD_RTTIEXT(_pyCommand ,Standard_Transient); -IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient); -IMPLEMENT_STANDARD_RTTIEXT(_pyGen ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pyMesh ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pySubMesh ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pyMeshEditor ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesis ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pySelfEraser ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pyGroup ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pyFilter ,_pyObject); -IMPLEMENT_STANDARD_RTTIEXT(_pyAlgorithm ,_pyHypothesis); -IMPLEMENT_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis); -IMPLEMENT_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis); -IMPLEMENT_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis); -IMPLEMENT_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyObject ,Standard_Transient); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyCommand ,Standard_Transient); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyGen ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyMesh ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySubMesh ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyMeshEditor ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesis ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySelfEraser ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyGroup ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyFilter ,_pyObject); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyAlgorithm ,_pyHypothesis); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis); +OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis); using namespace std; using SMESH::TPythonDump; @@ -1529,9 +1513,10 @@ _pyID _pyGen::GenerateNewID( const _pyID& theID ) } while ( myObjectNames.IsBound( aNewID ) ); - myObjectNames.Bind( aNewID, myObjectNames.IsBound( theID ) - ? (myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 )) - : _pyID( "A" ) + aNewID ); + if ( myObjectNames.IsBound( theID ) ) + myObjectNames.Bind( aNewID, ( myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 ) ) ); + else + myObjectNames.Bind( aNewID, ( _pyID( "A" ) + aNewID ) ); return aNewID; } @@ -1577,8 +1562,11 @@ void _pyGen::CheckObjectIsReCreated( Handle(_pyObject)& theObj ) return; const bool isHyp = theObj->IsKind( STANDARD_TYPE( _pyHypothesis )); - Handle(_pyObject) existing = - isHyp ? FindHyp( theObj->GetID() ) : FindObject( theObj->GetID() ); + Handle(_pyObject) existing; + if( isHyp ) + existing = Handle(_pyObject)::DownCast( FindHyp( theObj->GetID() ) ); + else + existing = FindObject( theObj->GetID() ); if ( !existing.IsNull() && existing != theObj ) { existing->SetRemovedFromStudy( true ); @@ -1636,7 +1624,7 @@ Handle(_pyObject) _pyGen::FindObject( const _pyID& theObjID ) const { map< _pyID, Handle(_pyMesh) >::const_iterator id_obj = myMeshes.find( theObjID ); if ( id_obj != myMeshes.end() ) - return id_obj->second; + return Handle(_pyObject)::DownCast( id_obj->second ); } // { // map< _pyID, Handle(_pyMeshEditor) >::const_iterator id_obj = myMeshEditors.find( theObjID ); diff --git a/src/SMESH_I/SMESH_2smeshpy.hxx b/src/SMESH_I/SMESH_2smeshpy.hxx index b9c6dfc22..a24b40d7a 100644 --- a/src/SMESH_I/SMESH_2smeshpy.hxx +++ b/src/SMESH_I/SMESH_2smeshpy.hxx @@ -33,12 +33,15 @@ #include #include #include +#include #include #include #include #include +#include + #include #include CORBA_CLIENT_HEADER(SALOMEDS) @@ -58,8 +61,6 @@ */ // =========================================================================================== -class Resource_DataMapOfAsciiStringAsciiString; - // =========================================================================================== // ===================== // INTERNAL STUFF @@ -159,7 +160,7 @@ public: bool AddAccessorMethod( _pyID theObjectID, const char* theAcsMethod ); - DEFINE_STANDARD_RTTI (_pyCommand) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyCommand,Standard_Transient) }; // ------------------------------------------------------------------------------------- @@ -199,7 +200,7 @@ public: virtual void ClearCommands(); virtual void Free() {} - DEFINE_STANDARD_RTTI (_pyObject) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyObject,Standard_Transient) }; // ------------------------------------------------------------------------------------- @@ -330,7 +331,7 @@ private: std::map< _AString, ExportedMeshData > myFile2ExportedMesh; Handle( _pyHypothesisReader ) myHypReader; - DEFINE_STANDARD_RTTI (_pyGen) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyGen,_pyObject) }; // ------------------------------------------------------------------------------------- @@ -371,7 +372,7 @@ private: static void AddMeshAccess( const Handle(_pyCommand)& theCommand ) { theCommand->SetObject( theCommand->GetObject() + "." _pyMesh_ACCESS_METHOD ); } - DEFINE_STANDARD_RTTI (_pyMesh) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject) }; #undef _pyMesh_ACCESS_METHOD @@ -391,7 +392,7 @@ public: virtual void Flush() {} virtual bool CanClear(); - DEFINE_STANDARD_RTTI (_pyMesh) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject) }; // ------------------------------------------------------------------------------------- @@ -475,7 +476,7 @@ public: //void ComputeSaved ( const Handle(_pyCommand)& theComputeCommand ); - DEFINE_STANDARD_RTTI (_pyHypothesis) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyHypothesis,_pyObject) }; // ------------------------------------------------------------------------------------- @@ -492,7 +493,7 @@ public: virtual const char* AccessorMethod() const { return "GetAlgorithm()"; } virtual bool IsWrappable(const _pyID& theMesh) { return !myIsWrapped; } - DEFINE_STANDARD_RTTI (_pyAlgorithm) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyAlgorithm,_pyHypothesis) }; // ------------------------------------------------------------------------------------- @@ -507,7 +508,7 @@ public: virtual void Process( const Handle(_pyCommand)& theCommand); virtual void Flush(); - DEFINE_STANDARD_RTTI (_pyComplexParamHypo) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pyComplexParamHypo, _pyHypothesis); @@ -529,7 +530,7 @@ public: const _pyID& theMesh); virtual void Free() { my1dHyp.Nullify(); } - DEFINE_STANDARD_RTTI (_pyLayerDistributionHypo) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pyLayerDistributionHypo, _pyHypothesis); @@ -546,7 +547,7 @@ public: const _pyID& theMesh); void Flush(); - DEFINE_STANDARD_RTTI (_pyNumberOfSegmentsHyp) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pyNumberOfSegmentsHyp, _pyHypothesis); @@ -561,7 +562,7 @@ public: _pySegmentLengthAroundVertexHyp(const Handle(_pyCommand)& theCrCmd): _pyHypothesis(theCrCmd) {} virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd, const _pyID& theMesh); - DEFINE_STANDARD_RTTI (_pySegmentLengthAroundVertexHyp) + OCCT_DEFINE_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis) }; DEFINE_STANDARD_HANDLE (_pySegmentLengthAroundVertexHyp, _pyHypothesis); @@ -580,7 +581,7 @@ public: virtual bool CanClear(); static bool IsAliveCmd( const Handle(_pyCommand)& theCmd ); - DEFINE_STANDARD_RTTI (_pySelfEraser) + OCCT_DEFINE_STANDARD_RTTIEXT(_pySelfEraser,_pyObject) }; DEFINE_STANDARD_HANDLE (_pySelfEraser, _pyObject); @@ -602,7 +603,7 @@ public: void SetCreator( const Handle(_pyObject)& theCreator ) { myCreator = theCreator; } static bool CanBeArgOfMethod(const _AString& theMethodName); - DEFINE_STANDARD_RTTI (_pySubMesh) + OCCT_DEFINE_STANDARD_RTTIEXT(_pySubMesh,_pyObject) }; // ------------------------------------------------------------------------------------- /*! @@ -622,7 +623,7 @@ public: //virtual void Free() { myUsers.clear(); } const _pyID& GetNewID() const { return myNewID; } - DEFINE_STANDARD_RTTI (_pyFilter) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyFilter,_pyObject) }; DEFINE_STANDARD_HANDLE (_pyFilter, _pyObject); @@ -643,7 +644,7 @@ public: virtual bool CanClear(); void RemovedWithContents(); - DEFINE_STANDARD_RTTI (_pyGroup) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyGroup,_pySubMesh) }; // ------------------------------------------------------------------------------------- @@ -658,7 +659,7 @@ public: _pyHypothesisReader(); Handle(_pyHypothesis) GetHypothesis(const _AString& hypType, const Handle(_pyCommand)& creationCmd) const; - DEFINE_STANDARD_RTTI (_pyHypothesisReader) + OCCT_DEFINE_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient) }; #endif diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 016a2f84b..d26f37dd7 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -40,6 +40,8 @@ #include #include +#include + #include #include #include @@ -3913,6 +3915,7 @@ CORBA::Boolean FilterLibrary_i::Save() if ( myFileName == 0 || strlen( myFileName ) == 0 ) return false; +#if OCC_VERSION_MAJOR < 7 FILE* aOutFile = fopen( myFileName, "wt" ); if ( !aOutFile ) return false; @@ -3921,6 +3924,17 @@ CORBA::Boolean FilterLibrary_i::Save() aWriter.SetIndentation( 2 ); aWriter << myDoc; fclose( aOutFile ); +#else + std::filebuf fb; + fb.open( myFileName, std::ios::out ); + + Standard_OStream os( &fb ); + + LDOM_XmlWriter aWriter; + aWriter.SetIndentation( 2 ); + aWriter.Write( os, myDoc ); + fb.close(); +#endif TPythonDump()< +#include #include #include @@ -40,7 +41,6 @@ class SMESH_Gen_i; class SMESH_MeshEditor_i; -class Resource_DataMapOfAsciiStringAsciiString; // =========================================================================================== /*! diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index adbeb5021..ccd11a0ec 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -1369,7 +1369,11 @@ namespace } if ( surf->IsKind( STANDARD_TYPE(Geom_BSplineSurface )) || surf->IsKind( STANDARD_TYPE(Geom_BezierSurface ))) +#if OCC_VERSION_MAJOR < 7 if ( !noSafeTShapes.insert((const Standard_Transient*) _face.TShape() ).second ) +#else + if ( !noSafeTShapes.insert( _face.TShape().get() ).second ) +#endif isSafe = false; double f, l; @@ -1409,7 +1413,11 @@ namespace edgeIsSafe = false; } } +#if OCC_VERSION_MAJOR < 7 if ( !edgeIsSafe && !noSafeTShapes.insert((const Standard_Transient*) e.TShape() ).second ) +#else + if ( !edgeIsSafe && !noSafeTShapes.insert( _face.TShape().get() ).second ) +#endif isSafe = false; } return isSafe; diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index edc45176a..f1f26aebf 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -36,6 +36,7 @@ #endif #include +#include #ifdef NO_CAS_CATCH #include diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.hxx b/src/StdMeshers/StdMeshers_ProjectionUtils.hxx index 95ccf7869..dc42ed22f 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.hxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.hxx @@ -33,6 +33,8 @@ #include "SMDS_MeshElement.hxx" #include +#include +#include #include #include #include @@ -47,8 +49,6 @@ class SMESH_Algo; class SMESH_Hypothesis; class SMESH_Mesh; class SMESH_subMesh; -class TopTools_IndexedDataMapOfShapeListOfShape; -class TopTools_IndexedMapOfShape; class TopoDS_Shape; /*! diff --git a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx index b6435755b..3f7f273c1 100644 --- a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx +++ b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx @@ -27,13 +27,14 @@ #include "SMESH_ProxyMesh.hxx" +#include +#include + class SMESH_Mesh; class SMESH_ElementSearcher; class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_MeshFace; -class TColgp_Array1OfPnt; -class TColgp_Array1OfVec; class gp_Pnt; class gp_Vec;