0030850: Visualization, OpenGl_Text - text within trihedron persistence jitters when...
[occt.git] / src / TopOpeBRepBuild / TopOpeBRepBuild_AreaBuilder.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-12-21
2// Created by: Jean Yves LEBEY
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 _TopOpeBRepBuild_AreaBuilder_HeaderFile
18#define _TopOpeBRepBuild_AreaBuilder_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TopOpeBRepBuild_ListOfListOfLoop.hxx>
25#include <TopOpeBRepBuild_ListIteratorOfListOfListOfLoop.hxx>
26#include <TopOpeBRepBuild_ListIteratorOfListOfLoop.hxx>
27#include <Standard_Boolean.hxx>
28#include <TopAbs_State.hxx>
29#include <TopOpeBRepBuild_ListOfLoop.hxx>
30#include <TopOpeBRepBuild_LoopEnum.hxx>
31#include <Standard_Integer.hxx>
32#include <Standard_Address.hxx>
33class TopOpeBRepBuild_LoopSet;
34class TopOpeBRepBuild_LoopClassifier;
35class TopOpeBRepBuild_Loop;
36
37
38
39//! The AreaBuilder algorithm is used to
40//! reconstruct complex topological objects as Faces
41//! or Solids.
42//! * Loop is the composite topological object of
43//! the boundary. Wire for a Face. Shell for a Solid.
44//! * LoopSet is a tool describing the object to
45//! build. It gives an iteration on Loops. For each
46//! Loop it tells if it is on the boundary or if it is
47//! an interference.
48//! * LoopClassifier is an algorithm used to test
49//! if a Loop is inside another Loop.
50//! The result of the reconstruction is an iteration
51//! on the reconstructed areas. An area is described
52//! by a set of Loops.
53//! A AreaBuilder is built with :
54//! - a LoopSet describing the object to reconstruct.
55//! - a LoopClassifier providing the classification algorithm.
56class TopOpeBRepBuild_AreaBuilder
57{
58public:
59
60 DEFINE_STANDARD_ALLOC
61
62
63 Standard_EXPORT TopOpeBRepBuild_AreaBuilder();
64
65 //! Creates a AreaBuilder to build the areas on
66 //! the shapes described by <LS> using the classifier <LC>.
67 Standard_EXPORT TopOpeBRepBuild_AreaBuilder(TopOpeBRepBuild_LoopSet& LS, TopOpeBRepBuild_LoopClassifier& LC, const Standard_Boolean ForceClass = Standard_False);
68
e6f550da 69 Standard_EXPORT virtual ~TopOpeBRepBuild_AreaBuilder();
42cf5bc1 70
71 //! Sets a AreaBuilder to find the areas on
72 //! the shapes described by <LS> using the classifier <LC>.
73 Standard_EXPORT virtual void InitAreaBuilder (TopOpeBRepBuild_LoopSet& LS, TopOpeBRepBuild_LoopClassifier& LC, const Standard_Boolean ForceClass = Standard_False);
74
75 //! Initialize iteration on areas.
76 Standard_EXPORT Standard_Integer InitArea();
77
78 Standard_EXPORT Standard_Boolean MoreArea() const;
79
80 Standard_EXPORT void NextArea();
81
82 //! Initialize iteration on loops of current Area.
83 Standard_EXPORT Standard_Integer InitLoop();
84
85 Standard_EXPORT Standard_Boolean MoreLoop() const;
86
87 Standard_EXPORT void NextLoop();
88
89 //! Returns the current Loop in the current area.
90 Standard_EXPORT const Handle(TopOpeBRepBuild_Loop)& Loop() const;
91
92 Standard_EXPORT virtual void ADD_Loop_TO_LISTOFLoop (const Handle(TopOpeBRepBuild_Loop)& L, TopOpeBRepBuild_ListOfLoop& LOL, const Standard_Address s = NULL) const;
93
94 Standard_EXPORT virtual void REM_Loop_FROM_LISTOFLoop (TopOpeBRepBuild_ListIteratorOfListOfLoop& ITLOL, TopOpeBRepBuild_ListOfLoop& LOL, const Standard_Address s = NULL) const;
95
96 Standard_EXPORT virtual void ADD_LISTOFLoop_TO_LISTOFLoop (TopOpeBRepBuild_ListOfLoop& LOL1, TopOpeBRepBuild_ListOfLoop& LOL2, const Standard_Address s = NULL, const Standard_Address s1 = NULL, const Standard_Address s2 = NULL) const;
97
98
99
100
101protected:
102
103
104 Standard_EXPORT TopAbs_State CompareLoopWithListOfLoop (TopOpeBRepBuild_LoopClassifier& LC, const Handle(TopOpeBRepBuild_Loop)& L, const TopOpeBRepBuild_ListOfLoop& LOL, const TopOpeBRepBuild_LoopEnum le) const;
105
106 Standard_EXPORT void Atomize (TopAbs_State& state, const TopAbs_State newstate) const;
107
108
109 TopOpeBRepBuild_ListOfListOfLoop myArea;
110 TopOpeBRepBuild_ListIteratorOfListOfListOfLoop myAreaIterator;
111 TopOpeBRepBuild_ListIteratorOfListOfLoop myLoopIterator;
112 Standard_Boolean myUNKNOWNRaise;
113
114
115private:
116
117
118
119
120
121};
122
123
124
125
126
127
128
129#endif // _TopOpeBRepBuild_AreaBuilder_HeaderFile