1 // Created on: 1993-06-17
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 under
9 // the terms of the GNU Lesser General Public License 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.
18 #include <BRep_Tool.hxx>
19 #include <Standard_ProgramError.hxx>
20 #include <Standard_Type.hxx>
21 #include <TopAbs_ShapeEnum.hxx>
23 #include <TopoDS_Shape.hxx>
24 #include <TopOpeBRepDS.hxx>
25 #include <TopOpeBRepDS_Check.hxx>
26 #include <TopOpeBRepDS_CurveIterator.hxx>
27 #include <TopOpeBRepDS_define.hxx>
28 #include <TopOpeBRepDS_HDataStructure.hxx>
29 #include <TopOpeBRepDS_Interference.hxx>
30 #include <TopOpeBRepDS_ListOfInterference.hxx>
31 #include <TopOpeBRepDS_Point.hxx>
32 #include <TopOpeBRepDS_PointIterator.hxx>
33 #include <TopOpeBRepDS_Surface.hxx>
34 #include <TopOpeBRepDS_SurfaceCurveInterference.hxx>
35 #include <TopOpeBRepDS_SurfaceIterator.hxx>
36 #include <TopOpeBRepDS_Transition.hxx>
37 #include <TopOpeBRepTool_ShapeExplorer.hxx>
38 #include <TopTools_ListOfShape.hxx>
40 IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_HDataStructure,Standard_Transient)
42 static void FUN_HDS_data(const Handle(TopOpeBRepDS_Interference)& I,
43 TopOpeBRepDS_Kind& GT1,Standard_Integer& G1,
44 TopOpeBRepDS_Kind& ST1,Standard_Integer& S1)
46 if (I.IsNull()) return;
47 GT1 = I->GeometryType(); G1 = I->Geometry();
48 ST1 = I->SupportType(); S1 = I->Support();
52 Standard_EXPORT Standard_Boolean FUN_HDS_FACESINTERFER
53 (const TopoDS_Shape& F1, const TopoDS_Shape& F2,
54 const Handle(TopOpeBRepDS_HDataStructure)& HDS)
56 Standard_Boolean yainterf = Standard_False;
57 const TopOpeBRepDS_DataStructure& DS = HDS->DS();
58 Standard_Boolean ya = DS.HasShape(F1);
59 if ( !ya ) return Standard_False;
62 Standard_Integer iF2 = DS.Shape(F2);
64 const TopOpeBRepDS_ListOfInterference& L1 = DS.ShapeInterferences(F1);
65 TopOpeBRepDS_ListIteratorOfListOfInterference itL1(L1);
66 for (;itL1.More(); itL1.Next()) {
67 const Handle(TopOpeBRepDS_Interference)& I = itL1.Value();
68 TopOpeBRepDS_Kind GT = TopOpeBRepDS_UNKNOWN, ST = TopOpeBRepDS_UNKNOWN; Standard_Integer G,S = 0;
69 FUN_HDS_data(I,GT,G,ST,S);
70 // interference face1/edge/face2
71 Standard_Boolean fef = Standard_True;
72 fef = fef && (GT==TopOpeBRepDS_EDGE);
73 fef = fef && (ST==TopOpeBRepDS_FACE);
74 fef = fef && (S==iF2);
76 yainterf = Standard_True;
84 //=======================================================================
85 //function : TopOpeBRepDS_HDataStructure
87 //=======================================================================
88 TopOpeBRepDS_HDataStructure::TopOpeBRepDS_HDataStructure()
92 //=======================================================================
93 //function : AddAncestors
95 //=======================================================================
96 void TopOpeBRepDS_HDataStructure::AddAncestors
97 (const TopoDS_Shape& S)
99 AddAncestors(S,TopAbs_WIRE,TopAbs_EDGE);
100 AddAncestors(S,TopAbs_FACE,TopAbs_WIRE);
101 AddAncestors(S,TopAbs_SHELL,TopAbs_FACE);
102 AddAncestors(S,TopAbs_SOLID,TopAbs_SHELL);
105 //=======================================================================
106 //function : AddAncestors
108 //=======================================================================
109 void TopOpeBRepDS_HDataStructure::AddAncestors
110 (const TopoDS_Shape& S,
111 const TopAbs_ShapeEnum T1,const TopAbs_ShapeEnum T2)
113 TopOpeBRepDS_DataStructure& BDS = ChangeDS();
114 Standard_Integer rankS = myDS.AncestorRank(S);
115 // find the shapes of type T1 containing HasShape() of type T2
116 for (TopOpeBRepTool_ShapeExplorer eT1(S,T1); eT1.More(); eT1.Next()) {
117 const TopoDS_Shape& ST1 = eT1.Current();
118 for (TopOpeBRepTool_ShapeExplorer eT2(ST1,T2); eT2.More(); eT2.Next()) {
119 const TopoDS_Shape& ST2 = eT2.Current();
120 if (BDS.HasShape(ST2)) {
121 BDS.AddShape(ST1,rankS);
128 //=======================================================================
130 //purpose : Check Integrity
131 //=======================================================================
132 void TopOpeBRepDS_HDataStructure::ChkIntg()
134 // Check the integrity of the DS
135 Handle(TopOpeBRepDS_Check) chk = new TopOpeBRepDS_Check(this);
137 // chk->PrintIntg(std::cout);
140 //=======================================================================
143 //=======================================================================
144 const TopOpeBRepDS_DataStructure& TopOpeBRepDS_HDataStructure::DS()const
149 //=======================================================================
150 //function : ChangeDS
152 //=======================================================================
153 TopOpeBRepDS_DataStructure& TopOpeBRepDS_HDataStructure::ChangeDS()
158 //=======================================================================
159 //function : NbSurfaces
161 //=======================================================================
162 Standard_Integer TopOpeBRepDS_HDataStructure::NbSurfaces()const
164 return myDS.NbSurfaces();
167 //=======================================================================
168 //function : NbCurves
170 //=======================================================================
171 Standard_Integer TopOpeBRepDS_HDataStructure::NbCurves()const
173 return myDS.NbCurves();
176 //=======================================================================
177 //function : NbPoints
179 //=======================================================================
180 Standard_Integer TopOpeBRepDS_HDataStructure::NbPoints()const
182 return myDS.NbPoints();
185 //=======================================================================
188 //=======================================================================
189 const TopOpeBRepDS_Surface& TopOpeBRepDS_HDataStructure::Surface
190 (const Standard_Integer I)const
192 return myDS.Surface(I);
195 //=======================================================================
196 //function : SurfaceCurves
198 //=======================================================================
199 TopOpeBRepDS_CurveIterator TopOpeBRepDS_HDataStructure::SurfaceCurves
200 (const Standard_Integer I)const
202 const TopOpeBRepDS_ListOfInterference& L = myDS.SurfaceInterferences(I);
203 return TopOpeBRepDS_CurveIterator(L);
206 //=======================================================================
209 //=======================================================================
210 const TopOpeBRepDS_Curve& TopOpeBRepDS_HDataStructure::Curve
211 (const Standard_Integer I)const
213 return myDS.Curve(I);
216 //=======================================================================
217 //function : ChangeCurve
219 //=======================================================================
220 TopOpeBRepDS_Curve& TopOpeBRepDS_HDataStructure::ChangeCurve
221 (const Standard_Integer I)
223 return myDS.ChangeCurve(I);
226 //=======================================================================
227 //function : CurvePoints
229 //=======================================================================
230 TopOpeBRepDS_PointIterator TopOpeBRepDS_HDataStructure::CurvePoints
231 (const Standard_Integer I)const
233 const TopOpeBRepDS_ListOfInterference& L = myDS.CurveInterferences(I);
234 return TopOpeBRepDS_PointIterator(L);
237 //=======================================================================
240 //=======================================================================
241 const TopOpeBRepDS_Point& TopOpeBRepDS_HDataStructure::Point
242 (const Standard_Integer I)const
244 return myDS.Point(I);
247 //=======================================================================
248 //function : HasGeometry
250 //=======================================================================
251 Standard_Boolean TopOpeBRepDS_HDataStructure::HasGeometry
252 (const TopoDS_Shape& S)const
254 Standard_Boolean b = myDS.HasGeometry(S);
258 //=======================================================================
259 //function : HasShape
261 //=======================================================================
262 Standard_Boolean TopOpeBRepDS_HDataStructure::HasShape
263 (const TopoDS_Shape& S,const Standard_Boolean FindKeep) const
265 Standard_Boolean b = myDS.HasShape(S, FindKeep);
269 //=======================================================================
270 //function : HasSameDomain
272 //=======================================================================
273 Standard_Boolean TopOpeBRepDS_HDataStructure::HasSameDomain
274 (const TopoDS_Shape& S,const Standard_Boolean FindKeep)const
276 if ( ! HasShape(S, FindKeep) ) return Standard_False;
277 const TopTools_ListOfShape& l = myDS.ShapeSameDomain(S);
278 Standard_Boolean res = ! l.IsEmpty();
282 //=======================================================================
283 //function : SameDomain
285 //=======================================================================
286 TopTools_ListIteratorOfListOfShape TopOpeBRepDS_HDataStructure::SameDomain
287 (const TopoDS_Shape& S)const
289 const TopTools_ListOfShape& L = myDS.ShapeSameDomain(S);
290 return TopTools_ListIteratorOfListOfShape(L);
293 //=======================================================================
294 //function : SameDomainOrientation
296 //=======================================================================
297 TopOpeBRepDS_Config TopOpeBRepDS_HDataStructure::SameDomainOrientation
298 (const TopoDS_Shape& S)const
300 if ( ! HasShape(S) ) return TopOpeBRepDS_UNSHGEOMETRY;
301 return myDS.SameDomainOri(S);
304 //=======================================================================
305 //function : SameDomainReference
307 //=======================================================================
308 Standard_Integer TopOpeBRepDS_HDataStructure::SameDomainReference
309 (const TopoDS_Shape& S)const
311 if ( ! HasShape(S) ) return 0;
312 return myDS.SameDomainRef(S);
315 //=======================================================================
316 //function : NbShapes
318 //=======================================================================
319 Standard_Integer TopOpeBRepDS_HDataStructure::NbShapes()const
321 return myDS.NbShapes();
324 //=======================================================================
327 //=======================================================================
328 const TopoDS_Shape& TopOpeBRepDS_HDataStructure::Shape
329 (const Standard_Integer I,const Standard_Boolean FindKeep) const
331 return myDS.Shape(I, FindKeep);
334 //=======================================================================
337 //=======================================================================
338 Standard_Integer TopOpeBRepDS_HDataStructure::Shape
339 (const TopoDS_Shape& S,const Standard_Boolean FindKeep)const
341 return myDS.Shape(S, FindKeep);
344 //=======================================================================
345 //function : SolidSurfaces
347 //=======================================================================
348 TopOpeBRepDS_SurfaceIterator TopOpeBRepDS_HDataStructure::SolidSurfaces
349 (const TopoDS_Shape& S) const
351 const TopOpeBRepDS_ListOfInterference& L = myDS.ShapeInterferences(S);
352 return TopOpeBRepDS_SurfaceIterator(L);
355 //=======================================================================
356 //function : SolidSurfaces
358 //=======================================================================
359 TopOpeBRepDS_SurfaceIterator TopOpeBRepDS_HDataStructure::SolidSurfaces
360 (const Standard_Integer I)const
362 const TopOpeBRepDS_ListOfInterference& L = myDS.ShapeInterferences(I);
363 return TopOpeBRepDS_SurfaceIterator(L);
366 //=======================================================================
367 //function : FaceCurves
369 //=======================================================================
370 TopOpeBRepDS_CurveIterator TopOpeBRepDS_HDataStructure::FaceCurves
371 (const TopoDS_Shape& F)const
373 const TopOpeBRepDS_ListOfInterference& L = myDS.ShapeInterferences(F);
374 return TopOpeBRepDS_CurveIterator(L);
377 //=======================================================================
378 //function : FaceCurves
380 //=======================================================================
381 TopOpeBRepDS_CurveIterator TopOpeBRepDS_HDataStructure::FaceCurves
382 (const Standard_Integer I)const
384 const TopOpeBRepDS_ListOfInterference& L = myDS.ShapeInterferences(I);
385 return TopOpeBRepDS_CurveIterator(L);
388 //=======================================================================
389 //function : EdgePoints
391 //=======================================================================
392 TopOpeBRepDS_PointIterator TopOpeBRepDS_HDataStructure::EdgePoints
393 (const TopoDS_Shape& E)const
395 const TopOpeBRepDS_ListOfInterference& L = myDS.ShapeInterferences(E);
396 return TopOpeBRepDS_PointIterator(L);
399 //=======================================================================
400 //function : MakeCurve
402 //=======================================================================
403 Standard_Integer TopOpeBRepDS_HDataStructure::MakeCurve
404 (const TopOpeBRepDS_Curve& curC,TopOpeBRepDS_Curve& newC)
406 // SCI1, SCI2 = new surface/curve interf. build from
407 // the surface/curve interf. of the curve curC
408 const Handle(TopOpeBRepDS_Interference)& I1 = curC.GetSCI1();
409 const Handle(TopOpeBRepDS_Interference)& I2 = curC.GetSCI2();
410 Handle(TopOpeBRepDS_SurfaceCurveInterference) SCI1,SCI2;
411 if ( ! I1.IsNull() ) SCI1 = new TopOpeBRepDS_SurfaceCurveInterference(I1);
412 if ( ! I2.IsNull() ) SCI2 = new TopOpeBRepDS_SurfaceCurveInterference(I2);
414 const TopoDS_Shape& S1 = curC.Shape1();
415 const TopoDS_Shape& S2 = curC.Shape2();
417 // add the new SCIs in the lists of SCIs connected to the shapes
418 if ( ! SCI1.IsNull() ) myDS.AddShapeInterference(S1,SCI1);
419 if ( ! SCI2.IsNull() ) myDS.AddShapeInterference(S2,SCI2);
421 // the shapes of the new curve are the shapes of curve curC
422 newC.SetShapes(S1,S2);
424 // set surface/curve interferences of the new curve
425 newC.SetSCI(SCI1,SCI2);
427 // newC is a daughter of curC
428 newC.ChangeMother(curC.DSIndex());
430 // add the new curve in the DS
431 Standard_Integer inewC = myDS.AddCurve(newC);
433 // the geometry of the new surface/curve interf. is new curve inewC
434 if ( ! SCI1.IsNull() ) SCI1->Geometry(inewC);
435 if ( ! SCI2.IsNull() ) SCI2->Geometry(inewC);
440 //=======================================================================
441 //function : RemoveCurve
443 //=======================================================================
444 void TopOpeBRepDS_HDataStructure::RemoveCurve(const Standard_Integer icurC)
446 myDS.RemoveCurve(icurC);
449 //=======================================================================
450 //function : NbGeometry
452 //=======================================================================
453 Standard_Integer TopOpeBRepDS_HDataStructure::NbGeometry
454 (const TopOpeBRepDS_Kind K) const
456 if ( ! TopOpeBRepDS::IsGeometry(K)) return 0;
458 Standard_Integer n = 0;
460 case TopOpeBRepDS_POINT : n = NbPoints(); break;
461 case TopOpeBRepDS_CURVE : n = NbCurves(); break;
462 case TopOpeBRepDS_SURFACE : n = NbSurfaces(); break;
463 default : n = 0; break;
468 //=======================================================================
469 //function : NbTopology
471 //=======================================================================
472 Standard_Integer TopOpeBRepDS_HDataStructure::NbTopology() const
474 Standard_Integer n = myDS.NbShapes();
478 //=======================================================================
479 //function : NbTopology
481 //=======================================================================
482 Standard_Integer TopOpeBRepDS_HDataStructure::NbTopology
483 (const TopOpeBRepDS_Kind K) const
485 if ( ! TopOpeBRepDS::IsTopology(K) ) return 0;
486 Standard_Integer res = 0;
487 const Standard_Boolean FindKeep = Standard_False;
489 TopAbs_ShapeEnum S = TopOpeBRepDS::KindToShape(K);
490 for (Standard_Integer i = 1; i <= NbTopology(); i++ )
491 if(myDS.KeepShape(i, FindKeep))
492 if (myDS.Shape(i, FindKeep).ShapeType() == S) res++;
496 //=======================================================================
497 //function : EdgesSameParameter
499 //=======================================================================
501 Standard_Boolean TopOpeBRepDS_HDataStructure::EdgesSameParameter() const
503 Standard_Integer i,n = myDS.NbShapes();
504 for (i = 1 ; i <= n; i++) {
505 const TopoDS_Shape& s = myDS.Shape(i);
506 if ( s.ShapeType() == TopAbs_EDGE ) {
507 const TopoDS_Edge& e = TopoDS::Edge(s);
508 if ( ! BRep_Tool::SameParameter(e) ) {
509 return Standard_False;
513 return Standard_True;
516 #include <TColStd_HArray1OfBoolean.hxx>
517 #include <TColStd_Array1OfBoolean.hxx>
519 Standard_EXPORT void FUN_TopOpeBRepDS_SortOnParameter
520 (const TopOpeBRepDS_ListOfInterference& List,
521 TopOpeBRepDS_ListOfInterference& SList)
523 // NYI : sort a list of Items, giving a sorting FUNCTION is impossible
524 // NYI : --> foobar method complexity n2.
526 Standard_Integer iIntf=0,nIntf = List.Extent();
527 if (nIntf == 0) return;
529 Handle(TColStd_HArray1OfBoolean) HT;
530 HT = new TColStd_HArray1OfBoolean(1,nIntf,Standard_False);
531 TColStd_Array1OfBoolean& T = HT->ChangeArray1();
533 Handle(TopOpeBRepDS_Interference) Intf;
535 for (Standard_Integer i = 1; i <= nIntf; i++) {
536 Standard_Real parmin = RealLast();
537 TopOpeBRepDS_PointIterator it(List);
538 for (Standard_Integer itest = 1; it.More(); it.Next(),itest++) {
540 Standard_Real par = it.Parameter();
549 T(iIntf) = Standard_True;
553 //=======================================================================
554 //function : SortOnParameter
556 //=======================================================================
557 void TopOpeBRepDS_HDataStructure::SortOnParameter
558 (const TopOpeBRepDS_ListOfInterference& List,
559 TopOpeBRepDS_ListOfInterference& SList) const
561 // NYI : sort a list of Items, giving a sorting FUNCTION is impossible
562 // NYI : --> foobar method complexity n2.
564 ::FUN_TopOpeBRepDS_SortOnParameter(List,SList);
566 // tete = interf FORWARD :
567 // modifier TopOpeBRepBuild_ParametrizedVertexSet ::SortParametrizedVertex()
568 Standard_Boolean found = Standard_False;
569 TopOpeBRepDS_ListIteratorOfListOfInterference it(SList);
570 TopOpeBRepDS_ListOfInterference L1,L2;
572 for (; it.More(); it.Next() ) {
573 Handle(TopOpeBRepDS_Interference) I = it.Value();
575 TopAbs_Orientation o = I->Transition().Orientation(TopAbs_IN);
576 if (o == TopAbs_FORWARD) {
577 found = Standard_True;
590 //=======================================================================
591 //function : SortOnParameter
593 //=======================================================================
594 void TopOpeBRepDS_HDataStructure::SortOnParameter
595 (TopOpeBRepDS_ListOfInterference& List) const
597 TopOpeBRepDS_PointIterator it(List);
599 TopOpeBRepDS_ListOfInterference SList;
600 SortOnParameter(List,SList);
605 //=======================================================================
606 //function : MinMaxOnParameter
608 //=======================================================================
609 void TopOpeBRepDS_HDataStructure::MinMaxOnParameter
610 (const TopOpeBRepDS_ListOfInterference& List,
611 Standard_Real& parmin,Standard_Real& parmax) const
613 if ( ! List.IsEmpty() ) {
614 Standard_Real parline;
615 parmin = RealLast(); parmax = RealFirst();
616 TopOpeBRepDS_PointIterator it(List);
617 for ( ; it.More(); it.Next()) {
618 parline = it.Parameter();
619 parmin = Min(parmin,parline);
620 parmax = Max(parmax,parline);
625 //-----------------------------------------------------------------------
626 // Search, among a list of interferences accessed by the iterator <IT>,
627 // a geometry whose 3D point is identical yo the 3D point of a DS point <PDS>.
628 // return True if such an interference has been found, False else.
629 // if True, iterator <IT> points (by the Value() method) on the first
630 // interference accessing an identical 3D point.
631 //-----------------------------------------------------------------------
632 //=======================================================================
633 //function : ScanInterfList
635 //=======================================================================
636 Standard_Boolean TopOpeBRepDS_HDataStructure::ScanInterfList
637 (TopOpeBRepDS_ListIteratorOfListOfInterference& IT,
638 const TopOpeBRepDS_Point& PDS) const
640 for ( ; IT.More(); IT.Next() ) {
641 TopOpeBRepDS_Kind GT = IT.Value()->GeometryType();
642 Standard_Integer G = IT.Value()->Geometry();
643 if ( GT == TopOpeBRepDS_POINT ) {
644 const TopOpeBRepDS_Point& OOPDS = myDS.Point(G);
645 Standard_Boolean iseq = PDS.IsEqual(OOPDS);
646 if (iseq) return iseq;
648 else if ( GT == TopOpeBRepDS_VERTEX ) {
649 TopOpeBRepDS_Point OOPDS(myDS.Shape(G));
650 Standard_Boolean iseq = PDS.IsEqual(OOPDS);
651 if (iseq) return iseq;
654 return Standard_False;
657 //=======================================================================
658 //function : GetGeometry
660 //=======================================================================
662 Standard_Boolean TopOpeBRepDS_HDataStructure::GetGeometry
663 (TopOpeBRepDS_ListIteratorOfListOfInterference& IT,
664 const TopOpeBRepDS_Point& PDS,
666 TopOpeBRepDS_Kind& K) const
668 Standard_Boolean found = ScanInterfList(IT,PDS);
670 G = IT.Value()->Geometry();
671 K = IT.Value()->GeometryType();
676 //=======================================================================
677 //function : StoreInterference
678 //purpose : Append an interference I to a list of interference LI
679 // Append I to the interf. list connected to I Geometry()
680 //=======================================================================
681 void TopOpeBRepDS_HDataStructure::StoreInterference
682 (const Handle(TopOpeBRepDS_Interference)& I,TopOpeBRepDS_ListOfInterference& LI, const TCollection_AsciiString&)
684 // append I to list LI
686 Standard_Integer G = I->Geometry();
688 // append I to list of interference connected to G = I->Geometry()
689 switch (I->GeometryType()) {
691 case TopOpeBRepDS_SOLID : case TopOpeBRepDS_FACE :
692 case TopOpeBRepDS_EDGE : case TopOpeBRepDS_VERTEX :
693 // appendtoG = Standard_True;
694 // myDS.ChangeShapeInterferences(G).Append(I);
697 case TopOpeBRepDS_SURFACE :
698 myDS.ChangeSurfaceInterferences(G).Append(I);
701 case TopOpeBRepDS_CURVE :
702 myDS.ChangeCurveInterferences(G).Append(I);
705 case TopOpeBRepDS_POINT :
706 // appendtoG = Standard_True;
707 // myDS.ChangePointInterferences(G).Append(I);
714 //=======================================================================
715 //function : StoreInterference
717 //=======================================================================
718 void TopOpeBRepDS_HDataStructure::StoreInterference
719 (const Handle(TopOpeBRepDS_Interference)& I,const TopoDS_Shape& S, const TCollection_AsciiString&)
721 Standard_Boolean h = myDS.HasShape(S);
723 throw Standard_ProgramError("StoreInterference on shape out of DS");
726 StoreInterference(I,myDS.ChangeShapeInterferences(S));
729 //=======================================================================
730 //function : StoreInterference
732 //=======================================================================
734 void TopOpeBRepDS_HDataStructure::StoreInterference
735 (const Handle(TopOpeBRepDS_Interference)& I,
736 const Standard_Integer IS, const TCollection_AsciiString&)
738 Standard_Integer n = myDS.NbShapes();
739 if ( IS < 1 || IS > n ) {
740 throw Standard_ProgramError("StoreInterference on index out of DS");
744 StoreInterference(I,myDS.ChangeShapeInterferences(IS));
747 //=======================================================================
748 //function : StoreInterference
750 //=======================================================================
751 void TopOpeBRepDS_HDataStructure::StoreInterferences
752 (const TopOpeBRepDS_ListOfInterference& LI,const Standard_Integer IS
753 // ,const TCollection_AsciiString& str)
754 ,const TCollection_AsciiString& )
756 TopOpeBRepDS_ListOfInterference& lids = myDS.ChangeShapeInterferences(IS);
757 TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
758 for (; it.More(); it.Next()){
759 const Handle(TopOpeBRepDS_Interference)& I = it.Value();
760 StoreInterference(I,lids);
764 //=======================================================================
765 //function : StoreInterferences
767 //=======================================================================
768 void TopOpeBRepDS_HDataStructure::StoreInterferences
769 (const TopOpeBRepDS_ListOfInterference& LI,const TopoDS_Shape& S
770 // ,const TCollection_AsciiString& str)
771 ,const TCollection_AsciiString& )
773 TopOpeBRepDS_ListOfInterference& lids = myDS.ChangeShapeInterferences(S);
774 TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
775 for (; it.More(); it.Next()){
776 const Handle(TopOpeBRepDS_Interference)& I = it.Value();
777 StoreInterference(I,lids);
781 //=======================================================================
782 //function : ClearStoreInterferences
784 //=======================================================================
785 void TopOpeBRepDS_HDataStructure::ClearStoreInterferences
786 (const TopOpeBRepDS_ListOfInterference& LI,const Standard_Integer IS
787 // ,const TCollection_AsciiString& str)
788 ,const TCollection_AsciiString& )
790 TopOpeBRepDS_ListOfInterference& lids = myDS.ChangeShapeInterferences(IS);
792 TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
793 for (; it.More(); it.Next()){
794 const Handle(TopOpeBRepDS_Interference)& I = it.Value();
795 StoreInterference(I,lids);
799 //=======================================================================
800 //function : ClearStoreInterferences
802 //=======================================================================
803 void TopOpeBRepDS_HDataStructure::ClearStoreInterferences
804 (const TopOpeBRepDS_ListOfInterference& LI,const TopoDS_Shape& S
805 // ,const TCollection_AsciiString& str)
806 ,const TCollection_AsciiString& )
808 TopOpeBRepDS_ListOfInterference& lids = myDS.ChangeShapeInterferences(S);
810 TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
811 for (; it.More(); it.Next()){
812 const Handle(TopOpeBRepDS_Interference)& I = it.Value();
813 StoreInterference(I,lids);