Back to index

salome-geom  6.5.0
GEOMImpl_IHealing.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 #include "GEOM_Function.hxx"
00024 
00025 #include <TColStd_HArray1OfInteger.hxx>
00026 #include <TColStd_HArray1OfExtendedString.hxx>
00027 
00028 #define ARG_SHAPE_PROCESS_OPERATORS   1
00029 #define ARG_SHAPE_PROCESS_PARAMS      2
00030 #define ARG_SHAPE_PROCESS_VALUES      3
00031 #define ARG_ORIGINAL                  4
00032 #define ARG_LIST_ARGUMENTS            5
00033 #define ARG_IS_COMMON_VERTEX          6
00034 #define ARG_TOLERANCE                 7
00035 #define ARG_DEV_EDGE_VALUE            8
00036 #define ARG_IS_BY_PARAMETER           9
00037 #define ARG_SUBSHAPE_INDEX           10
00038 
00039 
00040 class GEOMImpl_IHealing
00041 {
00042 public:
00043   GEOMImpl_IHealing(Handle(GEOM_Function) theFunction): _func(theFunction) {}
00044 
00045   void SetOperators( const Handle(TColStd_HArray1OfExtendedString)& arr ) {  if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_OPERATORS, arr); }
00046   Handle(TColStd_HArray1OfExtendedString) GetOperators() { return _func->GetStringArray(ARG_SHAPE_PROCESS_OPERATORS); }
00047 
00048   void SetParameters( const Handle(TColStd_HArray1OfExtendedString)& arr ) {  if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_PARAMS, arr); }
00049   Handle(TColStd_HArray1OfExtendedString) GetParameters() { return _func->GetStringArray(ARG_SHAPE_PROCESS_PARAMS); }
00050 
00051   void SetValues( const Handle(TColStd_HArray1OfExtendedString)& arr ) {  if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_VALUES, arr); }
00052   Handle(TColStd_HArray1OfExtendedString) GetValues() { return _func->GetStringArray(ARG_SHAPE_PROCESS_VALUES); }
00053 
00054   void SetOriginal( Handle(GEOM_Function)& f ) { _func->SetReference(ARG_ORIGINAL, f); }
00055   Handle(GEOM_Function) GetOriginal() { return _func->GetReference(ARG_ORIGINAL); }
00056 
00057   void SetFaces( const Handle(TColStd_HArray1OfInteger)& arr ) { if ( !arr.IsNull() ) _func->SetIntegerArray(ARG_LIST_ARGUMENTS, arr); }
00058   Handle(TColStd_HArray1OfInteger) GetFaces() { return _func->GetIntegerArray(ARG_LIST_ARGUMENTS); }
00059 
00060   void SetWires( const Handle(TColStd_HArray1OfInteger)& arr ) { if ( !arr.IsNull() ) _func->SetIntegerArray(ARG_LIST_ARGUMENTS, arr); }
00061   Handle(TColStd_HArray1OfInteger) GetWires() { return _func->GetIntegerArray(ARG_LIST_ARGUMENTS); }
00062 
00063   void SetIsCommonVertex( Standard_Boolean val ) { _func->SetInteger(ARG_IS_COMMON_VERTEX, val ? 1 : 0 ); }
00064   Standard_Boolean GetIsCommonVertex() { return (_func->GetInteger(ARG_IS_COMMON_VERTEX) != 0 ); }
00065 
00066   void SetIsByParameter( Standard_Boolean val ) { _func->SetInteger(ARG_IS_BY_PARAMETER, val ? 1 : 0 ); }
00067   Standard_Boolean GetIsByParameter() { return (_func->GetInteger(ARG_IS_BY_PARAMETER) != 0 ); }
00068 
00069   void SetTolerance( Standard_Real val ) { _func->SetReal(ARG_TOLERANCE, val); }
00070   Standard_Real GetTolerance() { return _func->GetReal(ARG_TOLERANCE); }
00071 
00072   void SetDevideEdgeValue( Standard_Real val ) { _func->SetReal(ARG_DEV_EDGE_VALUE, val); }
00073   Standard_Real GetDevideEdgeValue() { return _func->GetReal(ARG_DEV_EDGE_VALUE); }
00074 
00075   void SetIndex( Standard_Integer val ) { _func->SetInteger(ARG_SUBSHAPE_INDEX, val); }
00076   Standard_Integer GetIndex() { return _func->GetInteger(ARG_SUBSHAPE_INDEX); }
00077 
00078 private:
00079   Handle(GEOM_Function) _func;
00080 };