1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #ifndef _NMTDS_ShapesDataStructure_HeaderFile
25 #define _NMTDS_ShapesDataStructure_HeaderFile
27 #include <Standard.hxx>
28 #include <Standard_Macro.hxx>
29 #include <TopoDS_Shape.hxx>
30 #include <NMTDS_CArray1OfIndexRange.hxx>
31 #include <TopTools_DataMapOfShapeInteger.hxx>
32 #include <BooleanOperations_ShapesDataStructure.hxx>
33 #include <Standard_Integer.hxx>
34 #include <TopoDS_Shape.hxx>
35 #include <NMTDS_CArray1OfIndexRange.hxx>
36 #include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
37 #include <TColStd_IndexedMapOfInteger.hxx>
38 #include <Bnd_Box.hxx>
40 //=======================================================================
41 //class : NMTDS_ShapesDataStructure
43 //=======================================================================
44 class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure
48 NMTDS_ShapesDataStructure();
51 void SetCompositeShape(const TopoDS_Shape& aS) ;
57 const NMTDS_CArray1OfIndexRange& Ranges() const;
60 const TopoDS_Shape& CompositeShape() const;
63 Standard_Integer ShapeRangeIndex(const Standard_Integer aId) const;
66 virtual Standard_Integer Rank(const Standard_Integer anIndex) const;
69 virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,
70 const Standard_Integer iRank) const;
73 void FillMap(const TopoDS_Shape& aS,
74 BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
75 BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
78 void FillSubshapes(const TopoDS_Shape& aS,
79 BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,
80 BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const;
83 void GetAllSuccessors(const Standard_Integer anIndex,
84 TColStd_IndexedMapOfInteger& aScrs) const;
87 void ComputeBoxEx(const Standard_Integer anIndex,
92 TopoDS_Shape myCompositeShape;
93 NMTDS_CArray1OfIndexRange myRanges;
94 TopTools_DataMapOfShapeInteger myShapeIndexMap;