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 // File : GEOMImpl_PolylineDumper.h
24 // Author : Sergey KHROMOV
27 #ifndef _GEOMImpl_PolylineDumper_HXX_
28 #define _GEOMImpl_PolylineDumper_HXX_
31 #include "GEOM_GEOMImpl.hxx"
33 #include <GEOM_Object.hxx>
35 #include <TColStd_HArray1OfExtendedString.hxx>
36 #include <TColStd_HArray1OfByte.hxx>
37 #include <TColStd_HArray1OfReal.hxx>
43 * This is a helper class to form a dump of a polyline 2d curves creation
46 class GEOMIMPL_EXPORT GEOMImpl_PolylineDumper
52 * This construcor initializes the object with 2D polyline creation
55 * \param theCoords the list of coordinates list. theCoordsList[0]
56 * is the coordinates list of the first section. theCoordsList[1]
57 * is for the second section etc.
58 * \param theNames the list of names. The order corresponds to theCoords.
59 * \param theTypes the list of curve types. The order corresponds to
61 * \param theCloseds the list of Closed flags. The order corresponds to
63 * \param thePlnCoords 9 double values, defining origin,
64 * OZ and OX directions of the working plane.
66 GEOMImpl_PolylineDumper
67 (const std::list <std::list <double> > &theCoords,
68 const Handle(TColStd_HArray1OfExtendedString) &theNames,
69 const Handle(TColStd_HArray1OfByte) &theTypes,
70 const Handle(TColStd_HArray1OfByte) &theCloseds,
71 const Handle(TColStd_HArray1OfReal) &thePlnCoords);
74 * This construcor initializes the object with 2D polyline creation
77 * \param theCoords the list of coordinates list. theCoordsList[0]
78 * is the coordinates list of the first section. theCoordsList[1]
79 * is for the second section etc.
80 * \param theNames the list of names. The order corresponds to theCoords.
81 * \param theTypes the list of curve types. The order corresponds to
83 * \param theCloseds the list of Closed flags. The order corresponds to
85 * \param theWorkingPlane planar Face or LCS(Marker) of the working plane.
87 GEOMImpl_PolylineDumper
88 (const std::list <std::list <double> > &theCoords,
89 const Handle(TColStd_HArray1OfExtendedString) &theNames,
90 const Handle(TColStd_HArray1OfByte) &theTypes,
91 const Handle(TColStd_HArray1OfByte) &theCloseds,
92 const Handle(GEOM_Object) &theWorkingPlane);
95 * This method returns Standard_True if the dump description is created
98 * \return Standard_True in case of success; Standard_False otherwise.
100 Standard_Boolean IsDone() const
104 * This method performs dump of the polyline.
106 * \param theObject the newly created object.
107 * \return Standard_True in case of success; Standard_False otherwise.
109 Standard_Boolean Dump(const Handle(GEOM_Object) &theObject);
114 * This method generates the description required for python dump.
115 * It is called from constructor.
121 const std::list <std::list <double> > &myCoords;
122 Handle(TColStd_HArray1OfExtendedString) myNames;
123 Handle(TColStd_HArray1OfByte) myTypes;
124 Handle(TColStd_HArray1OfByte) myCloseds;
125 Handle(TColStd_HArray1OfReal) myPlnCoords;
126 Handle(GEOM_Object) myWorkingPlane;
127 Standard_Boolean myIsDone;
128 TCollection_ExtendedString myDescr;