From: dcq Date: Wed, 26 May 2004 11:12:04 +0000 (+0000) Subject: DCQ : OCC 4.0 compatibilty X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=82738c83d47be85dc8a3eb7f452819c3582ccef6;p=modules%2Fgeom.git DCQ : OCC 4.0 compatibilty --- 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();