Version: 9.12.0
GEOMAlgo_GetInPlace.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_GetInPlace.hxx
23 // Created:
24 // Author: Peter KURNEV
25 
26 #ifndef _GEOMAlgo_GetInPlace_HeaderFile
27 #define _GEOMAlgo_GetInPlace_HeaderFile
28 
29 #include <Standard.hxx>
30 #include <Standard_Macro.hxx>
31 #include <Standard_Integer.hxx>
32 #include <Standard_Real.hxx>
33 #include <Standard_Boolean.hxx>
34 
35 #include <TopAbs_ShapeEnum.hxx>
36 #include <TopoDS_Shape.hxx>
37 
41 
43 #include <GEOMAlgo_GluerAlgo.hxx>
44 #include <GEOMAlgo_Algo.hxx>
46 #include <TopTools_DataMapOfShapeInteger.hxx>
47 #include <TopTools_DataMapOfShapeShape.hxx>
48 
49 
50 //=======================================================================
56 //=======================================================================
57 //class : GEOMAlgo_GetInPlaceIterator
58 //purpose :
59 //=======================================================================
61  public:
65  //Standard_EXPORT
67 
71  //Standard_EXPORT
73 
77  //Standard_EXPORT
78  void Clear() ;
79 
85  //Standard_EXPORT
86  void AppendPair(const GEOMAlgo_CoupleOfShapes& theCS) ;
87 
95  //Standard_EXPORT
96  void Initialize(const TopAbs_ShapeEnum theT1,
97  const TopAbs_ShapeEnum theT2) ;
103  //Standard_EXPORT
104  Standard_Boolean More() const;
105 
109  //Standard_EXPORT
110  void Next() ;
111 
117  //Standard_EXPORT
118  const GEOMAlgo_CoupleOfShapes& Value() const;
119 
120 protected:
121  Standard_Integer myDim;
125 
126 private:
127 };
128 
129 
130 //=======================================================================
136 //=======================================================================
137 //class : GEOMAlgo_GetInPlace
138 //purpose :
139 //=======================================================================
141  public GEOMAlgo_Algo
142 {
143  public:
147  Standard_EXPORT
152  Standard_EXPORT
153  virtual ~GEOMAlgo_GetInPlace();
159  Standard_EXPORT
160  virtual void SetShapeWhere(const TopoDS_Shape& theShape) ;
161 
167  Standard_EXPORT
168  const TopoDS_Shape& ShapeWhere() const;
169 
175  Standard_EXPORT
176  void SetTolMass(const Standard_Real theTol) ;
177 
183  Standard_EXPORT
184  Standard_Real TolMass() const;
185 
191  Standard_EXPORT
192  void SetTolCG(const Standard_Real theTol) ;
193 
199  Standard_EXPORT
200  Standard_Real TolCG() const;
201 
205  Standard_EXPORT
206  virtual void Perform() ;
207 
213  Standard_EXPORT
214  Standard_Boolean IsFound() const;
215 
219  Standard_EXPORT
220  virtual void CheckData() ;
221 
225  Standard_EXPORT
226  virtual void Clear() ;
227 
236  Standard_EXPORT
238 
247  Standard_EXPORT
249  //
264  Standard_EXPORT
265  const TopoDS_Shape &Result();
266 
267 protected:
268  Standard_EXPORT
269  void Intersect() ;
270 
271  Standard_EXPORT
272  void PerformVV() ;
273 
274  Standard_EXPORT
275  void PerformVE() ;
276 
277  Standard_EXPORT
278  void PerformEE() ;
279 
280  void PerformEE(const TopoDS_Shape &theE1, const TopoDS_Shape &theE2);
281 
282  Standard_EXPORT
283  void PerformVF() ;
284 
285  Standard_EXPORT
286  void PerformEF() ;
287 
288  Standard_EXPORT
289  void PerformFF() ;
290 
291  void PerformFF(const TopoDS_Shape &theF1, const TopoDS_Shape &theF2);
292 
293  Standard_EXPORT
294  void FillEdgesOn(const TopoDS_Shape &theShape);
295 
296  Standard_EXPORT
297  void FillFacesOn(const TopoDS_Shape &theShape);
298 
299  Standard_EXPORT
300  void FillSolidsOn(const TopoDS_Shape &theShape);
301 
302  Standard_EXPORT
303  void PerformZF() ;
304 
305  Standard_EXPORT
306  void PerformZZ() ;
307 
308  void PerformZZ(const TopoDS_Shape &theSo1, const TopoDS_Shape &theSo2);
309 
310  Standard_EXPORT
311  void FillImages(const TopoDS_Shape &theShape,
312  const Standard_Boolean IsWhere);
313 
314  void FillImgSimple(const TopoDS_Shape &theShape,
315  const TopAbs_ShapeEnum theSubShapeType,
316  const Standard_Boolean IsWhere);
317 
318  void FillImgComplex(const TopoDS_Shape &theShape,
319  const Standard_Boolean IsWhere);
320 
321  void FillImgComplex(const TopoDS_Shape &theShape,
322  const TopAbs_ShapeEnum theSubShapeType,
323  const Standard_Boolean IsWhere);
324 
325  Standard_EXPORT
326  void CheckGProps() ;
327 
328  Standard_EXPORT
329  void FillShapesIn(const TopoDS_Shape& theS1,
330  const TopoDS_Shape& theS2) ;
331 
332  Standard_EXPORT
333  void FillShapesOn(const TopoDS_Shape& theS1,
334  const TopoDS_Shape& theS2) ;
335 
336  Standard_EXPORT
337  Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1,
338  const TopoDS_Shape& theS2);
339 
340  Standard_EXPORT
341  Standard_Integer CheckGProps(const TopoDS_Shape& theS);
342 
343  Standard_Boolean CompareGProps
344  (const TopoDS_Shape &theShape1,
345  const TopTools_ListOfShape &theListShape2) const;
346 
347  Standard_EXPORT
348  void UpdateChecked(const TopoDS_Shape& theS1,
349  const Standard_Integer theFlag);
350  //
351  TopoDS_Shape myShapeWhere;
355  TopTools_DataMapOfShapeShape myShapesInclusive;
356  Standard_Real myTolMass;
357  Standard_Real myTolCG;
358  Standard_Boolean myFound;
360  TopTools_DataMapOfShapeInteger myChecked;
361  //
362  TopoDS_Shape myResult;
363 
364 private:
365 };
366 
367 
368 
369 #endif
NCollection_DataMap< TopoDS_Shape, TopTools_MapOfShape, TopTools_ShapeMapHasher > GEOMAlgo_DataMapOfShapeMapOfShape
Definition: GEOMAlgo_DataMapOfShapeMapOfShape.hxx:37
NCollection_DataMap< TopoDS_Shape, gp_Pnt, TopTools_ShapeMapHasher > GEOMAlgo_DataMapOfShapePnt
Definition: GEOMAlgo_DataMapOfShapePnt.hxx:37
NCollection_List< GEOMAlgo_CoupleOfShapes > GEOMAlgo_ListOfCoupleOfShapes
Definition: GEOMAlgo_ListOfCoupleOfShapes.hxx:31
GEOMAlgo_ListOfCoupleOfShapes::Iterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes
Definition: GEOMAlgo_ListOfCoupleOfShapes.hxx:32
Definition: GEOMAlgo_Algo.hxx:41
Definition: GEOMAlgo_CoupleOfShapes.hxx:37
The implementation of iterator of intersected shapes for Get In Place Algorithm.
Definition: GEOMAlgo_GetInPlace.hxx:60
GEOMAlgo_ListIteratorOfListOfCoupleOfShapes myIterator
Definition: GEOMAlgo_GetInPlace.hxx:124
void Initialize(const TopAbs_ShapeEnum theT1, const TopAbs_ShapeEnum theT2)
Initialize the iterator.
Definition: GEOMAlgo_GetInPlace_3.cxx:94
const GEOMAlgo_CoupleOfShapes & Value() const
Returns the pair of intersected shapes.
Definition: GEOMAlgo_GetInPlace_3.cxx:127
void AppendPair(const GEOMAlgo_CoupleOfShapes &theCS)
Append the pair of intersected shapes.
Definition: GEOMAlgo_GetInPlace_3.cxx:65
virtual ~GEOMAlgo_GetInPlaceIterator()
Destructor.
Definition: GEOMAlgo_GetInPlace_3.cxx:46
GEOMAlgo_ListOfCoupleOfShapes myEmptyList
Definition: GEOMAlgo_GetInPlace.hxx:123
Standard_Integer myDim
Definition: GEOMAlgo_GetInPlace.hxx:121
GEOMAlgo_ListOfCoupleOfShapes myLists[10]
Definition: GEOMAlgo_GetInPlace.hxx:122
GEOMAlgo_GetInPlaceIterator()
Constructor.
Definition: GEOMAlgo_GetInPlace_3.cxx:38
Standard_Boolean More() const
Check the existence of pairs to iterare.
Definition: GEOMAlgo_GetInPlace_3.cxx:111
void Clear()
Clear the internal content.
Definition: GEOMAlgo_GetInPlace_3.cxx:53
void Next()
Shift to the next pair.
Definition: GEOMAlgo_GetInPlace_3.cxx:119
The implementation of Get In Place Algorithm.
Definition: GEOMAlgo_GetInPlace.hxx:142
Standard_Boolean CompareGProps(const TopoDS_Shape &theShape1, const TopTools_ListOfShape &theListShape2) const
Definition: GEOMAlgo_GetInPlace_2.cxx:179
GEOMAlgo_DataMapOfShapeMapOfShape myShapesOn
Definition: GEOMAlgo_GetInPlace.hxx:354
Standard_EXPORT Standard_Boolean CheckCoincidence(const TopoDS_Shape &theS1, const TopoDS_Shape &theS2)
Definition: GEOMAlgo_GetInPlace_1.cxx:90
Standard_EXPORT void SetTolCG(const Standard_Real theTol)
Modifier.
Definition: GEOMAlgo_GetInPlace.cxx:112
virtual Standard_EXPORT void SetShapeWhere(const TopoDS_Shape &theShape)
Modifier.
Definition: GEOMAlgo_GetInPlace.cxx:136
void FillImgComplex(const TopoDS_Shape &theShape, const Standard_Boolean IsWhere)
Definition: GEOMAlgo_GetInPlace.cxx:1011
Standard_EXPORT const TopoDS_Shape & Result()
Returns the result that includes parts of the whole and whole from parts.
Definition: GEOMAlgo_GetInPlace.cxx:1176
TopTools_DataMapOfShapeInteger myChecked
Definition: GEOMAlgo_GetInPlace.hxx:360
Standard_EXPORT void FillShapesIn(const TopoDS_Shape &theS1, const TopoDS_Shape &theS2)
Definition: GEOMAlgo_GetInPlace.cxx:1108
Standard_EXPORT void CheckGProps()
Definition: GEOMAlgo_GetInPlace_2.cxx:61
Standard_EXPORT void Intersect()
Definition: GEOMAlgo_GetInPlace.cxx:306
GEOMAlgo_DataMapOfShapePnt myMapShapePnt
Definition: GEOMAlgo_GetInPlace.hxx:359
Standard_EXPORT GEOMAlgo_GetInPlace()
Constructor.
Definition: GEOMAlgo_GetInPlace.cxx:74
Standard_EXPORT const GEOMAlgo_DataMapOfShapeMapOfShape & ShapesOn() const
Returns the map of shapes ON.
Definition: GEOMAlgo_GetInPlace.cxx:160
Standard_Boolean myFound
Definition: GEOMAlgo_GetInPlace.hxx:358
TopoDS_Shape myResult
Definition: GEOMAlgo_GetInPlace.hxx:362
Standard_EXPORT void PerformZZ()
Definition: GEOMAlgo_GetInPlace.cxx:842
Standard_EXPORT void PerformFF()
Definition: GEOMAlgo_GetInPlace.cxx:694
Standard_EXPORT void PerformVE()
Definition: GEOMAlgo_GetInPlace.cxx:444
Standard_EXPORT void PerformZF()
Definition: GEOMAlgo_GetInPlace.cxx:808
Standard_Real myTolMass
Definition: GEOMAlgo_GetInPlace.hxx:356
Standard_EXPORT Standard_Real TolCG() const
Selector.
Definition: GEOMAlgo_GetInPlace.cxx:120
Standard_EXPORT const GEOMAlgo_DataMapOfShapeMapOfShape & ShapesIn() const
Returns the map of shapes IN.
Definition: GEOMAlgo_GetInPlace.cxx:152
Standard_EXPORT const TopoDS_Shape & ShapeWhere() const
Selector.
Definition: GEOMAlgo_GetInPlace.cxx:144
Standard_EXPORT void SetTolMass(const Standard_Real theTol)
Modifier.
Definition: GEOMAlgo_GetInPlace.cxx:96
Standard_EXPORT void FillEdgesOn(const TopoDS_Shape &theShape)
Definition: GEOMAlgo_GetInPlace.cxx:410
Standard_EXPORT void PerformEF()
Definition: GEOMAlgo_GetInPlace.cxx:642
Standard_EXPORT void FillFacesOn(const TopoDS_Shape &theShape)
Definition: GEOMAlgo_GetInPlace.cxx:597
Standard_EXPORT void PerformVF()
Definition: GEOMAlgo_GetInPlace.cxx:543
virtual Standard_EXPORT void CheckData()
Checks data.
Definition: GEOMAlgo_GetInPlace.cxx:287
GEOMAlgo_GetInPlaceIterator myIterator
Definition: GEOMAlgo_GetInPlace.hxx:352
virtual Standard_EXPORT ~GEOMAlgo_GetInPlace()
Destructor.
Definition: GEOMAlgo_GetInPlace.cxx:89
Standard_EXPORT void FillImages(const TopoDS_Shape &theShape, const Standard_Boolean IsWhere)
Definition: GEOMAlgo_GetInPlace.cxx:927
Standard_EXPORT Standard_Real TolMass() const
Selector.
Definition: GEOMAlgo_GetInPlace.cxx:104
Standard_EXPORT void UpdateChecked(const TopoDS_Shape &theS1, const Standard_Integer theFlag)
Definition: GEOMAlgo_GetInPlace_2.cxx:245
Standard_EXPORT void PerformEE()
Definition: GEOMAlgo_GetInPlace.cxx:478
Standard_Real myTolCG
Definition: GEOMAlgo_GetInPlace.hxx:357
virtual Standard_EXPORT void Perform()
Perform the algorithm.
Definition: GEOMAlgo_GetInPlace.cxx:188
Standard_EXPORT void FillSolidsOn(const TopoDS_Shape &theShape)
Definition: GEOMAlgo_GetInPlace.cxx:766
Standard_EXPORT void PerformVV()
Definition: GEOMAlgo_GetInPlace.cxx:391
GEOMAlgo_DataMapOfShapeMapOfShape myShapesIn
Definition: GEOMAlgo_GetInPlace.hxx:353
Standard_EXPORT void FillShapesOn(const TopoDS_Shape &theS1, const TopoDS_Shape &theS2)
Definition: GEOMAlgo_GetInPlace.cxx:1126
void FillImgSimple(const TopoDS_Shape &theShape, const TopAbs_ShapeEnum theSubShapeType, const Standard_Boolean IsWhere)
Definition: GEOMAlgo_GetInPlace.cxx:968
Standard_EXPORT Standard_Boolean IsFound() const
Returns state of the search.
Definition: GEOMAlgo_GetInPlace.cxx:128
TopoDS_Shape myShapeWhere
Definition: GEOMAlgo_GetInPlace.hxx:351
TopTools_DataMapOfShapeShape myShapesInclusive
Definition: GEOMAlgo_GetInPlace.hxx:355
virtual Standard_EXPORT void Clear()
Clear the internal content.
Definition: GEOMAlgo_GetInPlace.cxx:168
Definition: GEOMAlgo_GluerAlgo.hxx:42