0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / LocOpe / LocOpe_GluedShape.hxx
1 // Created on: 1996-01-30
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1996-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 _LocOpe_GluedShape_HeaderFile
18 #define _LocOpe_GluedShape_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <TopoDS_Shape.hxx>
24 #include <TopTools_MapOfShape.hxx>
25 #include <TopTools_DataMapOfShapeShape.hxx>
26 #include <LocOpe_GeneratedShape.hxx>
27 #include <TopTools_ListOfShape.hxx>
28 class TopoDS_Shape;
29 class TopoDS_Face;
30 class TopoDS_Edge;
31 class TopoDS_Vertex;
32
33
34 class LocOpe_GluedShape;
35 DEFINE_STANDARD_HANDLE(LocOpe_GluedShape, LocOpe_GeneratedShape)
36
37
38 class LocOpe_GluedShape : public LocOpe_GeneratedShape
39 {
40
41 public:
42
43   
44   Standard_EXPORT LocOpe_GluedShape();
45   
46   Standard_EXPORT LocOpe_GluedShape(const TopoDS_Shape& S);
47   
48   Standard_EXPORT void Init (const TopoDS_Shape& S);
49   
50   Standard_EXPORT void GlueOnFace (const TopoDS_Face& F);
51   
52   Standard_EXPORT const TopTools_ListOfShape& GeneratingEdges() Standard_OVERRIDE;
53   
54   //! Returns the  edge  created by  the  vertex <V>. If
55   //! none, must return a null shape.
56   Standard_EXPORT TopoDS_Edge Generated (const TopoDS_Vertex& V) Standard_OVERRIDE;
57   
58   //! Returns the face created by the edge <E>. If none,
59   //! must return a null shape.
60   Standard_EXPORT TopoDS_Face Generated (const TopoDS_Edge& E) Standard_OVERRIDE;
61   
62   //! Returns  the  list of correctly oriented generated
63   //! faces.
64   Standard_EXPORT const TopTools_ListOfShape& OrientedFaces() Standard_OVERRIDE;
65
66
67
68
69   DEFINE_STANDARD_RTTIEXT(LocOpe_GluedShape,LocOpe_GeneratedShape)
70
71 protected:
72
73
74
75
76 private:
77
78   
79   Standard_EXPORT void MapEdgeAndVertices();
80
81   TopoDS_Shape myShape;
82   TopTools_MapOfShape myMap;
83   TopTools_DataMapOfShapeShape myGShape;
84
85
86 };
87
88
89
90
91
92
93
94 #endif // _LocOpe_GluedShape_HeaderFile