0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / BRepAlgo / BRepAlgo_FaceRestrictor.hxx
1 // Created on: 1995-09-01
2 // Created by: Yves FRICAUD
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRepAlgo_FaceRestrictor_HeaderFile
18 #define _BRepAlgo_FaceRestrictor_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <TopoDS_Face.hxx>
26 #include <TopTools_ListOfShape.hxx>
27 #include <TopTools_DataMapOfShapeListOfShape.hxx>
28 class TopoDS_Face;
29 class TopoDS_Wire;
30
31
32 //! Builds all  the faces  limited  with a set of non
33 //! jointing   and     planars     wires.    if
34 //! <ControlOrientation> is false  The Wires must have
35 //! correct orientations.  Sinon orientation des wires
36 //! de telle sorte que les faces ne soient pas infinies
37 //! et qu'elles soient disjointes.
38 class BRepAlgo_FaceRestrictor 
39 {
40 public:
41
42   DEFINE_STANDARD_ALLOC
43
44   
45   Standard_EXPORT BRepAlgo_FaceRestrictor();
46   
47   //! the surface of <F> will be the the surface of each new
48   //! faces built.
49   //! <Proj> is used to update pcurves on edges if necessary.
50   //! See Add().
51   Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Boolean Proj = Standard_False, const Standard_Boolean ControlOrientation = Standard_False);
52   
53   //! Add the wire <W> to the set of wires.
54   //!
55   //! Warning:
56   //! The Wires must be closed.
57   //!
58   //! The edges of <W> can be modified if they  have not pcurves
59   //! on the surface <S>  of <F>. In this  case
60   //! if <Proj> is false the first pcurve of  the edge
61   //! is positionned on <S>.
62   //! if <Proj> is True ,the Pcurve On <S> is the
63   //! projection of the  curve 3d on <F>.
64   Standard_EXPORT void Add (TopoDS_Wire& W);
65   
66   //! Removes all the Wires
67   Standard_EXPORT void Clear();
68   
69   //! Evaluate all the faces limited by the set of Wires.
70   Standard_EXPORT void Perform();
71   
72   Standard_EXPORT Standard_Boolean IsDone() const;
73   
74   Standard_EXPORT Standard_Boolean More() const;
75   
76   Standard_EXPORT void Next();
77   
78   Standard_EXPORT TopoDS_Face Current() const;
79
80
81
82
83 protected:
84
85
86
87
88
89 private:
90
91   
92   //! Evaluate all the faces limited by the set of Wires.
93   Standard_EXPORT void PerformWithCorrection();
94
95
96   Standard_Boolean myDone;
97   Standard_Boolean modeProj;
98   TopoDS_Face myFace;
99   TopTools_ListOfShape wires;
100   TopTools_ListOfShape faces;
101   Standard_Boolean myCorrection;
102   TopTools_DataMapOfShapeListOfShape keyIsIn;
103   TopTools_DataMapOfShapeListOfShape keyContains;
104
105
106 };
107
108
109
110
111
112
113
114 #endif // _BRepAlgo_FaceRestrictor_HeaderFile