summaryrefslogtreecommitdiff
path: root/src/HatchGen/HatchGen_HatchingGen.cdl
blob: 27012e04380829974d56f4a4e47d07a91048cd97 (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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
-- File:	HatchGen_HatchingGen.cdl
-- Created:	Wed Nov 10 18:10:00 1993
-- Author:	Jean Marc LACHAUME
--		<jml@sdsun1>
-- Copyright:	Matra Datavision 1993

generic class HatchingGen from HatchGen (TheHatchingCurve as any)

uses
    ErrorStatus      from HatchGen ,
    PointOnHatching  from HatchGen ,
    PointsOnHatching from HatchGen ,
    Domain           from HatchGen ,
    Domains          from HatchGen , 
    Pnt2d            from gp

raises
    OutOfRange   from Standard

is

     Create
       
       returns HatchingGen from HatchGen;


    Create (Curve : TheHatchingCurve)
    
    	---Purpose: Creates a hatching.

	returns HatchingGen from HatchGen ;


    Curve (me)
    
    	---Purpose: Returns the curve associated to the hatching.

    	---C++: return const &

        returns TheHatchingCurve
        is static ;


    ChangeCurve (me : in out)
    
    	---Purpose: Returns the curve associated to the hatching.

    	---C++: return &

        returns TheHatchingCurve
        is static ;


    TrimDone (me : in out ; Flag : Boolean from Standard)

    	---Purpose: Sets the flag about the trimming computations to the
    	--          given value.

    	is static ;


    TrimDone (me)

    	---Purpose: Returns the flag about the trimming computations.

    	returns Boolean from Standard
	is static ;


    TrimFailed (me : in out ; Flag : Boolean from Standard)

    	---Purpose: Sets the flag about the trimming failure to the
    	--          given value.

    	is static ;


    TrimFailed (me)

    	---Purpose: Returns the flag about the trimming failure.

    	returns Boolean from Standard
	is static ;


    IsDone (me : in out ; Flag : Boolean from Standard)

    	---Purpose: Sets the flag about the domains computation to the
    	--          given value.

    	is static ;


    IsDone (me)

    	---Purpose: Returns the flag about the domains computation.

    	returns Boolean from Standard
	is static ;


    Status (me : in out ; Status : ErrorStatus from HatchGen)

    	---Purpose: Sets the error status.

    	is static ;


    Status (me)

    	---Purpose: Returns the error status.

    	returns ErrorStatus from HatchGen
	is static ;


---Category: Points on hatching.

    AddPoint (me : in out ; Point     : PointOnHatching from HatchGen ;
    	    	    	    Confusion : Real            from Standard)
    
    	---Purpose: Adds an intersection point to the hatching.

	is static ;


    NbPoints (me)
    
    	---Purpose: Returns the number of intersection points
    	--          of the hatching.

        returns Integer from Standard
        is static ;


    Point (me ; Index : Integer from Standard)
    
    	---Purpose: Returns the Index-th intersection point of the
    	--          hatching.
    	--          The exception OutOfRange is raised if
    	--          Index < 1 or Index > NbPoints.

    	---C++: return const &

    	returns PointOnHatching from HatchGen
    	raises OutOfRange from Standard
   	is static ;


    ChangePoint (me : in out ; Index : Integer from Standard)
    
    	---Purpose: Returns the Index-th intersection point of the
    	--          hatching.
    	--          The exception OutOfRange is raised if
    	--          Index < 1 or Index > NbPoints.

    	---C++: return &

    	returns PointOnHatching from HatchGen
    	raises OutOfRange from Standard
   	is static ;


    RemPoint (me : in out ; Index : Integer from Standard)
    
    	---Purpose: Removes the Index-th intersection point of the
    	--          hatching.
    	--          The exception OutOfRange is raised if
    	--          Index < 1 or Index > NbPoints.

    	raises OutOfRange from Standard
    	is static ;


    ClrPoints (me : in out)
    
    	---Purpose: Removes all the intersection points of the hatching.

    	is static ;


---Category: Domains.


    AddDomain (me : in out ; Domain : Domain from HatchGen)
    
    	---Purpose: Adds a domain to the hatching.

	is static ;


    NbDomains (me)
    
    	---Purpose: Returns the number of domains of the hatching.

        returns Integer from Standard
        is static ;


    Domain (me ; Index : Integer from Standard)
    
    	---Purpose: Returns the Index-th domain of the hatching.
    	--          The exception OutOfRange is raised if
    	--          Index < 1 or Index > NbDomains.

    	---C++: return const &

    	returns Domain from HatchGen
    	raises OutOfRange from Standard
   	is static ;


    RemDomain (me : in out ; Index : Integer from Standard)
    
    	---Purpose: Removes the Index-th domain of the hatching.
    	--          The exception OutOfRange is raised if
    	--          Index < 1 or Index > NbDomains.

    	raises OutOfRange from Standard
    	is static ;


    ClrDomains (me : in out)
    
    	---Purpose: Removes all the domains of the hatching.

    	is static ;


    ClassificationPoint (me) 
    	---Purpose: Returns a point on the curve. 
    	--          This point will be used for the classification.
    returns Pnt2d from gp
    is static;
       
fields

    myCurve      : TheHatchingCurve ;
    myTrimDone   : Boolean          from Standard ;
    myTrimFailed : Boolean          from Standard ;
    myPoints     : PointsOnHatching from HatchGen ;
    myIsDone     : Boolean          from Standard ;
    myStatus     : ErrorStatus      from HatchGen ;
    myDomains    : Domains          from HatchGen ;

end HatchingGen from HatchGen ;