1 -- Created on: 1997-01-21
2 -- Created by: Prestataire Christiane ARMAND
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Circle from AIS inherits InteractiveObject from AIS
19 ---Purpose: Constructs circle datums to be used in construction of
25 Presentation from Prs3d,
26 PresentationManager3d from PrsMgr,
27 NameOfColor from Quantity,
29 Selection from SelectMgr,
31 Transformation from Geom,
33 KindOfInteractive from AIS
37 Create(aCircle : Circle from Geom)
38 returns Circle from AIS;
39 ---Purpose: Initializes this algorithm for constructing AIS circle
40 -- datums initializes the circle aCircle
41 Create(theCircle : Circle from Geom;
42 theUStart : Real from Standard;
43 theUEnd : Real from Standard;
44 theIsFilledCircleSens : Boolean from Standard = Standard_False)
45 returns Circle from AIS;
46 ---Purpose: Initializes this algorithm for constructing AIS circle datums.
47 -- Initializes the circle theCircle, the arc
48 -- starting point theUStart, the arc ending point theUEnd,
49 -- and the type of sensitivity theIsFilledCircleSens.
52 aPresentationManager: PresentationManager3d from PrsMgr;
53 aPresentation : Presentation from Prs3d;
54 aMode : Integer from Standard = 0)
55 is redefined static private;
58 aProjector: Projector from Prs3d;
59 aPresentation: Presentation from Prs3d)
60 is redefined static private;
63 aProjector : Projector from Prs3d;
64 aTrsf : Transformation from Geom;
65 aPresentation : Presentation from Prs3d)
67 ---Purpose: computes the presentation according to a point of view
68 -- given by <aProjector>.
69 -- To be Used when the associated degenerated Presentations
70 -- have been transformed by <aTrsf> which is not a Pure
71 -- Translation. The HLR Prs can't be deducted automatically
72 -- WARNING :<aTrsf> must be applied
73 -- to the object to display before computation !!!
75 -- Methods from SelectableObject
77 ComputeSelection(me : mutable;
78 aSelection : Selection from SelectMgr;
79 aMode : Integer from Standard)is private;
82 -- Methods from InteractiveObject
85 Signature(me) returns Integer from Standard is redefined;
87 ---Purpose: Returns index 6 by default.
89 Type(me) returns KindOfInteractive from AIS is redefined;
91 ---Purpose: Indicates that the type of Interactive Object is a datum.
93 Circle(me) returns any Circle from Geom;
95 ---C++: return const &
96 ---Purpose: Returns the circle component defined in SetCircle.
98 Parameters(me; u1,u2 : in out Real from Standard);
101 -- Constructs instances of the starting point and the end
102 -- point parameters, u1 and u2.
104 SetCircle(me:mutable;aCircle : Circle from Geom);
106 ---Purpose: Allows you to provide settings for the circle datum aCircle.
108 SetFirstParam(me:mutable;u:Real);
110 ---Purpose: Allows you to set the parameter u for the starting point of an arc.
112 SetLastParam(me:mutable;u:Real);
114 ---Purpose: Allows you to provide the parameter u for the end point of an arc.
116 SetColor(me :mutable; aColor : NameOfColor from Quantity)
118 --- Purpose: Assigns the color aColor to the solid line boundary of the circle datum.
119 SetColor(me :mutable; aColor : Color from Quantity)
122 SetWidth(me:mutable; aValue:Real from Standard)
124 ---Purpose: Assigns the width aValue to the solid line boundary of the circle datum.
125 UnsetColor(me:mutable)
127 ---Purpose: Removes color from the solid line boundary of the circle datum.
128 UnsetWidth(me:mutable)
130 ---Purpose: Removes width settings from the solid line boundary of the circle datum.
132 IsFilledCircleSens (me) returns Boolean from Standard;
134 ---Purpose: Returns the type of sensitivity for the circle;
136 SetFilledCircleSens (me: mutable;
137 theIsFilledCircleSens : Boolean from Standard);
139 ---Purpose: Sets the type of sensitivity for the circle. If theIsFilledCircleSens set to Standard_True
140 -- then the whole circle will be detectable, otherwise only the boundary of the circle.
142 ComputeCircle(me: mutable;
143 aPresentation : Presentation from Prs3d)
146 ComputeArc(me: mutable;
147 aPresentation : Presentation from Prs3d)
150 ComputeCircleSelection(me: mutable;
151 aSelection : Selection from SelectMgr)
154 ComputeArcSelection(me: mutable;
155 aSelection : Selection from SelectMgr)
160 myComponent : Circle from Geom;
161 myUStart : Real from Standard;
162 myUEnd : Real from Standard;
163 myCircleIsArc : Boolean from Standard;
164 myIsFilledCircleSens : Boolean from Standard;