b311480e |
1 | -- Created on: 1993-01-09 |
2 | -- Created by: CKY / Contract Toubro-Larsen ( TCD ) |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
7fd59977 |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
7fd59977 |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class LabelDisplay from IGESDraw inherits LabelDisplayEntity |
18 | |
19 | ---Purpose: defines IGESLabelDisplay, Type <402> Form <5> |
20 | -- in package IGESDraw |
21 | -- |
22 | -- Permits one or more displays for the |
23 | -- entity labels of an entity |
24 | |
25 | uses |
26 | |
27 | IGESEntity from IGESData, |
28 | HArray1OfIGESEntity from IGESData, |
29 | LeaderArrow from IGESDimen, |
30 | HArray1OfLeaderArrow from IGESDimen, |
31 | HArray1OfInteger from TColStd, |
32 | ViewKindEntity from IGESData, |
33 | HArray1OfViewKindEntity from IGESDraw, |
34 | Pnt from gp, |
35 | HArray1OfXYZ from TColgp |
36 | |
37 | raises DimensionMismatch, OutOfRange |
38 | |
39 | is |
40 | |
6e33d3ce |
41 | Create returns LabelDisplay; |
7fd59977 |
42 | |
43 | -- Specific Methods pertaining to the class |
44 | |
45 | Init (me : mutable; |
46 | allViews : HArray1OfViewKindEntity; |
47 | allTextLocations : HArray1OfXYZ; |
48 | allLeaderEntities : HArray1OfLeaderArrow; |
49 | allLabelLevels : HArray1OfInteger; |
50 | allDisplayedEntities : HArray1OfIGESEntity) |
51 | raises DimensionMismatch; |
52 | ---Purpose : This method is used to set the fields of the class |
53 | -- LabelDisplay |
54 | -- - allViews : Pointers to View Entities |
55 | -- - allTextLocations : Coordinates of text locations in the views |
56 | -- - allLeaderEntities : Pointers to Leader Entities in the views |
57 | -- - allLabelLevels : Entity label level numbers in the views |
58 | -- - allDisplayedEntities : Pointers to the entities being displayed |
59 | -- raises exception if Lengths of allViews, allTextLocations, |
60 | -- allLeaderEntities, allLabelLevels and allDisplayedEntities are |
61 | -- not same. |
62 | |
63 | NbLabels (me) returns Integer; |
64 | ---Purpose : returns the number of label placements in <me> |
65 | |
66 | ViewItem (me; ViewIndex : Integer) returns ViewKindEntity |
67 | raises OutOfRange; |
68 | ---Purpose : returns the View entity indicated by ViewIndex |
69 | -- raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
70 | |
71 | TextLocation (me; ViewIndex : Integer) returns Pnt |
72 | raises OutOfRange; |
73 | ---Purpose : returns the 3d-Point coordinates of the text location, in the |
74 | -- view indicated by ViewIndex |
75 | -- raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
76 | |
77 | LeaderEntity (me; ViewIndex : Integer) returns LeaderArrow |
78 | raises OutOfRange; |
79 | ---Purpose : returns the Leader entity in the view indicated by ViewIndex |
80 | -- raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
81 | |
82 | LabelLevel (me; ViewIndex : Integer) returns Integer |
83 | raises OutOfRange; |
84 | ---Purpose : returns the Entity label level number in the view indicated |
85 | -- by ViewIndex |
86 | -- raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
87 | |
88 | DisplayedEntity (me; EntityIndex : Integer) returns IGESEntity |
89 | raises OutOfRange; |
90 | ---Purpose : returns the entity indicated by EntityIndex |
91 | -- raises an exception if EntityIndex <= 0 or EntityIndex > NbLabels(). |
92 | |
93 | TransformedTextLocation (me; ViewIndex : Integer) returns Pnt |
94 | raises OutOfRange; |
95 | ---Purpose : returns the transformed 3d-Point coordinates of the text |
96 | -- location, in the view indicated by ViewIndex |
97 | -- raises an exception if ViewIndex <= 0 or ViewIndex > NbLabels(). |
98 | |
99 | fields |
100 | |
101 | -- |
102 | -- Class : IGESDraw_LabelDisplay |
103 | -- |
104 | -- Purpose : Declaration of the variables specific to a Label Display. |
105 | -- |
106 | -- Reminder : A Label Display is defined by : |
107 | -- - Pointers to View Entities |
108 | -- - Coordinates of text locations in the views |
109 | -- - Pointers to Leader Entities in the views |
110 | -- - Entity label level numbers in the views |
111 | -- - Pointers to the entities being displayed |
112 | -- |
113 | |
114 | theViews : HArray1OfViewKindEntity; |
115 | |
116 | theTextLocations : HArray1OfXYZ; |
117 | |
118 | theLeaderEntities : HArray1OfLeaderArrow; |
119 | |
120 | theLabelLevels : HArray1OfInteger; |
121 | |
122 | theDisplayedEntities : HArray1OfIGESEntity; |
123 | |
124 | end LabelDisplay; |