1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
\r
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
\r
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
\r
6 // This library is free software; you can redistribute it and/or
\r
7 // modify it under the terms of the GNU Lesser General Public
\r
8 // License as published by the Free Software Foundation; either
\r
9 // version 2.1 of the License.
\r
11 // This library is distributed in the hope that it will be useful,
\r
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
14 // Lesser General Public License for more details.
\r
16 // You should have received a copy of the GNU Lesser General Public
\r
17 // License along with this library; if not, write to the Free Software
\r
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
\r
22 // File: GEOMAlgo_Tools.hxx
\r
23 // Created: Mon Dec 6 11:35:29 2004
\r
24 // Author: Peter KURNEV
\r
26 #ifndef _GEOMAlgo_Tools_HeaderFile
\r
27 #define _GEOMAlgo_Tools_HeaderFile
\r
29 #include <Standard.hxx>
\r
30 #include <Standard_Macro.hxx>
\r
31 #include <Standard_Boolean.hxx>
\r
32 #include <Standard_Integer.hxx>
\r
33 #include <Standard_Real.hxx>
\r
34 #include <Handle_IntTools_Context.hxx>
\r
35 #include <Handle_Geom_Surface.hxx>
\r
36 #include <TopoDS_Shape.hxx>
\r
37 #include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
\r
38 #include <IntTools_Context.hxx>
\r
39 #include <TopTools_ListOfShape.hxx>
\r
40 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
\r
41 #include <gp_Pnt.hxx>
\r
42 #include <TopoDS_Edge.hxx>
\r
43 #include <TopoDS_Face.hxx>
\r
44 #include <Geom_Surface.hxx>
\r
46 //=======================================================================
\r
47 //class : GEOMAlgo_Tools
\r
49 //=======================================================================
\r
50 class GEOMAlgo_Tools
\r
54 static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
\r
57 static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,
\r
58 const Standard_Real aTol,
\r
59 const Handle(IntTools_Context)& aCtx) ;
\r
62 static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
\r
63 const Standard_Real aTol,
\r
64 TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
\r
65 const Handle(IntTools_Context)& aCtx) ;
\r
68 static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
\r
69 const TopTools_ListOfShape& aLE,
\r
70 const Standard_Real aTol,
\r
71 TopTools_ListOfShape& aLESD,
\r
72 const Handle(IntTools_Context)& aCtx) ;
\r
75 static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
\r
76 const TopoDS_Shape& aS,gp_Pnt& aP2,
\r
77 const Handle(IntTools_Context)& aCtx) ;
\r
80 static void PointOnShape(const TopoDS_Shape& aS,
\r
84 static void PointOnEdge(const TopoDS_Edge& aE,
\r
88 static void PointOnEdge(const TopoDS_Edge& aE,
\r
89 const Standard_Real aT,gp_Pnt& aP3D) ;
\r
92 static void PointOnFace(const TopoDS_Face& aF,
\r
96 static void PointOnFace(const TopoDS_Face& aF,
\r
97 const Standard_Real aU,
\r
98 const Standard_Real aV,
\r
102 static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
\r
103 const TopoDS_Face& aF,
\r
104 const Standard_Real aU1,
\r
105 const Standard_Real aU2) ;
\r
108 static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ;
\r
111 static Standard_Boolean CorrectWires(const TopoDS_Shape& aS) ;
\r
114 static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE,
\r
115 const TopoDS_Edge& aEold,
\r
116 const TopoDS_Face& aF,
\r
117 const Handle(IntTools_Context)& aCtx) ;
\r