1 -- Created on: 1998-04-16
2 -- Created by: Robert COUBLANC
3 -- Copyright (c) 1998-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 SensitiveGroup from Select3D inherits SensitiveEntity from Select3D
19 ---Purpose: A framework to define selection of a sensitive group
20 -- by a sensitive entity which is a set of 3D sensitive entities.
21 -- Remark: 2 modes are possible for rectangle selection
22 -- the group is considered selected
23 -- 1) when all the entities inside are selected in the rectangle
24 -- 2) only one entity inside is selected by the rectangle
25 -- By default the "Match All entities" mode is set.
29 Projector from Select3D,
31 EntityOwner from SelectBasics,
32 SensitiveEntity from Select3D,
33 ListOfSensitive from Select3D,
34 ListOfBox2d from SelectBasics,
35 PickArgs from SelectBasics,
36 Array1OfPnt2d from TColgp,
43 Create (OwnerId : EntityOwner from SelectBasics;
44 MatchAll : Boolean from Standard = Standard_True)
45 returns SensitiveGroup from Select3D;
46 ---Purpose: Constructs an empty sensitive group object.
47 -- This is a set of sensitive 3D entities. The sensitive
48 -- entities will be defined using the function Add to fill
49 -- the entity owner OwnerId. If MatchAll is false, nothing can be added.
51 Create(OwnerId : EntityOwner from SelectBasics;
52 TheList : in out ListOfSensitive from Select3D;
53 MatchAll : Boolean from Standard = Standard_True)
54 returns SensitiveGroup from Select3D;
55 ---Purpose: Constructs a sensitive group object defined by the list
56 -- TheList and the entity owner OwnerId. If MatchAll is false, nothing is done.
58 Add (me :mutable; LL: in out ListOfSensitive from Select3D);
59 ---Purpose: Adds the list of sensitive entities LL to the empty
60 -- sensitive group object created at construction time.
62 Add (me :mutable;aSensitive : SensitiveEntity from Select3D);
63 ---Purpose: Adds the sensitive entity aSensitive to the non-empty
64 -- sensitive group object created at construction time.
66 Remove(me:mutable; aSensitive :SensitiveEntity from Select3D);
69 ---Purpose: Removes all sensitive entities from the list used at the
70 -- time of construction, or added using the function Add.
72 IsIn(me;aSensitive: SensitiveEntity from Select3D)
73 returns Boolean from Standard;
74 ---Purpose: Returns true if the sensitive entity aSensitive is in
75 -- the list used at the time of construction, or added using the function Add.
76 Set(me:mutable; MustMatchAllEntities: Boolean from Standard);
77 ---Purpose: Sets the requirement that all sensitive entities in the
78 -- list used at the time of construction, or added using
79 -- the function Add must be matched.
81 MustMatchAll(me) returns Boolean from Standard;
82 ---Purpose: Returns true if all sensitive entities in the list used
83 -- at the time of construction, or added using the function Add must be matched.
89 Project (me:mutable;aProjector : Projector from Select3D)
92 ---Purpose: projection of the sensitive primitive in order to
93 -- get 2D boxes for the Sort Algorithm
95 Areas (me:mutable ; boxes : in out ListOfBox2d from SelectBasics)
98 ---Purpose: gives the 2D boxes which represent the segment in the
99 -- selection process...
102 MaxBoxes(me) returns Integer from Standard is redefined static;
104 GetConnected(me:mutable;aLocation: Location from TopLoc)
105 returns SensitiveEntity from Select3D is redefined static;
108 SetLocation(me:mutable;aLoc:Location from TopLoc) is redefined static;
109 ---Purpose: propagation of location on all the sensitive inside...
110 ResetLocation(me:mutable) is redefined static;
111 ---Purpose: propagation of location on all the sensitive inside...
113 Matches (me : mutable;
114 thePickArgs : PickArgs from SelectBasics;
115 theMatchDMin, theMatchDepth : out Real from Standard)
116 returns Boolean is redefined static;
118 ---Purpose: Checks whether the sensitive entity matches the picking
119 -- detection area (close to the picking line).
120 -- For details please refer to base class declaration.
122 Matches (me :mutable;
123 XMin,YMin,XMax,YMax : Real from Standard;
124 aTol: Real from Standard)
128 Matches (me :mutable;
129 Polyline:Array1OfPnt2d from TColgp;
131 aTol: Real from Standard)
133 is redefined virtual;
136 Set(me:mutable;TheOwnerId: EntityOwner from SelectBasics) is redefined static;
137 ---Purpose: Sets the owner for all entities in group
140 returns ListOfSensitive from Select3D;
141 ---Purpose: Gets group content
143 ---C++: return const&
147 myList : ListOfSensitive from Select3D;
148 myMustMatchAll : Boolean from Standard;