From 82738c83d47be85dc8a3eb7f452819c3582ccef6 Mon Sep 17 00:00:00 2001 From: dcq Date: Wed, 26 May 2004 11:12:04 +0000 Subject: [PATCH] DCQ : OCC 4.0 compatibilty --- src/GEOM/GEOM_Gen_i.cc | 17 +++++++++++++---- src/OperationGUI/OperationGUI_FilletDlg.cxx | 4 ++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/GEOM/GEOM_Gen_i.cc b/src/GEOM/GEOM_Gen_i.cc index 41506b1e7..aec7970cd 100644 --- a/src/GEOM/GEOM_Gen_i.cc +++ b/src/GEOM/GEOM_Gen_i.cc @@ -2735,12 +2735,13 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportIGES(const char* filename) THROW_SALOME_CORBA_EXCEPTION("Error in reading import file", SALOME::BAD_PARAM); } MESSAGE("ImportIGES : all Geometry Transfer" << endl ) ; - //OCC 5.1.2 porting -// aReader.Clear(); -// aReader.TransferRoots(false); +#if OCC_VERSION_MAJOR >= 5 aReader.ClearShapes(); aReader.TransferRoots(); - +#else + aReader.Clear(); + aReader.TransferRoots(false); +#endif MESSAGE("ImportIGES : count of shapes produced = " << aReader.NbShapes() << endl ); TopoDS_Shape shape = aReader.OneShape(); @@ -4891,7 +4892,11 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape, fill.Add(E); } for (int i = 1;i<=fill.NbContours();i++) { +#if OCC_VERSION_MAJOR >= 5 fill.SetRadius(radius,i,i); +#else + fill.SetRadius(radius,i); +#endif } tds = fill.Shape(); @@ -4906,7 +4911,11 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape, } } for (int i = 1;i<=fill.NbContours();i++) { +#if OCC_VERSION_MAJOR >= 5 fill.SetRadius(radius,i,i); +#else + fill.SetRadius(radius,i); +#endif } tds = fill.Shape(); } diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index 6f81cae0f..470d0e226 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -449,7 +449,11 @@ void OperationGUI_FilletDlg::MakePreview() for(int i = 1; i <= fill.NbContours(); i++) { try { +#if OCC_VERSION_MAJOR >= 5 fill.SetRadius(myRadius,i,i); +#else + fill.SetRadius(myRadius,i); +#endif } catch(Standard_Failure) { QApplication::restoreOverrideCursor(); -- 2.39.2