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
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 _TopOpeBRepDS_Check_HeaderFile
18 #define _TopOpeBRepDS_Check_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TopOpeBRepDS_DataMapOfCheckStatus.hxx>
24 #include <Standard_Transient.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;
37 class TopOpeBRepDS_Check;
38 DEFINE_STANDARD_HANDLE(TopOpeBRepDS_Check, Standard_Transient)
40 //! a tool verifing integrity and structure of DS
41 class TopOpeBRepDS_Check : public Standard_Transient
47 Standard_EXPORT TopOpeBRepDS_Check();
49 Standard_EXPORT TopOpeBRepDS_Check(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
51 //! Check integrition of DS
52 Standard_EXPORT Standard_Boolean ChkIntg();
54 //! Check integrition of interferences
55 //! (les supports et les geometries de LI)
56 Standard_EXPORT Standard_Boolean ChkIntgInterf (const TopOpeBRepDS_ListOfInterference& LI);
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);
63 //! Check integrition des champs SameDomain de la DS
64 Standard_EXPORT Standard_Boolean ChkIntgSamDom();
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;
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();
77 Standard_EXPORT const Handle(TopOpeBRepDS_HDataStructure)& HDS() const;
79 Standard_EXPORT Handle(TopOpeBRepDS_HDataStructure)& ChangeHDS();
81 Standard_EXPORT Standard_OStream& PrintIntg (Standard_OStream& S);
83 //! Prints the name of CheckStatus <stat> as a String
84 Standard_EXPORT Standard_OStream& Print (const TopOpeBRepDS_CheckStatus stat, Standard_OStream& S);
86 //! Prints the name of CheckStatus <stat> as a String
87 Standard_EXPORT Standard_OStream& PrintShape (const TopAbs_ShapeEnum SE, Standard_OStream& S);
89 //! Prints the name of CheckStatus <stat> as a String
90 Standard_EXPORT Standard_OStream& PrintShape (const Standard_Integer index, Standard_OStream& S);
95 DEFINE_STANDARD_RTTIEXT(TopOpeBRepDS_Check,Standard_Transient)
105 Standard_EXPORT Standard_OStream& PrintMap (TopOpeBRepDS_DataMapOfCheckStatus& MapStat, const Standard_CString eltstr, Standard_OStream& S);
107 Standard_EXPORT Standard_OStream& PrintElts (TopOpeBRepDS_DataMapOfCheckStatus& MapStat, const TopOpeBRepDS_CheckStatus Stat, Standard_Boolean& b, Standard_OStream& S);
109 Handle(TopOpeBRepDS_HDataStructure) myHDS;
110 TopOpeBRepDS_DataMapOfCheckStatus myMapSurfaceStatus;
111 TopOpeBRepDS_DataMapOfCheckStatus myMapCurveStatus;
112 TopOpeBRepDS_DataMapOfCheckStatus myMapPointStatus;
113 TopOpeBRepDS_DataMapOfCheckStatus myMapShapeStatus;
124 #endif // _TopOpeBRepDS_Check_HeaderFile