0024133: Development of improvement of dimensions implementation; new length, radius...
[occt.git] / src / Prs3d / Prs3d_DimensionAspect.cdl
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
21         ---Purpose: defines the attributes when drawing a Length Presentation.
22 uses 
23     HorizontalTextAlignment from Prs3d,
24     VerticalTextAlignment from Prs3d,
25     DimensionArrowOrientation from Prs3d,
26     AspectLine3d from Graphic3d,
27     ArrowAspect from Prs3d,
28     LineAspect from Prs3d,
29     TextAspect from Prs3d,
30     NameOfColor from Quantity,
31     Color from Quantity,
32     TypeOfLine from Aspect,
33     PlaneAngle from Quantity,
34     TypeOfLine from Aspect
35 is
36
37     Create returns mutable DimensionAspect from Prs3d;
38       --- Purpose: Constructs an empty framework to define the display of dimensions.  
39
40     LineAspect(me) returns mutable LineAspect from Prs3d;
41       ---Purpose: Returns the settings for the display of lines used in presentation of dimensions.    
42
43     SetLineAspect(me: mutable; theAspect: LineAspect from Prs3d);
44       ---Purpose: Sets the display attributes of lines used in presentation of dimensions.
45
46     TextAspect(me) returns mutable TextAspect from Prs3d is static;
47       --- Purpose: Returns the settings for the display of text used in presentation of dimensions.   
48
49     SetTextAspect(me:mutable; theAspect: TextAspect from Prs3d) is static; 
50       ---Purpose: Sets the display attributes of text used in presentation of dimensions.
51
52     IsText3d(me) returns Boolean from Standard;
53       --- Purpose: Check if text for dimension label is 3d.   
54
55     MakeText3d (me:mutable; isText3d: Boolean from Standard); 
56       ---Purpose: Sets type of text.
57
58     IsTextShaded (me) returns Boolean from Standard;
59     --- Purpose: Check if 3d text for dimension label is shaded.
60
61     MakeTextShaded (me: mutable; isTextShaded: Boolean from Standard);
62     --- Purpose: Turns on/off text shading for 3d text.
63
64     IsArrows3d(me) returns Boolean from Standard;
65       --- Purpose: Gets type of arrows.   
66
67     MakeArrows3d (me:mutable; isArrows3d: Boolean from Standard); 
68       ---Purpose: Sets type of arrows. 
69
70     SetArrowOrientation(me: mutable; theArrowOrient: DimensionArrowOrientation from Prs3d);
71       --- Purpose: Sets orientation of arrows (external or internal).
72       -- By default orientation is chosen automatically according to situation and text label size.   
73
74     GetArrowOrientation (me) returns DimensionArrowOrientation from Prs3d;
75       --- Purpose: Gets orientation of arrows (external or internal).
76
77     SetVerticalTextAlignment(me: mutable; theVertTextAlignment: VerticalTextAlignment from Prs3d);
78       --- Purpose: Sets vertical text alignment for text label.
79
80     VerticalTextAlignment (me) returns VerticalTextAlignment from Prs3d;
81       --- Purpose: Gets vertical text alignment for text label.
82
83     SetHorizontalTextAlignment (me: mutable; theHorTextAlignment: HorizontalTextAlignment from Prs3d);
84       --- Purpose: Sets horizontal text alignment for text label.
85
86     HorizontalTextAlignment (me) returns HorizontalTextAlignment from Prs3d;
87       --- Purpose: Gets horizontal text alignment for text label.
88
89     ArrowAspect(me) returns mutable ArrowAspect from Prs3d is static;
90      --- Purpose: Returns the settings for displaying arrows.   
91
92     SetArrowAspect(me: mutable; theAspect: ArrowAspect from Prs3d) is static;
93      ---Purpose:   Sets the display attributes of arrows used in presentation of dimensions.
94
95     SetCommonColor(me:mutable; theColor: Color from Quantity) is static; 
96       ---Purpose: Sets the same color for all parts of dimension: lines, arrows and text.
97
98 fields
99
100     myLineAspect: LineAspect from Prs3d;
101     ---Purpose: Text style. The size for 3d (or 2d) text is also inside here.
102     myTextAspect: TextAspect from Prs3d;
103     myArrowAspect : ArrowAspect from Prs3d;
104     myIsText3d : Boolean from Standard;
105     myIsTextShaded : Boolean from Standard;
106     myIsArrows3d: Boolean from Standard;
107     myArrowOrientation : DimensionArrowOrientation from Prs3d;
108     ---Purpose: Dimension arrow orientation
109     -- By default, it is computed automatically. Its value depends on the text
110     -- bouning rectangle size and distance between two flyouts.
111     -- By default, it is internal one.
112     myHorTextAlignment: HorizontalTextAlignment from Prs3d;
113     ---Purpose:Horizontal text alignment (Prs3d_HTA_Left/Prs3d_HTA_Right/Prs3d_HTA_Center).
114     -- Defines horizontal position of text value label, by default it is center.
115     myVerTextAlignment: VerticalTextAlignment from Prs3d;
116     ---Purpose: Vertical text alignment (Prs3d_VTA_Top, Prs3d_VTA_Bottom/Prs3d_VTA_Center)
117     -- Defines vertical position of text value lable, by default it is center.
118 end DimensionAspect from Prs3d;