1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 //NOTE: This is an interface to a function for the Polyline2D creation.
26 #ifndef _GEOMImpl_IPolyline2D_HXX_
27 #define _GEOMImpl_IPolyline2D_HXX_
30 #include <GEOM_GEOMImpl.hxx>
31 #include <GEOM_Function.hxx>
35 #include <TColStd_HArray1OfExtendedString.hxx>
36 #include <TColStd_HArray1OfByte.hxx>
37 #include <TColStd_HArray1OfReal.hxx>
40 #define POLY_ARG_NAMES 1
41 #define POLY_ARG_TYPES 2
42 #define POLY_ARG_CLOSEDS 3
43 #define POLY_ARG_COORDS 4
44 #define POLY_ARG_START_INDICES 5
45 #define POLY_ARG_WPLANE_DBLS 6
46 #define POLY_ARG_WPLANE_OBJ 7
49 class GEOMIMPL_EXPORT GEOMImpl_IPolyline2D
53 GEOMImpl_IPolyline2D(Handle(GEOM_Function) theFunction): _func(theFunction) {}
55 void SetNames(const Handle(TColStd_HArray1OfExtendedString) &theValue)
56 { _func->SetStringArray(POLY_ARG_NAMES, theValue); }
58 Handle(TColStd_HArray1OfExtendedString) GetNames()
59 { return _func->GetStringArray(POLY_ARG_NAMES); }
61 void SetTypes(const Handle(TColStd_HArray1OfByte) &theValue)
62 { _func->SetByteArray(POLY_ARG_TYPES, theValue); }
64 Handle(TColStd_HArray1OfByte) GetTypes()
65 { return _func->GetByteArray(POLY_ARG_TYPES); }
67 void SetClosedFlags(const Handle(TColStd_HArray1OfByte) &theValue)
68 { _func->SetBooleanArray(POLY_ARG_CLOSEDS, theValue); }
70 Handle(TColStd_HArray1OfByte) GetClosedFlags()
71 { return _func->GetBooleanArray(POLY_ARG_CLOSEDS); }
73 void SetWorkingPlaneDbls(const Handle(TColStd_HArray1OfReal) &thePlane)
74 { _func->SetRealArray(POLY_ARG_WPLANE_DBLS, thePlane); }
76 Handle(TColStd_HArray1OfReal) GetWorkingPlaneDbls()
77 { return _func->GetRealArray(POLY_ARG_WPLANE_DBLS); }
79 void SetWorkingPlane(const Handle(GEOM_Function) &thePlane)
80 { _func->SetReference(POLY_ARG_WPLANE_OBJ, thePlane); }
82 Handle(GEOM_Function) GetWorkingPlane()
83 { return _func->GetReference(POLY_ARG_WPLANE_OBJ); }
85 void SetCoords(const std::list <std::list <double> > &theValue);
87 void GetCoords(std::list <std::list <double> > &theValue);
91 Handle(GEOM_Function) _func;