1 -- Created on: 1993-02-25
2 -- Created by: Jean Yves LEBEY
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
22 class BlockBuilder from BOP
25 --- auxiliary class to storage and operate with data of
26 --- connexity blocks inside the given ShapeSet
34 BlockIterator from BOP,
36 SequenceOfInteger from TColStd,
37 DataMapOfIntegerInteger from TColStd,
38 IndexedMapOfOrientedShape from TopTools
47 Create(SS : in out ShapeSet)
50 --- Create an object for given ShapeSet
52 MakeBlock(me : in out;
56 --- Compute the set of connexity blocks of elements
57 --- for of the ShapeSet SS
60 -- I t e r a t i o n o n b l o c k s made by MakeBlock
62 InitBlock(me : in out)
66 returns Boolean from Standard
69 NextBlock(me : in out)
72 -- I t e r a t i o n o n on shapes inside the current block
75 returns BlockIterator from BOP
78 --- Returns the BlockIterator for the current block .
80 Element(me; BI : BlockIterator from BOP)
81 returns Shape from TopoDS
83 ---C++: return const &
85 --- Returns the current element of <BI>.
87 Element(me; I : Integer from Standard)
88 returns Shape from TopoDS
90 ---C++: return const &
92 --- Returns the current element with index <I> .
94 Element(me; S : Shape from TopoDS)
95 returns Integer from Standard;
97 --- Returns the index of the current element .
99 ElementIsValid(me; BI : BlockIterator)
100 returns Boolean from Standard;
104 ElementIsValid(me; I : Integer from Standard)
105 returns Boolean from Standard;
109 AddElement(me : in out; S : Shape from TopoDS)
110 returns Integer from Standard;
114 SetValid(me : in out;
115 BI : BlockIterator from BOP ;
116 IsValid : Boolean from Standard);
120 SetValid(me : in out;
121 I : Integer from Standard;
122 IsValid : Boolean from Standard);
126 CurrentBlockIsRegular(me : in out)
127 returns Boolean from Standard;
129 --- Returns TRUE if all elements inside the current block
135 myOrientedShapeMapIsValid : DataMapOfIntegerInteger from TColStd;
136 myOrientedShapeMap : IndexedMapOfOrientedShape from TopTools;
137 myBlocks : SequenceOfInteger from TColStd;
138 myBlockIndex : Integer from Standard;
139 myIsDone : Boolean from Standard;
140 myBlocksIsRegular : SequenceOfInteger from TColStd;