Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1999-02-24
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 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 _XSControl_ConnectedShapes_HeaderFile
0018 #define _XSControl_ConnectedShapes_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IFSelect_SelectExplore.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <TColStd_HSequenceOfTransient.hxx>
0026 #include <TopAbs_ShapeEnum.hxx>
0027 class XSControl_TransferReader;
0028 class Standard_Transient;
0029 class Interface_Graph;
0030 class Interface_EntityIterator;
0031 class TCollection_AsciiString;
0032 class TopoDS_Shape;
0033 class Transfer_TransientProcess;
0034 
0035 
0036 class XSControl_ConnectedShapes;
0037 DEFINE_STANDARD_HANDLE(XSControl_ConnectedShapes, IFSelect_SelectExplore)
0038 
0039 //! From a TopoDS_Shape, or from the entity which has produced it,
0040 //! searches for the shapes, and the entities which have produced
0041 //! them in last transfer, which are adjacent to it by VERTICES
0042 class XSControl_ConnectedShapes : public IFSelect_SelectExplore
0043 {
0044 
0045 public:
0046 
0047   
0048   //! Creates a Selection ConnectedShapes. It remains to be set a
0049   //! TransferReader
0050   Standard_EXPORT XSControl_ConnectedShapes();
0051   
0052   //! Creates a Selection ConnectedShapes, which will work with the
0053   //! current TransferProcess brought by the TransferReader
0054   Standard_EXPORT XSControl_ConnectedShapes(const Handle(XSControl_TransferReader)& TR);
0055   
0056   //! Sets a TransferReader to sort entities : it brings the
0057   //! TransferProcess which may change, while the TransferReader does not
0058   Standard_EXPORT void SetReader (const Handle(XSControl_TransferReader)& TR);
0059   
0060   //! Explores an entity : entities from which are connected to that
0061   //! produced by this entity, including itself
0062   Standard_EXPORT Standard_Boolean Explore (const Standard_Integer level, const Handle(Standard_Transient)& ent, const Interface_Graph& G, Interface_EntityIterator& explored) const Standard_OVERRIDE;
0063   
0064   //! Returns a text defining the criterium.
0065   //! "Connected Entities through produced Shapes"
0066   Standard_EXPORT TCollection_AsciiString ExploreLabel() const Standard_OVERRIDE;
0067   
0068   //! This functions considers a shape from a transfer and performs
0069   //! the search function explained above
0070   Standard_EXPORT static Handle(TColStd_HSequenceOfTransient) AdjacentEntities (const TopoDS_Shape& ashape, const Handle(Transfer_TransientProcess)& TP, const TopAbs_ShapeEnum type);
0071 
0072 
0073 
0074 
0075   DEFINE_STANDARD_RTTIEXT(XSControl_ConnectedShapes,IFSelect_SelectExplore)
0076 
0077 protected:
0078 
0079 
0080 
0081 
0082 private:
0083 
0084 
0085   Handle(XSControl_TransferReader) theTR;
0086 
0087 
0088 };
0089 
0090 
0091 
0092 
0093 
0094 
0095 
0096 #endif // _XSControl_ConnectedShapes_HeaderFile