Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 09:19:08

0001 // Created on: 1993-07-08
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1993-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 _TopOpeBRepTool_BoxSort_HeaderFile
0018 #define _TopOpeBRepTool_BoxSort_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Bnd_Box.hxx>
0025 #include <Bnd_BoundSortBox.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <NCollection_List.hxx>
0028 #include <TopoDS_Shape.hxx>
0029 #include <NCollection_Array1.hxx>
0030 #include <NCollection_HArray1.hxx>
0031 #include <TopAbs_ShapeEnum.hxx>
0032 class TopOpeBRepTool_HBoxTool;
0033 
0034 class TopOpeBRepTool_BoxSort
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   Standard_EXPORT TopOpeBRepTool_BoxSort();
0040 
0041   Standard_EXPORT TopOpeBRepTool_BoxSort(const occ::handle<TopOpeBRepTool_HBoxTool>& T);
0042 
0043   Standard_EXPORT void SetHBoxTool(const occ::handle<TopOpeBRepTool_HBoxTool>& T);
0044 
0045   Standard_EXPORT const occ::handle<TopOpeBRepTool_HBoxTool>& HBoxTool() const;
0046 
0047   Standard_EXPORT void Clear();
0048 
0049   Standard_EXPORT void AddBoxes(const TopoDS_Shape&    S,
0050                                 const TopAbs_ShapeEnum TS,
0051                                 const TopAbs_ShapeEnum TA = TopAbs_SHAPE);
0052 
0053   Standard_EXPORT void MakeHAB(const TopoDS_Shape&    S,
0054                                const TopAbs_ShapeEnum TS,
0055                                const TopAbs_ShapeEnum TA = TopAbs_SHAPE);
0056 
0057   Standard_EXPORT const occ::handle<NCollection_HArray1<Bnd_Box>>& HAB() const;
0058 
0059   Standard_EXPORT static void MakeHABCOB(const occ::handle<NCollection_HArray1<Bnd_Box>>& HAB,
0060                                          Bnd_Box&                                         COB);
0061 
0062   Standard_EXPORT const TopoDS_Shape& HABShape(const int I) const;
0063 
0064   Standard_EXPORT void MakeCOB(const TopoDS_Shape&    S,
0065                                const TopAbs_ShapeEnum TS,
0066                                const TopAbs_ShapeEnum TA = TopAbs_SHAPE);
0067 
0068   Standard_EXPORT void AddBoxesMakeCOB(const TopoDS_Shape&    S,
0069                                        const TopAbs_ShapeEnum TS,
0070                                        const TopAbs_ShapeEnum TA = TopAbs_SHAPE);
0071 
0072   Standard_EXPORT const NCollection_List<int>::Iterator& Compare(const TopoDS_Shape& S);
0073 
0074   Standard_EXPORT const TopoDS_Shape& TouchedShape(const NCollection_List<int>::Iterator& I) const;
0075 
0076   Standard_EXPORT const Bnd_Box& Box(const TopoDS_Shape& S) const;
0077 
0078   Standard_EXPORT ~TopOpeBRepTool_BoxSort();
0079 
0080 private:
0081   Bnd_Box                                   myCOB;
0082   Bnd_BoundSortBox                          myBSB;
0083   NCollection_List<int>::Iterator           myIterator;
0084   TopoDS_Shape                              myLastCompareShape;
0085   Bnd_Box                                   myLastCompareShapeBox;
0086   occ::handle<TopOpeBRepTool_HBoxTool>      myHBT;
0087   occ::handle<NCollection_HArray1<Bnd_Box>> myHAB;
0088   occ::handle<NCollection_HArray1<int>>     myHAI;
0089 };
0090 
0091 #endif // _TopOpeBRepTool_BoxSort_HeaderFile