a6eb515f |
1 | -- Copyright (c) 1993-1999 Matra Datavision |
2 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
3 | -- |
4 | -- The content of this file is subject to the Open CASCADE Technology Public |
5 | -- License Version 6.5 (the "License"). You may not use the content of this file |
6 | -- except in compliance with the License. Please obtain a copy of the License |
7 | -- at http://www.opencascade.org and read it completely before using this file. |
8 | -- |
9 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
10 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
11 | -- |
12 | -- The Original Code and all software distributed under the License is |
13 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
14 | -- Initial Developer hereby disclaims all such warranties, including without |
15 | -- limitation, any warranties of merchantability, fitness for a particular |
16 | -- purpose or non-infringement. Please see the License for the specific terms |
17 | -- and conditions governing the rights and limitations under the License. |
18 | |
19 | class DimensionAspect from Prs3d inherits BasicAspect from Prs3d |
20 | |
60bf98ae |
21 | ---Purpose: defines the attributes when drawing a Length Presentation. |
22 | |
23 | uses |
d7bffd44 |
24 | DimensionTextHorizontalPosition from Prs3d, |
25 | DimensionTextVerticalPosition from Prs3d, |
a6eb515f |
26 | DimensionArrowOrientation from Prs3d, |
27 | AspectLine3d from Graphic3d, |
28 | ArrowAspect from Prs3d, |
29 | LineAspect from Prs3d, |
30 | TextAspect from Prs3d, |
31 | NameOfColor from Quantity, |
32 | Color from Quantity, |
33 | TypeOfLine from Aspect, |
34 | PlaneAngle from Quantity, |
60bf98ae |
35 | TypeOfLine from Aspect, |
36 | AsciiString from TCollection |
a6eb515f |
37 | is |
38 | |
39 | Create returns mutable DimensionAspect from Prs3d; |
40 | --- Purpose: Constructs an empty framework to define the display of dimensions. |
41 | |
42 | LineAspect(me) returns mutable LineAspect from Prs3d; |
43 | ---Purpose: Returns the settings for the display of lines used in presentation of dimensions. |
44 | |
45 | SetLineAspect(me: mutable; theAspect: LineAspect from Prs3d); |
46 | ---Purpose: Sets the display attributes of lines used in presentation of dimensions. |
47 | |
48 | TextAspect(me) returns mutable TextAspect from Prs3d is static; |
49 | --- Purpose: Returns the settings for the display of text used in presentation of dimensions. |
50 | |
51 | SetTextAspect(me:mutable; theAspect: TextAspect from Prs3d) is static; |
52 | ---Purpose: Sets the display attributes of text used in presentation of dimensions. |
53 | |
54 | IsText3d(me) returns Boolean from Standard; |
55 | --- Purpose: Check if text for dimension label is 3d. |
56 | |
57 | MakeText3d (me:mutable; isText3d: Boolean from Standard); |
58 | ---Purpose: Sets type of text. |
59 | |
60 | IsTextShaded (me) returns Boolean from Standard; |
61 | --- Purpose: Check if 3d text for dimension label is shaded. |
62 | |
63 | MakeTextShaded (me: mutable; isTextShaded: Boolean from Standard); |
64 | --- Purpose: Turns on/off text shading for 3d text. |
65 | |
66 | IsArrows3d(me) returns Boolean from Standard; |
67 | --- Purpose: Gets type of arrows. |
68 | |
60bf98ae |
69 | MakeArrows3d (me : mutable; isArrows3d: Boolean from Standard); |
70 | ---Purpose: Sets type of arrows. |
71 | |
72 | IsUnitsDisplayed (me) returns Boolean from Standard; |
73 | ---Purpose: Shows if Units are to be displayed along with dimension value. |
74 | |
75 | MakeUnitsDisplayed (me : mutable; theIsDisplayed : Boolean from Standard); |
76 | ---Purpose: Specifies whether the units string should be displayed |
77 | -- along with value label or not. |
a6eb515f |
78 | |
79 | SetArrowOrientation(me: mutable; theArrowOrient: DimensionArrowOrientation from Prs3d); |
80 | --- Purpose: Sets orientation of arrows (external or internal). |
81 | -- By default orientation is chosen automatically according to situation and text label size. |
82 | |
d7bffd44 |
83 | ArrowOrientation (me) returns DimensionArrowOrientation from Prs3d; |
a6eb515f |
84 | --- Purpose: Gets orientation of arrows (external or internal). |
85 | |
d7bffd44 |
86 | SetTextVerticalPosition (me: mutable; thePosition : DimensionTextVerticalPosition from Prs3d); |
a6eb515f |
87 | --- Purpose: Sets vertical text alignment for text label. |
88 | |
d7bffd44 |
89 | TextVerticalPosition (me) returns DimensionTextVerticalPosition from Prs3d; |
a6eb515f |
90 | --- Purpose: Gets vertical text alignment for text label. |
91 | |
d7bffd44 |
92 | SetTextHorizontalPosition (me: mutable; thePosition: DimensionTextHorizontalPosition from Prs3d); |
a6eb515f |
93 | --- Purpose: Sets horizontal text alignment for text label. |
94 | |
d7bffd44 |
95 | TextHorizontalPosition (me) returns DimensionTextHorizontalPosition from Prs3d; |
a6eb515f |
96 | --- Purpose: Gets horizontal text alignment for text label. |
97 | |
98 | ArrowAspect(me) returns mutable ArrowAspect from Prs3d is static; |
99 | --- Purpose: Returns the settings for displaying arrows. |
100 | |
101 | SetArrowAspect(me: mutable; theAspect: ArrowAspect from Prs3d) is static; |
102 | ---Purpose: Sets the display attributes of arrows used in presentation of dimensions. |
103 | |
104 | SetCommonColor(me:mutable; theColor: Color from Quantity) is static; |
105 | ---Purpose: Sets the same color for all parts of dimension: lines, arrows and text. |
106 | |
60bf98ae |
107 | SetExtensionSize (me : mutable; theSize : Real from Standard); |
d7bffd44 |
108 | ---Purpose: Sets extension size. |
109 | |
110 | ExtensionSize (me) returns Real from Standard; |
111 | ---Purpose: Returns extension size. |
112 | |
60bf98ae |
113 | SetValueStringFormat (me : mutable; theFormat : AsciiString from TCollection); |
114 | ---Purpose: Sets "sprintf"-syntax format for formatting dimension value labels. |
115 | |
116 | ValueStringFormat (me) returns AsciiString from TCollection; |
117 | ---Purpose: Returns format. |
118 | |
a6eb515f |
119 | fields |
120 | |
60bf98ae |
121 | myLineAspect : LineAspect from Prs3d; |
a6eb515f |
122 | ---Purpose: Text style. The size for 3d (or 2d) text is also inside here. |
d7bffd44 |
123 | |
a6eb515f |
124 | myTextAspect: TextAspect from Prs3d; |
125 | myArrowAspect : ArrowAspect from Prs3d; |
126 | myIsText3d : Boolean from Standard; |
127 | myIsTextShaded : Boolean from Standard; |
128 | myIsArrows3d: Boolean from Standard; |
d7bffd44 |
129 | |
a6eb515f |
130 | myArrowOrientation : DimensionArrowOrientation from Prs3d; |
d7bffd44 |
131 | ---Purpose: Dimension arrow orientation. |
a6eb515f |
132 | -- By default, it is computed automatically. Its value depends on the text |
133 | -- bouning rectangle size and distance between two flyouts. |
d7bffd44 |
134 | -- By default, it is "fit" one. |
135 | |
136 | myTextHPosition : DimensionTextHorizontalPosition from Prs3d; |
137 | ---Purpose: Defines horizontal position of text value label, by default it is |
138 | -- "fit" - selected automatically depending on label-to-dimension size relation. |
139 | |
140 | myTextVPosition : DimensionTextVerticalPosition from Prs3d; |
141 | ---Purpose: Defines vertical position of text value label, by default it is center. |
142 | |
143 | myExtensionSize : Real from Standard; |
144 | ---Purpose: Size of arrow extensions. |
145 | -- The length of arrow tails if arrows are located outside dimension line. |
146 | |
60bf98ae |
147 | myValueStringFormat : AsciiString from TCollection; |
148 | ---Purpose: "sprintf"-syntax format for formatting dimension value labels. |
149 | -- Default is "%g". |
150 | |
151 | myToDisplayUnits : Boolean from Standard; |
152 | ---Purpose: Defines if the units need to be displayed. |
153 | -- Default is FALSE. |
154 | |
a6eb515f |
155 | end DimensionAspect from Prs3d; |