Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:26

0001 // Created on: 1997-04-10
0002 // Created by: Prestataire Mary FABIEN
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _TopOpeBRepDS_Check_HeaderFile
0018 #define _TopOpeBRepDS_Check_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TopOpeBRepDS_DataMapOfCheckStatus.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <TopOpeBRepDS_ListOfInterference.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <TopOpeBRepDS_Kind.hxx>
0028 #include <TopTools_ListOfShape.hxx>
0029 #include <Standard_OStream.hxx>
0030 #include <Standard_CString.hxx>
0031 #include <TopOpeBRepDS_CheckStatus.hxx>
0032 #include <TopAbs_ShapeEnum.hxx>
0033 class TopOpeBRepDS_HDataStructure;
0034 
0035 
0036 class TopOpeBRepDS_Check;
0037 DEFINE_STANDARD_HANDLE(TopOpeBRepDS_Check, Standard_Transient)
0038 
0039 //! a tool verifing integrity and structure of DS
0040 class TopOpeBRepDS_Check : public Standard_Transient
0041 {
0042 
0043 public:
0044 
0045   
0046   Standard_EXPORT TopOpeBRepDS_Check();
0047   
0048   Standard_EXPORT TopOpeBRepDS_Check(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
0049   
0050   //! Check integrition of DS
0051   Standard_EXPORT Standard_Boolean ChkIntg();
0052   
0053   //! Check integrition of interferences
0054   //! (les supports et les geometries de LI)
0055   Standard_EXPORT Standard_Boolean ChkIntgInterf (const TopOpeBRepDS_ListOfInterference& LI);
0056   
0057   //! Verifie que le ieme element de la DS existe, et
0058   //! pour un K de type topologique, verifie qu'il est du
0059   //! bon type (VERTEX, EDGE, WIRE, FACE, SHELL ou SOLID)
0060   Standard_EXPORT Standard_Boolean CheckDS (const Standard_Integer i, const TopOpeBRepDS_Kind K);
0061   
0062   //! Check integrition des champs SameDomain de la DS
0063   Standard_EXPORT Standard_Boolean ChkIntgSamDom();
0064   
0065   //! Verifie que les Shapes existent bien dans la DS
0066   //! Utile pour les Shapes SameDomain
0067   //! si la liste est vide, renvoie vrai
0068   Standard_EXPORT Standard_Boolean CheckShapes (const TopTools_ListOfShape& LS) const;
0069   
0070   //! Verifie que les Vertex   non   SameDomain sont bien
0071   //! nonSameDomain, que  les  vertex sameDomain sont  bien
0072   //! SameDomain,  que    les  Points sont  non    confondus
0073   //! ni entre eux, ni avec des Vertex.
0074   Standard_EXPORT Standard_Boolean OneVertexOnPnt();
0075   
0076   Standard_EXPORT const Handle(TopOpeBRepDS_HDataStructure)& HDS() const;
0077   
0078   Standard_EXPORT Handle(TopOpeBRepDS_HDataStructure)& ChangeHDS();
0079   
0080   Standard_EXPORT Standard_OStream& PrintIntg (Standard_OStream& S);
0081   
0082   //! Prints the name  of CheckStatus  <stat>  as  a String
0083   Standard_EXPORT Standard_OStream& Print (const TopOpeBRepDS_CheckStatus stat, Standard_OStream& S);
0084   
0085   //! Prints the name  of CheckStatus  <stat>  as  a String
0086   Standard_EXPORT Standard_OStream& PrintShape (const TopAbs_ShapeEnum SE, Standard_OStream& S);
0087   
0088   //! Prints the name  of CheckStatus  <stat>  as  a String
0089   Standard_EXPORT Standard_OStream& PrintShape (const Standard_Integer index, Standard_OStream& S);
0090 
0091 
0092 
0093 
0094   DEFINE_STANDARD_RTTIEXT(TopOpeBRepDS_Check,Standard_Transient)
0095 
0096 protected:
0097 
0098 
0099 
0100 
0101 private:
0102 
0103   
0104   Standard_EXPORT Standard_OStream& PrintMap (TopOpeBRepDS_DataMapOfCheckStatus& MapStat, const Standard_CString eltstr, Standard_OStream& S);
0105   
0106   Standard_EXPORT Standard_OStream& PrintElts (TopOpeBRepDS_DataMapOfCheckStatus& MapStat, const TopOpeBRepDS_CheckStatus Stat, Standard_Boolean& b, Standard_OStream& S);
0107 
0108   Handle(TopOpeBRepDS_HDataStructure) myHDS;
0109   TopOpeBRepDS_DataMapOfCheckStatus myMapSurfaceStatus;
0110   TopOpeBRepDS_DataMapOfCheckStatus myMapCurveStatus;
0111   TopOpeBRepDS_DataMapOfCheckStatus myMapPointStatus;
0112   TopOpeBRepDS_DataMapOfCheckStatus myMapShapeStatus;
0113 
0114 
0115 };
0116 
0117 
0118 
0119 
0120 
0121 
0122 
0123 #endif // _TopOpeBRepDS_Check_HeaderFile