1 // Created on: 1995-10-20
2 // Created by: Yves FRICAUD
3 // Copyright (c) 1995-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 _BRepOffset_Analyse_HeaderFile
18 #define _BRepOffset_Analyse_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <TopoDS_Shape.hxx>
26 #include <BRepOffset_DataMapOfShapeListOfInterval.hxx>
27 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
28 #include <Standard_Real.hxx>
29 #include <BRepOffset_ListOfInterval.hxx>
30 #include <BRepOffset_Type.hxx>
31 #include <TopTools_ListOfShape.hxx>
32 #include <TopTools_MapOfShape.hxx>
37 class TopoDS_Compound;
40 //! Analyse of a shape consit to
41 //! Find the part of edges convex concave tangent.
42 class BRepOffset_Analyse
49 Standard_EXPORT BRepOffset_Analyse();
51 Standard_EXPORT BRepOffset_Analyse(const TopoDS_Shape& S, const Standard_Real Angle);
53 Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Real Angle);
55 Standard_EXPORT Standard_Boolean IsDone() const;
57 Standard_EXPORT void Clear();
59 Standard_EXPORT const BRepOffset_ListOfInterval& Type (const TopoDS_Edge& E) const;
61 //! Stores in <L> all the edges of Type <T>
62 //! on the vertex <V>.
63 Standard_EXPORT void Edges (const TopoDS_Vertex& V, const BRepOffset_Type T, TopTools_ListOfShape& L) const;
65 //! Stores in <L> all the edges of Type <T>
67 Standard_EXPORT void Edges (const TopoDS_Face& F, const BRepOffset_Type T, TopTools_ListOfShape& L) const;
69 //! set in <Edges> all the Edges of <Shape> which are
70 //! tangent to <Edge> at the vertex <Vertex>.
71 Standard_EXPORT void TangentEdges (const TopoDS_Edge& Edge, const TopoDS_Vertex& Vertex, TopTools_ListOfShape& Edges) const;
73 Standard_EXPORT Standard_Boolean HasAncestor (const TopoDS_Shape& S) const;
75 Standard_EXPORT const TopTools_ListOfShape& Ancestors (const TopoDS_Shape& S) const;
77 //! Explode in compounds of faces where
78 //! all the connex edges are of type <Side>
79 Standard_EXPORT void Explode (TopTools_ListOfShape& L, const BRepOffset_Type Type) const;
81 //! Explode in compounds of faces where
82 //! all the connex edges are of type <Side1> or <Side2>
83 Standard_EXPORT void Explode (TopTools_ListOfShape& L, const BRepOffset_Type Type1, const BRepOffset_Type Type2) const;
85 //! Add in <CO> the faces of the shell containing <Face>
86 //! where all the connex edges are of type <Side>.
87 Standard_EXPORT void AddFaces (const TopoDS_Face& Face, TopoDS_Compound& Co, TopTools_MapOfShape& Map, const BRepOffset_Type Type) const;
89 //! Add in <CO> the faces of the shell containing <Face>
90 //! where all the connex edges are of type <Side1> or <Side2>.
91 Standard_EXPORT void AddFaces (const TopoDS_Face& Face, TopoDS_Compound& Co, TopTools_MapOfShape& Map, const BRepOffset_Type Type1, const BRepOffset_Type Type2) const;
106 Standard_Boolean myDone;
107 TopoDS_Shape myShape;
108 BRepOffset_DataMapOfShapeListOfInterval mapEdgeType;
109 TopTools_IndexedDataMapOfShapeListOfShape ancestors;
121 #endif // _BRepOffset_Analyse_HeaderFile