summaryrefslogtreecommitdiff
path: root/src/AIS2D/AIS2D.cdl
blob: 883ce15b959fea5022deb6be76276c7f91029aaf (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
-- File     : AIS2D.cdl
-- Created  : 07 April  2000
-- Author   : Tanya COOL
---Copyright: Matra Datavision 2000

package AIS2D

	---Purpose: FOR APPLICATION INTERACTIVE SERVICES
	--          
	--          This package provides the classes and methods
	--          to the maintenance of the high level 2D visualization . 
	--          The central entity is Interactive Context for easily 
	--          piloting presentation and selection.
	--          AIS2D package proposes the classes of standard Interactive Objects  
	--          and this one allows to implement users classes of interactive objects,
	--          by respecting a certain rules of creating of Interactive Object.

 uses

   Aspect,
   Quantity,
   TColStd,
   TCollection,
   V2d,
   Graphic2d,
   GGraphic2d,
   TopoDS,
   TopTools,
   HLRAlgo,
   HLRBRep,
   Prs2d

 is

  enumeration KindOfIO is
    
    KOI_None,
    KOI_DATUM,
    KOI_DIMENSION,
    KOI_SHAPE,
    KOI_PROJSHAPE,
    KOI_COMPOUND
    
  end KindOfIO;

  enumeration KindOfDimension is
    
    KOD_NONE,
    KOD_LENGTH,
    KOD_ANGLE,
    KOD_DIAMETER,
    KOD_RADIUS

  end KindOfDimension;

  enumeration KindOfPrimitive is
    
    KOP_NONE,
    KOP_CIRCLE,
    KOP_CIRCLEMARKER,
    KOP_ELLIPS,
    KOP_ELLIPSEMARKER,
    KOP_FRAMEDTEXT,
    KOP_HIDINGTEXT,
    KOP_IMAGE,
    KOP_IMAGEFILE,
    KOP_INFINITELINE,
    KOP_MARKER,
    KOP_PARAGRAPH,
    KOP_POLYLINE,
    KOP_POLYLINEMARKER,
    KOP_SEGMENT,
    KOP_SETOFMARKERS,
    KOP_SETOFPOLYLINES,
    KOP_SETOFSEGMENTS,
    KOP_TEXT,
    KOP_CURVE,
    KOP_SETOFCURVES,
    KOP_ANGLE,
    KOP_ANGULARITY,
    KOP_ARROW,
    KOP_AXIS,
    KOP_CIRCULARITY,
    KOP_CONCENTRIC,
    KOP_CYLINDRIC,
    KOP_DIAMETER,
    KOP_FLATNESS,
    KOP_LENGTH,
    KOP_LINEPROFILE,
    KOP_PARALLELISM,
    KOP_PERPENDICULAR,
    KOP_POINT,
    KOP_RADIUS,
    KOP_RADIUSINDEP,
    KOP_REPERE,
    KOP_STRAIGHTNESS,
    KOP_SURFPROFILE,
    KOP_SYMCIRCULAR,
    KOP_SYMMETRY,
    KOP_SYMTOTAL,
    KOP_TAPER,
    KOP_TOLERANCEFRAME

  end KindOfPrimitive;

  enumeration TypeOfAxis is 
    
	TOAX_Unknown,
	TOAX_XAxis,
	TOAX_YAxis

  end TypeOfAxis;

  enumeration DisplayStatus is

    DS_Displayed,  -- displayed in main viewer
    DS_Erased,     -- erased in the collector
    DS_FullErased, -- erased but not in the collector
    DS_Temporary,  -- temporary displayed
    DS_None        -- nowhere

  end DisplayStatus;

  enumeration SelectStatus is

    SS_Added,
    SS_Removed,
    SS_NotDone

  end SelectStatus;

  enumeration StatusOfPick is

    SOP_Error,
    SOP_NothingSelected,
    SOP_Removed,
    SOP_OneSelected,
    SOP_SeveralSelected

  end StatusOfPick;

  enumeration StatusOfDetection is

    SOD_Error,
    SOD_Nothing,
    SOD_AllBad,
    SOD_Selected,
    SOD_OnlyOneDetected,
    SOD_OnlyOneGood,
    SOD_SeveralGood

  end StatusOfDetection;

  enumeration TypeOfDetection is
    TOD_OBJECT,
    TOD_PRIMITIVE,
    TOD_ELEMENT,
    TOD_VERTEX,
    TOD_NONE
  end TypeOfDetection;

 enumeration ClearMode is

    CM_All,
    CM_Interactive,
    CM_StandardModes,
    CM_TemporaryShapePrs

  end ClearMode;

  class InteractiveContext;
  class InteractiveObject;
  class ProjShape;
  
  private class LocalStatus;
  private class GlobalStatus;
  private class LocalContext;

  private class PrimitiveArchit;
  
  private class SequenceOfIO instantiates Sequence from TCollection
      ( InteractiveObject from AIS2D );

  private class HSequenceOfIO instantiates HSequence from TCollection
      ( InteractiveObject from AIS2D, SequenceOfIO from AIS2D );

  private class SequenceOfPrimArchit instantiates Sequence from TCollection
      ( PrimitiveArchit from AIS2D );

  private class HSequenceOfPrimArchit instantiates HSequence from TCollection
      ( PrimitiveArchit from AIS2D, SequenceOfPrimArchit from AIS2D );
  
  private class DataMapOfIOStatus instantiates DataMap from TCollection
       ( InteractiveObject from AIS2D,
         GlobalStatus from AIS2D,
         MapTransientHasher from TColStd );
  -- Management of interactiveObjects Status...

  class ListOfIO instantiates List from TCollection
      ( InteractiveObject from AIS2D );

  class DataMapOfPrimAspects instantiates DataMap from TCollection 
       ( Primitive from Graphic2d,
	 AspectRoot from Prs2d,
	 MapTransientHasher from TColStd);

  private class DataMapOfLC instantiates DataMap from TCollection
      ( Integer from Standard,
        LocalContext from AIS2D,
        MapIntegerHasher from TColStd );

  private class DataMapOfLocStat instantiates DataMap from TCollection
      ( InteractiveObject from AIS2D,
        LocalStatus from AIS2D,
        MapTransientHasher from TColStd );
    -- to tell if an object is sensitive to Standard Modes Of Selection....


  pointer PToListOfInt to ListOfInteger from TColStd;
   
  Save( aCntx: InteractiveContext from AIS2D; aFile: CString from Standard )
       returns Boolean; 
  Retrieve( aCntx: InteractiveContext from AIS2D; aFile: CString from Standard )
       returns InteractiveObject from AIS2D;

end AIS2D;