b311480e |
1 | -- Created on: 1997-01-21 |
2 | -- Created by: Prestataire Christiane ARMAND |
3 | -- Copyright (c) 1997-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead |
22 | -- the restricted NameOfColor. |
7fd59977 |
23 | |
24 | class Circle from AIS inherits InteractiveObject from AIS |
25 | |
26 | ---Purpose: Constructs circle datums to be used in construction of |
27 | -- composite shapes. |
28 | |
29 | uses |
30 | Circle from Geom, |
31 | Point from Geom, |
32 | Presentation from Prs3d, |
33 | PresentationManager3d from PrsMgr, |
34 | NameOfColor from Quantity, |
35 | Color from Quantity, |
36 | Selection from SelectMgr, |
37 | Projector from Prs3d, |
38 | Transformation from Geom, |
7fd59977 |
39 | Line from AIS, |
40 | KindOfInteractive from AIS |
41 | |
42 | |
43 | is |
44 | Create(aCircle : Circle from Geom) |
45 | returns mutable Circle from AIS; |
46 | ---Purpose: Initializes this algorithm for constructing AIS circle |
47 | -- datums initializes the circle aCircle |
48 | Create(aCircle : Circle from Geom; |
49 | aUStart : Real from Standard; |
50 | aUEnd : Real from Standard; |
51 | aSens : Boolean from Standard = Standard_True) |
52 | returns mutable Circle from AIS; |
53 | ---Purpose: Initializes this algorithm for constructing AIS circle datums. |
54 | -- Initializes the circle aCircle, the arc |
55 | -- starting point UStart, the arc ending point UEnd, |
56 | -- and the direction aSens. |
57 | |
58 | Compute(me : mutable; |
59 | aPresentationManager: PresentationManager3d from PrsMgr; |
60 | aPresentation : mutable Presentation from Prs3d; |
61 | aMode : Integer from Standard = 0) |
62 | is redefined static private; |
63 | |
64 | Compute(me:mutable; |
65 | aProjector: Projector from Prs3d; |
66 | aPresentation: mutable Presentation from Prs3d) |
67 | is redefined static private; |
68 | |
7fd59977 |
69 | Compute(me : mutable; |
70 | aProjector : Projector from Prs3d; |
71 | aTrsf : Transformation from Geom; |
72 | aPresentation : mutable Presentation from Prs3d) |
73 | is redefined; |
74 | ---Purpose: computes the presentation according to a point of view |
75 | -- given by <aProjector>. |
76 | -- To be Used when the associated degenerated Presentations |
77 | -- have been transformed by <aTrsf> which is not a Pure |
78 | -- Translation. The HLR Prs can't be deducted automatically |
79 | -- WARNING :<aTrsf> must be applied |
80 | -- to the object to display before computation !!! |
81 | |
82 | -- Methods from SelectableObject |
83 | |
84 | ComputeSelection(me : mutable; |
85 | aSelection : mutable Selection from SelectMgr; |
86 | aMode : Integer from Standard)is private; |
87 | |
88 | |
89 | -- Methods from InteractiveObject |
90 | |
91 | |
92 | Signature(me) returns Integer from Standard is redefined; |
93 | ---C++: inline |
94 | ---Purpose: Returns index 6 by default. |
95 | |
96 | Type(me) returns KindOfInteractive from AIS is redefined; |
97 | ---C++: inline |
98 | ---Purpose: Indicates that the type of Interactive Object is a datum. |
99 | |
100 | Circle(me) returns any Circle from Geom; |
101 | ---C++: inline |
102 | ---C++: return const & |
103 | ---Purpose: Returns the circle component defined in SetCircle. |
104 | |
105 | Parameters(me; u1,u2 : in out Real from Standard); |
106 | ---C++: inline |
107 | ---Purpose: |
108 | -- Constructs instances of the starting point and the end |
109 | -- point parameters, u1 and u2. |
110 | |
111 | SetCircle(me:mutable;aCircle : Circle from Geom); |
112 | ---C++: inline |
113 | ---Purpose: Allows you to provide settings for the circle datum aCircle. |
114 | |
115 | SetFirstParam(me:mutable;u:Real); |
116 | ---C++: inline |
117 | ---Purpose: Allows you to set the parameter u for the starting point of an arc. |
118 | |
119 | SetLastParam(me:mutable;u:Real); |
120 | ---C++: inline |
121 | ---Purpose: Allows you to provide the parameter u for the end point of an arc. |
122 | |
123 | SetColor(me :mutable; aColor : NameOfColor from Quantity) |
124 | is redefined static; |
125 | --- Purpose: Assigns the color aColor to the solid line boundary of the circle datum. |
126 | SetColor(me :mutable; aColor : Color from Quantity) |
127 | is redefined static; |
128 | |
129 | SetWidth(me:mutable; aValue:Real from Standard) |
130 | is redefined static; |
131 | ---Purpose: Assigns the width aValue to the solid line boundary of the circle datum. |
132 | UnsetColor(me:mutable) |
133 | is redefined static; |
134 | ---Purpose: Removes color from the solid line boundary of the circle datum. |
135 | UnsetWidth(me:mutable) |
136 | is redefined static; |
137 | ---Purpose: Removes width settings from the solid line boundary of the circle datum. |
138 | |
139 | |
140 | ComputeCircle(me: mutable; |
141 | aPresentation : mutable Presentation from Prs3d) |
142 | is private; |
143 | |
144 | ComputeArc(me: mutable; |
145 | aPresentation : mutable Presentation from Prs3d) |
146 | is private; |
147 | |
148 | ComputeCircleSelection(me: mutable; |
149 | aSelection : mutable Selection from SelectMgr) |
150 | is private; |
151 | |
152 | ComputeArcSelection(me: mutable; |
153 | aSelection : mutable Selection from SelectMgr) |
154 | is private; |
155 | |
156 | fields |
157 | |
158 | myComponent : Circle from Geom; |
159 | myUStart : Real from Standard; |
160 | myUEnd : Real from Standard; |
161 | myCircleIsArc : Boolean from Standard; |
162 | mySens : Boolean from Standard; |
163 | |
164 | end Circle ; |