1 -- Created on: 1992-09-23
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1992-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 Compare from IFGraph inherits GraphContent
19 ---Purpose : this class evaluates effect of two compared sub-parts :
20 -- cumulation (union), common part (intersection-overlapping)
21 -- part specific to first sub-part or to the second one
22 -- Results are kept in a Graph, several question can be set
23 -- Basic Iteration gives Cumulation (union)
25 uses Transient, EntityIterator, Graph
29 Create (agraph : Graph) returns Compare;
30 ---Purpose : creates empty Compare, ready to work
32 GetFromEntity (me : in out; ent : any Transient; first : Boolean);
33 ---Purpose : adds an entity and its shared ones to the list :
34 -- first True means adds to the first sub-list, else to the 2nd
36 GetFromIter (me : in out; iter : EntityIterator; first : Boolean);
37 ---Purpose : adds a list of entities (as an iterator) as such, that is,
38 -- their shared entities are not considered (use AllShared to
40 -- first True means adds to the first sub-list, else to the 2nd
43 ---Purpose : merges the second list into the first one, hence the second
46 RemoveSecond (me : in out);
47 ---Purpose : Removes the contents of second list
49 KeepCommon (me : in out);
50 ---Purpose : Keeps only Common part, sets it as First list and clears
53 ResetData (me : in out);
54 ---Purpose : Allows to restart on a new data set
57 -- More-Next-Value-Entity give all entities taken into the Cumulation
58 -- other informations are provided, as EntityIterator : hence they
59 -- are available for other evaluations
61 Evaluate (me : in out) is redefined;
62 ---Purpose : Recomputes result of comparing to sub-parts
64 Common (me) returns EntityIterator;
65 ---Purpose : returns entities common to the both parts
67 FirstOnly (me) returns EntityIterator;
68 ---Purpose : returns entities which are exclusively in the first list
70 SecondOnly (me) returns EntityIterator;
71 ---Purpose : returns entities which are exclusively in the second part