|
||||
File indexing completed on 2025-01-18 10:03:53
0001 // Created on: 1992-09-23 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1992-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 _IFGraph_Compare_HeaderFile 0018 #define _IFGraph_Compare_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Interface_Graph.hxx> 0025 #include <Interface_GraphContent.hxx> 0026 class Standard_Transient; 0027 class Interface_EntityIterator; 0028 0029 0030 //! this class evaluates effect of two compared sub-parts : 0031 //! cumulation (union), common part (intersection-overlapping) 0032 //! part specific to first sub-part or to the second one 0033 //! Results are kept in a Graph, several question can be set 0034 //! Basic Iteration gives Cumulation (union) 0035 class IFGraph_Compare : public Interface_GraphContent 0036 { 0037 public: 0038 0039 DEFINE_STANDARD_ALLOC 0040 0041 0042 //! creates empty Compare, ready to work 0043 Standard_EXPORT IFGraph_Compare(const Interface_Graph& agraph); 0044 0045 //! adds an entity and its shared ones to the list : 0046 //! first True means adds to the first sub-list, else to the 2nd 0047 Standard_EXPORT void GetFromEntity (const Handle(Standard_Transient)& ent, const Standard_Boolean first); 0048 0049 //! adds a list of entities (as an iterator) as such, that is, 0050 //! their shared entities are not considered (use AllShared to 0051 //! have them) 0052 //! first True means adds to the first sub-list, else to the 2nd 0053 Standard_EXPORT void GetFromIter (const Interface_EntityIterator& iter, const Standard_Boolean first); 0054 0055 //! merges the second list into the first one, hence the second 0056 //! list is empty 0057 Standard_EXPORT void Merge(); 0058 0059 //! Removes the contents of second list 0060 Standard_EXPORT void RemoveSecond(); 0061 0062 //! Keeps only Common part, sets it as First list and clears 0063 //! second list 0064 Standard_EXPORT void KeepCommon(); 0065 0066 //! Allows to restart on a new data set 0067 Standard_EXPORT void ResetData(); 0068 0069 //! Recomputes result of comparing to sub-parts 0070 Standard_EXPORT virtual void Evaluate() Standard_OVERRIDE; 0071 0072 //! returns entities common to the both parts 0073 Standard_EXPORT Interface_EntityIterator Common() const; 0074 0075 //! returns entities which are exclusively in the first list 0076 Standard_EXPORT Interface_EntityIterator FirstOnly() const; 0077 0078 //! returns entities which are exclusively in the second part 0079 Standard_EXPORT Interface_EntityIterator SecondOnly() const; 0080 0081 0082 0083 0084 protected: 0085 0086 0087 0088 0089 0090 private: 0091 0092 0093 0094 Interface_Graph thegraph; 0095 0096 0097 }; 0098 0099 0100 0101 0102 0103 0104 0105 #endif // _IFGraph_Compare_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |