1 -- Created on: 2000-11-27
2 -- Created by: Michael KLOKOV
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
21 class IteratorOfCoupleOfShape from BOPTools
23 ---Purpose: The class IteratorOfCoupleOfShape provides the iteration
24 --- on the couples of shapes stored in ShapesDataStructure
25 --- according to the given types of shapes and
26 --- status of their intersection.
27 --- The statuses are stored in 2 dimension array.
30 ShapeEnum from TopAbs,
31 HArray2OfIntersectionStatus from BOPTools,
32 PShapesDataStructure from BooleanOperations,
33 IntersectionStatus from BOPTools,
34 ListOfCoupleOfInteger from BOPTools,
35 ListIteratorOfListOfCoupleOfInteger from BOPTools,
36 NoSuchObject from Standard
38 raises NoSuchObject from Standard
43 returns IteratorOfCoupleOfShape from BOPTools;
48 Create(PDS: PShapesDataStructure from BooleanOperations;
49 Type1: ShapeEnum from TopAbs;
50 Type2: ShapeEnum from TopAbs)
51 returns IteratorOfCoupleOfShape from BOPTools;
53 --- Initializes iterator by ShapesDataStructure and
57 Destroy(me: in out) is virtual;
58 ---C++: alias "Standard_EXPORT virtual ~BOPTools_IteratorOfCoupleOfShape(){Destroy();}"
60 Initialize(me: in out; Type1: ShapeEnum from TopAbs;
61 Type2: ShapeEnum from TopAbs)
63 raises NoSuchObject from Standard
66 --- Initializes iterator with shape types.
67 --- The iterator uses PDS assigned in constructor or in SetDataStructure().
68 --- Raises the exception if myPDS is null.
72 SetDataStructure(me: in out; PDS: PShapesDataStructure from BooleanOperations)
74 NoSuchObject from Standard;
76 --- Initialize iterator with ShapeDataStructure.
81 returns Boolean from Standard
84 --- Returns True if there are still not
85 --- treated couples of shapes
91 --- Moves to the next couple of iteration
94 Current(me; Index1: in out Integer from Standard;
95 Index2: in out Integer from Standard;
96 WithSubShape: out Boolean from Standard)
99 --- Returns current couple of indices and
100 --- flag WithSubShape which is true
101 --- if bounding boxes of subshapes
106 returns ListOfCoupleOfInteger from BOPTools;
107 ---C++: return const &
109 --- Returns a list of couples of shape indices
110 --- according to shape types by which
111 --- the iterator was initialized
115 returns Boolean from Standard
121 CurrentP(me;Index1: in out Integer from Standard;
122 Index2: in out Integer from Standard)
123 raises NoSuchObject from Standard
126 SetIntersectionStatus(me: in out; Index1: Integer from Standard;
127 Index2: Integer from Standard;
128 theStatus: IntersectionStatus from BOPTools);
130 --- Sets status to array according to Index1 and Index2
133 GetTableOfIntersectionStatus(me)
134 returns HArray2OfIntersectionStatus from BOPTools;
135 ---C++: return const &
137 --- Returns 2 dimension array of intersection statuses
140 DumpTableOfIntersectionStatus(me);
146 myPDS: PShapesDataStructure from BooleanOperations is protected;
147 myTableOfStatus: HArray2OfIntersectionStatus from BOPTools is protected;
148 myCurrentIndex1: Integer from Standard is protected;
149 myCurrentIndex2: Integer from Standard is protected;
150 myType1: ShapeEnum from TopAbs is protected;
151 myType2: ShapeEnum from TopAbs is protected;
153 myFirstLowerIndex :Integer from Standard is protected;
154 myFirstUpperIndex :Integer from Standard is protected;
155 mySecondLowerIndex:Integer from Standard is protected;
156 mySecondUpperIndex:Integer from Standard is protected;
157 myListOfCouple :ListOfCoupleOfInteger from BOPTools is protected;
158 myIterator :ListIteratorOfListOfCoupleOfInteger from BOPTools is protected;
160 end IteratorOfCoupleOfShape from BOPTools;