0024157: Parallelization of assembly part of BO
[occt.git] / src / Select3D / Select3D_SensitiveCircle.cdl
CommitLineData
b311480e 1-- Created on: 1996-02-06
2-- Created by: Robert COUBLANC
3-- Copyright (c) 1996-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
22
23
24class SensitiveCircle from Select3D
25inherits SensitivePoly from Select3D
26
27 ---Purpose: A framework to define sensitive 3D arcs and circles.
ceae62f0
A
28 -- In some cases this class can raise Standard_ConstructionError and
29 -- Standard_OutOfRange exceptions. For more details see Select3D_SensitivePoly.
7fd59977 30uses
31 Pnt from gp,
32 Pnt2d from gp,
33 Projector from Select3D,
34 Lin from gp,
35 EntityOwner from SelectBasics,
36 ListOfBox2d from SelectBasics,
4269bd1b 37 PickArgs from SelectBasics,
7fd59977 38 Circle from Geom,
39 Array1OfPnt from TColgp,
40 HArray1OfPnt from TColgp,
41 Array1OfPnt2d from TColgp,
42 Box2d from Bnd,
329843e2
A
43 Location from TopLoc,
44 Pnt from Select3D,
45 Pnt2d from Select3D,
ac04d101
SA
46 Projector from Select3D,
47 SensitiveEntity from Select3D,
48 Circle from Geom
7fd59977 49
ceae62f0
A
50raises
51 ConstructionError from Standard,
52 OutOfRange from Standard
53
7fd59977 54is
55 Create (OwnerId : EntityOwner from SelectBasics;
56 TheCircle : Circle from Geom;
57 FilledCircle : Boolean = Standard_False;
58 NbOfPoints : Integer = 6)
59 returns mutable SensitiveCircle;
60 ---Level: Public
61 ---Purpose: Constructs the sensitive circle object defined by the
62 -- owner OwnerId, the circle Circle, the Boolean
63 -- FilledCircle and the number of points NbOfPoints.
64
65 Create (OwnerId : EntityOwner from SelectBasics;
66 TheCircle : Circle from Geom;
67 u1 : Real ;
68 u2 : Real;
69 FilledCircle : Boolean = Standard_False;
70 NbOfPoints : Integer = 6)
71 returns mutable SensitiveCircle;
72 ---Level: Public
73 ---Purpose: Constructs the sensitive arc object defined by the
74 -- owner OwnerId, the circle Circle, the parameters u1
75 -- and u2, the Boolean FilledCircle and the number of points NbOfPoints.
76 -- u1 and u2 define the first and last points of the arc on Circle.
77
78 Create(OwnerId : EntityOwner from SelectBasics;
79 apolyg3d : HArray1OfPnt from TColgp;
80 FilledCircle : Boolean from Standard = Standard_False)
81 returns mutable SensitiveCircle;
82 ---Level: Internal
83 ---Purpose: Constructs the sensitive circle object defined by the
84 -- owner OwnerId, the array of triangles apolyg3d, and the Boolean FilledCircle.
85 -- apolyg3d is an array of consecutive triangles on the
86 -- circle. The triangle i+1 lies on the intersection of the
329843e2
A
87 -- tangents to the circle of i and i+2. Note, that the first point of apolyg3d
88 -- must be equal to the last point of apolyg3d.
7fd59977 89
90 Create(OwnerId : EntityOwner from SelectBasics;
91 apolyg3d : Array1OfPnt from TColgp;
92 FilledCircle : Boolean from Standard = Standard_False)
93 returns mutable SensitiveCircle;
94 ---Purpose: Constructs the sensitive circle object defined by the
ac04d101 95 -- owner OwnerId, the array of points apolyg3d, and the Boolean FilledCircle.
329843e2
A
96 -- If the length of apolyg3d is more then 1, the first point of apolyg3d
97 -- must be equal to the last point of apolyg3d.
7fd59977 98
4269bd1b 99 Matches (me : mutable;
100 thePickArgs : PickArgs from SelectBasics;
101 theMatchDMin, theMatchDepth : out Real from Standard)
102 returns Boolean is redefined static;
103 ---Level: Public
104 ---Purpose: Checks whether the sensitive entity matches the picking
105 -- detection area (close to the picking line).
106 -- For details please refer to base class declaration.
7fd59977 107
108 Matches (me :mutable;
109 XMin,YMin,XMax,YMax : Real from Standard;
110 aTol: Real from Standard)
111 returns Boolean
112 is redefined static;
113
114 Matches (me :mutable;
115 Polyline:Array1OfPnt2d from TColgp;
116 aBox:Box2d from Bnd;
117 aTol: Real from Standard)
118 returns Boolean
119 is redefined virtual;
120 ---Level: Public
121
122
4269bd1b 123 ComputeDepth (me;
124 thePickLine : Lin from gp;
125 theDetectedIndex : Integer from Standard)
126 returns Real from Standard;
127 ---Level: Public
128 ---Purpose: Compute depth of sensitive circle for the detected sub-part.
129 -- @param thePickLine [in] the picking line.
130 -- @param theDetectedIndex [in] index of the detected sub-part.
131 -- @return depth on the picking line.
132
7fd59977 133 ArrayBounds(me;Low,Up:in out Integer);
134
135 GetPoint3d(me;rank:Integer) returns Pnt from gp;
136 ---Level: Internal
137
ac04d101
SA
138 Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual;
139
140 GetConnected(me: mutable; theLocation : Location from TopLoc)
141 returns SensitiveEntity from Select3D
142 is redefined virtual;
143 ---Level: Public
144 ---Purpose: Returns the copy of this.
7fd59977 145
329843e2
A
146 Project(me: mutable;aProjector: Projector from Select3D) is redefined virtual;
147
ceae62f0 148 ComputeCenter3D(me: mutable) is private;
329843e2
A
149 ---Level: Internal
150 ---Purpose: Computes myCenter3D as the barycenter of points from mypolyg3d
151
7fd59977 152fields
153
154 myFillStatus : Boolean;
329843e2
A
155 myCenter2D : Pnt2d from Select3D; -- used for Matches()
156 myCenter3D : Pnt from Select3D; -- used for Matches()
ac04d101
SA
157 myCircle : Circle from Geom;
158 mystart : Real from Standard; -- used for GetConnected()
159 myend : Real from Standard; -- used for GetConnected()
7fd59977 160
161end SensitiveCircle;
162