64c3fa3fd475ea6d735c63fffd9b0b9eee7363a7
[occt.git] / src / Select3D / Select3D_SensitiveWire.cdl
1 -- Created on: 1996-10-17
2 -- Created by: Odile OLIVIER
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
21
22
23 class SensitiveWire   from Select3D 
24 inherits SensitiveEntity from Select3D
25
26         ---Purpose: A framework to define selection of a wire owner by an
27         -- elastic wire band.
28
29 uses
30     Pnt                      from gp,
31     Projector                from Select3D,
32     Lin                      from gp,
33     EntityOwner              from SelectBasics,
34     SensitiveEntity          from Select3D,
35     SensitiveEntitySequence  from Select3D,
36     ListOfBox2d              from SelectBasics,
37     Array1OfPnt2d            from TColgp,
38     Box2d                    from Bnd,
39     Location                 from TopLoc
40
41 is
42
43
44     Create (OwnerId      : EntityOwner from SelectBasics;
45             MaxRect      : Integer = 1)
46      returns mutable SensitiveWire;
47         ---Purpose: Constructs a sensitive wire object defined by the
48         -- owner OwnerId, and the maximum number of
49         -- sensitive rectangles MaxRect.
50     Add (me   :mutable;aSensitive : SensitiveEntity from Select3D)
51     is static;
52         ---Purpose: Adds the sensitive entity aSensitive to this framework.
53     Project (me:mutable;aProjector : Projector from Select3D) 
54     is redefined static;
55         ---Level: Public 
56         ---Purpose: projection of the sensitive primitive in order to
57         --          get 2D boxes for the Sort Algorithm
58
59     Areas   (me:mutable ; boxes : in out ListOfBox2d from SelectBasics) 
60     is redefined static;
61         ---Level: Public 
62         ---Purpose: gives the 2D boxes which represent the segment in the 
63         --          selection process...
64
65     GetConnected(me:mutable;aLocation: Location from TopLoc)
66     returns SensitiveEntity from Select3D is redefined static;
67
68     GetEdges(me       : mutable;
69              theEdges : in out SensitiveEntitySequence from Select3D);
70         ---Level: Public
71         ---Purpose: returns the sensitive edges stored in this wire
72
73
74     SetLocation(me:mutable;aLoc:Location from TopLoc) is redefined static;
75         ---Purpose:  propagation of location on all the sensitive inside...
76     ResetLocation(me:mutable) is redefined static;
77         ---Purpose:  propagation of location on all the sensitive inside...    
78
79     Matches(me  :mutable; 
80             X,Y : Real from Standard;
81             aTol: Real from Standard;
82             DMin: out Real from Standard) 
83     returns Boolean
84     is  redefined static;
85         ---Level: Public 
86         ---Purpose: projection of the sensitive primitive in order to
87         --          get 2D boxes for the Sort Algorithm
88
89     Matches (me  :mutable; 
90              XMin,YMin,XMax,YMax : Real from Standard;
91              aTol: Real from Standard) 
92     returns Boolean
93     is static;
94      
95     Matches (me  :mutable; 
96              Polyline:Array1OfPnt2d from TColgp;
97              aBox:Box2d from Bnd;
98              aTol: Real from Standard) 
99     returns Boolean
100     is redefined virtual;
101         ---Level: Public 
102     
103
104     ComputeDepth(me;EyeLine: Lin from gp) 
105     returns Real from Standard is redefined static;
106         ---Purpose: returns the depth of the touched entity
107
108     MaxBoxes(me) returns Integer is redefined static;    
109         ---Level: Public 
110         ---Purpose:returns <mymaxrect>
111             
112     
113     Dump(me; S: in out OStream;FullDump : Boolean from Standard = Standard_True) is redefined virtual; 
114
115     Set(me:mutable;TheOwnerId: EntityOwner from SelectBasics) is redefined static; 
116     ---Purpose: Sets the owner for all entities in wire 
117         
118     SetLastPrj(me:mutable;aPrj: Projector from Select3D) is redefined virtual; 
119      
120     GetLastDetected(me)
121     returns SensitiveEntity from Select3D is static; 
122     ---Purpose:returns <mymaxrect>
123
124 fields
125     mymaxrect       : Integer;
126     mysensitive     : SensitiveEntitySequence from Select3D;
127     myDetectedIndex : Integer from Standard;
128 end SensitiveWire;
129
130
131
132
133
134
135
136