summaryrefslogtreecommitdiff
path: root/inc/TopOpeBRepBuild_Builder.hxx
blob: 81dcf0d631df0d95a6b003677720dc5a91dbe9f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _TopOpeBRepBuild_Builder_HeaderFile
#define _TopOpeBRepBuild_Builder_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _TopAbs_State_HeaderFile
#include <TopAbs_State.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _Handle_TopOpeBRepDS_HDataStructure_HeaderFile
#include <Handle_TopOpeBRepDS_HDataStructure.hxx>
#endif
#ifndef _TopOpeBRepDS_BuildTool_HeaderFile
#include <TopOpeBRepDS_BuildTool.hxx>
#endif
#ifndef _Handle_TopTools_HArray1OfShape_HeaderFile
#include <Handle_TopTools_HArray1OfShape.hxx>
#endif
#ifndef _TopTools_DataMapOfIntegerListOfShape_HeaderFile
#include <TopTools_DataMapOfIntegerListOfShape.hxx>
#endif
#ifndef _Handle_TopTools_HArray1OfListOfShape_HeaderFile
#include <Handle_TopTools_HArray1OfListOfShape.hxx>
#endif
#ifndef _TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State_HeaderFile
#include <TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State.hxx>
#endif
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopoDS_Solid_HeaderFile
#include <TopoDS_Solid.hxx>
#endif
#ifndef _TopoDS_Face_HeaderFile
#include <TopoDS_Face.hxx>
#endif
#ifndef _TopoDS_Edge_HeaderFile
#include <TopoDS_Edge.hxx>
#endif
#ifndef _TopTools_IndexedMapOfShape_HeaderFile
#include <TopTools_IndexedMapOfShape.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _TopOpeBRepTool_ShapeClassifier_HeaderFile
#include <TopOpeBRepTool_ShapeClassifier.hxx>
#endif
#ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx>
#endif
#ifndef _TCollection_AsciiString_HeaderFile
#include <TCollection_AsciiString.hxx>
#endif
#ifndef _TopTools_IndexedDataMapOfShapeShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#endif
#ifndef _TopTools_IndexedMapOfOrientedShape_HeaderFile
#include <TopTools_IndexedMapOfOrientedShape.hxx>
#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
#ifndef _TopOpeBRepDS_Config_HeaderFile
#include <TopOpeBRepDS_Config.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
class TopOpeBRepDS_HDataStructure;
class TopTools_HArray1OfShape;
class TopTools_HArray1OfListOfShape;
class Standard_NoSuchObject;
class TopOpeBRepBuild_HBuilder;
class TopOpeBRepDS_BuildTool;
class TopoDS_Shape;
class TopTools_ListOfShape;
class TopTools_MapOfShape;
class TopTools_DataMapOfShapeShape;
class TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State;
class TopOpeBRepTool_ShapeExplorer;
class TopOpeBRepBuild_ShapeSet;
class TopOpeBRepBuild_EdgeBuilder;
class TopOpeBRepBuild_FaceBuilder;
class TopOpeBRepBuild_SolidBuilder;
class TopOpeBRepBuild_WireEdgeSet;
class TopOpeBRepDS_PointIterator;
class TopOpeBRepBuild_PaveSet;
class TopTools_DataMapOfIntegerListOfShape;
class TopTools_DataMapOfIntegerShape;
class TopOpeBRepBuild_GTopo;
class TopOpeBRepBuild_ShellFaceSet;
class TopOpeBRepDS_SurfaceIterator;
class TopTools_IndexedMapOfOrientedShape;
class TopOpeBRepDS_CurveIterator;
class TopoDS_Vertex;
class TopoDS_Edge;
class TopTools_DataMapOfShapeInteger;
class gp_Pnt;
class TopoDS_Face;
class TCollection_AsciiString;


//! The Builder  algorithm    constructs   topological <br>
//!          objects  from   an    existing  topology  and  new <br>
//!          geometries attached to the topology. It is used to <br>
//!          construct the result of a topological operation; <br>
//!          the existing  topologies are the parts involved in <br>
//!          the  topological  operation and the new geometries <br>
//!          are the intersection lines and points. <br>
class TopOpeBRepBuild_Builder  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
  Standard_EXPORT   TopOpeBRepBuild_Builder(const TopOpeBRepDS_BuildTool& BT);
  
  Standard_EXPORT   virtual  void Destroy() ;
Standard_EXPORT virtual ~TopOpeBRepBuild_Builder()  {  Destroy() ; }
  
  Standard_EXPORT     TopOpeBRepDS_BuildTool& ChangeBuildTool() ;
  
  Standard_EXPORT    const TopOpeBRepDS_BuildTool& BuildTool() const;
  //! Stores the data structure <HDS>, <br>
//! Create shapes from the new geometries. <br>
  Standard_EXPORT   virtual  void Perform(const Handle(TopOpeBRepDS_HDataStructure)& HDS) ;
  //! Stores the data structure <HDS>, <br>
//! Create shapes from the new geometries, <br>
//! Evaluates if an operation performed on shapes S1,S2 <br>
//! is a particular case. <br>
  Standard_EXPORT   virtual  void Perform(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const TopoDS_Shape& S1,const TopoDS_Shape& S2) ;
  //! returns the DS handled by this builder <br>
  Standard_EXPORT     Handle_TopOpeBRepDS_HDataStructure DataStructure() const;
  //! Removes all splits and merges already performed. <br>
//! Does NOT clear the handled DS. <br>
  Standard_EXPORT   virtual  void Clear() ;
  //! Merges  the two edges <S1> and <S2> keeping the <br>
//! parts in each edge of states <TB1> and <TB2>. <br>
//! Booleans onA, onB, onAB indicate wheter parts of edges <br>
//! found as state ON respectively on first, second, and both <br>
//! shapes must be (or not) built. <br>
  Standard_EXPORT     void MergeEdges(const TopTools_ListOfShape& L1,const TopAbs_State TB1,const TopTools_ListOfShape& L2,const TopAbs_State TB2,const Standard_Boolean onA = Standard_False,const Standard_Boolean onB = Standard_False,const Standard_Boolean onAB = Standard_False) ;
  //! Merges  the two faces <S1>   and <S2> keeping the <br>
//! parts in each face of states <TB1> and <TB2>. <br>
  Standard_EXPORT     void MergeFaces(const TopTools_ListOfShape& S1,const TopAbs_State TB1,const TopTools_ListOfShape& S2,const TopAbs_State TB2,const Standard_Boolean onA = Standard_False,const Standard_Boolean onB = Standard_False,const Standard_Boolean onAB = Standard_False) ;
  //! Merges  the two solids <S1>   and <S2> keeping the <br>
//! parts in each solid of states <TB1> and <TB2>. <br>
  Standard_EXPORT     void MergeSolids(const TopoDS_Shape& S1,const TopAbs_State TB1,const TopoDS_Shape& S2,const TopAbs_State TB2) ;
  //! Merges the two shapes <S1> and <S2> keeping the <br>
//! parts of states <TB1>,<TB2> in <S1>,<S2>. <br>
  Standard_EXPORT     void MergeShapes(const TopoDS_Shape& S1,const TopAbs_State TB1,const TopoDS_Shape& S2,const TopAbs_State TB2) ;
  
  Standard_EXPORT     void End() ;
  
  Standard_EXPORT     Standard_Boolean Classify() const;
  
  Standard_EXPORT     void ChangeClassify(const Standard_Boolean B) ;
  //! Merges the solid <S>  keeping the <br>
//! parts of state <TB>. <br>
  Standard_EXPORT     void MergeSolid(const TopoDS_Shape& S,const TopAbs_State TB) ;
  //! Returns the vertex created on point <I>. <br>
  Standard_EXPORT    const TopoDS_Shape& NewVertex(const Standard_Integer I) const;
  //! Returns the edges created on curve <I>. <br>
  Standard_EXPORT    const TopTools_ListOfShape& NewEdges(const Standard_Integer I) const;
  //! Returns the faces created on surface <I>. <br>
  Standard_EXPORT    const TopTools_ListOfShape& NewFaces(const Standard_Integer I) const;
  //! Returns True if the shape <S> has been split. <br>
  Standard_EXPORT     Standard_Boolean IsSplit(const TopoDS_Shape& S,const TopAbs_State TB) const;
  //! Returns the split parts <TB> of shape <S>. <br>
  Standard_EXPORT    const TopTools_ListOfShape& Splits(const TopoDS_Shape& S,const TopAbs_State TB) const;
  //! Returns True if the shape <S> has been merged. <br>
  Standard_EXPORT     Standard_Boolean IsMerged(const TopoDS_Shape& S,const TopAbs_State TB) const;
  //! Returns the merged parts <TB> of shape <S>. <br>
  Standard_EXPORT    const TopTools_ListOfShape& Merged(const TopoDS_Shape& S,const TopAbs_State TB) const;
  
  Standard_EXPORT     void InitSection() ;
  //! create parts ON solid of section edges <br>
  Standard_EXPORT     void SplitSectionEdges() ;
  //! create parts ON solid of section edges <br>
  Standard_EXPORT   virtual  void SplitSectionEdge(const TopoDS_Shape& E) ;
  //! return the section edges built on new curves. <br>
  Standard_EXPORT     void SectionCurves(TopTools_ListOfShape& L) ;
  //! return the parts of edges found ON the boundary <br>
//! of the two arguments S1,S2 of Perform() <br>
  Standard_EXPORT     void SectionEdges(TopTools_ListOfShape& L) ;
  //! Fills anAncMap with pairs (edge,ancestor edge) for each <br>
//!          split from the map aMapON for the shape object identified <br>
//!          by ShapeRank <br>
  Standard_EXPORT     void FillSecEdgeAncestorMap(const Standard_Integer aShapeRank,const TopTools_MapOfShape& aMapON,TopTools_DataMapOfShapeShape& anAncMap) const;
  //! return all section edges. <br>
  Standard_EXPORT     void Section(TopTools_ListOfShape& L) ;
  
  Standard_EXPORT    const TopTools_ListOfShape& Section() ;
  //! update the DS by creating new geometries. <br>
//!          create vertices on DS points. <br>
  Standard_EXPORT     void BuildVertices(const Handle(TopOpeBRepDS_HDataStructure)& DS) ;
  //! update the DS by creating new geometries. <br>
//!          create shapes from the new geometries. <br>
  Standard_EXPORT     void BuildEdges(const Handle(TopOpeBRepDS_HDataStructure)& DS) ;
  
  Standard_EXPORT    const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& MSplit(const TopAbs_State s) const;
  
  Standard_EXPORT     TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& ChangeMSplit(const TopAbs_State s) ;
  
  Standard_EXPORT     void MakeEdges(const TopoDS_Shape& E,TopOpeBRepBuild_EdgeBuilder& B,TopTools_ListOfShape& L) ;
  
  Standard_EXPORT     void MakeFaces(const TopoDS_Shape& F,TopOpeBRepBuild_FaceBuilder& B,TopTools_ListOfShape& L) ;
  
  Standard_EXPORT     void MakeSolids(TopOpeBRepBuild_SolidBuilder& B,TopTools_ListOfShape& L) ;
  
  Standard_EXPORT     void MakeShells(TopOpeBRepBuild_SolidBuilder& B,TopTools_ListOfShape& L) ;
  //! Returns a ref.on the list of shapes connected to <S> as <br>
//! <TB> split parts of <S>. <br>
//! Mark <S> as split in <TB> parts. <br>
  Standard_EXPORT     TopTools_ListOfShape& ChangeSplit(const TopoDS_Shape& S,const TopAbs_State TB) ;
  
  Standard_EXPORT     Standard_Boolean Opec12() const;
  
  Standard_EXPORT     Standard_Boolean Opec21() const;
  
  Standard_EXPORT     Standard_Boolean Opecom() const;
  
  Standard_EXPORT     Standard_Boolean Opefus() const;
  
  Standard_EXPORT     TopAbs_State ShapePosition(const TopoDS_Shape& S,const TopTools_ListOfShape& LS) ;
  
  Standard_EXPORT     Standard_Boolean KeepShape(const TopoDS_Shape& S,const TopTools_ListOfShape& LS,const TopAbs_State T) ;
  
  Standard_EXPORT   static  TopAbs_ShapeEnum TopType(const TopoDS_Shape& S) ;
  
  Standard_EXPORT   static  Standard_Boolean Reverse(const TopAbs_State T1,const TopAbs_State T2) ;
  
  Standard_EXPORT   static  TopAbs_Orientation Orient(const TopAbs_Orientation O,const Standard_Boolean R) ;
  
  Standard_EXPORT     void FindSameDomain(TopTools_ListOfShape& L1,TopTools_ListOfShape& L2) const;
  
  Standard_EXPORT     void FindSameDomainSameOrientation(TopTools_ListOfShape& LSO,TopTools_ListOfShape& LDO) const;
  
  Standard_EXPORT     void MapShapes(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ;
  
  Standard_EXPORT     void ClearMaps() ;
  
  Standard_EXPORT     void FindSameRank(const TopTools_ListOfShape& L1,const Standard_Integer R,TopTools_ListOfShape& L2) const;
  
  Standard_EXPORT     Standard_Integer ShapeRank(const TopoDS_Shape& S) const;
  
  Standard_EXPORT     Standard_Boolean IsShapeOf(const TopoDS_Shape& S,const Standard_Integer I12) const;
  
  Standard_EXPORT   static  Standard_Boolean Contains(const TopoDS_Shape& S,const TopTools_ListOfShape& L) ;
  
  Standard_EXPORT     Standard_Integer FindIsKPart() ;
  
  Standard_EXPORT     Standard_Integer IsKPart() const;
  
  Standard_EXPORT   virtual  void MergeKPart() ;
  
  Standard_EXPORT   virtual  void MergeKPart(const TopAbs_State TB1,const TopAbs_State TB2) ;
  
  Standard_EXPORT     void MergeKPartiskole() ;
  
  Standard_EXPORT     void MergeKPartiskoletge() ;
  
  Standard_EXPORT     void MergeKPartisdisj() ;
  
  Standard_EXPORT     void MergeKPartisfafa() ;
  
  Standard_EXPORT     void MergeKPartissoso() ;
  
  Standard_EXPORT     Standard_Integer KPiskole() ;
  
  Standard_EXPORT     Standard_Integer KPiskoletge() ;
  
  Standard_EXPORT     Standard_Integer KPisdisj() ;
  
  Standard_EXPORT     Standard_Integer KPisfafa() ;
  
  Standard_EXPORT     Standard_Integer KPissoso() ;
  
  Standard_EXPORT     void KPClearMaps() ;
  
  Standard_EXPORT     Standard_Integer KPlhg(const TopoDS_Shape& S,const TopAbs_ShapeEnum T,TopTools_ListOfShape& L) const;
  
  Standard_EXPORT     Standard_Integer KPlhg(const TopoDS_Shape& S,const TopAbs_ShapeEnum T) const;
  
  Standard_EXPORT     Standard_Integer KPlhsd(const TopoDS_Shape& S,const TopAbs_ShapeEnum T,TopTools_ListOfShape& L) const;
  
  Standard_EXPORT     Standard_Integer KPlhsd(const TopoDS_Shape& S,const TopAbs_ShapeEnum T) const;
  
  Standard_EXPORT     TopAbs_State KPclasSS(const TopoDS_Shape& S1,const TopTools_ListOfShape& exceptLS1,const TopoDS_Shape& S2) ;
  
  Standard_EXPORT     TopAbs_State KPclasSS(const TopoDS_Shape& S1,const TopoDS_Shape& exceptS1,const TopoDS_Shape& S2) ;
  
  Standard_EXPORT     TopAbs_State KPclasSS(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ;
  
  Standard_EXPORT     Standard_Boolean KPiskolesh(const TopoDS_Shape& S,TopTools_ListOfShape& LS,TopTools_ListOfShape& LF) const;
  
  Standard_EXPORT     Standard_Boolean KPiskoletgesh(const TopoDS_Shape& S,TopTools_ListOfShape& LS,TopTools_ListOfShape& LF) const;
  
  Standard_EXPORT     void KPSameDomain(TopTools_ListOfShape& L1,TopTools_ListOfShape& L2) const;
  
  Standard_EXPORT     Standard_Integer KPisdisjsh(const TopoDS_Shape& S) const;
  
  Standard_EXPORT     Standard_Integer KPisfafash(const TopoDS_Shape& S) const;
  
  Standard_EXPORT     Standard_Integer KPissososh(const TopoDS_Shape& S) const;
  
  Standard_EXPORT     void KPiskoleanalyse(const TopAbs_State FT1,const TopAbs_State FT2,const TopAbs_State ST1,const TopAbs_State ST2,Standard_Integer& I,Standard_Integer& I1,Standard_Integer& I2) const;
  
  Standard_EXPORT     void KPiskoletgeanalyse(const TopOpeBRepDS_Config Conf,const TopAbs_State ST1,const TopAbs_State ST2,Standard_Integer& I) const;
  
  Standard_EXPORT     void KPisdisjanalyse(const TopAbs_State ST1,const TopAbs_State ST2,Standard_Integer& I,Standard_Integer& IC1,Standard_Integer& IC2) const;
  
  Standard_EXPORT   static  Standard_Integer KPls(const TopoDS_Shape& S,const TopAbs_ShapeEnum T,TopTools_ListOfShape& L) ;
  
  Standard_EXPORT   static  Standard_Integer KPls(const TopoDS_Shape& S,const TopAbs_ShapeEnum T) ;
  
  Standard_EXPORT     TopAbs_State KPclassF(const TopoDS_Shape& F1,const TopoDS_Shape& F2) ;
  
  Standard_EXPORT     void KPclassFF(const TopoDS_Shape& F1,const TopoDS_Shape& F2,TopAbs_State& T1,TopAbs_State& T2) ;
  
  Standard_EXPORT     Standard_Boolean KPiskoleFF(const TopoDS_Shape& F1,const TopoDS_Shape& F2,TopAbs_State& T1,TopAbs_State& T2) ;
  
  Standard_EXPORT   static  Standard_Boolean KPContains(const TopoDS_Shape& S,const TopTools_ListOfShape& L) ;
  
  Standard_EXPORT     TopoDS_Shape KPmakeface(const TopoDS_Shape& F1,const TopTools_ListOfShape& LF2,const TopAbs_State T1,const TopAbs_State T2,const Standard_Boolean R1,const Standard_Boolean R2) ;
  
  Standard_EXPORT   static  Standard_Integer KPreturn(const Standard_Integer KP) ;
  
  Standard_EXPORT     void SplitEvisoONperiodicF() ;
  
  Standard_EXPORT     void GMergeSolids(const TopTools_ListOfShape& LSO1,const TopTools_ListOfShape& LSO2,const TopOpeBRepBuild_GTopo& G) ;
  
  Standard_EXPORT     void GFillSolidsSFS(const TopTools_ListOfShape& LSO1,const TopTools_ListOfShape& LSO2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT   virtual  void GFillSolidSFS(const TopoDS_Shape& SO1,const TopTools_ListOfShape& LSO2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT     void GFillSurfaceTopologySFS(const TopoDS_Shape& SO1,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT     void GFillSurfaceTopologySFS(const TopOpeBRepDS_SurfaceIterator& IT,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) const;
  
  Standard_EXPORT   virtual  void GFillShellSFS(const TopoDS_Shape& SH1,const TopTools_ListOfShape& LSO2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT     void GFillFaceSFS(const TopoDS_Shape& F1,const TopTools_ListOfShape& LSO2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT     void GSplitFaceSFS(const TopoDS_Shape& F1,const TopTools_ListOfShape& LSclass,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT     void GMergeFaceSFS(const TopoDS_Shape& F,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT     void GSplitFace(const TopoDS_Shape& F,const TopOpeBRepBuild_GTopo& G,const TopTools_ListOfShape& LSclass) ;
  
  Standard_EXPORT     void AddONPatchesSFS(const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_ShellFaceSet& SFS) ;
  
  Standard_EXPORT     void FillOnPatches(const TopTools_ListOfShape& anEdgesON,const TopoDS_Shape& aBaseFace,const TopTools_IndexedMapOfOrientedShape& avoidMap) ;
  
  Standard_EXPORT     void FindFacesTouchingEdge(const TopoDS_Shape& aFace,const TopoDS_Shape& anEdge,const Standard_Integer aShRank,TopTools_ListOfShape& aFaces) const;
  
  Standard_EXPORT     void GMergeFaces(const TopTools_ListOfShape& LF1,const TopTools_ListOfShape& LF2,const TopOpeBRepBuild_GTopo& G) ;
  
  Standard_EXPORT     void GFillFacesWES(const TopTools_ListOfShape& LF1,const TopTools_ListOfShape& LF2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GFillFacesWESK(const TopTools_ListOfShape& LF1,const TopTools_ListOfShape& LF2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES,const Standard_Integer K) ;
  
  Standard_EXPORT     void GFillFacesWESMakeFaces(const TopTools_ListOfShape& LF1,const TopTools_ListOfShape& LF2,const TopTools_ListOfShape& LSO,const TopOpeBRepBuild_GTopo& G) ;
  
  Standard_EXPORT     void GFillFaceWES(const TopoDS_Shape& F,const TopTools_ListOfShape& LF2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GFillCurveTopologyWES(const TopoDS_Shape& F,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GFillCurveTopologyWES(const TopOpeBRepDS_CurveIterator& IT,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) const;
  
  Standard_EXPORT     void GFillONPartsWES(const TopoDS_Shape& F,const TopOpeBRepBuild_GTopo& G,const TopTools_ListOfShape& LSclass,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GFillWireWES(const TopoDS_Shape& W,const TopTools_ListOfShape& LF2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GFillEdgeWES(const TopoDS_Shape& E,const TopTools_ListOfShape& LF2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GSplitEdgeWES(const TopoDS_Shape& E,const TopTools_ListOfShape& LF2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GMergeEdgeWES(const TopoDS_Shape& E,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_WireEdgeSet& WES) ;
  
  Standard_EXPORT     void GSplitEdge(const TopoDS_Shape& E,const TopOpeBRepBuild_GTopo& G,const TopTools_ListOfShape& LSclass) ;
  
  Standard_EXPORT     void GMergeEdges(const TopTools_ListOfShape& LE1,const TopTools_ListOfShape& LE2,const TopOpeBRepBuild_GTopo& G) ;
  
  Standard_EXPORT     void GFillEdgesPVS(const TopTools_ListOfShape& LE1,const TopTools_ListOfShape& LE2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_PaveSet& PVS) ;
  
  Standard_EXPORT     void GFillEdgePVS(const TopoDS_Shape& E,const TopTools_ListOfShape& LE2,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_PaveSet& PVS) ;
  
  Standard_EXPORT     void GFillPointTopologyPVS(const TopoDS_Shape& E,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_PaveSet& PVS) ;
  
  Standard_EXPORT     void GFillPointTopologyPVS(const TopoDS_Shape& E,const TopOpeBRepDS_PointIterator& IT,const TopOpeBRepBuild_GTopo& G,TopOpeBRepBuild_PaveSet& PVS) const;
  
  Standard_EXPORT     Standard_Boolean GParamOnReference(const TopoDS_Vertex& V,const TopoDS_Edge& E,Standard_Real& P) const;
  
  Standard_EXPORT     Standard_Boolean GKeepShape(const TopoDS_Shape& S,const TopTools_ListOfShape& Lref,const TopAbs_State T) ;
  //! return True if S is classified <T> / Lref shapes <br>
  Standard_EXPORT     Standard_Boolean GKeepShape1(const TopoDS_Shape& S,const TopTools_ListOfShape& Lref,const TopAbs_State T,TopAbs_State& pos) ;
  //! add to Lou the shapes of Lin classified <T> / Lref shapes. <br>
//! Lou is not cleared. (S is a dummy trace argument) <br>
  Standard_EXPORT     void GKeepShapes(const TopoDS_Shape& S,const TopTools_ListOfShape& Lref,const TopAbs_State T,const TopTools_ListOfShape& Lin,TopTools_ListOfShape& Lou) ;
  
  Standard_EXPORT     void GSFSMakeSolids(const TopoDS_Shape& SOF,TopOpeBRepBuild_ShellFaceSet& SFS,TopTools_ListOfShape& LOSO) ;
  
  Standard_EXPORT     void GSOBUMakeSolids(const TopoDS_Shape& SOF,TopOpeBRepBuild_SolidBuilder& SOBU,TopTools_ListOfShape& LOSO) ;
  
  Standard_EXPORT   virtual  void GWESMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBuild_WireEdgeSet& WES,TopTools_ListOfShape& LOF) ;
  
  Standard_EXPORT     void GFABUMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBuild_FaceBuilder& FABU,TopTools_ListOfShape& LOF,TopTools_DataMapOfShapeInteger& MWisOld) ;
  
  Standard_EXPORT     void RegularizeFaces(const TopoDS_Shape& FF,const TopTools_ListOfShape& lnewFace,TopTools_ListOfShape& LOF) ;
  
  Standard_EXPORT     void RegularizeFace(const TopoDS_Shape& FF,const TopoDS_Shape& newFace,TopTools_ListOfShape& LOF) ;
  
  Standard_EXPORT     void RegularizeSolids(const TopoDS_Shape& SS,const TopTools_ListOfShape& lnewSolid,TopTools_ListOfShape& LOS) ;
  
  Standard_EXPORT     void RegularizeSolid(const TopoDS_Shape& SS,const TopoDS_Shape& newSolid,TopTools_ListOfShape& LOS) ;
  
  Standard_EXPORT     void GPVSMakeEdges(const TopoDS_Shape& EF,TopOpeBRepBuild_PaveSet& PVS,TopTools_ListOfShape& LOE) const;
  
  Standard_EXPORT     void GEDBUMakeEdges(const TopoDS_Shape& EF,TopOpeBRepBuild_EdgeBuilder& EDBU,TopTools_ListOfShape& LOE) const;
  
  Standard_EXPORT     Standard_Boolean GToSplit(const TopoDS_Shape& S,const TopAbs_State TB) const;
  
  Standard_EXPORT     Standard_Boolean GToMerge(const TopoDS_Shape& S) const;
  
  Standard_EXPORT   static  Standard_Boolean GTakeCommonOfSame(const TopOpeBRepBuild_GTopo& G) ;
  
  Standard_EXPORT   static  Standard_Boolean GTakeCommonOfDiff(const TopOpeBRepBuild_GTopo& G) ;
  
  Standard_EXPORT     void GFindSamDom(const TopoDS_Shape& S,TopTools_ListOfShape& L1,TopTools_ListOfShape& L2) const;
  
  Standard_EXPORT     void GFindSamDom(TopTools_ListOfShape& L1,TopTools_ListOfShape& L2) const;
  
  Standard_EXPORT     void GFindSamDomSODO(const TopoDS_Shape& S,TopTools_ListOfShape& LSO,TopTools_ListOfShape& LDO) const;
  
  Standard_EXPORT     void GFindSamDomSODO(TopTools_ListOfShape& LSO,TopTools_ListOfShape& LDO) const;
  
  Standard_EXPORT     void GMapShapes(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ;
  
  Standard_EXPORT     void GClearMaps() ;
  
  Standard_EXPORT     void GFindSameRank(const TopTools_ListOfShape& L1,const Standard_Integer R,TopTools_ListOfShape& L2) const;
  
  Standard_EXPORT     Standard_Integer GShapeRank(const TopoDS_Shape& S) const;
  
  Standard_EXPORT     Standard_Boolean GIsShapeOf(const TopoDS_Shape& S,const Standard_Integer I12) const;
  
  Standard_EXPORT   static  Standard_Boolean GContains(const TopoDS_Shape& S,const TopTools_ListOfShape& L) ;
  
  Standard_EXPORT   static  void GCopyList(const TopTools_ListOfShape& Lin,const Standard_Integer i1,const Standard_Integer i2,TopTools_ListOfShape& Lou) ;
  
  Standard_EXPORT   static  void GCopyList(const TopTools_ListOfShape& Lin,TopTools_ListOfShape& Lou) ;
  
  Standard_EXPORT     void GdumpLS(const TopTools_ListOfShape& L) const;
  
  Standard_EXPORT   static  void GdumpPNT(const gp_Pnt& P) ;
  
  Standard_EXPORT   static  void GdumpORIPARPNT(const TopAbs_Orientation o,const Standard_Real p,const gp_Pnt& Pnt) ;
  
  Standard_EXPORT     void GdumpSHA(const TopoDS_Shape& S,const Standard_Address str = NULL) const;
  
  Standard_EXPORT     void GdumpSHAORI(const TopoDS_Shape& S,const Standard_Address str = NULL) const;
  
  Standard_EXPORT     void GdumpSHAORIGEO(const TopoDS_Shape& S,const Standard_Address str = NULL) const;
  
  Standard_EXPORT     void GdumpSHASTA(const Standard_Integer iS,const TopAbs_State T,const TCollection_AsciiString& a = "",const TCollection_AsciiString& b = "") const;
  
  Standard_EXPORT     void GdumpSHASTA(const TopoDS_Shape& S,const TopAbs_State T,const TCollection_AsciiString& a = "",const TCollection_AsciiString& b = "") const;
  
  Standard_EXPORT     void GdumpSHASTA(const Standard_Integer iS,const TopAbs_State T,const TopOpeBRepBuild_ShapeSet& SS,const TCollection_AsciiString& a = "",const TCollection_AsciiString& b = "",const TCollection_AsciiString& c = "\n") const;
  
  Standard_EXPORT     void GdumpEDG(const TopoDS_Shape& S,const Standard_Address str = NULL) const;
  
  Standard_EXPORT     void GdumpEDGVER(const TopoDS_Shape& E,const TopoDS_Shape& V,const Standard_Address str = NULL) const;
  
  Standard_EXPORT     void GdumpSAMDOM(const TopTools_ListOfShape& L,const Standard_Address str = NULL) const;
  
  Standard_EXPORT     void GdumpEXP(const TopOpeBRepTool_ShapeExplorer& E) const;
  
  Standard_EXPORT     void GdumpSOBU(TopOpeBRepBuild_SolidBuilder& SB) const;
  
  Standard_EXPORT     void GdumpFABU(TopOpeBRepBuild_FaceBuilder& FB) const;
  
  Standard_EXPORT     void GdumpEDBU(TopOpeBRepBuild_EdgeBuilder& EB) const;
  
  Standard_EXPORT     Standard_Boolean GtraceSPS(const Standard_Integer iS) const;
  
  Standard_EXPORT     Standard_Boolean GtraceSPS(const Standard_Integer iS,const Standard_Integer jS) const;
  
  Standard_EXPORT     Standard_Boolean GtraceSPS(const TopoDS_Shape& S) const;
  
  Standard_EXPORT     Standard_Boolean GtraceSPS(const TopoDS_Shape& S,Standard_Integer& IS) const;
  
  Standard_EXPORT     void GdumpSHASETreset() ;
  
  Standard_EXPORT     Standard_Integer GdumpSHASETindex() ;
  
  Standard_EXPORT   static  void PrintGeo(const TopoDS_Shape& S) ;
  
  Standard_EXPORT   static  void PrintSur(const TopoDS_Face& F) ;
  
  Standard_EXPORT   static  void PrintCur(const TopoDS_Edge& E) ;
  
  Standard_EXPORT   static  void PrintPnt(const TopoDS_Vertex& V) ;
  
  Standard_EXPORT   static  void PrintOri(const TopoDS_Shape& S) ;
  
  Standard_EXPORT   static  TCollection_AsciiString StringState(const TopAbs_State S) ;
  
  Standard_EXPORT   static  Standard_Boolean GcheckNBOUNDS(const TopoDS_Shape& E) ;


friend class TopOpeBRepBuild_HBuilder;



protected:

  //! update the DS by creating new geometries. <br>
//!          create edges on the new curve <Icurv>. <br>
  Standard_EXPORT     void BuildEdges(const Standard_Integer iC,const Handle(TopOpeBRepDS_HDataStructure)& DS) ;
  //! update the DS by creating new geometries. <br>
//!          create faces on the new surface <ISurf>. <br>
  Standard_EXPORT     void BuildFaces(const Standard_Integer iS,const Handle(TopOpeBRepDS_HDataStructure)& DS) ;
  //! update the DS by creating new geometries. <br>
//!          create shapes from the new geometries. <br>
  Standard_EXPORT     void BuildFaces(const Handle(TopOpeBRepDS_HDataStructure)& DS) ;
  //! Split <E1> keeping the parts of state <TB1>. <br>
  Standard_EXPORT     void SplitEdge(const TopoDS_Shape& E1,const TopAbs_State TB1,const TopAbs_State TB2) ;
  //! Split <E1> keeping the parts of state <TB1>. <br>
  Standard_EXPORT     void SplitEdge1(const TopoDS_Shape& E1,const TopAbs_State TB1,const TopAbs_State TB2) ;
  //! Split <E1> keeping the parts of state <TB1>. <br>
  Standard_EXPORT     void SplitEdge2(const TopoDS_Shape& E1,const TopAbs_State TB1,const TopAbs_State TB2) ;
  //! Split <F1> keeping the  parts of state  <TB1>. <br>
//!          Merge faces with same domain, keeping parts  of <br>
//!          state <TB2>. <br>
  Standard_EXPORT     void SplitFace(const TopoDS_Shape& F1,const TopAbs_State TB1,const TopAbs_State TB2) ;
  
  Standard_EXPORT     void SplitFace1(const TopoDS_Shape& F1,const TopAbs_State TB1,const TopAbs_State TB2) ;
  
  Standard_EXPORT     void SplitFace2(const TopoDS_Shape& F1,const TopAbs_State TB1,const TopAbs_State TB2) ;
  //! Split <S1> keeping the parts of state <TB1>. <br>
  Standard_EXPORT     void SplitSolid(const TopoDS_Shape& S1,const TopAbs_State TB1,const TopAbs_State TB2) ;
  //! Explore shapes of given  by explorer <Ex> to split them. <br>
//! Store  new shapes in the set <SS>. <br>
//! According to RevOri, reverse or not their orientation. <br>
  Standard_EXPORT     void SplitShapes(TopOpeBRepTool_ShapeExplorer& Ex,const TopAbs_State TB1,const TopAbs_State TB2,TopOpeBRepBuild_ShapeSet& SS,const Standard_Boolean RevOri) ;
  //! Split edges of <F1> and store  wires and edges in <br>
//! the set <WES>. According to RevOri, reverse (or not) orientation. <br>
  Standard_EXPORT     void FillFace(const TopoDS_Shape& F1,const TopAbs_State TB1,const TopTools_ListOfShape& LF2,const TopAbs_State TB2,TopOpeBRepBuild_WireEdgeSet& WES,const Standard_Boolean RevOri) ;
  //! Split faces of <S1> and store shells  and faces in <br>
//! the set <SS>. According to RevOri, reverse (or not) orientation. <br>
  Standard_EXPORT     void FillSolid(const TopoDS_Shape& S1,const TopAbs_State TB1,const TopTools_ListOfShape& LS2,const TopAbs_State TB2,TopOpeBRepBuild_ShapeSet& SS,const Standard_Boolean RevOri) ;
  //! Split subshapes of <S1> and store subshapes in <br>
//! the set <SS>. According to RevOri, reverse (or not) orientation. <br>
  Standard_EXPORT     void FillShape(const TopoDS_Shape& S1,const TopAbs_State TB1,const TopTools_ListOfShape& LS2,const TopAbs_State TB2,TopOpeBRepBuild_ShapeSet& SS,const Standard_Boolean RevOri) ;
  //! fills the vertex set PVS with the point iterator IT. <br>
//! IT accesses a list of interferences which geometry is a point or a vertex. <br>
//! TB indicates the orientation to give to the geometries <br>
//! found in interference list accessed by IT. <br>
  Standard_EXPORT     void FillVertexSet(TopOpeBRepDS_PointIterator& IT,const TopAbs_State TB,TopOpeBRepBuild_PaveSet& PVS) const;
  //! fills vertex set PVS with the current value of IT. <br>
//! I geometry is a point or a vertex. <br>
//! TB  indicates the orientation to give to geometries found I <br>
  Standard_EXPORT     void FillVertexSetOnValue(const TopOpeBRepDS_PointIterator& IT,const TopAbs_State TB,TopOpeBRepBuild_PaveSet& PVS) const;
  //! Returns True if the shape <S> has not already been split <br>
  Standard_EXPORT     Standard_Boolean ToSplit(const TopoDS_Shape& S,const TopAbs_State TB) const;
  //! add the shape <S> to the map of split shapes. <br>
//! mark <S> as split/not split on <state>, according to B value. <br>
  Standard_EXPORT     void MarkSplit(const TopoDS_Shape& S,const TopAbs_State TB,const Standard_Boolean B = Standard_True) ;
  //! Returns a ref. on the list of shapes connected to <S> as <br>
//! <TB> merged parts of <S>. <br>
  Standard_EXPORT     TopTools_ListOfShape& ChangeMerged(const TopoDS_Shape& S,const TopAbs_State TB) ;
  //! Returns a ref. on the vertex created on point <I>. <br>
  Standard_EXPORT     TopoDS_Shape& ChangeNewVertex(const Standard_Integer I) ;
  //! Returns a ref. on the list of edges created on curve <I>. <br>
  Standard_EXPORT     TopTools_ListOfShape& ChangeNewEdges(const Standard_Integer I) ;
  //! Returns a ref. on the list of faces created on surface <I>. <br>
  Standard_EXPORT     TopTools_ListOfShape& ChangeNewFaces(const Standard_Integer I) ;
  
  Standard_EXPORT     void AddIntersectionEdges(TopoDS_Shape& F,const TopAbs_State TB,const Standard_Boolean RevOri,TopOpeBRepBuild_ShapeSet& ES) const;
  
  Standard_EXPORT     void UpdateSplitAndMerged(const TopTools_DataMapOfIntegerListOfShape& mle,const TopTools_DataMapOfIntegerShape& mre,const TopTools_DataMapOfShapeShape& mlf,const TopAbs_State state) ;


TopAbs_State myState1;
TopAbs_State myState2;
TopoDS_Shape myShape1;
TopoDS_Shape myShape2;
Handle_TopOpeBRepDS_HDataStructure myDataStructure;
TopOpeBRepDS_BuildTool myBuildTool;
Handle_TopTools_HArray1OfShape myNewVertices;
TopTools_DataMapOfIntegerListOfShape myNewEdges;
Handle_TopTools_HArray1OfListOfShape myNewFaces;
TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State mySplitIN;
TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State mySplitON;
TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State mySplitOUT;
TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State myMergedIN;
TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State myMergedON;
TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State myMergedOUT;
TopTools_ListOfShape myEmptyShapeList;
TopTools_ListOfShape myListOfSolid;
TopTools_ListOfShape myListOfFace;
TopTools_ListOfShape myListOfEdge;
TopTools_DataMapOfShapeListOfShape myFSplits;
TopTools_DataMapOfShapeListOfShape myESplits;
Standard_Boolean mySectionDone;
Standard_Boolean mySplitSectionEdgesDone;
TopTools_ListOfShape mySection;
TopoDS_Solid mySolidReference;
TopoDS_Solid mySolidToFill;
TopTools_ListOfShape myFaceAvoid;
TopoDS_Face myFaceReference;
TopoDS_Face myFaceToFill;
TopTools_ListOfShape myEdgeAvoid;
TopoDS_Edge myEdgeReference;
TopoDS_Edge myEdgeToFill;
TopTools_ListOfShape myVertexAvoid;
TopTools_IndexedMapOfShape myMAP1;
TopTools_IndexedMapOfShape myMAP2;
Standard_Integer myIsKPart;
TopTools_DataMapOfShapeListOfShape myKPMAPf1f2;
Standard_Integer mySHASETindex;
Standard_Boolean myClassifyDef;
Standard_Boolean myClassifyVal;
TopOpeBRepTool_ShapeClassifier myShapeClassifier;
TopTools_MapOfShape myMemoSplit;
TCollection_AsciiString myEmptyAS;
Standard_Boolean myProcessON;
TopTools_IndexedDataMapOfShapeShape myONFacesMap;
TopTools_IndexedMapOfOrientedShape myONElemMap;


private:





};





// other Inline functions and methods (like "C++: function call" methods)


#endif