0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / ShapeUpgrade / ShapeUpgrade_RemoveInternalWires.cdl
1 -- Created on: 2006-08-10
2 -- Created by: Galina KULIKOVA
3 -- Copyright (c) 2006-2014 OPEN CASCADE SAS
4 --
5 -- This file is part of Open CASCADE Technology software library.
6 --
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
12 --
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
15
16 class RemoveInternalWires from ShapeUpgrade inherits Tool from ShapeUpgrade 
17
18         ---Purpose: Removes all internal wires having area less than specified min area
19
20 uses
21     Shape from TopoDS,
22     SequenceOfShape from TopTools,
23     DataMapOfShapeListOfShape from TopTools,
24     IndexedDataMapOfShapeListOfShape from TopTools,
25     Status from ShapeExtend
26 is
27     Create returns RemoveInternalWires from ShapeUpgrade; 
28         ---Purpose: Creates empty  constructor.
29
30     Create (theShape : Shape from TopoDS) returns RemoveInternalWires from ShapeUpgrade;
31     
32     Init (me: mutable; theShape : Shape from TopoDS);
33         ---Purpose: Initialize by a Shape.
34         
35     Perform (me: mutable) returns Boolean;
36     ---Purpose:Removes all internal wires having area less than area specified as minimal allowed area
37     
38     Perform (me: mutable; theSeqShapes : SequenceOfShape from TopTools) returns Boolean;
39     ---Purpose:If specified sequence of shape contains -
40     --         1.wires then these wires will be removed if they have area less than allowed min area.
41     --         2.faces than internal wires from these faces will be removed if they have area less than allowed min area.
42     
43     GetResult(me) returns Shape from TopoDS;
44     ---C++: inline
45     ---Purpose:Get result shape
46     
47     MinArea(me: mutable) returns Real;
48     ---C++: inline
49     ---C++: return &
50     ---Purpose:Set min area allowed for holes( all holes having area less than mi area will be removed)
51     
52     RemoveFaceMode(me: mutable) returns Boolean;
53     ---C++: inline
54     ---C++: return &
55     ---Purpose:Set mode which manage removing faces which have outer wires consisting only from edges
56     --         belonginig to removed internal wires.
57     ----       By default it is equal to true.
58    
59     RemovedFaces(me) returns SequenceOfShape from TopTools;
60     ---C++: inline
61     ---C++: return const &
62     ---Purpose:Returns sequence of removed faces.
63     
64     RemovedWires(me) returns SequenceOfShape from TopTools;
65     ---C++: inline
66     ---C++: return const &
67     ---Purpose:Returns sequence of removed faces.
68     
69     Status(me; theStatus : Status from ShapeExtend) returns Boolean;
70     ---C++: inline
71     ---Purpose:Queries status of last call to Perform()
72     --        : OK - nothing was done
73     --        :DONE1 - internal wires were removed
74     --        :DONE2 - small faces were removed.
75     --        :FAIL1 - initial shape is not specified
76     --        :FAIL2 - specified sub-shape is not belonged to inotial shape.
77     
78     removeSmallWire (me:mutable;theFace: Shape from TopoDS; theWire : Shape from TopoDS) is private;
79     ---Purpose:Removes internal wires having area of contour less than specified MinArea
80
81     removeSmallFaces(me:mutable) is private;
82     ---Purpose:Removes faces having outer wire consisting 
83     --         from removed edges(belonging small internal wires)
84     
85     Clear(me:mutable)is protected;
86     ---Purpose:Clear all sequences and temporary map;
87     
88     
89 fields
90
91     myShape : Shape from TopoDS;
92     myResult : Shape from TopoDS;
93     myMinArea : Real;
94     myRemoveFacesMode : Boolean;
95     myEdgeFaces : IndexedDataMapOfShapeListOfShape from TopTools;--map of containing all edges and corresponding them edges
96     myRemoveEdges : DataMapOfShapeListOfShape from TopTools;
97     myRemovedFaces : SequenceOfShape from TopTools;
98     myStatus: Integer is protected;
99     myRemoveWires : SequenceOfShape from TopTools;
100     
101 end RemoveInternalWires;