Salome HOME
4fef49e1ab39768bf80c114d3b988a4fe818b028
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_WESCorrector.hxx
1 //  Copyright (C) 2007-2008  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.
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 #ifndef _GEOMAlgo_WESCorrector_HeaderFile
23 #define _GEOMAlgo_WESCorrector_HeaderFile
24
25 #ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile
26 #include <GEOMAlgo_PWireEdgeSet.hxx>
27 #endif
28 #ifndef _GEOMAlgo_WireEdgeSet_HeaderFile
29 #include <GEOMAlgo_WireEdgeSet.hxx>
30 #endif
31 #ifndef _BOP_ListOfConnexityBlock_HeaderFile
32 #include <BOP_ListOfConnexityBlock.hxx>
33 #endif
34 #ifndef _GEOMAlgo_Algo_HeaderFile
35 #include <GEOMAlgo_Algo.hxx>
36 #endif
37 class GEOMAlgo_WireEdgeSet;
38
39
40 #ifndef _Standard_HeaderFile
41 #include <Standard.hxx>
42 #endif
43 #ifndef _Standard_Macro_HeaderFile
44 #include <Standard_Macro.hxx>
45 #endif
46
47
48 //!  The algorithm to change the Wire Edges Set (WES) contents. <br>
49 //!   The NewWES will contain only wires instead of wires and edges. <br>
50 class GEOMAlgo_WESCorrector  : public GEOMAlgo_Algo {
51
52 public:
53
54     void* operator new(size_t,void* anAddress) 
55       {
56         return anAddress;
57       }
58     void* operator new(size_t size) 
59       { 
60         return Standard::Allocate(size); 
61       }
62     void  operator delete(void *anAddress) 
63       { 
64         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
65       }
66  // Methods PUBLIC
67  // 
68
69
70 //! Empty constructor; <br>
71 //! <br>
72 Standard_EXPORT GEOMAlgo_WESCorrector();
73 Standard_EXPORT virtual ~GEOMAlgo_WESCorrector();
74
75
76 //! Modifier <br>
77 Standard_EXPORT   void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ;
78
79
80 //! Performs the algorithm that  consists  of  two  steps <br>
81 //! 1. Make conexity blocks (  DoConnexityBlocks()  ) <br>
82 //! 2. Make corrections     (  DoCorrections()  ) <br>
83 Standard_EXPORT virtual  void Perform() ;
84
85
86 //! Selector <br>
87 Standard_EXPORT   GEOMAlgo_WireEdgeSet& WES() ;
88
89
90 //! Selector <br>
91 Standard_EXPORT   GEOMAlgo_WireEdgeSet& NewWES() ;
92
93
94
95
96
97 protected:
98
99  // Methods PROTECTED
100  // 
101
102
103 Standard_EXPORT   void DoConnexityBlocks() ;
104
105
106 Standard_EXPORT   void DoCorrections() ;
107
108
109  // Fields PROTECTED
110  //
111 GEOMAlgo_PWireEdgeSet myWES;
112 GEOMAlgo_WireEdgeSet myNewWES;
113 BOP_ListOfConnexityBlock myConnexityBlocks;
114
115
116 private: 
117
118  // Methods PRIVATE
119  // 
120
121
122  // Fields PRIVATE
123  //
124
125
126 };
127
128
129
130
131
132 // other Inline functions and methods (like "C++: function call" methods)
133 //
134
135
136 #endif