1 -- File: Select3D_SensitiveCircle.cdl
2 -- Created: Tue Feb 6 11:35:02 1996
3 -- Author: Robert COUBLANC
5 ---Copyright: Matra Datavision 1996
9 class SensitiveCircle from Select3D
10 inherits SensitivePoly from Select3D
12 ---Purpose: A framework to define sensitive 3D arcs and circles.
16 Projector from Select3D,
18 EntityOwner from SelectBasics,
19 ListOfBox2d from SelectBasics,
21 Array1OfPnt from TColgp,
22 HArray1OfPnt from TColgp,
23 Array1OfPnt2d from TColgp,
28 Projector from Select3D,
29 SensitiveEntity from Select3D,
33 Create (OwnerId : EntityOwner from SelectBasics;
34 TheCircle : Circle from Geom;
35 FilledCircle : Boolean = Standard_False;
36 NbOfPoints : Integer = 6)
37 returns mutable SensitiveCircle;
39 ---Purpose: Constructs the sensitive circle object defined by the
40 -- owner OwnerId, the circle Circle, the Boolean
41 -- FilledCircle and the number of points NbOfPoints.
43 Create (OwnerId : EntityOwner from SelectBasics;
44 TheCircle : Circle from Geom;
47 FilledCircle : Boolean = Standard_False;
48 NbOfPoints : Integer = 6)
49 returns mutable SensitiveCircle;
51 ---Purpose: Constructs the sensitive arc object defined by the
52 -- owner OwnerId, the circle Circle, the parameters u1
53 -- and u2, the Boolean FilledCircle and the number of points NbOfPoints.
54 -- u1 and u2 define the first and last points of the arc on Circle.
56 Create(OwnerId : EntityOwner from SelectBasics;
57 apolyg3d : HArray1OfPnt from TColgp;
58 FilledCircle : Boolean from Standard = Standard_False)
59 returns mutable SensitiveCircle;
61 ---Purpose: Constructs the sensitive circle object defined by the
62 -- owner OwnerId, the array of triangles apolyg3d, and the Boolean FilledCircle.
63 -- apolyg3d is an array of consecutive triangles on the
64 -- circle. The triangle i+1 lies on the intersection of the
65 -- tangents to the circle of i and i+2. Note, that the first point of apolyg3d
66 -- must be equal to the last point of apolyg3d.
68 Create(OwnerId : EntityOwner from SelectBasics;
69 apolyg3d : Array1OfPnt from TColgp;
70 FilledCircle : Boolean from Standard = Standard_False)
71 returns mutable SensitiveCircle;
72 ---Purpose: Constructs the sensitive circle object defined by the
73 -- owner OwnerId, the array of points apolyg3d, and the Boolean FilledCircle.
74 -- If the length of apolyg3d is more then 1, the first point of apolyg3d
75 -- must be equal to the last point of apolyg3d.
78 X,Y : Real from Standard;
79 aTol: Real from Standard;
80 DMin: out Real from Standard)
85 XMin,YMin,XMax,YMax : Real from Standard;
86 aTol: Real from Standard)
91 Polyline:Array1OfPnt2d from TColgp;
93 aTol: Real from Standard)
99 ComputeDepth(me;EyeLine: Lin from gp)
100 returns Real from Standard is redefined static;
102 ArrayBounds(me;Low,Up:in out Integer);
104 GetPoint3d(me;rank:Integer) returns Pnt from gp;
107 Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual;
109 GetConnected(me: mutable; theLocation : Location from TopLoc)
110 returns SensitiveEntity from Select3D
111 is redefined virtual;
113 ---Purpose: Returns the copy of this.
115 Project(me: mutable;aProjector: Projector from Select3D) is redefined virtual;
117 ComputeCenter3D(me: mutable);
119 ---Purpose: Computes myCenter3D as the barycenter of points from mypolyg3d
123 myFillStatus : Boolean;
124 myDetectedIndex : Integer from Standard; -- used for depth...
125 myCenter2D : Pnt2d from Select3D; -- used for Matches()
126 myCenter3D : Pnt from Select3D; -- used for Matches()
127 myCircle : Circle from Geom;
128 mystart : Real from Standard; -- used for GetConnected()
129 myend : Real from Standard; -- used for GetConnected()