Back to index

salome-geom  6.5.0
GEOMAlgo_Tools3D.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File    : GEOMAlgo_Tools3D.hxx
00023 //  Created :
00024 //  Author  : Peter KURNEV
00025 
00026 #ifndef _GEOMAlgo_Tools3D_HeaderFile
00027 #define _GEOMAlgo_Tools3D_HeaderFile
00028 
00029 #include <Standard.hxx>
00030 #include <Standard_Macro.hxx>
00031 #include <Standard_Boolean.hxx>
00032 #include <Handle_IntTools_Context.hxx>
00033 #include <Standard_Integer.hxx>
00034 #include <TopAbs_ShapeEnum.hxx>
00035 #include <TopAbs_State.hxx>
00036 #include <Standard_Real.hxx>
00037 #include <NMTTools_ListOfCoupleOfShape.hxx>
00038 #include <TopoDS_Shape.hxx>
00039 #include <IntTools_Context.hxx>
00040 #include <TopoDS_Face.hxx>
00041 #include <TopoDS_Edge.hxx>
00042 #include <TopTools_ListOfShape.hxx>
00043 #include <TopTools_IndexedMapOfShape.hxx>
00044 #include <TopoDS_Solid.hxx>
00045 #include <gp_Pnt.hxx>
00046 #include <TopoDS_Vertex.hxx>
00047 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
00048 #include <gp_Pnt2d.hxx>
00049 
00050 
00052 //=======================================================================
00053 //class    : GEOMAlgo_Tools3D
00054 //purpose  :
00055 //=======================================================================
00056 class GEOMAlgo_Tools3D  {
00057  public:
00061   Standard_EXPORT
00062     static  Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit,
00063                                          const TopoDS_Shape& theShape,
00064                                          const Handle(IntTools_Context)& theContext) ;
00065 
00070   Standard_EXPORT
00071     static  Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit,
00072                                          const TopoDS_Face& theShape,
00073                                          const Handle(IntTools_Context)& theContext) ;
00074 
00079   Standard_EXPORT
00080     static  Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge,
00081                                          const TopoDS_Edge& theSplit,
00082                                          const Handle(IntTools_Context)& theContext) ;
00083 
00089   Standard_EXPORT
00090     static  Standard_Integer Sense(const TopoDS_Face& theF1,
00091                                const TopoDS_Face& theF2) ;
00092 
00095   Standard_EXPORT
00096     static  void CopyFace(const TopoDS_Face& theF1,
00097                        TopoDS_Face& theF2) ;
00098 
00100   Standard_EXPORT
00101     static  void MakeContainer(const TopAbs_ShapeEnum theType,
00102                             TopoDS_Shape& theShape) ;
00103 
00108   Standard_EXPORT
00109     static  void MakeConnexityBlock(const TopTools_ListOfShape& theLS,
00110                                 const TopTools_IndexedMapOfShape& theMapAvoid,
00111                                 TopTools_ListOfShape& theLSCB) ;
00112 
00118   Standard_EXPORT
00119     static  TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape,
00120                                           const TopoDS_Solid& theSolid,
00121                                           const Standard_Real theTol,
00122                                           const Handle(IntTools_Context)& theContext) ;
00123 
00129   Standard_EXPORT
00130     static  TopAbs_State ComputeState(const gp_Pnt& thePoint,
00131                                   const TopoDS_Solid& theSolid,
00132                                   const Standard_Real theTol,
00133                                   const Handle(IntTools_Context)& theContext) ;
00134 
00140   Standard_EXPORT
00141     static  TopAbs_State ComputeState(const TopoDS_Vertex& theVertex,
00142                                   const TopoDS_Solid& theSolid,
00143                                   const Standard_Real theTol,
00144                                   const Handle(IntTools_Context)& theContext) ;
00145 
00151   Standard_EXPORT
00152     static  TopAbs_State ComputeState(const TopoDS_Edge& theEdge,
00153                                   const TopoDS_Solid& theSolid,
00154                                   const Standard_Real theTol,
00155                                   const Handle(IntTools_Context)& theContext) ;
00156 
00163   Standard_EXPORT
00164     static  TopAbs_State ComputeState(const TopoDS_Face& theFace,
00165                                   const TopoDS_Solid& theSolid,
00166                                   const Standard_Real theTol,
00167                                   const TopTools_IndexedMapOfShape& theBounds,
00168                                   const Handle(IntTools_Context)& theContext) ;
00169 
00174   Standard_EXPORT
00175     static  Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
00176                                        const TopoDS_Edge& theEdge,
00177                                        const TopoDS_Face& theFace1,
00178                                        const TopoDS_Face& theFace2,
00179                                        const Handle(IntTools_Context)& theContext) ;
00180 
00185   Standard_EXPORT
00186     static  Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
00187                                        const TopoDS_Edge& theEdge,
00188                                        const TopTools_ListOfShape& theLF,
00189                                        const Handle(IntTools_Context)& theContext) ;
00190 
00196   Standard_EXPORT
00197     static  Standard_Boolean IsInternalFace(const TopoDS_Face& theFace,
00198                                        const TopoDS_Solid& theSolid,
00199                                        const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
00200                                        const Standard_Real theTol,
00201                                        const Handle(IntTools_Context)& theContext) ;
00202 
00207   Standard_EXPORT
00208     static  void GetFaceOff(const TopoDS_Edge& theEdge,
00209                          const TopoDS_Face& theFace,
00210                          const NMTTools_ListOfCoupleOfShape& theLCEF,
00211                          TopoDS_Face& theFaceOff) ;
00212 
00217   Standard_EXPORT
00218     static  Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge,
00219                                       const TopoDS_Face& theFace,
00220                                       TopoDS_Edge& theEdgeOnF) ;
00221 
00226   Standard_EXPORT
00227     static  Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge,
00228                                    const TopoDS_Face& theFace,
00229                                    TopoDS_Edge& theEdgeOff) ;
00230 
00235   Standard_EXPORT
00236     static  Standard_Integer PntInFace(const TopoDS_Face& theF,
00237                                    gp_Pnt& theP,
00238                                    gp_Pnt2d& theP2D) ;
00239 };
00240 #endif