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 interface to a function for the Glueing of faces 00024 00025 #include "GEOM_Function.hxx" 00026 00027 #include <TColStd_HSequenceOfTransient.hxx> 00028 00029 #define GLUE_ARG_BASE 1 00030 #define GLUE_ARG_TOLER 2 00031 #define GLUE_ARG_FACES 3 00032 #define GLUE_ARG_KEEPALL 4 00033 #define GLUE_ARG_GLUEEDG 5 00034 00035 class GEOMImpl_IGlue 00036 { 00037 public: 00038 00039 GEOMImpl_IGlue(Handle(GEOM_Function) theFunction): _func(theFunction) {} 00040 00041 void SetBase(Handle(GEOM_Function) theRefBase) 00042 { _func->SetReference(GLUE_ARG_BASE, theRefBase); } 00043 00044 Handle(GEOM_Function) GetBase() { return _func->GetReference(GLUE_ARG_BASE); } 00045 00046 void SetTolerance(const Standard_Real theTolerance) 00047 { _func->SetReal(GLUE_ARG_TOLER, theTolerance); } 00048 00049 Standard_Real GetTolerance() { return _func->GetReal(GLUE_ARG_TOLER); } 00050 00051 void SetFaces(const Handle(TColStd_HSequenceOfTransient)& theShapes) 00052 { _func->SetReferenceList(GLUE_ARG_FACES, theShapes); } 00053 00054 Handle(TColStd_HSequenceOfTransient) GetFaces() 00055 { return _func->GetReferenceList(GLUE_ARG_FACES); } 00056 00057 void SetKeepNonSolids (Standard_Boolean theFlag) { _func->SetInteger(GLUE_ARG_KEEPALL, theFlag ? 1 : 0); } 00058 Standard_Boolean GetKeepNonSolids() { return (_func->GetInteger(GLUE_ARG_KEEPALL) != 0); } 00059 00060 void SetGlueAllEdges (Standard_Boolean theFlag) { _func->SetInteger(GLUE_ARG_GLUEEDG, theFlag ? 1 : 0); } 00061 Standard_Boolean GetGlueAllEdges() { return (_func->GetInteger(GLUE_ARG_GLUEEDG) != 0); } 00062 00063 private: 00064 00065 Handle(GEOM_Function) _func; 00066 };