1 // Created on: 1997-06-10
2 // Created by: Yves FRICAUD
3 // Copyright (c) 1997-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 _TNaming_Localizer_HeaderFile
18 #define _TNaming_Localizer_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Integer.hxx>
25 #include <TopTools_ListOfShape.hxx>
26 #include <TNaming_ListOfMapOfShape.hxx>
27 #include <TNaming_ListOfIndexedDataMapOfShapeListOfShape.hxx>
28 #include <TopTools_MapOfShape.hxx>
29 #include <TopAbs_ShapeEnum.hxx>
30 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
31 #include <TNaming_Evolution.hxx>
32 #include <TNaming_ListOfNamedShape.hxx>
33 #include <TNaming_MapOfNamedShape.hxx>
34 #include <Standard_Boolean.hxx>
35 class TNaming_UsedShapes;
38 class TNaming_NamedShape;
42 class TNaming_Localizer
49 Standard_EXPORT TNaming_Localizer();
51 Standard_EXPORT void Init (const Handle(TNaming_UsedShapes)& US, const Standard_Integer CurTrans);
53 Standard_EXPORT const TopTools_MapOfShape& SubShapes (const TopoDS_Shape& S, const TopAbs_ShapeEnum Type);
55 Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& Ancestors (const TopoDS_Shape& S, const TopAbs_ShapeEnum Type);
57 Standard_EXPORT void FindFeaturesInAncestors (const TopoDS_Shape& S, const TopoDS_Shape& In, TopTools_MapOfShape& AncInFeatures);
59 Standard_EXPORT void GoBack (const TopoDS_Shape& S, const TDF_Label& Lab, const TNaming_Evolution Evol, TopTools_ListOfShape& OldS, TNaming_ListOfNamedShape& OldLab);
61 Standard_EXPORT void Backward (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& S, TNaming_MapOfNamedShape& Primitives, TopTools_MapOfShape& ValidShapes);
63 Standard_EXPORT void FindNeighbourg (const TopoDS_Shape& Cont, const TopoDS_Shape& S, TopTools_MapOfShape& Neighbourg);
65 Standard_EXPORT static Standard_Boolean IsNew (const TopoDS_Shape& S, const Handle(TNaming_NamedShape)& NS);
67 Standard_EXPORT static void FindGenerator (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& S, TopTools_ListOfShape& theListOfGenerators);
69 //! Finds context of the shape <S>.
70 Standard_EXPORT static void FindShapeContext (const Handle(TNaming_NamedShape)& NS, const TopoDS_Shape& theS, TopoDS_Shape& theSC);
85 Standard_Integer myCurTrans;
86 Handle(TNaming_UsedShapes) myUS;
87 TopTools_ListOfShape myShapeWithSubShapes;
88 TNaming_ListOfMapOfShape mySubShapes;
89 TopTools_ListOfShape myShapeWithAncestors;
90 TNaming_ListOfIndexedDataMapOfShapeListOfShape myAncestors;
101 #endif // _TNaming_Localizer_HeaderFile