a6eb515f |
1 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
2 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
a6eb515f |
3 | -- |
973c2be1 |
4 | -- This file is part of Open CASCADE Technology software library. |
a6eb515f |
5 | -- |
d5f74e42 |
6 | -- This library is free software; you can redistribute it and/or modify it under |
7 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | -- by the Free Software Foundation, with special exception defined in the file |
9 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | -- distribution for complete text of the license and disclaimer of any warranty. |
a6eb515f |
11 | -- |
973c2be1 |
12 | -- Alternatively, this file may be used under the terms of Open CASCADE |
13 | -- commercial license or contractual agreement. |
a6eb515f |
14 | |
15 | class DimensionAspect from Prs3d inherits BasicAspect from Prs3d |
16 | |
60bf98ae |
17 | ---Purpose: defines the attributes when drawing a Length Presentation. |
18 | |
19 | uses |
d7bffd44 |
20 | DimensionTextHorizontalPosition from Prs3d, |
21 | DimensionTextVerticalPosition from Prs3d, |
a6eb515f |
22 | DimensionArrowOrientation from Prs3d, |
23 | AspectLine3d from Graphic3d, |
24 | ArrowAspect from Prs3d, |
25 | LineAspect from Prs3d, |
26 | TextAspect from Prs3d, |
27 | NameOfColor from Quantity, |
28 | Color from Quantity, |
29 | TypeOfLine from Aspect, |
30 | PlaneAngle from Quantity, |
60bf98ae |
31 | TypeOfLine from Aspect, |
32 | AsciiString from TCollection |
a6eb515f |
33 | is |
34 | |
6e33d3ce |
35 | Create returns DimensionAspect from Prs3d; |
a6eb515f |
36 | --- Purpose: Constructs an empty framework to define the display of dimensions. |
37 | |
6e33d3ce |
38 | LineAspect(me) returns LineAspect from Prs3d; |
a6eb515f |
39 | ---Purpose: Returns the settings for the display of lines used in presentation of dimensions. |
40 | |
41 | SetLineAspect(me: mutable; theAspect: LineAspect from Prs3d); |
42 | ---Purpose: Sets the display attributes of lines used in presentation of dimensions. |
43 | |
6e33d3ce |
44 | TextAspect(me) returns TextAspect from Prs3d is static; |
a6eb515f |
45 | --- Purpose: Returns the settings for the display of text used in presentation of dimensions. |
46 | |
47 | SetTextAspect(me:mutable; theAspect: TextAspect from Prs3d) is static; |
48 | ---Purpose: Sets the display attributes of text used in presentation of dimensions. |
49 | |
50 | IsText3d(me) returns Boolean from Standard; |
51 | --- Purpose: Check if text for dimension label is 3d. |
52 | |
53 | MakeText3d (me:mutable; isText3d: Boolean from Standard); |
54 | ---Purpose: Sets type of text. |
55 | |
56 | IsTextShaded (me) returns Boolean from Standard; |
57 | --- Purpose: Check if 3d text for dimension label is shaded. |
58 | |
59 | MakeTextShaded (me: mutable; isTextShaded: Boolean from Standard); |
60 | --- Purpose: Turns on/off text shading for 3d text. |
61 | |
62 | IsArrows3d(me) returns Boolean from Standard; |
63 | --- Purpose: Gets type of arrows. |
64 | |
60bf98ae |
65 | MakeArrows3d (me : mutable; isArrows3d: Boolean from Standard); |
66 | ---Purpose: Sets type of arrows. |
67 | |
68 | IsUnitsDisplayed (me) returns Boolean from Standard; |
69 | ---Purpose: Shows if Units are to be displayed along with dimension value. |
70 | |
71 | MakeUnitsDisplayed (me : mutable; theIsDisplayed : Boolean from Standard); |
72 | ---Purpose: Specifies whether the units string should be displayed |
73 | -- along with value label or not. |
a6eb515f |
74 | |
75 | SetArrowOrientation(me: mutable; theArrowOrient: DimensionArrowOrientation from Prs3d); |
76 | --- Purpose: Sets orientation of arrows (external or internal). |
77 | -- By default orientation is chosen automatically according to situation and text label size. |
78 | |
d7bffd44 |
79 | ArrowOrientation (me) returns DimensionArrowOrientation from Prs3d; |
a6eb515f |
80 | --- Purpose: Gets orientation of arrows (external or internal). |
81 | |
d7bffd44 |
82 | SetTextVerticalPosition (me: mutable; thePosition : DimensionTextVerticalPosition from Prs3d); |
a6eb515f |
83 | --- Purpose: Sets vertical text alignment for text label. |
84 | |
d7bffd44 |
85 | TextVerticalPosition (me) returns DimensionTextVerticalPosition from Prs3d; |
a6eb515f |
86 | --- Purpose: Gets vertical text alignment for text label. |
87 | |
d7bffd44 |
88 | SetTextHorizontalPosition (me: mutable; thePosition: DimensionTextHorizontalPosition from Prs3d); |
a6eb515f |
89 | --- Purpose: Sets horizontal text alignment for text label. |
90 | |
d7bffd44 |
91 | TextHorizontalPosition (me) returns DimensionTextHorizontalPosition from Prs3d; |
a6eb515f |
92 | --- Purpose: Gets horizontal text alignment for text label. |
93 | |
6e33d3ce |
94 | ArrowAspect(me) returns ArrowAspect from Prs3d is static; |
a6eb515f |
95 | --- Purpose: Returns the settings for displaying arrows. |
96 | |
97 | SetArrowAspect(me: mutable; theAspect: ArrowAspect from Prs3d) is static; |
98 | ---Purpose: Sets the display attributes of arrows used in presentation of dimensions. |
99 | |
100 | SetCommonColor(me:mutable; theColor: Color from Quantity) is static; |
101 | ---Purpose: Sets the same color for all parts of dimension: lines, arrows and text. |
102 | |
60bf98ae |
103 | SetExtensionSize (me : mutable; theSize : Real from Standard); |
d7bffd44 |
104 | ---Purpose: Sets extension size. |
105 | |
106 | ExtensionSize (me) returns Real from Standard; |
107 | ---Purpose: Returns extension size. |
108 | |
af203d54 |
109 | SetArrowTailSize (me : mutable; theSize : Real from Standard); |
110 | ---Purpose: Set size for arrow tail (extension without text). |
111 | |
112 | ArrowTailSize (me) returns Real from Standard; |
113 | ---Purpose: Returns arrow tail size. |
114 | |
60bf98ae |
115 | SetValueStringFormat (me : mutable; theFormat : AsciiString from TCollection); |
116 | ---Purpose: Sets "sprintf"-syntax format for formatting dimension value labels. |
117 | |
118 | ValueStringFormat (me) returns AsciiString from TCollection; |
119 | ---Purpose: Returns format. |
120 | |
a6eb515f |
121 | fields |
122 | |
60bf98ae |
123 | myLineAspect : LineAspect from Prs3d; |
a6eb515f |
124 | ---Purpose: Text style. The size for 3d (or 2d) text is also inside here. |
d7bffd44 |
125 | |
a6eb515f |
126 | myTextAspect: TextAspect from Prs3d; |
127 | myArrowAspect : ArrowAspect from Prs3d; |
128 | myIsText3d : Boolean from Standard; |
129 | myIsTextShaded : Boolean from Standard; |
130 | myIsArrows3d: Boolean from Standard; |
d7bffd44 |
131 | |
a6eb515f |
132 | myArrowOrientation : DimensionArrowOrientation from Prs3d; |
d7bffd44 |
133 | ---Purpose: Dimension arrow orientation. |
a6eb515f |
134 | -- By default, it is computed automatically. Its value depends on the text |
135 | -- bouning rectangle size and distance between two flyouts. |
d7bffd44 |
136 | -- By default, it is "fit" one. |
137 | |
138 | myTextHPosition : DimensionTextHorizontalPosition from Prs3d; |
139 | ---Purpose: Defines horizontal position of text value label, by default it is |
140 | -- "fit" - selected automatically depending on label-to-dimension size relation. |
141 | |
142 | myTextVPosition : DimensionTextVerticalPosition from Prs3d; |
143 | ---Purpose: Defines vertical position of text value label, by default it is center. |
144 | |
145 | myExtensionSize : Real from Standard; |
146 | ---Purpose: Size of arrow extensions. |
af203d54 |
147 | -- The length of arrow tail with text if arrows are located outside dimension line. |
148 | |
149 | myArrowTailSize : Real from Standard; |
150 | ---Purpose: Size of arrow tail (extension without text). |
d7bffd44 |
151 | |
60bf98ae |
152 | myValueStringFormat : AsciiString from TCollection; |
153 | ---Purpose: "sprintf"-syntax format for formatting dimension value labels. |
154 | -- Default is "%g". |
155 | |
156 | myToDisplayUnits : Boolean from Standard; |
157 | ---Purpose: Defines if the units need to be displayed. |
158 | -- Default is FALSE. |
159 | |
a6eb515f |
160 | end DimensionAspect from Prs3d; |