1 // Created on: 1999-02-24
2 // Created by: Christian CAILLET
3 // Copyright (c) 1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _XSControl_ConnectedShapes_HeaderFile
18 #define _XSControl_ConnectedShapes_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <IFSelect_SelectExplore.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TColStd_HSequenceOfTransient.hxx>
27 #include <TopAbs_ShapeEnum.hxx>
28 class XSControl_TransferReader;
29 class Standard_Transient;
30 class Interface_Graph;
31 class Interface_EntityIterator;
32 class TCollection_AsciiString;
34 class Transfer_TransientProcess;
37 class XSControl_ConnectedShapes;
38 DEFINE_STANDARD_HANDLE(XSControl_ConnectedShapes, IFSelect_SelectExplore)
40 //! From a TopoDS_Shape, or from the entity which has produced it,
41 //! searches for the shapes, and the entities which have produced
42 //! them in last transfer, which are adjacent to it by VERTICES
43 class XSControl_ConnectedShapes : public IFSelect_SelectExplore
49 //! Creates a Selection ConnectedShapes. It remains to be set a
51 Standard_EXPORT XSControl_ConnectedShapes();
53 //! Creates a Selection ConnectedShapes, which will work with the
54 //! current TransferProcess brought by the TransferReader
55 Standard_EXPORT XSControl_ConnectedShapes(const Handle(XSControl_TransferReader)& TR);
57 //! Sets a TransferReader to sort entities : it brings the
58 //! TransferProcess which may change, while the TransferReader does not
59 Standard_EXPORT void SetReader (const Handle(XSControl_TransferReader)& TR);
61 //! Explores an entity : entities from which are connected to that
62 //! produced by this entity, including itself
63 Standard_EXPORT Standard_Boolean Explore (const Standard_Integer level, const Handle(Standard_Transient)& ent, const Interface_Graph& G, Interface_EntityIterator& explored) const Standard_OVERRIDE;
65 //! Returns a text defining the criterium.
66 //! "Connected Entities through produced Shapes"
67 Standard_EXPORT TCollection_AsciiString ExploreLabel() const Standard_OVERRIDE;
69 //! This functions considers a shape from a transfer and performs
70 //! the search function explained above
71 Standard_EXPORT static Handle(TColStd_HSequenceOfTransient) AdjacentEntities (const TopoDS_Shape& ashape, const Handle(Transfer_TransientProcess)& TP, const TopAbs_ShapeEnum type);
76 DEFINE_STANDARD_RTTIEXT(XSControl_ConnectedShapes,IFSelect_SelectExplore)
86 Handle(XSControl_TransferReader) theTR;
97 #endif // _XSControl_ConnectedShapes_HeaderFile