Commit | Line | Data |
---|---|---|

4e57c75e | 1 | -- Created by: Peter KURNEV |

973c2be1 | 2 | -- Copyright (c) 2010-2014 OPEN CASCADE SAS |

4e57c75e | 3 | -- Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE |

4 | -- Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, | |

5 | -- EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS | |

6 | -- | |

973c2be1 | 7 | -- This file is part of Open CASCADE Technology software library. |

4e57c75e | 8 | -- |

d5f74e42 | 9 | -- This library is free software; you can redistribute it and/or modify it under |

10 | -- the terms of the GNU Lesser General Public License version 2.1 as published | |

973c2be1 | 11 | -- by the Free Software Foundation, with special exception defined in the file |

12 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT | |

13 | -- distribution for complete text of the license and disclaimer of any warranty. | |

4e57c75e | 14 | -- |

973c2be1 | 15 | -- Alternatively, this file may be used under the terms of Open CASCADE |

16 | -- commercial license or contractual agreement. | |

4e57c75e | 17 | |

18 | class Iterator from BOPDS | |

19 | ||

20 | ---Purpose: | |

21 | -- The class BOPDS_Iterator is | |

22 | -- 1.to compute intersections between BRep sub-shapes | |

23 | -- of arguments of an operation (see the class BOPDS_DS) | |

24 | -- in terms of theirs bounding boxes | |

25 | -- 2.provides interface to iterare the pairs of | |

26 | -- intersected sub-shapes of given type | |

27 | ||

28 | uses | |

29 | BaseAllocator from BOPCol, | |

30 | ShapeEnum from TopAbs, | |

31 | DS from BOPDS, | |

32 | PDS from BOPDS, | |

33 | PassKeyBoolean from BOPDS, | |

34 | ListOfPassKeyBoolean from BOPDS, | |

35 | ListIteratorOfListOfPassKeyBoolean from BOPDS, | |

36 | VectorOfListOfPassKeyBoolean from BOPDS | |

37 | ||

38 | --raises | |

39 | ||

40 | is | |

41 | Create | |

42 | returns Iterator from BOPDS; | |

43 | ---C++: alias "Standard_EXPORT virtual ~BOPDS_Iterator();" | |

44 | ---Purpose: | |

45 | --- Empty contructor | |

46 | --- | |

47 | ||

48 | Create (theAllocator: BaseAllocator from BOPCol) | |

49 | returns Iterator from BOPDS; | |

50 | ---Purpose: | |

51 | --- Contructor | |

52 | --- theAllocator - the allocator to manage the memory | |

53 | --- | |

54 | ||

55 | SetDS(me:out; | |

56 | pDS:PDS from BOPDS); | |

57 | ---Purpose: | |

58 | --- Modifier | |

59 | --- Sets the data structure <pDS> to process | |

60 | ||

61 | DS(me) | |

62 | returns DS from BOPDS; | |

63 | ---C++:return const & | |

64 | ---Purpose: | |

65 | --- Selector | |

66 | --- Returns the data structure | |

67 | ||

68 | Initialize(me: out; | |

69 | theType1: ShapeEnum from TopAbs; | |

70 | theType2: ShapeEnum from TopAbs); | |

71 | ---Purpose: | |

72 | --- Initializes the iterator | |

73 | --- theType1 - the first type of shape | |

74 | --- theType2 - the second type of shape | |

75 | ||

76 | More(me) | |

77 | returns Boolean from Standard; | |

78 | ---Purpose: | |

79 | --- Returns true if still there are pairs | |

80 | -- of intersected shapes | |

81 | ||

82 | Next(me:out); | |

83 | ---Purpose: | |

84 | --- Moves iterations ahead | |

85 | ||

86 | Value(me; | |

87 | theIndex1:out Integer from Standard; | |

88 | theIndex2:out Integer from Standard; | |

89 | theWithSubShape: out Boolean from Standard); | |

90 | ---Purpose: | |

91 | --- Returns indices (DS) of intersected shapes | |

92 | --- theIndex1 - the index of the first shape | |

93 | --- theIndex2 - the index of the second shape | |

94 | --- theWithSubShape - flag. True if the sub-shapes of | |

95 | --- shapes are intersected | |

96 | ||

97 | Prepare(me:out) | |

98 | is virtual; | |

99 | ---Purpose: | |

100 | --- Perform the intersection algorithm and prepare | |

101 | --- the results to be used | |

102 | ||

103 | ExpectedLength(me) | |

104 | returns Integer from Standard; | |

105 | ---Purpose: | |

106 | --- Returns the number of intersections founded | |

107 | ||

108 | BlockLength(me) | |

109 | returns Integer from Standard; | |

110 | ---Purpose: | |

111 | --- Returns the block length | |

112 | ||

113 | Intersect(me:out) | |

114 | is virtual protected; | |

115 | ||

116 | fields | |

117 | myAllocator: BaseAllocator from BOPCol is protected; | |

118 | myLength : Integer from Standard is protected; | |

119 | myDS : PDS from BOPDS is protected; | |

120 | myLists : VectorOfListOfPassKeyBoolean from BOPDS is protected; | |

121 | myIterator : ListIteratorOfListOfPassKeyBoolean from BOPDS is protected; | |

122 | ||

123 | end Iterator; |