Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-23 09:17:02

0001 // Created on: 1994-10-07
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1994-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 _BRepMAT2d_LinkTopoBilo_HeaderFile
0018 #define _BRepMAT2d_LinkTopoBilo_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopoDS_Shape.hxx>
0025 #include <MAT_BasicElt.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <TopTools_ShapeMapHasher.hxx>
0028 #include <NCollection_DataMap.hxx>
0029 #include <Standard_Integer.hxx>
0030 class BRepMAT2d_Explorer;
0031 class BRepMAT2d_BisectingLocus;
0032 class MAT_BasicElt;
0033 class TopoDS_Wire;
0034 
0035 //! Constructs links between the Wire or the Face of the explorer and
0036 //! the BasicElts contained in the bisecting locus.
0037 class BRepMAT2d_LinkTopoBilo
0038 {
0039 public:
0040   DEFINE_STANDARD_ALLOC
0041 
0042   Standard_EXPORT BRepMAT2d_LinkTopoBilo();
0043 
0044   //! Constructs the links Between S and BiLo.
0045   //!
0046   //! raises if <S> is not a face.
0047   Standard_EXPORT BRepMAT2d_LinkTopoBilo(const BRepMAT2d_Explorer&       Explo,
0048                                          const BRepMAT2d_BisectingLocus& BiLo);
0049 
0050   //! Constructs the links Between S and BiLo.
0051   //!
0052   //! raises if <S> is not a face or a wire.
0053   Standard_EXPORT void Perform(const BRepMAT2d_Explorer&       Explo,
0054                                const BRepMAT2d_BisectingLocus& BiLo);
0055 
0056   //! Initialise the Iterator on <S>
0057   //! <S> is an edge or a vertex of the initial
0058   //! wire or face.
0059   //! raises if <S> is not an edge or a vertex.
0060   Standard_EXPORT void Init(const TopoDS_Shape& S);
0061 
0062   //! Returns True if there is a current BasicElt.
0063   Standard_EXPORT bool More();
0064 
0065   //! Proceed to the next BasicElt.
0066   Standard_EXPORT void Next();
0067 
0068   //! Returns the current BasicElt.
0069   Standard_EXPORT occ::handle<MAT_BasicElt> Value() const;
0070 
0071   //! Returns the Shape linked to <aBE>.
0072   Standard_EXPORT TopoDS_Shape GeneratingShape(const occ::handle<MAT_BasicElt>& aBE) const;
0073 
0074 private:
0075   Standard_EXPORT void LinkToWire(const TopoDS_Wire&              W,
0076                                   const BRepMAT2d_Explorer&       Explo,
0077                                   const int                       IndexContour,
0078                                   const BRepMAT2d_BisectingLocus& BiLo);
0079 
0080   NCollection_DataMap<TopoDS_Shape,
0081                       NCollection_Sequence<occ::handle<MAT_BasicElt>>,
0082                       TopTools_ShapeMapHasher>
0083                                                                myMap;
0084   NCollection_DataMap<occ::handle<MAT_BasicElt>, TopoDS_Shape> myBEShape;
0085   TopoDS_Shape                                                 myKey;
0086   int                                                          current;
0087   bool                                                         isEmpty;
0088 };
0089 
0090 #endif // _BRepMAT2d_LinkTopoBilo_HeaderFile