0022751: Issues around Prs3d_TextAspect::Print()
[occt.git] / src / Graphic3d / Graphic3d_Group.cdl
1     --
2     -- File:    Graphic3d_Group.cdl
3     -- Created: Vendredi 6 Septembre 1991
4     -- Author:  NW,JPB,CAL
5     --      27/09/97 ; PCT : add manual control of  textures
6     --              11/97 ; CAL : ajout polyline par 2 points
7     --      16/06/2000 : ATS: Study G005 - Group store presentations of it's objects in field
8     --                        MyListOfPArray to avoid deletion of handle-manipulating 
9     --                        primitives.
10     --
11     ---Copyright:   MatraDatavision 1991,1992,1993,1994
12     --
13     class Group from Graphic3d inherits TShared
14     
15         ---Version:
16
17         ---Purpose: This class allows the definition of groups
18         --     of primitives inside of graphic objects (presentations).
19         --     A group contains the primitives and attributes
20         --     for which the range is limited to this group.
21         --     The primitives of a group can be globally suppressed.
22         --
23         --      There are two main group usage models:
24         --
25         --        1) Non-modifiable, or unbounded, group ('black box'). 
26         --           Developers can repeat a sequence of 
27         --           SetPrimitivesAspect() with AddPrimitiveArray() methods arbitrary number of times
28         --           to define arbitrary number of primitive "blocks" each having individual apect values.
29         --           Any modification of such a group is forbidden, as aspects and primitives are mixed 
30         --           in memory without any high-level logical structure, and any modification is very likely to result
31         --           in corruption of the group internal data.
32         --           It is necessary to recreate such a group as a whole when some attribute should be changed.
33         --           (for example, in terms of AIS it is necessary to re-Compute() the whole presentation each time).
34         --        2) Bounded group. Developers should specify the necessary group aspects with help of
35         --           SetGroupPrimitivesAspect() and then add primitives to the group.
36         --           Such a group have simplified organization in memory (a single block of attributes
37         --           followed by a block of primitives) and therefore it can be modified, if it is necessary to
38         --           change parameters of some aspect that has already been set, using methods:
39         --           IsGroupPrimitivesAspectSet() to detect which aspect was set for primitives;
40         --           GroupPrimitivesAspect() to read current aspect values
41         --           and SetGroupPrimitivesAspect() to set new values.
42         -- 
43         --        Developers are strongly recommended to take all the above into account when filling Graphic3d_Group
44         --        with aspects and primitives and choose the group usage model beforehand out of application needs.
45
46         ---Warning:
47         ---References:
48     
49     uses
50     
51         Array1OfInteger             from TColStd,
52         Array1OfReal                from TColStd,
53         HArray1OfByte               from TColStd,
54     
55         ExtendedString              from TCollection,
56     
57         PlaneAngle                  from Quantity,
58     
59         Array1OfEdge                from Aspect,
60         Edge                        from Aspect,
61     
62         GroupAspect                 from Graphic3d,
63         AspectLine3d                from Graphic3d,
64         AspectMarker3d              from Graphic3d,
65         AspectText3d                from Graphic3d,
66         AspectFillArea3d            from Graphic3d,
67         HorizontalTextAlignment     from Graphic3d,
68         CBitFields4                 from Graphic3d,
69         CGroup                      from Graphic3d,
70         GraphicDriver               from Graphic3d,
71         Structure                   from Graphic3d,
72         TextPath                    from Graphic3d,
73         TypeOfPolygon               from Graphic3d,
74         Vector                      from Graphic3d,
75         Array1OfVertex              from Graphic3d,
76         Array2OfVertex              from Graphic3d,
77         Vertex                      from Graphic3d,
78         Array1OfVertexC             from Graphic3d,
79         Array2OfVertexC             from Graphic3d,
80         VertexC                     from Graphic3d,
81         Array1OfVertexN             from Graphic3d,
82         Array2OfVertexN             from Graphic3d,
83         VertexN                     from Graphic3d,
84         Array1OfVertexNC            from Graphic3d,
85         Array2OfVertexNC            from Graphic3d,
86         VertexNC                    from Graphic3d,
87         VerticalTextAlignment       from Graphic3d, 
88         VertexNT                    from Graphic3d, 
89         Array1OfVertexNT            from Graphic3d,
90         Array2OfVertexNT            from Graphic3d,
91         ArrayOfPrimitives           from Graphic3d,
92         ListOfPArray                from Graphic3d,
93         ListIteratorOfListOfPArray  from Graphic3d,
94         TransModeFlags              from Graphic3d,
95         CBounds                     from Graphic3d
96     
97     raises
98     
99         GroupDefinitionError        from Graphic3d,
100         PickIdDefinitionError       from Graphic3d,
101     OutOfRange          from Standard
102     
103     is
104         Create ( AStructure : Structure from Graphic3d )
105             returns mutable Group from Graphic3d;
106         ---Level: Public
107         ---Purpose: Creates a group in the structure <AStructure>.
108     
109         ---------------------------------------------------
110         -- Category: Methods to modify the class definition
111         ---------------------------------------------------
112     
113         Clear ( me  : mutable;
114                 theUpdateStructureMgr : Boolean from Standard = Standard_True )
115             is static;
116         ---Level: Public
117         ---Purpose: Supress all primitives and attributes of <me>.
118         --          To clear group without update in Graphic3d_StructureManager
119         --          pass Standard_False as <theUpdateStructureMgr>. This
120         --          used on context and viewer destruction, when the pointer
121         --          to structure manager in Graphic3d_Structure could be 
122         --          already released (pointers are used here to avoid handle 
123         --          cross-reference);
124         ---Category: Methods to modify the class definition
125     
126         Destroy ( me    : mutable )
127             is static;
128         ---Level: Public
129         ---Purpose: Supress the group <me> in the structure.
130         ---Category: Methods to modify the class definition
131         ---C++: alias ~
132     
133         Remove ( me : mutable )
134             is static;
135         ---Level: Public
136         ---Purpose: Supress the group <me> in the structure.
137         --  Warning: No more graphic operations in <me> after this call.
138         ---Category: Methods to modify the class definition
139
140         --SetTransformPersistence( me     : mutable;
141         --                         AFlag  : TransModeFlags from Graphic3d )
142         ---Level: Public
143     ---Purpose: Modifies the current modelling transform persistence (pan, zoom or rotate)
144         --is static;
145
146     --TransformPersistence( me )
147     --      returns TransModeFlags from Graphic3d
148         ---Level: Public
149     ---Purpose: Get the current modelling transform persistence (pan, zoom or rotate)
150         --is static;
151     
152         SetGroupPrimitivesAspect ( me   : mutable )
153             is static;
154         ---Level: Public
155         ---Purpose: Removes the context for all the line primitives
156         --      of the group.
157         ---Category: Methods to modify the class definition
158     
159         SetGroupPrimitivesAspect ( me   : mutable;
160                                    CTX  : AspectLine3d from Graphic3d )
161             is static;
162         ---Level: Public
163         ---Purpose: Modifies the context for all the line primitives
164         --      of the group.
165         ---Category: Methods to modify the class definition
166     
167         SetGroupPrimitivesAspect ( me   : mutable;
168                                    CTX  : AspectFillArea3d from Graphic3d )
169             is static;
170         ---Level: Public
171         ---Purpose: Modifies the context for all the face primitives
172         --      of the group.
173         ---Category: Methods to modify the class definition
174     
175         SetGroupPrimitivesAspect ( me   : mutable;
176                                    CTX  : AspectText3d from Graphic3d )
177             is static;
178         ---Level: Public
179         ---Purpose: Modifies the context for all the text primitives
180         --      of the group.
181         ---Category: Methods to modify the class definition
182     
183         SetGroupPrimitivesAspect ( me   : mutable;
184                                    CTX  : AspectMarker3d from Graphic3d )
185             is static;
186         ---Level: Public
187         ---Purpose: Modifies the context for all the marker primitives
188         --      of the group.
189         ---Category: Methods to modify the class definition
190     
191         SetPrimitivesAspect ( me    : mutable;
192                               CTX   : AspectLine3d from Graphic3d )
193             is static;
194         ---Level: Public
195         ---Purpose: Modifies the current context of the group to give
196         --      another aspect for all the line primitives created
197         --      after this call in the group.
198         ---Category: Methods to modify the class definition
199     
200         SetPrimitivesAspect ( me    : mutable;
201                               CTX   : AspectFillArea3d from Graphic3d )
202             is static;
203         ---Level: Public
204         ---Purpose: Modifies the current context of the group to give
205         --      another aspect for all the face primitives created
206         --      after this call in the group.
207         ---Category: Methods to modify the class definition
208     
209         SetPrimitivesAspect ( me    : mutable;
210                               CTX   : AspectText3d from Graphic3d )
211             is static;
212         ---Level: Public
213         ---Purpose: Modifies the current context of the group to give
214         --      another aspect for all the text primitives created
215         --      after this call in the group.
216         ---Category: Methods to modify the class definition
217     
218         SetPrimitivesAspect ( me    : mutable;
219                               CTX   : AspectMarker3d from Graphic3d )
220             is static;
221         ---Level: Public
222         ---Purpose: Modifies the current context of the group to give
223         --      another aspect for all the marker primitives created
224         --      after this call in the group.
225         ---Category: Methods to modify the class definition
226     
227         SetMinMaxValues ( me                : mutable;
228                           XMin, YMin, ZMin  : Real from Standard;
229                           XMax, YMax, ZMax  : Real from Standard )
230             is static;
231         ---Level: Public
232         ---Purpose: Sets the coordinates of the boundary box of the
233         --      group <me>.
234         ---Category: Methods to modify the class definition
235     
236         -------------------------------------
237         -- Category: Methods to create Marker
238         -------------------------------------
239     
240         ---------------------------------------------
241         -- Summary of Markers                      --
242         --                                         --
243         -- They should have one or more vertices.  --
244         --                                         --
245         -- They have the following attributes.     --
246         --                                         --
247         --  Marker Type.                       --
248         --  Marker Scale Factor.               --
249         --  Marker Color.                      --
250         --                                         --
251         -- The  size, shape  and orientation  of a --
252         -- marker is not subject to transformation --
253         ---------------------------------------------
254     
255         Marker ( me         : mutable;
256                  APoint     : Vertex from Graphic3d;
257                  EvalMinMax : Boolean from Standard = Standard_True )
258             is static;
259         ---Level: Public
260         ---Purpose: Creates a marker in position <APoint> which will be drawn
261         --      with the current attribute (AspectMarker).
262         ---Category: Methods to create Marker
263     
264         MarkerSet ( me          : mutable;
265                     ListVertex  : Array1OfVertex from Graphic3d;
266                     EvalMinMax  : Boolean from Standard = Standard_True )
267             is static;
268         ---Purpose: Creates a group of markers defined by a table of
269         --     vertices.
270         ---Category: Methods to create Marker
271     
272         --------------------------------------
273         -- Category: Methods to create Polygon
274         --------------------------------------
275     
276         --------------------------------------------------
277         -- Summary of Polygons                          --
278         --                                              --
279         -- They are limited to one boundary.            --
280         --                                              --
281         -- The boundary should be closed.               --
282         --                                              --
283         -- They should have at least three vertices.    --
284         --                                              --
285         -- They should be planar.                       --
286         --                                              --
287         -- They should have a normal.                   --
288         --                                              --
289         -- The boundary is drawn only when the interior --
290         -- style is hollow.                             --
291         --                                              --
292         -- The boundary have the following attributes : --
293         --                                              --
294         --  Line Type.                              --
295         --  Line Width Scale Factor.                --
296         --  Line Color.                             --
297         --                                              --
298         -- They have only interior attributes :         --
299         --                                              --
300         --  Interior Style.                         --
301         --  Interior Color.                         --
302         --  Front Material.                         --
303         --  Back Material.                          --
304         --------------------------------------------------
305     
306         Polygon ( me            : mutable;
307                   ListVertex    : Array1OfVertex from Graphic3d;
308                   AType         : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
309                   EvalMinMax    : Boolean from Standard = Standard_True )
310             is static;
311         ---Level: Public
312         ---Purpose: Links up points to create a face drawn
313         --      using the current fill attributes (AspectFillArea3d))
314         --      The first and last points are not duplicates.
315         ---Category: Methods to create Polygon
316     
317         Polygon ( me            : mutable;
318                   ListVertex    : Array1OfVertex from Graphic3d;
319                   Normal        : Vector from Graphic3d;
320                   AType         : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
321                   EvalMinMax    : Boolean from Standard = Standard_True )
322             is static;
323         ---Level: Public
324         ---Purpose: Links up points to create a face drawn
325         --      using the current fill attributes (AspectFillArea3d))
326         --      The first and last points are not duplicates.
327         --      The normal to the polygon is defined normalised.
328         ---Category: Methods to create Polygon
329     
330         Polygon ( me            : mutable;
331                   ListVertex    : Array1OfVertexN from Graphic3d;
332                   AType         : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
333                   EvalMinMax    : Boolean from Standard = Standard_True )
334             is static;
335         ---Level: Public
336         ---Purpose: Links up points to create a face drawn
337         --      using the current fill attributes (AspectFillArea3d))
338         --      The first and last points are not duplicates.
339         --      The normal is defined and normalised for each vertex.
340         ---Category: Methods to create Polygon
341     
342         Polygon ( me            : mutable;
343                   ListVertex    : Array1OfVertexN from Graphic3d;
344                   Normal        : Vector from Graphic3d;
345                   AType         : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
346                   EvalMinMax    : Boolean from Standard = Standard_True )
347             is static;
348         ---Level: Public
349         ---Purpose: Links up points to create a face drawn
350         --      using the current fill attributes (AspectFillArea3d))
351         --      The first and last points are not duplicates.
352         --      The normal is defined for each vertex.
353         --      The normal to the polygon is defined normalised.
354         ---Category: Methods to create Polygon
355     
356      
357         Polygon ( me            : mutable;
358                   ListVertex    : Array1OfVertexNT from Graphic3d;
359                   AType         : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
360                   EvalMinMax    : Boolean from Standard = Standard_True )
361             is static;
362         ---Level: Public
363         ---Purpose: Links up points to create a face drawn
364         --      using the current fill attributes (AspectFillArea3d))
365         --      The first and last points are not duplicated.
366         --      The normal is defined and normalised for each vertex.
367         --          The texture coordinate is defined for each vertex.
368         ---Category: Methods to create Polygon
369     
370     
371     
372         --------------------------------------------------
373         -- Summary of Polygons with holes               --
374         --                                              --
375         -- They may have multiple boundaries.           --
376         --                                              --
377         -- Each boundary should be closed.              --
378         --                                              --
379         -- Each  boundary  should  have at  least three --
380         -- vertices.                                    --
381         --                                              --
382         -- They should be planar.                       --
383         --                                              --
384         -- They should have a normal.                   --
385         --                                              --
386         -- The boundary is drawn only when the interior --
387         -- style is hollow.                             --
388         --                                              --
389         -- The boundary have the following attributes : --
390         --                                              --
391         --  Line Type.                              --
392         --  Line Width Scale Factor.                --
393         --  Line Color.                             --
394         --                                              --
395         -- They have only interior attributes :         --
396         --                                              --
397         --  Interior Style.                         --
398         --  Interior Color.                         --
399         --  Front Material.                         --
400         --  Back Material.                          --
401         --------------------------------------------------
402     
403         Polygon ( me            : mutable;
404                   Bounds        : Array1OfInteger from TColStd;
405                   ListVertex    : Array1OfVertex from Graphic3d;
406                   EvalMinMax    : Boolean from Standard = Standard_True )
407             is static;
408         ---Level: Public
409         ---Purpose: Creates a face with holes.
410         --      The face is described by the total number
411         --      of vertices on the external contour and around the holes,
412         --      and by the list of vertices.
413         --      The face will be drawn
414         --      using the current fill attributes (AspectFillArea3d))
415         --      The first and last points are not duplicates.
416         --      Bounds : total number of interior and exterior vertices
417         --      ListVertex : a list of the interior and exterior vertices
418         ---Category: Methods to create Polygon
419     
420         Polygon ( me            : mutable;
421                   Bounds        : Array1OfInteger from TColStd;
422                   ListVertex    : Array1OfVertex from Graphic3d;
423                   Normal        : Vector from Graphic3d;
424                   EvalMinMax    : Boolean from Standard = Standard_True )
425             is static;
426         ---Level: Public
427         ---Purpose: Creates a face with holes.
428         --      The face is described by the total number
429         --      of vertices on the external contour and around the holes,
430         --      and by the list of vertices.
431         --      The face will be drawn
432         --      using the current fill attributes (AspectFillArea3d))
433         --      The first and last points are not duplicates.
434         --      The normal to the polygon is normalised.
435         --      Bounds : total number of interior and exterior vertices
436         --      ListVertex : a list of the interior and exterior vertices
437         ---Category: Methods to create Polygon
438     
439         Polygon ( me            : mutable;
440                   Bounds        : Array1OfInteger from TColStd;
441                   ListVertex    : Array1OfVertexN from Graphic3d;
442                   EvalMinMax    : Boolean from Standard = Standard_True )
443             is static;
444         ---Level: Public
445         ---Purpose: Creates a face with holes.
446         --      The face is described by the total number
447         --      of vertices on the external contour and around the holes,
448         --      and by the list of vertices.
449         --      The face will be drawn
450         --      using the current fill attributes (AspectFillArea3d))
451         --      The first and last points are not duplicates.
452         --      Bounds : total number of interior and exterior vertices
453         --      ListVertex : a list of the interior and exterior vertices
454         ---Category: Methods to create Polygon
455     
456         Polygon ( me            : mutable;
457                   Bounds        : Array1OfInteger from TColStd;
458                   ListVertex    : Array1OfVertexN from Graphic3d;
459                   Normal        : Vector from Graphic3d;
460                   EvalMinMax    : Boolean from Standard = Standard_True )
461             is static;
462         ---Level: Public
463         ---Purpose: Creates a face with holes.
464         --      The face is described by the total number
465         --      of vertices on the external contour and around the holes,
466         --      and by the list of vertices.
467         --      The face will be drawn
468         --      using the current fill attributes (AspectFillArea3d))
469         --      The first and last points are not duplicates.
470         --      The normal to the polygon is normalised.
471         --      Bounds : total number of interior and exterior vertices
472         --      ListVertex : a list of the interior and exterior vertices
473         ---Category: Methods to create Polygon
474     
475         PolygonSet ( me           : mutable;
476                      Bounds       : Array1OfInteger from TColStd;
477                      ListVertex   : Array1OfVertex from Graphic3d;
478                      AType        : TypeOfPolygon from Graphic3d = Graphic3d_TOP_CONVEX;
479                      EvalMinMax   : Boolean from Standard = Standard_True )
480             is static;
481         ---Level: Public
482         ---Purpose: Links up points to create a set of face drawn
483         --      using the current fill attributes (AspectFillArea3d))
484         --      The first and last points are not duplicates.
485         ---Category: Methods to create Polygon
486     
487         ---------------------------------------
488         -- Category: Methods to create Polyline
489         ---------------------------------------
490     
491         --------------------------------------------
492         -- Summary of Polylines                   --
493         --                                        --
494         -- They should have two or more vertices. --
495         --                                        --
496         -- They have the following attributes.    --
497         --                                        --
498         --  Line Type.                        --
499         --  Line Width Scale Factor.          --
500         --  Line Color.                       --
501         --------------------------------------------
502     
503         Polyline ( me           : mutable;
504                    APT1         : Vertex from Graphic3d;
505                    APT2         : Vertex from Graphic3d;
506                    EvalMinMax   : Boolean from Standard = Standard_True )
507             is static;
508         ---Level: Public
509         ---Purpose: Links up points to create a line drawn
510         --      using the current line attributes (AspectLine)
511         ---Category: Methods to create Polyline
512     
513         Polyline ( me         : mutable;
514                    ListVertex : Array1OfVertex from Graphic3d;
515                    EvalMinMax : Boolean from Standard = Standard_True )
516             is static;
517         ---Level: Public
518         ---Purpose: Links up points to create a line drawn
519         --      using the current line attributes (AspectLine)
520         ---Category: Methods to create Polyline
521     
522         Polyline ( me         : mutable;
523                    ListVertex : Array1OfVertexC from Graphic3d;
524                    EvalMinMax : Boolean from Standard = Standard_True )
525             is static;
526         ---Level: Public
527         ---Purpose: Links up points to create a line drawn
528         --      using the current line attributes (AspectLine)
529         --      except for the colour which is defined
530         --      for each vertex.
531         ---Category: Methods to create Polyline
532     
533         -----------------------------------------
534         -- Category: Methods to create Quadrangle
535         -----------------------------------------
536     
537         QuadrangleMesh ( me         : mutable;
538                          ListVertex : Array2OfVertex from Graphic3d;
539                          EvalMinMax : Boolean from Standard = Standard_True )
540         ---Level: Public
541         ---Purpose: Creates a group of quadrilaterals from a list of
542         --      points, such that their vertices are:
543         --      Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
544         --      The quadrilaterals will be drawn according to the
545         --      current attributes (AspectFillArea3d).
546         --  Category: Methods to create Quadrangle
547         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
548         --      less than four points.
549         raises GroupDefinitionError from Graphic3d is static;
550     
551         QuadrangleMesh ( me         : mutable;
552                          ListVertex : Array2OfVertexN from Graphic3d;
553                          EvalMinMax : Boolean from Standard = Standard_True )
554         ---Level: Public
555         ---Purpose: Creates a group of quadrilaterals from a list of
556         --      points, such that their vertices are:
557         --      Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
558         --      The quadrilaterals will be drawn according to the
559         --      current attributes (AspectFillArea3d).
560         --      For each vertex the normal is given.
561         --  Category: Methods to create Quadrangle
562         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
563         --      less than four points.
564         raises GroupDefinitionError from Graphic3d is static;
565     
566         QuadrangleMesh ( me           : mutable;
567                          ListVertex   : Array2OfVertexNT from Graphic3d;
568                          EvalMinMax   : Boolean from Standard = Standard_True )
569         ---Level: Public
570         ---Purpose: Creates a group of quadrilaterals from a list of
571         --      points, such that their vertices are:
572         --      Ki,j; Ki,j+1; Ki+1,j+1; Ki+1,j.
573         --      The quadrilaterals will be drawn according to the
574         --      current attributes (AspectFillArea3d).
575         --      For each vertex the normal is given.
576         --      For each vertex a texture coordinate is given.
577         --  Category: Methods to create Quadrangle
578         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
579         --      less than four points.
580         raises GroupDefinitionError from Graphic3d is static;
581
582         -----------------------------------
583         -- Category: Methods to create Text
584         -----------------------------------
585     
586         --------------------------------------------
587         -- Summary of Texts                       --
588         --                                        --
589         -- Text  has  geometric  and nongeometric --
590         -- attributes.                            --
591         --                                        --
592         -- The geometric text attributes are :    --
593         --                                        --
594         --  Character Height.                 --
595         --  Character Up Vector.              --
596         --  Text Path.                        --
597         --  Text Alignment Horizontal.        --
598         --  Text Alignment Vertical.          --
599         --                                        --
600         -- The nongeometric text attributes are : --
601         --                                        --
602         --  Text Font.                        --
603         --  Character Spacing.                --
604         --  Character Expansion Factor.       --
605         --  Text Color.                       --
606         --------------------------------------------
607     
608         Text (  me  : mutable;
609             AText   : CString from Standard;
610             APoint  : Vertex from Graphic3d;
611             AHeight : Real from Standard;
612             AAngle  : PlaneAngle from Quantity;
613             ATp : TextPath from Graphic3d;
614             AHta    : HorizontalTextAlignment from Graphic3d;
615             AVta    : VerticalTextAlignment from Graphic3d;
616             EvalMinMax  : Boolean from Standard = Standard_True )
617             is static;
618         ---Level: Public
619         ---Purpose: Creates the string <AText> at position <APoint>.
620         --      The 3D point of attachment is projected. The text is
621         --      written in the plane of projection.
622         --      The attributes are given with respect to the plane of
623         --      projection.
624         --      AHeight : Height of text.
625         --            (Relative to the Normalized Projection
626         --              Coordinates (NPC) Space).
627         --      AAngle  : Orientation of the text
628         --            (with respect to the horizontal).
629         ---Category: Methods to create Text
630     
631         Text ( me   : mutable;
632                AText    : CString from Standard;
633                APoint   : Vertex from Graphic3d;
634                AHeight  : Real from Standard;
635                EvalMinMax   : Boolean from Standard = Standard_True )
636             is static;
637         ---Level: Public
638         ---Purpose: Creates the string <AText> at position <APoint>.
639         --      The 3D point of attachment is projected. The text is
640         --      written in the plane of projection.
641         --      The attributes are given with respect to the plane of
642         --      projection.
643         --      AHeight : Height of text.
644         --            (Relative to the Normalized Projection
645         --              Coordinates (NPC) Space).
646         --      The other attributes have the following default values:
647         --      AAngle  : PI / 2.
648         --      ATp     : TP_RIGHT
649         --      AHta    : HTA_LEFT
650         --      AVta    : VTA_BOTTOM
651         ---Category: Methods to create Text
652     
653         Text (  me          : mutable;
654                 AText       : ExtendedString from TCollection;
655                 APoint      : Vertex from Graphic3d;
656                 AHeight     : Real from Standard;
657                 AAngle      : PlaneAngle from Quantity;
658                 ATp         : TextPath from Graphic3d;
659                 AHta        : HorizontalTextAlignment from Graphic3d;
660                 AVta        : VerticalTextAlignment from Graphic3d;
661                 EvalMinMax  : Boolean from Standard = Standard_True )
662             is static;
663         ---Level: Internal
664         ---Purpose: Creates the string <AText> at position <APoint>.
665         --      The 3D point of attachment is projected. The text is
666         --      written in the plane of projection.
667         --      The attributes are given with respect to the plane of
668         --      projection.
669         --      AHeight : Height of text.
670         --            (Relative to the Normalized Projection
671         --              Coordinates (NPC) Space).
672         --      AAngle  : Orientation of the text
673         --            (with respect to the horizontal).
674         ---Category: Methods to create Text
675     
676         Text ( me           : mutable;
677                AText        : ExtendedString from TCollection;
678                APoint       : Vertex from Graphic3d;
679                AHeight      : Real from Standard;
680                EvalMinMax   : Boolean from Standard = Standard_True )
681             is static;
682         ---Level: Internal
683         ---Purpose: Creates the string <AText> at position <APoint>.
684         --      The 3D point of attachment is projected. The text is
685         --      written in the plane of projection.
686         --      The attributes are given with respect to the plane of
687         --      projection.
688         --      AHeight : Height of text.
689         --            (Relative to the Normalized Projection
690         --              Coordinates (NPC) Space).
691         --      The other attributes have the following default values:
692         --      AAngle  : PI / 2.
693         --      ATp     : TP_RIGHT
694         --      AHta    : HTA_LEFT
695         --      AVta    : VTA_BOTTOM
696         ---Category: Methods to create Text
697     
698         ---------------------------------------
699         ---Category: Methods to create Triangle
700         ---------------------------------------
701     
702         TriangleMesh ( me           : mutable;
703                        ListVertex   : Array1OfVertex from Graphic3d;
704                        EvalMinMax   : Boolean from Standard = Standard_True )
705         ---Level: Public
706         ---Purpose: Creates triangles from an array of points such that
707         --      the Kth triangle contains the vertices K, K+1, K+2.
708         --      The triangle will be drawn using the current fill
709         --      attributes (AspectFillArea3d)
710         --  Category: Methods to create Triangle
711         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
712         --      less than three points.
713         raises GroupDefinitionError from Graphic3d is static;
714     
715         TriangleMesh ( me           : mutable;
716                        ListVertex   : Array1OfVertexN from Graphic3d;
717                        EvalMinMax   : Boolean from Standard = Standard_True )
718         ---Level: Public
719         ---Purpose: Creates triangles from an array of points such that
720         --      the Kth triangle contains the vertices K, K+1, K+2.
721         --      The triangle will be drawn using the current fill
722         --      attributes (AspectFillArea3d)
723         --      The normal is given for each vertex.
724         --  Category: Methods to create Triangle
725         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
726         --      less than three points.
727         raises GroupDefinitionError from Graphic3d is static;
728     
729         TriangleMesh ( me           : mutable;
730                        ListVertex   : Array1OfVertexNT from Graphic3d;
731                        EvalMinMax   : Boolean from Standard = Standard_True )
732         ---Level: Public
733         ---Purpose: Creates triangles from an array of points such that
734         --      the Kth triangle contains the vertices K, K+1, K+2.
735         --      The triangle will be drawn using the current fill
736         --      attributes (AspectFillArea3d)
737         --      The normal is given for each vertex.
738         --      A texture coordinate is given for each vertex.
739         --  Category: Methods to create Triangle
740         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
741         --      less than three points.
742         raises GroupDefinitionError from Graphic3d is static;
743   
744         TriangleSet ( me            : mutable;
745                       ListVertex    : Array1OfVertex from Graphic3d;
746                       ListEdge      : Array1OfEdge from Aspect;
747                       EvalMinMax    : Boolean from Standard = Standard_True )
748         ---Level: Public
749         ---Purpose: Creates a group of triangles defined by a table of
750         --      vertices and a table of edges, visible or not.
751         --  Category: Methods to create Triangle
752         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
753         --      less than three points or if <ListEdge> contains
754         --      less than three edges.
755         raises GroupDefinitionError from Graphic3d is static;
756     
757         TriangleSet ( me            : mutable;
758                       ListVertex    : Array1OfVertexN from Graphic3d;
759                       ListEdge      : Array1OfEdge from Aspect;
760                       EvalMinMax    : Boolean from Standard = Standard_True )
761         ---Level: Public
762         ---Purpose: Creates a group of triangles defined by a table of
763         --      vertices and a table of edges, visible or not.
764         --      For each vertex the normal is given.
765         --  Category: Methods to create Triangle
766         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
767         --      less than three points or if <ListEdge> contains
768         --      less than three edges.
769         raises GroupDefinitionError from Graphic3d is static;
770      
771         TriangleSet ( me            : mutable;
772                       ListVertex    : Array1OfVertexNT from Graphic3d;
773                       ListEdge      : Array1OfEdge from Aspect;
774                       EvalMinMax    : Boolean from Standard = Standard_True )
775         ---Level: Public
776         ---Purpose: Creates a group of triangles defined by a table of
777         --      vertices and a table of edges, visible or not.
778         --      For each vertex the normal is given.
779         --      For each vertex a texture coordinate is given.
780         --  Category: Methods to create Triangle
781         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
782         --      less than three points or if <ListEdge> contains
783         --      less than three edges.
784         raises GroupDefinitionError from Graphic3d is static;
785     
786         TriangleSet ( me            : mutable;
787                       ListVertex    : Array1OfVertexC from Graphic3d;
788                       ListEdge      : Array1OfEdge from Aspect;
789                       EvalMinMax    : Boolean from Standard = Standard_True )
790         ---Level: Public
791         ---Purpose: Creates a group of triangles defined by a table of
792         --      vertices and a table of edges, visible or not.
793         --      For each vertex the color is given.
794         --  Category: Methods to create Triangle
795         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
796         --      less than three points or if <ListEdge> contains
797         --      less than three edges.
798         raises GroupDefinitionError from Graphic3d is static;
799     
800         TriangleSet ( me            : mutable;
801                       ListVertex    : Array1OfVertexNC from Graphic3d;
802                       ListEdge      : Array1OfEdge from Aspect;
803                       EvalMinMax    : Boolean from Standard = Standard_True )
804         ---Level: Public
805         ---Purpose: Creates a group of triangles defined by a table of
806         --      vertices and a table of edges, visible or not.
807         --      For each vertex the normal and the color are given.
808         --  Category: Methods to create Triangle
809         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
810         --      less than three points or if <ListEdge> contains
811         --      less than three edges.
812         raises GroupDefinitionError from Graphic3d is static;
813     
814     AddPrimitiveArray( me      : mutable;
815                        elem    : ArrayOfPrimitives from Graphic3d;
816           EvalMinMax: Boolean from Standard = Standard_True );
817         ---Level: Public
818     ---Purpose: Adds an array of primitives for display
819
820     RemovePrimitiveArray( me       : mutable;
821                           aRank    : Integer from Standard) 
822         ---Level: Public
823     ---Purpose: Remove the array of primitives of rank <aRank> 
824         raises OutOfRange from Standard is static;
825     -- if <aRank> is < 1 or > ArrayNumber()
826
827     RemovePrimitiveArrays( me       : mutable);
828         ---Level: Public
829     ---Purpose: Remove all array of primitives 
830     
831         UserDraw ( me           : mutable;
832                    AnObject     : Address from Standard; 
833                    EvalMinMax   : Boolean from Standard = Standard_True; 
834     -- SAMTECH contribution 5 July 2007 -- BEGIN
835            ContainsFacet: Boolean from Standard = Standard_False
836     -- SAMTECH contribution 5 July 2007 -- END 
837         )
838         ---Level: Public
839         ---Purpose: Creates an UserDraw primitive
840         --  Category: Methods to create UserDraw
841         --  Warning: Raises GroupDefinitionError if ...
842         raises GroupDefinitionError from Graphic3d is static;
843
844         ----------------------------
845         -- Category: Inquire methods
846         ----------------------------
847
848     ArrayNumber( me )
849     returns Integer from Standard;
850         ---Level: Public
851     ---Purpose: Returns the number of primitive array added in this group 
852
853     InitDefinedArray( me:mutable );
854         ---Level: Public
855     ---Purpose: Initialize the array list iterator. 
856
857     NextDefinedArray( me:mutable );
858         ---Level: Public
859     ---Purpose: Increments the array list iterator. 
860
861     MoreDefinedArray( me:mutable )
862     returns Boolean from Standard;
863         ---Level: Public
864     ---Purpose: Returns TRUE if more array exists in the list.
865
866     DefinedArray( me )
867     returns mutable ArrayOfPrimitives from Graphic3d;
868         ---Level: Public
869     ---Purpose: Returns the current array of primitives according
870     -- to the array list iterator value. 
871
872         IsGroupPrimitivesAspectSet ( me;
873                     theAspect : GroupAspect from Graphic3d )
874             returns Boolean from Standard
875             is static;
876         ---Level: Public
877         ---Purpose: Returns TRUE if aspect is set for the group.
878         ---Category: Inquire methods
879
880         GroupPrimitivesAspect ( me;
881                                 CTXL    : AspectLine3d from Graphic3d;
882                                 CTXT    : AspectText3d from Graphic3d;
883                                 CTXM    : AspectMarker3d from Graphic3d;
884                                 CTXF    : AspectFillArea3d from Graphic3d )
885                 is static;
886         ---Level: Public
887         ---Purpose: Returns the context of all the primitives of the group.
888         ---Category: Inquire methods
889     
890         PrimitivesAspect ( me;
891                            CTXL : AspectLine3d from Graphic3d;
892                            CTXT : AspectText3d from Graphic3d;
893                            CTXM : AspectMarker3d from Graphic3d;
894                            CTXF : AspectFillArea3d from Graphic3d )
895                 is static;
896         ---Level: Public
897         ---Purpose: Returns the last inserted context in the group <me>
898         --          foreach kind of primitives.
899         ---Category: Inquire methods
900
901         ContainsFacet ( me )
902             returns Boolean from Standard
903             is static;
904         ---Level: Internal
905         ---Purpose: Returns Standard_True if the group <me> contains
906         --      Polygons, Triangles or Quadrangles.
907         ---Category: Inquire methods
908     
909         IsDeleted ( me )
910             returns Boolean from Standard
911             is static;
912         ---Level: Public
913         ---Purpose: Returns Standard_True if the group <me> is deleted.
914         --      <me> is deleted after the call Remove (me) or the
915         --      associated structure is deleted.
916         ---Category: Inquire methods
917     
918         IsEmpty ( me )
919             returns Boolean from Standard
920             is static;
921         ---Level: Public
922         ---Purpose: Returns Standard_True if the group <me> is empty.
923         ---Warning: A group is empty if the MinMaxValues method returns :
924         --      XMin = YMin = ZMin = RealFirst ().
925         --      XMax = YMax = ZMax = RealLast ().
926         ---Category: Inquire methods
927     
928         MinMaxValues ( me;
929                        XMin, YMin, ZMin : out Real from Standard;
930                        XMax, YMax, ZMax : out Real from Standard )
931             is static;
932         ---Level: Public
933         ---Purpose: Returns the coordinates of the boundary box of the
934         --      group <me>.
935         ---Warning: If the group <me> is empty then :
936         --      XMin = YMin = ZMin = RealFirst ().
937         --      XMax = YMax = ZMax = RealLast ().
938         ---Category: Inquire methods
939     
940         Structure ( me )
941             returns mutable Structure from Graphic3d
942             is static;
943         ---Level: Public
944         ---Purpose: Returns the structure containing the group <me>.
945         ---Category: Inquire methods
946     
947         ----------------------------
948         -- Category: Private methods
949         ----------------------------
950         
951         Labels ( me;
952              LB, LE : in out Integer from Standard )
953             is static private;
954         ---Level: Internal
955         ---Purpose: Returns the position of the group in the structure.
956         ---Category: Private methods
957     
958         MinMaxCoord ( me;
959                       XMin, YMin, ZMin : out Real from Standard;
960                       XMax, YMax, ZMax : out Real from Standard )
961             is static private;
962         ---Level: Internal
963         ---Purpose: Returns the extreme coordinates found in the group.
964         ---Warning: If the group <me> is empty then :
965         --      XMin = YMin = ZMin = RealFirst ().
966         --      XMax = YMax = ZMax = RealLast ().
967         ---Category: Private methods
968     
969         Update ( me )
970             is static private;
971         ---Level: Internal
972         ---Purpose: Calls the Update method of the StructureManager which
973         --      contains the associated Structure of the Group <me>.
974         ---Category: Private methods
975     
976         -----------------------------
977         -- Category: Internal methods
978         -----------------------------
979     
980         BeginPrimitives ( me : mutable )
981             is static;
982         ---Level: Internal
983         ---Category: Internal methods
984     
985         EndPrimitives ( me : mutable )
986             is static;
987         ---Level: Internal
988         ---Category: Internal methods
989     
990         Bezier ( me         : mutable;
991                  ListVertex : Array1OfVertex from Graphic3d;
992                  EvalMinMax : Boolean from Standard = Standard_True )
993         ---Level: Internal
994         ---Purpose: Creates a non rational Bezier curve with a set of poles :
995         --      ListVertex. The weights are defaulted to all being 1.
996         --  Category: Methods to create Curve
997         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
998         --      less than two points.
999         raises GroupDefinitionError from Graphic3d is static;
1000     
1001         Bezier ( me         : mutable;
1002                  ListVertex : Array1OfVertex from Graphic3d;
1003                  ListWeight : Array1OfReal from TColStd;
1004                  EvalMinMax : Boolean from Standard = Standard_True )
1005         ---Level: Internal
1006         ---Purpose: Creates a non rational Bezier curve with a set of poles :
1007         --      ListVertex and the set of weights ListWeight.
1008             --      If all the weights are identical the curve is considered 
1009             --      as non rational.
1010         --  Category: Methods to create Curve
1011         --  Warning: Raises GroupDefinitionError if <ListVertex> contains
1012         --      less than two points or <ListVertex> and <ListWeight>
1013         --      have not the same length or one weight value is lower
1014         --      or equal to Resolution from package gp.
1015         raises GroupDefinitionError from Graphic3d is static;
1016     
1017     --
1018     
1019     fields
1020     
1021     --
1022     -- Class    :   Graphic3d_Group
1023     --
1024     -- Purpose  :   Declaration of variables specific to groups
1025     --          of primitives.
1026     --
1027     -- Reminder :   A group is defined in a structure
1028     --          It acts as the smallest editable entity.
1029     
1030         -- the associated C structure 
1031         MyCGroup        :   CGroup from Graphic3d;
1032     
1033         -- the graphic driver used
1034         MyGraphicDriver     :   GraphicDriver from Graphic3d;
1035     
1036         -- the state of the different contexts for primitives
1037         MyCBitFields        :   CBitFields4 from Graphic3d;
1038     
1039         -- the structure contains the group
1040         MyPtrStructure      :   Address from Standard;
1041     
1042         -- the min-max
1043     MyBounds                :       CBounds from Graphic3d;
1044
1045     MyListOfPArray          :   ListOfPArray from Graphic3d;
1046     MyListOfPArrayIterator  :   ListIteratorOfListOfPArray from Graphic3d;
1047
1048     MyMarkArray             :       HArray1OfByte from TColStd;
1049     MyMarkWidth             :       Integer from Standard;
1050     MyMarkHeight            :       Integer from Standard;
1051
1052     friends
1053     
1054         Remove from class Structure from Graphic3d
1055             ( me : mutable; AGroup : Group from Graphic3d )
1056     
1057     end Group;