summaryrefslogtreecommitdiff
path: root/src/BOP/BOP_BlockBuilder.cdl
blob: 1208a805b6e674d7ee20fa929b965a677df98e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
-- File:	BOP_BlockBuilder.cdl
-- Created:	Thu Feb 25 15:16:42 1993
-- Author:	Jean Yves LEBEY
--		<jyl@phylox>
---Copyright:	 Matra Datavision 1993

class BlockBuilder from BOP
    	 
    ---Purpose: 
    ---  auxiliary class to storage and operate with data of  
    ---  connexity blocks inside the given ShapeSet 
    --- 
     
uses
    
    Shape     from TopoDS,  
     
    ShapeSet  from BOP,
    BlockIterator from BOP,

    SequenceOfInteger         from TColStd,
    DataMapOfIntegerInteger   from TColStd,
    IndexedMapOfOrientedShape from TopTools

is

    Create  
    	returns BlockBuilder;
    	---Purpose:  
    	--- Empty  Constructor 
    	---
    Create(SS : in out ShapeSet)  
    	returns BlockBuilder;
    	---Purpose:  
    	--- Create an  object for given ShapeSet  
    	---
    MakeBlock(me : in out;  
    	      SS : in out ShapeSet)  
    	is static;
    	---Purpose:   
    	--- Compute the set of connexity blocks of elements  
    	--- for of the ShapeSet SS
    -- 
    --	
    --   I t e r a t i o n   o n   b l o c k s made by MakeBlock
    -- 
    InitBlock(me : in out)  
    	is static; 

    MoreBlock(me)  
    	returns Boolean from Standard  
    	is static; 
	
    NextBlock(me : in out)  
    	is static;
    --
    -- I t e r a t i o n   o n  on shapes inside the current block 
    --
    BlockIterator(me)  
    	returns BlockIterator from  BOP   
    	is static;
    	--- Purpose:  
    	--- Returns the BlockIterator for the current block  .
    	---
    Element(me; BI : BlockIterator from  BOP)  
    	returns Shape from TopoDS  
    	is static; 
    	---C++: return const &
    	---Purpose:  
    	--- Returns the current element of <BI>.
    	---
    Element(me; I : Integer from Standard)  
    	returns Shape from TopoDS  
    	is static;
    	---C++: return const & 
    	---Purpose:  
    	--- Returns the current element with index  <I> .
    	---
    Element(me; S : Shape from TopoDS)  
    	returns Integer from Standard;
    	---Purpose:   
    	--- Returns the index of the current element .
    	---
    ElementIsValid(me; BI : BlockIterator)  
    	returns Boolean from Standard; 
    	---Purpose:   
    	--- Internal
    	---
    ElementIsValid(me; I : Integer from Standard)  
    	returns Boolean from Standard; 
    	---Purpose:   
    	--- Internal
    	---
    AddElement(me : in out; S : Shape from TopoDS)  
    	returns Integer from Standard;
    	---Purpose:   
    	--- Internal 
    	---
    SetValid(me : in out;  
    	     BI : BlockIterator from  BOP ;  
    	     IsValid : Boolean from Standard); 
    	---Purpose:   
    	--- Internal
    	---
    SetValid(me : in out;  
    	     I : Integer from Standard;  
    	     IsValid : Boolean from Standard);
    	---Purpose:   
    	--- Internal
    	---
    CurrentBlockIsRegular(me : in out)  
    	returns Boolean from Standard;
    	---Purpose:   
    	--- Returns TRUE if all elements inside the current block 
    	--- are biconnexial          
    	---
    
fields

    myOrientedShapeMapIsValid : DataMapOfIntegerInteger from TColStd;
    myOrientedShapeMap        : IndexedMapOfOrientedShape from TopTools;
    myBlocks                  : SequenceOfInteger from TColStd;
    myBlockIndex              : Integer from Standard;
    myIsDone                  : Boolean from Standard;
    myBlocksIsRegular         : SequenceOfInteger from TColStd;

end BlockBuilder;