Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GEOMUtils_Hatcher.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 
23 #ifndef _GEOMUtils_Hatcher_HXX_
24 #define _GEOMUtils_Hatcher_HXX_
25 
26 
27 #include <Geom2dHatch_Hatcher.hxx>
28 #include <GeomAbs_IsoType.hxx>
29 #include <TColStd_HArray1OfInteger.hxx>
30 #include <TColStd_HArray1OfReal.hxx>
31 #include <TopoDS_Face.hxx>
32 
33 
37 namespace GEOMUtils
38 {
39  class Hatcher
40  {
41  public:
42 
46  Standard_EXPORT Hatcher(const TopoDS_Face &theFace);
47 
53  Standard_EXPORT void Init(const Standard_Integer theNbIsos);
54 
61  Standard_EXPORT void Init(const Standard_Integer theNbIsoU,
62  const Standard_Integer theNbIsoV);
63 
70  Standard_EXPORT void Init(const GeomAbs_IsoType theIsoType,
71  const Standard_Real theParameter);
72 
76  Standard_EXPORT void Perform();
77 
84  Standard_Boolean IsDone() const
85  { return myIsDone; }
86 
92  const TopoDS_Face &GetFace() const
93  { return myFace; }
94 
103  Standard_EXPORT Standard_Integer GetNbDomains
104  (const Standard_Integer theHatchingIndex) const;
105 
116  Standard_EXPORT Standard_Boolean GetDomain
117  (const Standard_Integer theHatchingIndex,
118  const Standard_Integer theDomainIndex,
119  Standard_Real &theParam1,
120  Standard_Real &theParam2) const;
121 
130  Standard_EXPORT Standard_Boolean IsDomainInfinite
131  (const Standard_Integer theHatchingIndex,
132  const Standard_Integer theDomainIndex) const;
133 
139  Standard_EXPORT const Geom2dHatch_Hatcher &GetHatcher() const
140  { return myHatcher; }
141 
148  Standard_EXPORT const Handle(TColStd_HArray1OfInteger) &GetUIndices() const
149  { return myUInd; }
150 
157  Standard_EXPORT const Handle(TColStd_HArray1OfInteger) &GetVIndices() const
158  { return myVInd; }
159 
166  Standard_EXPORT const Handle(TColStd_HArray1OfReal) &GetUParams() const
167  { return myUPrm; }
168 
175  Standard_EXPORT const Handle(TColStd_HArray1OfReal) &GetVParams() const
176  { return myVPrm; }
177 
184  Standard_EXPORT const Handle(Geom2d_Curve) &GetHatching
185  (const Standard_Integer theHatchingIndex) const;
186 
187  protected:
188 
192  void Clear();
193 
194  private:
195 
196  Geom2dHatch_Hatcher myHatcher;
197  TopoDS_Face myFace;
198  Standard_Boolean myIsDone;
199  Standard_Real myUMin;
200  Standard_Real myUMax;
201  Standard_Real myVMin;
202  Standard_Real myVMax;
203  Handle(TColStd_HArray1OfReal) myUPrm;
204  Handle(TColStd_HArray1OfReal) myVPrm;
205  Handle(TColStd_HArray1OfInteger) myUInd;
206  Handle(TColStd_HArray1OfInteger) myVInd;
207 
208  };
209 }
210 
211 #endif