42cf5bc1 |
1 | // Created on: 1997-04-10 |
2 | // Created by: Prestataire Mary FABIEN |
3 | // Copyright (c) 1997-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 _TopOpeBRepDS_Check_HeaderFile |
18 | #define _TopOpeBRepDS_Check_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <TopOpeBRepDS_DataMapOfCheckStatus.hxx> |
24 | #include <MMgt_TShared.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <TopOpeBRepDS_ListOfInterference.hxx> |
27 | #include <Standard_Integer.hxx> |
28 | #include <TopOpeBRepDS_Kind.hxx> |
29 | #include <TopTools_ListOfShape.hxx> |
30 | #include <Standard_OStream.hxx> |
31 | #include <Standard_CString.hxx> |
32 | #include <TopOpeBRepDS_CheckStatus.hxx> |
33 | #include <TopAbs_ShapeEnum.hxx> |
34 | class TopOpeBRepDS_HDataStructure; |
35 | |
36 | |
37 | class TopOpeBRepDS_Check; |
38 | DEFINE_STANDARD_HANDLE(TopOpeBRepDS_Check, MMgt_TShared) |
39 | |
40 | //! a tool verifing integrity and structure of DS |
41 | class TopOpeBRepDS_Check : public MMgt_TShared |
42 | { |
43 | |
44 | public: |
45 | |
46 | |
47 | Standard_EXPORT TopOpeBRepDS_Check(); |
48 | |
49 | Standard_EXPORT TopOpeBRepDS_Check(const Handle(TopOpeBRepDS_HDataStructure)& HDS); |
50 | |
51 | //! Check integrition of DS |
52 | Standard_EXPORT Standard_Boolean ChkIntg(); |
53 | |
54 | //! Check integrition of interferences |
55 | //! (les supports et les geometries de LI) |
56 | Standard_EXPORT Standard_Boolean ChkIntgInterf (const TopOpeBRepDS_ListOfInterference& LI); |
57 | |
58 | //! Verifie que le ieme element de la DS existe, et |
59 | //! pour un K de type topologique, verifie qu'il est du |
60 | //! bon type (VERTEX, EDGE, WIRE, FACE, SHELL ou SOLID) |
61 | Standard_EXPORT Standard_Boolean CheckDS (const Standard_Integer i, const TopOpeBRepDS_Kind K); |
62 | |
63 | //! Check integrition des champs SameDomain de la DS |
64 | Standard_EXPORT Standard_Boolean ChkIntgSamDom(); |
65 | |
66 | //! Verifie que les Shapes existent bien dans la DS |
67 | //! Utile pour les Shapes SameDomain |
68 | //! si la liste est vide, renvoie vrai |
69 | Standard_EXPORT Standard_Boolean CheckShapes (const TopTools_ListOfShape& LS) const; |
70 | |
71 | //! Verifie que les Vertex non SameDomain sont bien |
72 | //! nonSameDomain, que les vertex sameDomain sont bien |
73 | //! SameDomain, que les Points sont non confondus |
74 | //! ni entre eux, ni avec des Vertex. |
75 | Standard_EXPORT Standard_Boolean OneVertexOnPnt(); |
76 | |
77 | Standard_EXPORT const Handle(TopOpeBRepDS_HDataStructure)& HDS() const; |
78 | |
79 | Standard_EXPORT Handle(TopOpeBRepDS_HDataStructure)& ChangeHDS(); |
80 | |
81 | Standard_EXPORT Standard_OStream& PrintIntg (Standard_OStream& S); |
82 | |
83 | //! Prints the name of CheckStatus <stat> as a String |
84 | Standard_EXPORT Standard_OStream& Print (const TopOpeBRepDS_CheckStatus stat, Standard_OStream& S); |
85 | |
86 | //! Prints the name of CheckStatus <stat> as a String |
87 | Standard_EXPORT Standard_OStream& PrintShape (const TopAbs_ShapeEnum SE, Standard_OStream& S); |
88 | |
89 | //! Prints the name of CheckStatus <stat> as a String |
90 | Standard_EXPORT Standard_OStream& PrintShape (const Standard_Integer index, Standard_OStream& S); |
91 | |
92 | |
93 | |
94 | |
92efcf78 |
95 | DEFINE_STANDARD_RTTIEXT(TopOpeBRepDS_Check,MMgt_TShared) |
42cf5bc1 |
96 | |
97 | protected: |
98 | |
99 | |
100 | |
101 | |
102 | private: |
103 | |
104 | |
105 | Standard_EXPORT Standard_OStream& PrintMap (TopOpeBRepDS_DataMapOfCheckStatus& MapStat, const Standard_CString eltstr, Standard_OStream& S); |
106 | |
107 | Standard_EXPORT Standard_OStream& PrintElts (TopOpeBRepDS_DataMapOfCheckStatus& MapStat, const TopOpeBRepDS_CheckStatus Stat, Standard_Boolean& b, Standard_OStream& S); |
108 | |
109 | Handle(TopOpeBRepDS_HDataStructure) myHDS; |
110 | TopOpeBRepDS_DataMapOfCheckStatus myMapSurfaceStatus; |
111 | TopOpeBRepDS_DataMapOfCheckStatus myMapCurveStatus; |
112 | TopOpeBRepDS_DataMapOfCheckStatus myMapPointStatus; |
113 | TopOpeBRepDS_DataMapOfCheckStatus myMapShapeStatus; |
114 | |
115 | |
116 | }; |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | #endif // _TopOpeBRepDS_Check_HeaderFile |