0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / TopOpeBRepTool / TopOpeBRepTool_REGUS.hxx
1 // Created on: 1999-01-04
2 // Created by: Xuan PHAM PHU
3 // Copyright (c) 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_REGUS_HeaderFile
18 #define _TopOpeBRepTool_REGUS_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <TopTools_DataMapOfShapeListOfShape.hxx>
26 #include <TopoDS_Shape.hxx>
27 #include <TopTools_IndexedMapOfShape.hxx>
28 #include <Standard_Integer.hxx>
29 #include <TopTools_MapOfShape.hxx>
30 #include <TopTools_ListOfShape.hxx>
31 class TopoDS_Shape;
32 class TopoDS_Face;
33 class TopoDS_Edge;
34
35
36
37 class TopOpeBRepTool_REGUS 
38 {
39 public:
40
41   DEFINE_STANDARD_ALLOC
42
43   
44   Standard_EXPORT TopOpeBRepTool_REGUS();
45   
46   Standard_EXPORT void Init (const TopoDS_Shape& S);
47   
48   Standard_EXPORT const TopoDS_Shape& S() const;
49   
50   Standard_EXPORT Standard_Boolean MapS();
51   
52   Standard_EXPORT static Standard_Boolean WireToFace (const TopoDS_Face& Fanc, const TopTools_ListOfShape& nWs, TopTools_ListOfShape& nFs);
53   
54   Standard_EXPORT static Standard_Boolean SplitF (const TopoDS_Face& Fanc, TopTools_ListOfShape& FSplits);
55   
56   Standard_EXPORT Standard_Boolean SplitFaces();
57   
58   Standard_EXPORT Standard_Boolean REGU();
59   
60   Standard_EXPORT void SetFsplits (TopTools_DataMapOfShapeListOfShape& Fsplits);
61   
62   Standard_EXPORT void GetFsplits (TopTools_DataMapOfShapeListOfShape& Fsplits) const;
63   
64   Standard_EXPORT void SetOshNsh (TopTools_DataMapOfShapeListOfShape& OshNsh);
65   
66   Standard_EXPORT void GetOshNsh (TopTools_DataMapOfShapeListOfShape& OshNsh) const;
67   
68   Standard_EXPORT Standard_Boolean InitBlock();
69   
70   Standard_EXPORT Standard_Boolean NextinBlock();
71   
72   Standard_EXPORT Standard_Boolean NearestF (const TopoDS_Edge& e, const TopTools_ListOfShape& lof, TopoDS_Face& ffound) const;
73
74
75
76
77 protected:
78
79
80
81
82
83 private:
84
85
86
87   Standard_Boolean hasnewsplits;
88   TopTools_DataMapOfShapeListOfShape myFsplits;
89   TopTools_DataMapOfShapeListOfShape myOshNsh;
90   TopoDS_Shape myS;
91   TopTools_DataMapOfShapeListOfShape mymapeFsstatic;
92   TopTools_DataMapOfShapeListOfShape mymapeFs;
93   TopTools_IndexedMapOfShape mymapemult;
94   Standard_Integer mynF;
95   Standard_Integer myoldnF;
96   TopoDS_Shape myf;
97   TopTools_MapOfShape myedstoconnect;
98   TopTools_ListOfShape mylFinBlock;
99
100
101 };
102
103
104
105
106
107
108
109 #endif // _TopOpeBRepTool_REGUS_HeaderFile