1 // Created on: 1994-10-24
2 // Created by: Christophe MARION
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _HLRTopoBRep_Data_HeaderFile
18 #define _HLRTopoBRep_Data_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopTools_DataMapOfShapeShape.hxx>
25 #include <TopTools_DataMapOfShapeListOfShape.hxx>
26 #include <HLRTopoBRep_DataMapOfShapeFaceData.hxx>
27 #include <TopTools_MapOfShape.hxx>
28 #include <HLRTopoBRep_MapOfShapeListOfVData.hxx>
29 #include <HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData.hxx>
30 #include <HLRTopoBRep_ListIteratorOfListOfVData.hxx>
31 #include <Standard_Boolean.hxx>
32 #include <TopTools_ListOfShape.hxx>
33 #include <Standard_Real.hxx>
40 //! Stores the results of the OutLine and IsoLine
42 class HLRTopoBRep_Data
49 Standard_EXPORT HLRTopoBRep_Data();
51 //! Clear of all the maps.
52 Standard_EXPORT void Clear();
54 //! Clear of all the data not needed during and after
55 //! the hiding process.
56 Standard_EXPORT void Clean();
58 //! Returns True if the Edge is split.
59 Standard_EXPORT Standard_Boolean EdgeHasSplE (const TopoDS_Edge& E) const;
61 //! Returns True if the Face has internal outline.
62 Standard_EXPORT Standard_Boolean FaceHasIntL (const TopoDS_Face& F) const;
64 //! Returns True if the Face has outlines on restriction.
65 Standard_EXPORT Standard_Boolean FaceHasOutL (const TopoDS_Face& F) const;
67 //! Returns True if the Face has isolines.
68 Standard_EXPORT Standard_Boolean FaceHasIsoL (const TopoDS_Face& F) const;
70 Standard_EXPORT Standard_Boolean IsSplEEdgeEdge (const TopoDS_Edge& E1, const TopoDS_Edge& E2) const;
72 Standard_EXPORT Standard_Boolean IsIntLFaceEdge (const TopoDS_Face& F, const TopoDS_Edge& E) const;
74 Standard_EXPORT Standard_Boolean IsOutLFaceEdge (const TopoDS_Face& F, const TopoDS_Edge& E) const;
76 Standard_EXPORT Standard_Boolean IsIsoLFaceEdge (const TopoDS_Face& F, const TopoDS_Edge& E) const;
78 Standard_EXPORT TopoDS_Shape NewSOldS (const TopoDS_Shape& New) const;
80 //! Returns the list of the edges.
81 const TopTools_ListOfShape& EdgeSplE (const TopoDS_Edge& E) const;
83 //! Returns the list of the internal OutLines.
84 const TopTools_ListOfShape& FaceIntL (const TopoDS_Face& F) const;
86 //! Returns the list of the OutLines on restriction.
87 const TopTools_ListOfShape& FaceOutL (const TopoDS_Face& F) const;
89 //! Returns the list of the IsoLines.
90 const TopTools_ListOfShape& FaceIsoL (const TopoDS_Face& F) const;
92 //! Returns True if V is an outline vertex on a
94 Standard_Boolean IsOutV (const TopoDS_Vertex& V) const;
96 //! Returns True if V is an internal outline vertex.
97 Standard_Boolean IsIntV (const TopoDS_Vertex& V) const;
99 Standard_EXPORT void AddOldS (const TopoDS_Shape& NewS, const TopoDS_Shape& OldS);
101 Standard_EXPORT TopTools_ListOfShape& AddSplE (const TopoDS_Edge& E);
103 Standard_EXPORT TopTools_ListOfShape& AddIntL (const TopoDS_Face& F);
105 Standard_EXPORT TopTools_ListOfShape& AddOutL (const TopoDS_Face& F);
107 Standard_EXPORT TopTools_ListOfShape& AddIsoL (const TopoDS_Face& F);
109 void AddOutV (const TopoDS_Vertex& V);
111 void AddIntV (const TopoDS_Vertex& V);
113 Standard_EXPORT void InitEdge();
115 Standard_Boolean MoreEdge() const;
117 Standard_EXPORT void NextEdge();
119 const TopoDS_Edge& Edge() const;
121 //! Start an iteration on the vertices of E.
122 Standard_EXPORT void InitVertex (const TopoDS_Edge& E);
124 Standard_Boolean MoreVertex() const;
128 Standard_EXPORT const TopoDS_Vertex& Vertex() const;
130 Standard_EXPORT Standard_Real Parameter() const;
132 //! Insert before the current position.
133 Standard_EXPORT void InsertBefore (const TopoDS_Vertex& V, const Standard_Real P);
135 Standard_EXPORT void Append (const TopoDS_Vertex& V, const Standard_Real P);
150 TopTools_DataMapOfShapeShape myOldS;
151 TopTools_DataMapOfShapeListOfShape mySplE;
152 HLRTopoBRep_DataMapOfShapeFaceData myData;
153 TopTools_MapOfShape myOutV;
154 TopTools_MapOfShape myIntV;
155 HLRTopoBRep_MapOfShapeListOfVData myEdgesVertices;
156 HLRTopoBRep_DataMapIteratorOfMapOfShapeListOfVData myEIterator;
157 HLRTopoBRep_ListIteratorOfListOfVData myVIterator;
158 HLRTopoBRep_ListOfVData* myVList;
164 #include <HLRTopoBRep_Data.lxx>
170 #endif // _HLRTopoBRep_Data_HeaderFile