Salome HOME
Merge from BR_siman_phase1 14/02/2013
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Tools.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File:        GEOMAlgo_Tools.hxx
24 // Created:     Mon Dec  6 11:35:29 2004
25 // Author:      Peter KURNEV
26
27 #ifndef _GEOMAlgo_Tools_HeaderFile
28 #define _GEOMAlgo_Tools_HeaderFile
29
30 #include <Standard.hxx>
31 #include <Standard_Macro.hxx>
32 #include <Standard_Boolean.hxx>
33 #include <Standard_Integer.hxx>
34 #include <Standard_Real.hxx>
35 #include <Handle_IntTools_Context.hxx>
36 #include <Handle_Geom_Surface.hxx>
37 #include <TopoDS_Shape.hxx>
38 #include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
39 #include <IntTools_Context.hxx>
40 #include <TopTools_ListOfShape.hxx>
41 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
42 #include <gp_Pnt.hxx>
43 #include <TopoDS_Edge.hxx>
44 #include <TopoDS_Face.hxx>
45 #include <Geom_Surface.hxx>
46
47 //=======================================================================
48 //class    : GEOMAlgo_Tools
49 //purpose  :
50 //=======================================================================
51 class GEOMAlgo_Tools
52  {
53 public:
54   Standard_EXPORT
55     static  Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
56
57   Standard_EXPORT
58     static  Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
59                                             const Standard_Real aTol,
60                                             const Handle(IntTools_Context)& aCtx) ;
61
62   Standard_EXPORT
63     static  Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
64                                           const Standard_Real aTol,
65                                           TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
66                                           const Handle(IntTools_Context)& aCtx) ;
67
68   Standard_EXPORT
69     static  Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
70                                           const TopTools_ListOfShape& aLE,
71                                           const Standard_Real aTol,
72                                           TopTools_ListOfShape& aLESD,
73                                           const Handle(IntTools_Context)& aCtx) ;
74
75   Standard_EXPORT
76     static  Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
77                                                  const TopoDS_Shape& aS,gp_Pnt& aP2,
78                                                  const Handle(IntTools_Context)& aCtx) ;
79
80   Standard_EXPORT
81     static  void PointOnShape(const TopoDS_Shape& aS,
82                               gp_Pnt& aP3D) ;
83
84   Standard_EXPORT
85     static  void PointOnEdge(const TopoDS_Edge& aE,
86                              gp_Pnt& aP3D) ;
87
88   Standard_EXPORT
89     static  void PointOnEdge(const TopoDS_Edge& aE,
90                              const Standard_Real aT,gp_Pnt& aP3D) ;
91
92   Standard_EXPORT
93     static  void PointOnFace(const TopoDS_Face& aF,
94                              gp_Pnt& aP3D) ;
95
96   Standard_EXPORT
97     static  void PointOnFace(const TopoDS_Face& aF,
98                              const Standard_Real aU,
99                              const Standard_Real aV,
100                              gp_Pnt& aP3D) ;
101
102   Standard_EXPORT
103     static  void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
104                                            const TopoDS_Face& aF,
105                                            const Standard_Real aU1,
106                                            const Standard_Real aU2) ;
107
108   Standard_EXPORT
109     static  Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
110
111   Standard_EXPORT
112     static  Standard_Boolean CorrectWires(const TopoDS_Shape& aS) ;
113
114   Standard_EXPORT
115     static  Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,
116                                                       const TopoDS_Edge& aEold,
117                                                       const TopoDS_Face& aF,
118                                                       const Handle(IntTools_Context)& aCtx) ;
119
120 };
121 #endif