Version: 9.12.0
GEOMAlgo_AlgoTools.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, 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, or (at your option) any later version.
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 // File : GEOMAlgo_AlgoTools.hxx
23 // Created :
24 // Author : Peter KURNEV
25 
26 #ifndef _GEOMAlgo_AlgoTools_HeaderFile
27 #define _GEOMAlgo_AlgoTools_HeaderFile
28 
29 #include <Standard.hxx>
30 #include <Standard_Macro.hxx>
31 #include <Standard_Boolean.hxx>
32 #include <IntTools_Context.hxx>
33 #include <Standard_Integer.hxx>
34 
35 #include <gp_Pnt.hxx>
36 #include <gp_Pnt2d.hxx>
37 
38 #include <Geom_Surface.hxx>
39 
40 #include <TopAbs_ShapeEnum.hxx>
41 
42 #include <TopoDS_Face.hxx>
43 #include <TopoDS_Shape.hxx>
44 #include <TopoDS_Edge.hxx>
45 #include <TopoDS_Compound.hxx>
46 
47 #include <TopTools_ListOfShape.hxx>
48 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
49 #include <TopTools_ListOfShape.hxx>
50 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
51 
55 
57 //=======================================================================
58 //class : GEOMAlgo_AlgoTools
59 //purpose :
60 //=======================================================================
62  public:
63 
64  Standard_EXPORT
65  static void FaceNormal (const TopoDS_Face& aF,
66  const Standard_Real U,
67  const Standard_Real V,
68  gp_Vec& aN);
69 
74  Standard_EXPORT
75  static Standard_Integer PntInFace(const TopoDS_Face& theF,
76  gp_Pnt& theP,
77  gp_Pnt2d& theP2D) ;
78 
81  Standard_EXPORT
82  static Standard_Integer PointCloudInFace(const TopoDS_Face& theF,
83  const int theNbPnts,
84  TopoDS_Compound& theCompound) ;
85 
86  Standard_EXPORT
87  static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ;
88 
89 
90  Standard_EXPORT
91  static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ;
92 
93  Standard_EXPORT
94  static Standard_Integer RefineSDShapes
96  const Standard_Real aTol,
97  const Handle(IntTools_Context)& aCtx) ;
98 
99  Standard_EXPORT
100  static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
101  const Standard_Real aTol,
102  TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
103  const Handle(IntTools_Context)& aCtx) ;
104  Standard_EXPORT
105  static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
106  const TopTools_ListOfShape& aLE,
107  const Standard_Real aTol,
108  TopTools_ListOfShape& aLESD,
109  const Handle(IntTools_Context)& aCtx) ;
110 
111  Standard_EXPORT
112  static void PointOnShape(const TopoDS_Shape& aS,
113  gp_Pnt& aP3D) ;
114 
115  Standard_EXPORT
116  static void PointOnEdge(const TopoDS_Edge& aE,
117  gp_Pnt& aP3D) ;
118 
119  Standard_EXPORT
120  static void PointOnEdge(const TopoDS_Edge& aE,
121  const Standard_Real aT,gp_Pnt& aP3D) ;
122 
123  Standard_EXPORT
124  static void PointOnFace(const TopoDS_Face& aF,
125  gp_Pnt& aP3D) ;
126 
127  Standard_EXPORT
128  static void PointOnFace(const TopoDS_Face& aF,
129  const Standard_Real aU,
130  const Standard_Real aV,
131  gp_Pnt& aP3D) ;
132  Standard_EXPORT
133  static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,
134  const TopoDS_Shape& aS,
135  gp_Pnt& aP2,
136  const Handle(IntTools_Context)& aCtx) ;
137 
138  Standard_EXPORT
139  static void CorrectTolerances(const TopoDS_Shape& aShape,
140  const Standard_Real aMaxTol=0.0001);
141 
142  Standard_EXPORT
143  static void CorrectPointOnCurve(const TopoDS_Shape& S,
144  const Standard_Real aMaxTol=0.0001);
145 
146  Standard_EXPORT
147  static void CorrectCurveOnSurface(const TopoDS_Shape& S,
148  const Standard_Real aMaxTol=0.0001);
149 
150 
151  Standard_EXPORT
152  static Standard_Boolean IsSplitToReverse1 (const TopoDS_Edge& aEF1,
153  const TopoDS_Edge& aEF2,
154  const Handle(IntTools_Context)& aCtx) ;
155  Standard_EXPORT
156  static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,
157  const TopoDS_Face& aF,
158  const Standard_Real aUMin,
159  const Standard_Real aUMax);
160 
161  Standard_EXPORT
162  static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface) &aS);
163 
164  Standard_EXPORT
165  static void MakeContainer(const TopAbs_ShapeEnum theType,
166  TopoDS_Shape& theC);
167 
168  Standard_EXPORT
169  static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theSplit,
170  const TopoDS_Edge& theEdge,
171  const Handle(IntTools_Context)& theCtx) ;
172 
173  Standard_EXPORT
174  static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theFSp,
175  const TopoDS_Face& theFSr,
176  const Handle(IntTools_Context)& theCtx) ;
177 
178  Standard_EXPORT
179  static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSp,
180  const TopoDS_Shape& theSr,
181  const Handle(IntTools_Context)& theCtx) ;
182  Standard_EXPORT
183  static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aEold,
184  const TopoDS_Edge& aEnew,
185  const TopoDS_Face& aF,
186  const Handle(IntTools_Context)& aCtx) ;
187 
188 //
189  Standard_EXPORT
190  static void FindChains(const GEOMAlgo_ListOfCoupleOfShapes& aLCS,
192 
193  Standard_EXPORT
196 
197  Standard_EXPORT
198  static void CopyShape(const TopoDS_Shape& aS,
199  TopoDS_Shape& aSC) ;
200 
201  Standard_EXPORT
202  static void CopyShape(const TopoDS_Shape& aS,
203  TopoDS_Shape& aSC,
204  TopTools_IndexedDataMapOfShapeShape& aMSS) ;
205 };
206 #endif
Handle(TColStd_HSequenceOfTransient) AdvancedEngine_IOperations
Create a T-shape object with specified caracteristics for the main and the incident pipes (radius,...
Definition: AdvancedEngine_IOperations.cxx:1907
NCollection_IndexedDataMap< GEOMAlgo_PassKeyShape, TopTools_ListOfShape, GEOMAlgo_PassKeyShapeMapHasher > GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape
Definition: GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx:37
NCollection_IndexedDataMap< TopoDS_Shape, TopTools_IndexedMapOfShape, TopTools_ShapeMapHasher > GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape
Definition: GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape.hxx:41
NCollection_List< GEOMAlgo_CoupleOfShapes > GEOMAlgo_ListOfCoupleOfShapes
Definition: GEOMAlgo_ListOfCoupleOfShapes.hxx:31
Auxiliary tools for Algorithms
Definition: GEOMAlgo_AlgoTools.hxx:61
static Standard_EXPORT Standard_Boolean IsCompositeShape(const TopoDS_Shape &aS)
Definition: GEOMAlgo_AlgoTools.cxx:893
static Standard_EXPORT Standard_Boolean BuildTriangulation(const TopoDS_Shape &aS)
Definition: GEOMAlgo_AlgoTools.cxx:842
static Standard_EXPORT void RefinePCurveForEdgeOnFace(const TopoDS_Edge &aE, const TopoDS_Face &aF, const Standard_Real aUMin, const Standard_Real aUMax)
Definition: GEOMAlgo_AlgoTools.cxx:450
static Standard_EXPORT void PointOnEdge(const TopoDS_Edge &aE, gp_Pnt &aP3D)
Definition: GEOMAlgo_AlgoTools.cxx:587
static Standard_EXPORT Standard_Boolean ProjectPointOnShape(const gp_Pnt &aP1, const TopoDS_Shape &aS, gp_Pnt &aP2, const Handle(IntTools_Context)&aCtx)
Definition: GEOMAlgo_AlgoTools.cxx:527
static Standard_EXPORT Standard_Boolean IsUPeriodic(const Handle(Geom_Surface) &aS)
Definition: GEOMAlgo_AlgoTools.cxx:431
static Standard_EXPORT void FaceNormal(const TopoDS_Face &aF, const Standard_Real U, const Standard_Real V, gp_Vec &aN)
Definition: GEOMAlgo_AlgoTools.cxx:217
static Standard_EXPORT Standard_Boolean IsSplitToReverse(const TopoDS_Shape &theSp, const TopoDS_Shape &theSr, const Handle(IntTools_Context)&theCtx)
static Standard_EXPORT void PointOnFace(const TopoDS_Face &aF, gp_Pnt &aP3D)
Definition: GEOMAlgo_AlgoTools.cxx:628
static Standard_EXPORT Standard_Integer PointCloudInFace(const TopoDS_Face &theF, const int theNbPnts, TopoDS_Compound &theCompound)
Computes a set of points inside the face <theF>.
Definition: GEOMAlgo_AlgoTools.cxx:1058
static Standard_EXPORT void PointOnShape(const TopoDS_Shape &aS, gp_Pnt &aP3D)
Definition: GEOMAlgo_AlgoTools.cxx:644
static Standard_EXPORT void CorrectPointOnCurve(const TopoDS_Shape &S, const Standard_Real aMaxTol=0.0001)
static Standard_EXPORT Standard_Boolean IsSplitToReverse1(const TopoDS_Edge &aEF1, const TopoDS_Edge &aEF2, const Handle(IntTools_Context)&aCtx)
static Standard_EXPORT void FindChains(const GEOMAlgo_ListOfCoupleOfShapes &aLCS, GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape &aMapChains)
Definition: GEOMAlgo_AlgoTools_1.cxx:47
static Standard_EXPORT void CopyShape(const TopoDS_Shape &aS, TopoDS_Shape &aSC)
Definition: GEOMAlgo_AlgoTools.cxx:146
static Standard_EXPORT Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape &aMSD, const Standard_Real aTol, const Handle(IntTools_Context)&aCtx)
Definition: GEOMAlgo_AlgoTools.cxx:782
static Standard_EXPORT void CorrectTolerances(const TopoDS_Shape &aShape, const Standard_Real aMaxTol=0.0001)
static Standard_EXPORT Standard_Integer FindSDShapes(const TopTools_ListOfShape &aLE, const Standard_Real aTol, TopTools_IndexedDataMapOfShapeListOfShape &aMEE, const Handle(IntTools_Context)&aCtx)
Definition: GEOMAlgo_AlgoTools.cxx:713
static Standard_EXPORT Standard_Integer PntInFace(const TopoDS_Face &theF, gp_Pnt &theP, gp_Pnt2d &theP2D)
Computes a point <theP> inside the face <theF>.
Definition: GEOMAlgo_AlgoTools.cxx:936
static Standard_EXPORT void MakeContainer(const TopAbs_ShapeEnum theType, TopoDS_Shape &theC)
Definition: GEOMAlgo_AlgoTools.cxx:381
static Standard_EXPORT Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge &aEold, const TopoDS_Edge &aEnew, const TopoDS_Face &aF, const Handle(IntTools_Context)&aCtx)
Definition: GEOMAlgo_AlgoTools.cxx:240
static Standard_EXPORT Standard_Boolean IsSplitToReverse(const TopoDS_Face &theFSp, const TopoDS_Face &theFSr, const Handle(IntTools_Context)&theCtx)
static Standard_EXPORT void CorrectCurveOnSurface(const TopoDS_Shape &S, const Standard_Real aMaxTol=0.0001)
static Standard_EXPORT Standard_Boolean IsSplitToReverse(const TopoDS_Edge &theSplit, const TopoDS_Edge &theEdge, const Handle(IntTools_Context)&theCtx)
Definition: GEOMAlgo_AlgoTools.cxx:483