1 // Created on: 1993-06-14
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and / or modify it
9 // under the terms of the GNU Lesser General Public version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <TopOpeBRepBuild_Builder.ixx>
18 #include <TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State.hxx>
19 #include <TopOpeBRepDS_ListOfShapeOn1State.hxx>
20 #include <TopOpeBRepBuild_GTool.hxx>
21 #include <TopOpeBRepDS_SurfaceIterator.hxx>
22 #include <TopOpeBRepDS_Surface.hxx>
23 #include <TopOpeBRepDS_Curve.hxx>
24 #include <TopOpeBRepDS_CurveExplorer.hxx>
25 #include <TopOpeBRepDS_Point.hxx>
26 #include <TopOpeBRepDS_Config.hxx>
27 #include <TopOpeBRepDS_BuildTool.hxx>
28 #include <BRepClass3d_SolidClassifier.hxx>
30 #include <Precision.hxx>
31 #include <TopOpeBRepTool_ShapeExplorer.hxx>
32 #include <Geom_Curve.hxx>
33 #include <Geom2d_Curve.hxx>
34 #include <BRep_Tool.hxx>
35 #include <BRep_Builder.hxx>
36 #include <TopoDS_Compound.hxx>
37 #include <TopoDS_Shell.hxx>
38 #include <TopoDS_Wire.hxx>
41 #include <TopOpeBRepDS_Filter.hxx>
42 #include <TopOpeBRepDS_Reducer.hxx>
43 #include <TopOpeBRepBuild_define.hxx>
46 extern Standard_Boolean TopOpeBRepBuild_GettraceCU();
47 extern Standard_Boolean TopOpeBRepBuild_GettraceCUV();
48 extern Standard_Boolean TopOpeBRepBuild_GettraceSPF();
49 extern Standard_Boolean TopOpeBRepBuild_GettraceSPS();
50 extern Standard_Boolean TopOpeBRepBuild_GetcontextSF2();
51 extern Standard_Boolean TopOpeBRepBuild_GettraceSHEX();
52 Standard_EXPORT void debmarksplit(const Standard_Integer i) {cout<<"++ debmarksplit "<<i<<endl;}
53 Standard_EXPORT void debchangesplit(const Standard_Integer i) {cout<<"++ debchangesplit "<<i<<endl;}
56 static Standard_Integer STATIC_SOLIDINDEX = 0;
57 #include <TopOpeBRepBuild_SplitEdge.hxx>
58 #include <TopOpeBRepBuild_SplitFace.hxx>
59 #include <TopOpeBRepBuild_SplitSolid.hxx>
60 #include <TopOpeBRepBuild_SplitShapes.hxx>
61 #include <TopOpeBRepBuild_Fill.hxx>
63 Standard_EXPORT TopOpeBRepBuild_Builder* GLOBAL_PBUILDER;
65 //=======================================================================
66 //function : TopOpeBRepBuild_Builder
68 //=======================================================================
69 TopOpeBRepBuild_Builder::TopOpeBRepBuild_Builder(const TopOpeBRepDS_BuildTool& BT)
71 mySectionDone(Standard_False),
73 myClassifyDef(Standard_False),
74 myClassifyVal(Standard_True),
75 myProcessON(Standard_False)
77 GLOBAL_PBUILDER = this;
81 //modified by NIZHNY-MZV Sat May 6 10:04:49 2000
82 //=======================================================================
84 //purpose : virtual destructor
85 //=======================================================================
86 void TopOpeBRepBuild_Builder::Destroy()
90 //=======================================================================
91 //function : ChangeBuildTool
93 //=======================================================================
94 TopOpeBRepDS_BuildTool& TopOpeBRepBuild_Builder::ChangeBuildTool()
99 //=======================================================================
100 //function : BuildTool
102 //=======================================================================
103 const TopOpeBRepDS_BuildTool& TopOpeBRepBuild_Builder::BuildTool() const
108 //=======================================================================
109 //function : DataStructure
111 //=======================================================================
112 Handle(TopOpeBRepDS_HDataStructure) TopOpeBRepBuild_Builder::DataStructure() const
114 return myDataStructure;
117 //=======================================================================
120 //=======================================================================
121 void TopOpeBRepBuild_Builder::Perform(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
127 myDataStructure = HDS;
129 SplitEvisoONperiodicF();
135 TopOpeBRepDS_Filter F(HDS, &myShapeClassifier);
136 F.ProcessFaceInterferences(mySplitON);
137 TopOpeBRepDS_Reducer R(HDS);
138 R.ProcessFaceInterferences(mySplitON);
141 //=======================================================================
144 //=======================================================================
145 void TopOpeBRepBuild_Builder::Perform(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const TopoDS_Shape& S1, const TopoDS_Shape& S2)
148 myShape1 = S1; myShape2 = S2;
149 myIsKPart = FindIsKPart();
152 //=======================================================================
153 //function : AddIntersectionEdges
155 //=======================================================================
156 void TopOpeBRepBuild_Builder::AddIntersectionEdges
157 (TopoDS_Shape& aFace,const TopAbs_State ToBuild1,const Standard_Boolean RevOri1,TopOpeBRepBuild_ShapeSet& WES) const
160 TopOpeBRepDS_CurveIterator FCurves = myDataStructure->FaceCurves(aFace);
161 for (; FCurves.More(); FCurves.Next()) {
162 Standard_Integer iC = FCurves.Current();
164 Standard_Boolean tCU = TopOpeBRepBuild_GettraceCU();
165 Standard_Boolean NtCUV = !TopOpeBRepBuild_GettraceCUV();
166 if(tCU) {cout<<endl;myDataStructure->Curve(iC).Dump(cout,iC,NtCUV);}
168 const TopTools_ListOfShape& LnewE = NewEdges(iC);
169 for (TopTools_ListIteratorOfListOfShape Iti(LnewE); Iti.More(); Iti.Next()) {
170 anEdge = Iti.Value();
171 TopAbs_Orientation ori = FCurves.Orientation(ToBuild1);
172 TopAbs_Orientation newori = Orient(ori,RevOri1);
174 if(newori == TopAbs_EXTERNAL) continue;
176 myBuildTool.Orientation(anEdge,newori);
177 const Handle(Geom2d_Curve)& PC = FCurves.PCurve();
178 myBuildTool.PCurve(aFace,anEdge,PC);
179 WES.AddStartElement(anEdge);
184 //=======================================================================
187 //=======================================================================
188 void TopOpeBRepBuild_Builder::Clear()
190 const TopOpeBRepDS_DataStructure& BDS = myDataStructure->DS();
191 TopOpeBRepDS_DataMapIteratorOfDataMapOfShapeListOfShapeOn1State it;
192 for (it.Initialize(mySplitOUT); it.More(); it.Next()) {
193 const TopoDS_Shape& e = it.Key();
194 if ( e.ShapeType() == TopAbs_EDGE ) {
195 Standard_Boolean isse = BDS.IsSectionEdge(TopoDS::Edge(e));
196 if (!isse) mySplitOUT.ChangeFind(e).Clear();
199 for (it.Initialize(mySplitIN); it.More(); it.Next()) {
200 const TopoDS_Shape& e = it.Key();
201 if ( e.ShapeType() == TopAbs_EDGE ) {
202 Standard_Boolean isse = BDS.IsSectionEdge(TopoDS::Edge(e));
203 if (!isse) mySplitIN.ChangeFind(e).Clear();
206 for (it.Initialize(mySplitON); it.More(); it.Next()) {
207 const TopoDS_Shape& e = it.Key();
208 if ( e.ShapeType() == TopAbs_EDGE ) {
209 Standard_Boolean isse = BDS.IsSectionEdge(TopoDS::Edge(e));
210 if (!isse) mySplitON.ChangeFind(e).Clear();
218 //=======================================================================
219 //function : NewFaces
221 //=======================================================================
222 const TopTools_ListOfShape& TopOpeBRepBuild_Builder::NewFaces(const Standard_Integer I) const
224 const TopTools_ListOfShape& L = myNewFaces->Array1().Value(I);
228 //=======================================================================
229 //function : ChangeNewFaces
231 //=======================================================================
232 TopTools_ListOfShape& TopOpeBRepBuild_Builder::ChangeNewFaces(const Standard_Integer I)
234 TopTools_ListOfShape& L = myNewFaces->ChangeArray1().ChangeValue(I);
238 //=======================================================================
239 //function : NewEdges
241 //=======================================================================
242 const TopTools_ListOfShape& TopOpeBRepBuild_Builder::NewEdges(const Standard_Integer I) const
244 if ( myNewEdges.IsBound(I) ) {
245 return myNewEdges.Find(I);
248 return myEmptyShapeList;
252 //=======================================================================
253 //function : ChangeNewEdges
255 //=======================================================================
256 TopTools_ListOfShape& TopOpeBRepBuild_Builder::ChangeNewEdges(const Standard_Integer I)
258 if ( ! myNewEdges.IsBound(I) ) {
259 TopTools_ListOfShape thelist;
260 myNewEdges.Bind(I, thelist);
262 TopTools_ListOfShape& L = myNewEdges.ChangeFind(I);
266 //=======================================================================
267 //function : NewVertex
269 //=======================================================================
270 const TopoDS_Shape& TopOpeBRepBuild_Builder::NewVertex(const Standard_Integer I) const
272 const TopoDS_Shape& V = myNewVertices->Array1().Value(I);
276 //=======================================================================
277 //function : ChangeNewVertex
279 //=======================================================================
280 TopoDS_Shape& TopOpeBRepBuild_Builder::ChangeNewVertex(const Standard_Integer I)
282 TopoDS_Shape& V = myNewVertices->ChangeArray1().ChangeValue(I);
286 //=======================================================================
289 //=======================================================================
290 Standard_Boolean TopOpeBRepBuild_Builder::ToSplit(const TopoDS_Shape& S,const TopAbs_State ToBuild) const
292 Standard_Boolean issplit = IsSplit(S,ToBuild);
293 Standard_Boolean hasgeom = myDataStructure->HasGeometry(S);
294 Standard_Boolean hassame = myDataStructure->HasSameDomain(S);
295 Standard_Boolean tosplit = (!issplit) && (hasgeom || hassame);
298 Standard_Integer iS; Standard_Boolean tSPS = GtraceSPS(S,iS);
300 cout<<"tosplit "<<tosplit<<" : "<<"!issplit "<<(!issplit);
301 cout<<" && (hasgeom || hassame) ("<<hasgeom<<" || "<<hassame<<")"<<endl;
308 //=======================================================================
309 //function : MarkSplit
311 //=======================================================================
312 void TopOpeBRepBuild_Builder::MarkSplit(const TopoDS_Shape& S,const TopAbs_State ToBuild,const Standard_Boolean Bval)
314 TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State* p = NULL;
315 if ( ToBuild == TopAbs_OUT ) p = &mySplitOUT;
316 else if ( ToBuild == TopAbs_IN ) p = &mySplitIN;
317 else if ( ToBuild == TopAbs_ON ) p = &mySplitON;
318 if ( p == NULL ) return;
320 TopOpeBRepDS_ListOfShapeOn1State thelist;
321 if (!(*p).IsBound(S)) (*p).Bind(S, thelist);
322 TopOpeBRepDS_ListOfShapeOn1State& losos = (*p).ChangeFind(S);
326 Standard_Integer iS; Standard_Boolean tSPS = GtraceSPS(S,iS);
328 GdumpSHA(S, (char *) "MarkSplit ");
329 cout<<" ";TopAbs::Print(ToBuild,cout);cout<<" "<<Bval<<endl;
336 //=======================================================================
339 //=======================================================================
340 Standard_Boolean TopOpeBRepBuild_Builder::IsSplit(const TopoDS_Shape& S,const TopAbs_State ToBuild) const
342 Standard_Boolean res = Standard_False;
343 const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State* p = NULL;
344 if ( ToBuild == TopAbs_OUT ) p = &mySplitOUT;
345 else if ( ToBuild == TopAbs_IN ) p = &mySplitIN;
346 else if ( ToBuild == TopAbs_ON ) p = &mySplitON;
347 if ( p == NULL ) return res;
349 if ((*p).IsBound(S)) {
350 const TopOpeBRepDS_ListOfShapeOn1State& losos = (*p).Find(S);
351 res = losos.IsSplit();
353 // Standard_Integer n = losos.ListOnState().Extent();
359 //=======================================================================
362 //=======================================================================
363 const TopTools_ListOfShape& TopOpeBRepBuild_Builder::Splits(const TopoDS_Shape& S, const TopAbs_State ToBuild) const
365 const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State* p = NULL;
366 if ( ToBuild == TopAbs_OUT ) p = &mySplitOUT;
367 else if ( ToBuild == TopAbs_IN ) p = &mySplitIN;
368 else if ( ToBuild == TopAbs_ON ) p = &mySplitON;
369 if ( p == NULL ) return myEmptyShapeList;
371 if ((*p).IsBound(S)) {
372 const TopOpeBRepDS_ListOfShapeOn1State& losos = (*p).Find(S);
373 const TopTools_ListOfShape& L = losos.ListOnState();
376 return myEmptyShapeList;
379 //=======================================================================
380 //function : ChangeSplit
382 //=======================================================================
383 TopTools_ListOfShape& TopOpeBRepBuild_Builder::ChangeSplit(const TopoDS_Shape& S,const TopAbs_State ToBuild)
386 Standard_Integer iS; Standard_Boolean tSPS = GtraceSPS(S,iS);
388 GdumpSHA(S, (char *) "ChangeSplit ");
389 cout<<" ";TopAbs::Print(ToBuild,cout);cout<<endl;
394 TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State* p = NULL;
395 if ( ToBuild == TopAbs_OUT ) p = &mySplitOUT;
396 else if ( ToBuild == TopAbs_IN ) p = &mySplitIN;
397 else if ( ToBuild == TopAbs_ON ) p = &mySplitON;
398 if ( p == NULL ) return myEmptyShapeList;
399 TopOpeBRepDS_ListOfShapeOn1State thelist1;
400 if (!(*p).IsBound(S)) (*p).Bind(S, thelist1);
401 TopOpeBRepDS_ListOfShapeOn1State& losos = (*p).ChangeFind(S);
402 TopTools_ListOfShape& L = losos.ChangeListOnState();
406 //=======================================================================
407 //function : ShapePosition
408 //purpose : compute position of shape S compared with the shapes of list LS
409 // if S is found IN any shape of LS, return IN
411 //=======================================================================
412 TopAbs_State TopOpeBRepBuild_Builder::ShapePosition(const TopoDS_Shape& S, const TopTools_ListOfShape& LS)
414 TopAbs_State state = TopAbs_UNKNOWN;
416 // take the edges of myEdgeAvoid as shape to avoid
417 // during face classification
418 const TopTools_ListOfShape* PLOS = &myEmptyShapeList;
419 TopAbs_ShapeEnum tS = S.ShapeType();
420 if (tS == TopAbs_FACE) PLOS = &myEdgeAvoid;
421 // NYI : idem with myFaceAvoid if (tS == TopAbs_SOLID)
423 for (TopTools_ListIteratorOfListOfShape Iti(LS); Iti.More(); Iti.Next()) {
424 const TopoDS_Shape& SLS = Iti.Value();
426 // TopAbs_ShapeEnum tSLS = SLS.ShapeType();
428 state = myShapeClassifier.StateShapeShape(S,(*PLOS),SLS);
429 if (state != TopAbs_OUT && state != TopAbs_UNKNOWN) return state;
431 if (state == TopAbs_UNKNOWN) return state;
435 //=======================================================================
436 //function : KeepShape
437 //purpose : compute <pos2> = position of shape <S1> / shapes of list <LS2>
440 // - if (pos2 == ToBuild1)
441 //=======================================================================
442 Standard_Boolean TopOpeBRepBuild_Builder::KeepShape(const TopoDS_Shape& S1,const TopTools_ListOfShape& LS2,const TopAbs_State ToBuild1)
444 Standard_Boolean keep = Standard_True;
445 if ( ! LS2.IsEmpty() ) {
446 TopAbs_State pos2 = ShapePosition(S1,LS2);
447 if ( pos2 != ToBuild1 ) keep = Standard_False;
452 //=======================================================================
454 //purpose : return the type of upper subshape found in <S>
455 //=======================================================================
456 TopAbs_ShapeEnum TopOpeBRepBuild_Builder::TopType(const TopoDS_Shape& S)
459 TopOpeBRepTool_ShapeExplorer e;
461 t = TopAbs_COMPOUND; e.Init(S,t); if (e.More()) return t;
462 t = TopAbs_COMPSOLID; e.Init(S,t); if (e.More()) return t;
463 t = TopAbs_SOLID; e.Init(S,t); if (e.More()) return t;
464 t = TopAbs_SHELL; e.Init(S,t); if (e.More()) return t;
465 t = TopAbs_FACE; e.Init(S,t); if (e.More()) return t;
466 t = TopAbs_WIRE; e.Init(S,t); if (e.More()) return t;
467 t = TopAbs_EDGE; e.Init(S,t); if (e.More()) return t;
468 t = TopAbs_VERTEX; e.Init(S,t); if (e.More()) return t;
473 //=======================================================================
475 //purpose : compute orientation reversibility according to build states
476 //=======================================================================
477 Standard_Boolean TopOpeBRepBuild_Builder::Reverse(const TopAbs_State ToBuild1,const TopAbs_State ToBuild2)
479 Standard_Boolean rev;
480 if (ToBuild1 == TopAbs_IN && ToBuild2 == TopAbs_IN) rev = Standard_False;
481 else rev = (ToBuild1 == TopAbs_IN);
485 //=======================================================================
487 //purpose : reverse the orientation
488 //=======================================================================
489 TopAbs_Orientation TopOpeBRepBuild_Builder::Orient(const TopAbs_Orientation Ori,const Standard_Boolean Reverse)
491 TopAbs_Orientation result=TopAbs_FORWARD;
493 case Standard_True : result = TopAbs::Complement(Ori); break;
494 case Standard_False : result = Ori; break;
499 //=======================================================================
500 //function : FindSameDomain
501 //purpose : complete the lists L1,L2 with the shapes of the DS
502 // having same domain :
503 // L1 = shapes sharing the same domain of L2 shapes
504 // L2 = shapes sharing the same domain of L1 shapes
505 // (L1 contains a face)
506 //=======================================================================
507 void TopOpeBRepBuild_Builder::FindSameDomain(TopTools_ListOfShape& L1,TopTools_ListOfShape& L2) const
510 Standard_Integer nl1 = L1.Extent(), nl2 = L2.Extent();
512 while ( nl1 > 0 || nl2 > 0 ) {
514 TopTools_ListIteratorOfListOfShape it1(L1);
515 for (i=1 ; i<=nl1; i++) {
516 const TopoDS_Shape& S1 = it1.Value();
518 // Standard_Integer iS1 = myDataStructure->Shape(S1); // DEB
520 TopTools_ListIteratorOfListOfShape itsd(myDataStructure->SameDomain(S1));
521 for (; itsd.More(); itsd.Next() ) {
522 const TopoDS_Shape& S2 = itsd.Value();
524 // Standard_Integer iS2 = myDataStructure->Shape(S2);// DEB
526 Standard_Boolean found = Contains(S2,L2);
536 TopTools_ListIteratorOfListOfShape it2(L2);
537 for (i=1 ; i<=nl2; i++) {
538 const TopoDS_Shape& S2 = it2.Value();
540 // Standard_Integer iS2 = myDataStructure->Shape(S2);// DEB
542 TopTools_ListIteratorOfListOfShape itsd(myDataStructure->SameDomain(S2));
543 for (; itsd.More(); itsd.Next() ) {
544 const TopoDS_Shape& S1 = itsd.Value();
546 // Standard_Integer iS1 = myDataStructure->Shape(S1);// DEB
548 Standard_Boolean found = Contains(S1,L1);
563 //=======================================================================
564 //function : FindSameDomainSameOrientation
566 //=======================================================================
567 void TopOpeBRepBuild_Builder::FindSameDomainSameOrientation(TopTools_ListOfShape& L1, TopTools_ListOfShape& L2) const
569 FindSameDomain(L1,L2);
570 TopTools_ListIteratorOfListOfShape it(L1);
571 if ( !it.More() ) return;
573 const TopoDS_Shape& sref = it.Value();
575 // Standard_Integer iref = myDataStructure->SameDomainReference(sref);
577 TopOpeBRepDS_Config oref = myDataStructure->SameDomainOrientation(sref);
579 TopTools_ListOfShape LL1,LL2;
581 for (it.Initialize(L1); it.More(); it.Next() ) {
582 const TopoDS_Shape& s = it.Value();
583 TopOpeBRepDS_Config o = myDataStructure->SameDomainOrientation(s);
584 if ( o == oref && !Contains(s,LL1) ) LL1.Append(s);
585 else if ( o != oref && !Contains(s,LL2) ) LL2.Append(s);
588 for (it.Initialize(L2); it.More(); it.Next() ) {
589 const TopoDS_Shape& s = it.Value();
590 TopOpeBRepDS_Config o = myDataStructure->SameDomainOrientation(s);
591 if ( o == oref && !Contains(s,LL1) ) LL1.Append(s);
592 else if ( o != oref && !Contains(s,LL2) ) LL2.Append(s);
600 //=======================================================================
601 //function : MapShapes
603 //=======================================================================
604 void TopOpeBRepBuild_Builder::MapShapes(const TopoDS_Shape& S1,const TopoDS_Shape& S2)
606 Standard_Boolean S1null = S1.IsNull();
607 Standard_Boolean S2null = S2.IsNull();
609 if ( ! S1null ) TopExp::MapShapes(S1,myMAP1);
610 if ( ! S2null ) TopExp::MapShapes(S2,myMAP2);
613 //=======================================================================
614 //function : ClearMaps
616 //=======================================================================
617 void TopOpeBRepBuild_Builder::ClearMaps()
623 //=======================================================================
624 //function : FindSameRank
626 //=======================================================================
627 void TopOpeBRepBuild_Builder::FindSameRank(const TopTools_ListOfShape& L1,const Standard_Integer rank,TopTools_ListOfShape& L2) const
629 for ( TopTools_ListIteratorOfListOfShape it1(L1); it1.More(); it1.Next() ) {
630 const TopoDS_Shape& s = it1.Value();
631 Standard_Integer r = ShapeRank(s);
632 if ( r == rank && !Contains(s,L2) ) {
638 //=======================================================================
639 //function : ShapeRank
641 //=======================================================================
642 Standard_Integer TopOpeBRepBuild_Builder::ShapeRank(const TopoDS_Shape& s) const
644 Standard_Boolean isof1 = IsShapeOf(s,1);
645 Standard_Boolean isof2 = IsShapeOf(s,2);
646 Standard_Integer ancetre = (isof1 || isof2) ? ((isof1) ? 1 : 2) : 0;
650 //=======================================================================
651 //function : IsShapeOf
653 //=======================================================================
654 Standard_Boolean TopOpeBRepBuild_Builder::IsShapeOf(const TopoDS_Shape& s,const Standard_Integer i) const
656 Standard_Boolean b = Standard_False;
657 if (i == 1) b = myMAP1.Contains(s);
658 else if (i == 2) b = myMAP2.Contains(s);
662 //=======================================================================
663 //function : Contains
664 //purpose : returns True if S is in the list L.
665 //=======================================================================
666 Standard_Boolean TopOpeBRepBuild_Builder::Contains(const TopoDS_Shape& S,const TopTools_ListOfShape& L)
668 for (TopTools_ListIteratorOfListOfShape it(L); it.More(); it.Next() ) {
669 TopoDS_Shape& SL = it.Value();
670 Standard_Boolean issame = SL.IsSame(S);
671 if ( issame ) return Standard_True;
673 return Standard_False;
676 //=======================================================================
679 //=======================================================================
680 Standard_Boolean TopOpeBRepBuild_Builder::Opec12() const
682 Standard_Boolean b = (myState1 == TopAbs_OUT) && (myState2 == TopAbs_IN );
686 //=======================================================================
689 //=======================================================================
690 Standard_Boolean TopOpeBRepBuild_Builder::Opec21() const
692 Standard_Boolean b = (myState1 == TopAbs_IN ) && (myState2 == TopAbs_OUT);
696 //=======================================================================
699 //=======================================================================
700 Standard_Boolean TopOpeBRepBuild_Builder::Opecom() const
702 Standard_Boolean b = (myState1 == TopAbs_IN ) && (myState2 == TopAbs_IN );
706 //=======================================================================
709 //=======================================================================
710 Standard_Boolean TopOpeBRepBuild_Builder::Opefus() const
712 Standard_Boolean b = (myState1 == TopAbs_OUT) && (myState2 == TopAbs_OUT);
716 //=======================================================================
719 //=======================================================================
720 const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& TopOpeBRepBuild_Builder::MSplit(const TopAbs_State s) const
722 if (s == TopAbs_IN) return mySplitIN;
723 else if (s == TopAbs_OUT) return mySplitOUT;
724 else if (s == TopAbs_ON) return mySplitON;
728 //=======================================================================
729 //function : ChangeMSplit
731 //=======================================================================
732 TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& TopOpeBRepBuild_Builder::ChangeMSplit(const TopAbs_State s)
734 if (s == TopAbs_IN) return mySplitIN;
735 else if (s == TopAbs_OUT) return mySplitOUT;
736 else if (s == TopAbs_ON) return mySplitON;