00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 //NOTE: This is an intreface to a function for the Filling operation. 00024 // 00025 #include "GEOM_Function.hxx" 00026 00027 #define FILL_ARG_MINDEG 1 00028 #define FILL_ARG_MAXDEG 2 00029 #define FILL_ARG_TOL2D 3 00030 #define FILL_ARG_TOL3D 4 00031 #define FILL_ARG_SHAPE 5 00032 #define FILL_ARG_NBITER 6 00033 #define FILL_ARG_APPROX 7 00034 #define FILL_ARG_METHOD 8 00035 00036 class GEOMImpl_IFilling 00037 { 00038 public: 00039 00040 GEOMImpl_IFilling(Handle(GEOM_Function) theFunction): _func(theFunction) {} 00041 00042 void SetTol2D(double theTol2D) { _func->SetReal(FILL_ARG_TOL2D, theTol2D); } 00043 void SetTol3D(double theTol3D) { _func->SetReal(FILL_ARG_TOL3D, theTol3D); } 00044 double GetTol2D() { return _func->GetReal(FILL_ARG_TOL2D); } 00045 double GetTol3D() { return _func->GetReal(FILL_ARG_TOL3D); } 00046 00047 void SetMinDeg(int theMinDeg) { _func->SetInteger(FILL_ARG_MINDEG, theMinDeg); } 00048 void SetMaxDeg(int theMaxDeg) { _func->SetInteger(FILL_ARG_MAXDEG, theMaxDeg); } 00049 int GetMinDeg() { return _func->GetInteger(FILL_ARG_MINDEG); } 00050 int GetMaxDeg() { return _func->GetInteger(FILL_ARG_MAXDEG); } 00051 void SetNbIter(int theNbIter) { _func->SetInteger(FILL_ARG_NBITER, theNbIter); } 00052 int GetNbIter() { return _func->GetInteger(FILL_ARG_NBITER); } 00053 00054 void SetApprox(bool theApprox) { _func->SetInteger(FILL_ARG_APPROX, theApprox); } 00055 bool GetApprox() { return _func->GetInteger(FILL_ARG_APPROX); } 00056 00057 void SetMethod(int theMethod) { _func->SetInteger(FILL_ARG_METHOD, theMethod); } 00058 int GetMethod() { return _func->GetInteger(FILL_ARG_METHOD); } 00059 00060 void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(FILL_ARG_SHAPE, theShape); } 00061 Handle(GEOM_Function) GetShape() { return _func->GetReference(FILL_ARG_SHAPE); } 00062 00063 private: 00064 00065 Handle(GEOM_Function) _func; 00066 };