Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:19:26

0001 // Created on: 1998-03-04
0002 // Created by: Julia Gerasimova
0003 // Copyright (c) 1998-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 _AIS_BadEdgeFilter_HeaderFile
0018 #define _AIS_BadEdgeFilter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <TopoDS_Shape.hxx>
0024 #include <NCollection_List.hxx>
0025 #include <NCollection_DataMap.hxx>
0026 #include <SelectMgr_Filter.hxx>
0027 #include <TopAbs_ShapeEnum.hxx>
0028 class SelectMgr_EntityOwner;
0029 class TopoDS_Edge;
0030 
0031 //! A Class
0032 class AIS_BadEdgeFilter : public SelectMgr_Filter
0033 {
0034 
0035 public:
0036   //! Constructs an empty filter object for bad edges.
0037   Standard_EXPORT AIS_BadEdgeFilter();
0038 
0039   Standard_EXPORT bool ActsOn(const TopAbs_ShapeEnum aType) const override;
0040 
0041   Standard_EXPORT bool IsOk(const occ::handle<SelectMgr_EntityOwner>& EO) const override;
0042 
0043   //! sets <myContour> with current contour. used by IsOk.
0044   Standard_EXPORT void SetContour(const int Index);
0045 
0046   //! Adds an edge to the list of non-selectable edges.
0047   Standard_EXPORT void AddEdge(const TopoDS_Edge& anEdge, const int Index);
0048 
0049   //! removes from the list of non-selectable edges
0050   //! all edges in the contour <Index>.
0051   Standard_EXPORT void RemoveEdges(const int Index);
0052 
0053   DEFINE_STANDARD_RTTIEXT(AIS_BadEdgeFilter, SelectMgr_Filter)
0054 
0055 private:
0056   NCollection_DataMap<int, NCollection_List<TopoDS_Shape>> myBadEdges;
0057   int                                                      myContour;
0058 };
0059 
0060 #endif // _AIS_BadEdgeFilter_HeaderFile