Back to index

salome-geom  6.5.0
GEOMImpl_IPrism.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 //NOTE: This is an intreface to a function for the Prism creation.
00024 
00025 #include "GEOM_Function.hxx"
00026 // #include <GEOMImpl_Mode.hxx>  TEST
00027 
00028 #define PRISM_ARG_H        1
00029 #define PRISM_ARG_VEC      2
00030 #define PRISM_ARG_BASE     3
00031 #define PRISM_ARG_PNT_F    4
00032 #define PRISM_ARG_PNT_L    5
00033 #define PRISM_ARG_DX       6
00034 #define PRISM_ARG_DY       7
00035 #define PRISM_ARG_DZ       8
00036 #define PRISM_ARG_SCALE    9
00037 #define PRISM_ARG_DRAFT    10
00038 #define PRISM_ARG_FUSE     11
00039 #define PRISM_ARG_INIT     12
00040 #define PRISM_ARG_MODE     13
00041 
00042 class GEOMImpl_IPrism
00043 {
00044  public:
00045 
00046   GEOMImpl_IPrism(Handle(GEOM_Function) theFunction): _func(theFunction) {}
00047 
00048   void SetBase  (Handle(GEOM_Function) theRefBase      ) { _func->SetReference(PRISM_ARG_BASE, theRefBase); }
00049   void SetVector(Handle(GEOM_Function) theRefVector    ) { _func->SetReference(PRISM_ARG_VEC , theRefVector); }
00050   void SetFirstPoint(Handle(GEOM_Function) thePoint    ) { _func->SetReference(PRISM_ARG_PNT_F, thePoint); }
00051   void SetLastPoint (Handle(GEOM_Function) thePoint    ) { _func->SetReference(PRISM_ARG_PNT_L, thePoint); }
00052   void SetInitShape (Handle(GEOM_Function) theInitShape) { _func->SetReference(PRISM_ARG_INIT,  theInitShape); }
00053 
00054   Handle(GEOM_Function) GetBase  () { return _func->GetReference(PRISM_ARG_BASE); }
00055   Handle(GEOM_Function) GetVector() { return _func->GetReference(PRISM_ARG_VEC ); }
00056   Handle(GEOM_Function) GetFirstPoint() { return _func->GetReference(PRISM_ARG_PNT_F ); }
00057   Handle(GEOM_Function) GetLastPoint () { return _func->GetReference(PRISM_ARG_PNT_L ); }
00058   Handle(GEOM_Function) GetInitShape () { return _func->GetReference(PRISM_ARG_INIT  ); }
00059 
00060   void SetDX(double theDX) { _func->SetReal(PRISM_ARG_DX, theDX); }
00061   void SetDY(double theDY) { _func->SetReal(PRISM_ARG_DY, theDY); }
00062   void SetDZ(double theDZ) { _func->SetReal(PRISM_ARG_DZ, theDZ); }
00063 
00064   double GetDX() { return _func->GetReal(PRISM_ARG_DX); }
00065   double GetDY() { return _func->GetReal(PRISM_ARG_DY); }
00066   double GetDZ() { return _func->GetReal(PRISM_ARG_DZ); }
00067 
00068   void SetH         (double theH    ) { _func->SetReal(PRISM_ARG_H, theH); }
00069   void SetScale     (double theH    ) { _func->SetReal(PRISM_ARG_SCALE, theH); }
00070   void SetDraftAngle(double theAngle) { _func->SetReal(PRISM_ARG_DRAFT, theAngle); }
00071 
00072   double GetH()          { return _func->GetReal(PRISM_ARG_H); }
00073   double GetScale() { return _func->GetReal(PRISM_ARG_SCALE); }
00074   double GetDraftAngle() { return _func->GetReal(PRISM_ARG_DRAFT); }
00075   
00076   void SetFuseFlag(int theFlag) { _func->SetInteger(PRISM_ARG_FUSE, theFlag); }
00077 //   void SetMode(GEOMImpl_Mode theMode) { _func->SetInteger(PRISM_ARG_MODE, theMode); }  //TEST
00078 
00079   int  GetFuseFlag()      { return _func->GetInteger(PRISM_ARG_FUSE); }
00080 //   GEOMImpl_Mode GetMode() { return _func->GetInteger(PRISM_ARG_MODE); }   //TEST
00081 
00082  private:
00083 
00084   Handle(GEOM_Function) _func;
00085 };