0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / BRepFill / BRepFill_TrimShellCorner.hxx
1 // Created on: 2003-10-21
2 // Created by: Mikhail KLOKOV
3 // Copyright (c) 2003-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _BRepFill_TrimShellCorner_HeaderFile
17 #define _BRepFill_TrimShellCorner_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
22
23 #include <BRepFill_TransitionStyle.hxx>
24 #include <gp_Ax2.hxx>
25 #include <TopoDS_Shape.hxx>
26 #include <TopoDS_Wire.hxx>
27 #include <TopoDS_Face.hxx>
28 #include <TopTools_HArray2OfShape.hxx>
29 #include <TopTools_HArray1OfShape.hxx>
30 #include <Standard_Boolean.hxx>
31 #include <TopTools_DataMapOfShapeListOfShape.hxx>
32 #include <TopTools_ListOfShape.hxx>
33 #include <BOPDS_PDS.hxx>
34 class gp_Ax2;
35 class TopoDS_Face;
36 class TopoDS_Wire;
37 class TopoDS_Shape;
38
39
40 //! Trims sets of faces in the corner to make proper parts of pipe
41 class BRepFill_TrimShellCorner 
42 {
43 public:
44
45   DEFINE_STANDARD_ALLOC
46
47   
48   //! Constructor: takes faces to intersect,
49   //! type of transition (it can be RightCorner or RoundCorner)
50   //! and axis of bisector plane
51   Standard_EXPORT BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces,
52                                            const BRepFill_TransitionStyle         theTransition,
53                                            const gp_Ax2&                          theAxeOfBisPlane);
54
55   Standard_EXPORT void AddBounds (const Handle(TopTools_HArray2OfShape)& Bounds);
56   
57   Standard_EXPORT void AddUEdges (const Handle(TopTools_HArray2OfShape)& theUEdges);
58   
59   Standard_EXPORT void AddVEdges (const Handle(TopTools_HArray2OfShape)& theVEdges,
60                                   const Standard_Integer theIndex);
61   
62   Standard_EXPORT void Perform();
63   
64   Standard_EXPORT Standard_Boolean IsDone() const;
65   
66   Standard_EXPORT Standard_Boolean HasSection() const;
67   
68   Standard_EXPORT void Modified (const TopoDS_Shape& S, TopTools_ListOfShape& theModified);
69
70
71
72
73 protected:
74
75
76
77
78
79 private:
80
81   Standard_Boolean MakeFacesSec(const Standard_Integer                     theIndex,
82                                 const BOPDS_PDS&                           theDS,
83                                 const Standard_Integer                     theFaceIndex1, 
84                                 const Standard_Integer                     theFaceIndex2, 
85                                 const Standard_Integer                     theSSInterfIndex);
86   
87   Standard_Boolean MakeFacesNonSec(const Standard_Integer                     theIndex,
88                                    const BOPDS_PDS&                           theDS,
89                                    const Standard_Integer                     theFaceIndex1, 
90                                    const Standard_Integer                     theFaceIndex2);
91   
92   Standard_Boolean ChooseSection(const TopoDS_Shape& Comp,
93                                  const TopoDS_Vertex& theFirstVertex,
94                                  const TopoDS_Vertex& theLastVertex,
95                                  TopoDS_Shape& resWire,
96                                  gp_Pln& resPlane,
97                                  Standard_Boolean& IsSingular);
98
99
100   BRepFill_TransitionStyle myTransition;
101   gp_Ax2 myAxeOfBisPlane;
102   TopoDS_Shape myShape1;
103   TopoDS_Shape myShape2;
104   Handle(TopTools_HArray2OfShape) myBounds;
105   Handle(TopTools_HArray2OfShape) myUEdges;
106   Handle(TopTools_HArray1OfShape) myVEdges;
107   Handle(TopTools_HArray2OfShape) myFaces;
108   Standard_Boolean myDone;
109   Standard_Boolean myHasSection;
110   TopTools_DataMapOfShapeListOfShape myHistMap;
111
112
113 };
114
115
116
117
118
119
120
121 #endif // _BRepFill_TrimShellCorner_HeaderFile