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
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.
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.
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.
21 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
22 -- the restricted NameOfColor.
24 class Circle from AIS inherits InteractiveObject from AIS
26 ---Purpose: Constructs circle datums to be used in construction of
32 Presentation from Prs3d,
33 PresentationManager3d from PrsMgr,
34 NameOfColor from Quantity,
36 Selection from SelectMgr,
38 Transformation from Geom,
40 KindOfInteractive from AIS
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(theCircle : Circle from Geom;
49 theUStart : Real from Standard;
50 theUEnd : Real from Standard;
51 theIsFilledCircleSens : Boolean from Standard = Standard_False)
52 returns mutable Circle from AIS;
53 ---Purpose: Initializes this algorithm for constructing AIS circle datums.
54 -- Initializes the circle theCircle, the arc
55 -- starting point theUStart, the arc ending point theUEnd,
56 -- and the type of sensitivity theIsFilledCircleSens.
59 aPresentationManager: PresentationManager3d from PrsMgr;
60 aPresentation : mutable Presentation from Prs3d;
61 aMode : Integer from Standard = 0)
62 is redefined static private;
65 aProjector: Projector from Prs3d;
66 aPresentation: mutable Presentation from Prs3d)
67 is redefined static private;
70 aProjector : Projector from Prs3d;
71 aTrsf : Transformation from Geom;
72 aPresentation : mutable Presentation from Prs3d)
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 !!!
82 -- Methods from SelectableObject
84 ComputeSelection(me : mutable;
85 aSelection : mutable Selection from SelectMgr;
86 aMode : Integer from Standard)is private;
89 -- Methods from InteractiveObject
92 Signature(me) returns Integer from Standard is redefined;
94 ---Purpose: Returns index 6 by default.
96 Type(me) returns KindOfInteractive from AIS is redefined;
98 ---Purpose: Indicates that the type of Interactive Object is a datum.
100 Circle(me) returns any Circle from Geom;
102 ---C++: return const &
103 ---Purpose: Returns the circle component defined in SetCircle.
105 Parameters(me; u1,u2 : in out Real from Standard);
108 -- Constructs instances of the starting point and the end
109 -- point parameters, u1 and u2.
111 SetCircle(me:mutable;aCircle : Circle from Geom);
113 ---Purpose: Allows you to provide settings for the circle datum aCircle.
115 SetFirstParam(me:mutable;u:Real);
117 ---Purpose: Allows you to set the parameter u for the starting point of an arc.
119 SetLastParam(me:mutable;u:Real);
121 ---Purpose: Allows you to provide the parameter u for the end point of an arc.
123 SetColor(me :mutable; aColor : NameOfColor from Quantity)
125 --- Purpose: Assigns the color aColor to the solid line boundary of the circle datum.
126 SetColor(me :mutable; aColor : Color from Quantity)
129 SetWidth(me:mutable; aValue:Real from Standard)
131 ---Purpose: Assigns the width aValue to the solid line boundary of the circle datum.
132 UnsetColor(me:mutable)
134 ---Purpose: Removes color from the solid line boundary of the circle datum.
135 UnsetWidth(me:mutable)
137 ---Purpose: Removes width settings from the solid line boundary of the circle datum.
139 IsFilledCircleSens (me) returns Boolean from Standard;
141 ---Purpose: Returns the type of sensitivity for the circle;
143 SetFilledCircleSens (me: mutable;
144 theIsFilledCircleSens : Boolean from Standard);
146 ---Purpose: Sets the type of sensitivity for the circle. If theIsFilledCircleSens set to Standard_True
147 -- then the whole circle will be detectable, otherwise only the boundary of the circle.
149 ComputeCircle(me: mutable;
150 aPresentation : mutable Presentation from Prs3d)
153 ComputeArc(me: mutable;
154 aPresentation : mutable Presentation from Prs3d)
157 ComputeCircleSelection(me: mutable;
158 aSelection : mutable Selection from SelectMgr)
161 ComputeArcSelection(me: mutable;
162 aSelection : mutable Selection from SelectMgr)
167 myComponent : Circle from Geom;
168 myUStart : Real from Standard;
169 myUEnd : Real from Standard;
170 myCircleIsArc : Boolean from Standard;
171 myIsFilledCircleSens : Boolean from Standard;