Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-27 09:45:02

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 class XSControl_ConnectedShapes;
0036 DEFINE_STANDARD_HANDLE(XSControl_ConnectedShapes, IFSelect_SelectExplore)
0037 
0038 //! From a TopoDS_Shape, or from the entity which has produced it,
0039 //! searches for the shapes, and the entities which have produced
0040 //! them in last transfer, which are adjacent to it by VERTICES
0041 class XSControl_ConnectedShapes : public IFSelect_SelectExplore
0042 {
0043 
0044 public:
0045   //! Creates a Selection ConnectedShapes. It remains to be set a
0046   //! TransferReader
0047   Standard_EXPORT XSControl_ConnectedShapes();
0048 
0049   //! Creates a Selection ConnectedShapes, which will work with the
0050   //! current TransferProcess brought by the TransferReader
0051   Standard_EXPORT XSControl_ConnectedShapes(const Handle(XSControl_TransferReader)& TR);
0052 
0053   //! Sets a TransferReader to sort entities : it brings the
0054   //! TransferProcess which may change, while the TransferReader does not
0055   Standard_EXPORT void SetReader(const Handle(XSControl_TransferReader)& TR);
0056 
0057   //! Explores an entity : entities from which are connected to that
0058   //! produced by this entity, including itself
0059   Standard_EXPORT Standard_Boolean
0060     Explore(const Standard_Integer            level,
0061             const Handle(Standard_Transient)& ent,
0062             const Interface_Graph&            G,
0063             Interface_EntityIterator&         explored) const Standard_OVERRIDE;
0064 
0065   //! Returns a text defining the criterium.
0066   //! "Connected Entities through produced Shapes"
0067   Standard_EXPORT TCollection_AsciiString ExploreLabel() const Standard_OVERRIDE;
0068 
0069   //! This functions considers a shape from a transfer and performs
0070   //! the search function explained above
0071   Standard_EXPORT static Handle(TColStd_HSequenceOfTransient) AdjacentEntities(
0072     const TopoDS_Shape&                      ashape,
0073     const Handle(Transfer_TransientProcess)& TP,
0074     const TopAbs_ShapeEnum                   type);
0075 
0076   DEFINE_STANDARD_RTTIEXT(XSControl_ConnectedShapes, IFSelect_SelectExplore)
0077 
0078 protected:
0079 private:
0080   Handle(XSControl_TransferReader) theTR;
0081 };
0082 
0083 #endif // _XSControl_ConnectedShapes_HeaderFile