X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGEOMImpl%2FGEOMImpl_CylinderDriver.cxx;h=79ee42148e64556b72547c39c6ca6cc75db917bf;hb=7a3c2d25cc85b5c75acf2c8df92e4373af480d42;hp=3c91625b3440790a4358348d62a19c79447fafae;hpb=6e2763b42437045fd4b18aa3a6197865020de84b;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx b/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx index 3c91625b3..79ee42148 100644 --- a/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -65,7 +65,7 @@ GEOMImpl_CylinderDriver::GEOMImpl_CylinderDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const +Standard_Integer GEOMImpl_CylinderDriver::Execute(LOGBOOK& log) const { if (Label().IsNull()) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); @@ -119,7 +119,7 @@ Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const BRepPrimAPI_MakeCylinder MC (anAxes, aCI.GetR(), Abs(aCI.GetH())); MC.Build(); if (!MC.IsDone()) { - StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters"); + StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters"); } aShape = MC.Shape(); break; @@ -130,7 +130,7 @@ Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const BRepPrimAPI_MakeCylinder MC (anAxes, aCI.GetR(), Abs(aCI.GetH()), aCI.GetA()); MC.Build(); if (!MC.IsDone()) { - StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters. Failure."); + StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters. Failure."); } aShape = MC.Shape(); break; @@ -142,7 +142,11 @@ Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const if (aShape.IsNull()) return 0; aFunction->SetValue(aShape); +#if OCC_VERSION_MAJOR < 7 log.SetTouched(Label()); +#else + log->SetTouched(Label()); +#endif return 1; } @@ -169,19 +173,29 @@ GetCreationInformation(std::string& theOperationName, AddParam( theParams, "Radius", aCI.GetR() ); AddParam( theParams, "Height", aCI.GetH() ); break; - case CONE_PNT_VEC_R1_R2_H: + case CYLINDER_R_H_A: + AddParam( theParams, "Radius", aCI.GetR() ); + AddParam( theParams, "Height", aCI.GetH() ); + AddParam( theParams, "Angle", aCI.GetA() ); + break; + case CYLINDER_PNT_VEC_R_H: + AddParam( theParams, "Base Point", aCI.GetPoint() ); + AddParam( theParams, "Vector", aCI.GetVector() ); + AddParam( theParams, "Radius", aCI.GetR() ); + AddParam( theParams, "Height", aCI.GetH() ); + break; + case CYLINDER_PNT_VEC_R_H_A: AddParam( theParams, "Base Point", aCI.GetPoint() ); AddParam( theParams, "Vector", aCI.GetVector() ); AddParam( theParams, "Radius", aCI.GetR() ); AddParam( theParams, "Height", aCI.GetH() ); + AddParam( theParams, "Angle", aCI.GetA() ); break; default: return false; } - + return true; } -IMPLEMENT_STANDARD_HANDLE (GEOMImpl_CylinderDriver,GEOM_BaseDriver); - -IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CylinderDriver,GEOM_BaseDriver); +OCCT_IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_CylinderDriver,GEOM_BaseDriver);