|
||||
File indexing completed on 2025-01-18 10:04:54
0001 // Created on: 1998-06-03 0002 // Created by: data exchange team 0003 // Copyright (c) 1998-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 _ShapeAnalysis_Shell_HeaderFile 0018 #define _ShapeAnalysis_Shell_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <TopTools_IndexedMapOfShape.hxx> 0024 #include <Standard_Integer.hxx> 0025 class TopoDS_Shape; 0026 class TopoDS_Compound; 0027 0028 0029 //! This class provides operators to analyze edges orientation 0030 //! in the shell. 0031 class ShapeAnalysis_Shell 0032 { 0033 public: 0034 0035 DEFINE_STANDARD_ALLOC 0036 0037 0038 //! Empty constructor 0039 Standard_EXPORT ShapeAnalysis_Shell(); 0040 0041 //! Clears data about loaded shells and performed checks 0042 Standard_EXPORT void Clear(); 0043 0044 //! Adds shells contained in the <shape> to the list of loaded shells 0045 Standard_EXPORT void LoadShells (const TopoDS_Shape& shape); 0046 0047 //! Checks if shells fulfill orientation condition, i.e. if each 0048 //! edge is, either present once (free edge) or twice (connected 0049 //! edge) but with different orientations (FORWARD/REVERSED) 0050 //! Edges which do not fulfill these conditions are bad 0051 //! 0052 //! If <alsofree> is True free edges are considered. 0053 //! Free edges can be queried but are not bad 0054 Standard_EXPORT Standard_Boolean CheckOrientedShells (const TopoDS_Shape& shape, const Standard_Boolean alsofree = Standard_False, const Standard_Boolean checkinternaledges = Standard_False); 0055 0056 //! Tells if a shape is loaded (only shells are checked) 0057 Standard_EXPORT Standard_Boolean IsLoaded (const TopoDS_Shape& shape) const; 0058 0059 //! Returns the actual number of loaded shapes (i.e. shells) 0060 Standard_EXPORT Standard_Integer NbLoaded() const; 0061 0062 //! Returns a loaded shape specified by its rank number. 0063 //! Returns null shape if <num> is out of range 0064 Standard_EXPORT TopoDS_Shape Loaded (const Standard_Integer num) const; 0065 0066 //! Tells if at least one edge is recorded as bad 0067 Standard_EXPORT Standard_Boolean HasBadEdges() const; 0068 0069 //! Returns the list of bad edges as a Compound 0070 //! It is empty (not null) if no edge are recorded as bad 0071 Standard_EXPORT TopoDS_Compound BadEdges() const; 0072 0073 //! Tells if at least one edge is recorded as free (not connected) 0074 Standard_EXPORT Standard_Boolean HasFreeEdges() const; 0075 0076 //! Returns the list of free (not connected) edges as a Compound 0077 //! It is empty (not null) if no edge are recorded as free 0078 Standard_EXPORT TopoDS_Compound FreeEdges() const; 0079 0080 //! Tells if at least one edge is connected (shared twice or more) 0081 Standard_EXPORT Standard_Boolean HasConnectedEdges() const; 0082 0083 0084 0085 0086 protected: 0087 0088 0089 0090 0091 0092 private: 0093 0094 0095 0096 TopTools_IndexedMapOfShape myShells; 0097 TopTools_IndexedMapOfShape myBad; 0098 TopTools_IndexedMapOfShape myFree; 0099 Standard_Boolean myConex; 0100 0101 0102 }; 0103 0104 0105 0106 0107 0108 0109 0110 #endif // _ShapeAnalysis_Shell_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |