0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / TopOpeBRepTool / TopOpeBRepTool_REGUW.hxx
1 // Created on: 1998-12-08
2 // Created by: Xuan PHAM PHU
3 // Copyright (c) 1998-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 _TopOpeBRepTool_REGUW_HeaderFile
18 #define _TopOpeBRepTool_REGUW_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TopoDS_Shape.hxx>
25 #include <TopOpeBRepTool_CORRISO.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <TopTools_DataMapOfShapeListOfShape.hxx>
28 #include <TopOpeBRepTool_IndexedDataMapOfShapeconnexity.hxx>
29 #include <TopTools_MapOfShape.hxx>
30 #include <TopTools_ListOfShape.hxx>
31 #include <Standard_Integer.hxx>
32 #include <Standard_Real.hxx>
33 #include <TopoDS_Vertex.hxx>
34 #include <gp_Pnt2d.hxx>
35 #include <TopoDS_Edge.hxx>
36 #include <gp_Dir2d.hxx>
37 class TopoDS_Face;
38 class TopoDS_Shape;
39 class TopoDS_Edge;
40 class TopoDS_Vertex;
41 class TopOpeBRepTool_connexity;
42
43
44
45 class TopOpeBRepTool_REGUW 
46 {
47 public:
48
49   DEFINE_STANDARD_ALLOC
50
51   
52   Standard_EXPORT TopOpeBRepTool_REGUW(const TopoDS_Face& FRef);
53   
54   Standard_EXPORT const TopoDS_Face& Fref() const;
55   
56   Standard_EXPORT void SetEsplits (TopTools_DataMapOfShapeListOfShape& Esplits);
57   
58   Standard_EXPORT void GetEsplits (TopTools_DataMapOfShapeListOfShape& Esplits) const;
59   
60   Standard_EXPORT void SetOwNw (TopTools_DataMapOfShapeListOfShape& OwNw);
61   
62   Standard_EXPORT void GetOwNw (TopTools_DataMapOfShapeListOfShape& OwNw) const;
63   
64   Standard_EXPORT Standard_Boolean SplitEds();
65   
66   Standard_EXPORT void Init (const TopoDS_Shape& S);
67   
68   Standard_EXPORT const TopoDS_Shape& S() const;
69   
70   Standard_EXPORT Standard_Boolean HasInit() const;
71   
72   Standard_EXPORT Standard_Boolean MapS();
73   
74   Standard_EXPORT Standard_Boolean REGU (const Standard_Integer istep, const TopoDS_Shape& Scur, TopTools_ListOfShape& Splits);
75   
76   Standard_EXPORT Standard_Boolean REGU();
77   
78   Standard_EXPORT Standard_Boolean GetSplits (TopTools_ListOfShape& Splits) const;
79   
80   Standard_EXPORT Standard_Boolean InitBlock();
81   
82   Standard_EXPORT Standard_Boolean NextinBlock();
83   
84   Standard_EXPORT Standard_Boolean NearestE (const TopTools_ListOfShape& loe, TopoDS_Edge& efound) const;
85   
86   Standard_EXPORT Standard_Boolean Connexity (const TopoDS_Vertex& v, TopOpeBRepTool_connexity& co) const;
87   
88   Standard_EXPORT Standard_Boolean AddNewConnexity (const TopoDS_Vertex& v, const Standard_Integer OriKey, const TopoDS_Edge& e);
89   
90   Standard_EXPORT Standard_Boolean RemoveOldConnexity (const TopoDS_Vertex& v, const Standard_Integer OriKey, const TopoDS_Edge& e);
91   
92   Standard_EXPORT Standard_Boolean UpdateMultiple (const TopoDS_Vertex& v);
93
94
95
96
97 protected:
98
99
100
101
102
103 private:
104
105   
106   Standard_EXPORT void InitStep (const TopoDS_Shape& S);
107
108
109   TopoDS_Shape myS;
110   TopOpeBRepTool_CORRISO myCORRISO;
111   Standard_Boolean hasnewsplits;
112   TopTools_DataMapOfShapeListOfShape myEsplits;
113   TopTools_DataMapOfShapeListOfShape myOwNw;
114   TopOpeBRepTool_IndexedDataMapOfShapeconnexity mymapvEds;
115   TopTools_MapOfShape mymapvmultiple;
116   TopTools_ListOfShape myListVmultiple;
117   Standard_Integer iStep;
118   Standard_Real mytol2d;
119   Standard_Boolean isinit0;
120   TopoDS_Vertex myv0;
121   gp_Pnt2d myp2d0;
122   TopoDS_Vertex myv;
123   TopoDS_Edge myed;
124   gp_Pnt2d myp2d;
125   gp_Dir2d mytg2d;
126
127
128 };
129
130
131
132
133
134
135
136 #endif // _TopOpeBRepTool_REGUW_HeaderFile