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
23 // File: GEOMAlgo_Tools.hxx
24 // Created: Mon Dec 6 11:35:29 2004
25 // Author: Peter KURNEV
27 #ifndef _GEOMAlgo_Tools_HeaderFile
28 #define _GEOMAlgo_Tools_HeaderFile
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>
43 #include <TopoDS_Edge.hxx>
44 #include <TopoDS_Face.hxx>
45 #include <Geom_Surface.hxx>
47 //=======================================================================
48 //class : GEOMAlgo_Tools
50 //=======================================================================
55 static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
58 static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
59 const Standard_Real aTol,
60 const Handle(IntTools_Context)& aCtx) ;
63 static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
64 const Standard_Real aTol,
65 TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
66 const Handle(IntTools_Context)& aCtx) ;
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) ;
76 static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
77 const TopoDS_Shape& aS,gp_Pnt& aP2,
78 const Handle(IntTools_Context)& aCtx) ;
81 static void PointOnShape(const TopoDS_Shape& aS,
85 static void PointOnEdge(const TopoDS_Edge& aE,
89 static void PointOnEdge(const TopoDS_Edge& aE,
90 const Standard_Real aT,gp_Pnt& aP3D) ;
93 static void PointOnFace(const TopoDS_Face& aF,
97 static void PointOnFace(const TopoDS_Face& aF,
98 const Standard_Real aU,
99 const Standard_Real aV,
103 static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
104 const TopoDS_Face& aF,
105 const Standard_Real aU1,
106 const Standard_Real aU2) ;
109 static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
112 static Standard_Boolean CorrectWires(const TopoDS_Shape& aS) ;
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) ;