644d80dc6b5bd47d7aec8c8332bfbfe735d35c22
[occt.git] / src / BRepAlgoAPI / BRepAlgoAPI_Check.cdl
1 -- Created on: 2012-12-17
2 -- Created by: Eugeny MALTCHIKOV
3 -- Copyright (c) 2012-2012 OPEN CASCADE SAS
4 --
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
9 --
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 --
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
19
20 class Check from BRepAlgoAPI
21     ---Purpose:  
22     -- The class Check provides a diagnostic tool for checking  
23     -- single shape or couple of shapes. 
24     -- Single shape is checking on topological validity, small edges  
25     -- and self-interference. For couple of shapes added check 
26     -- on validity for boolean operation of given type.
27     -- 
28     -- The class provides two ways of checking shape(-s)
29     -- 1. Constructors 
30     --    BRepAlgoAPI_Check aCh(theS); 
31     --    Standard_Boolean bV=aCh.IsValid();     
32     -- 2. Methods SetData and Perform 
33     --    BRepAlgoAPI_Check aCh; 
34     --    aCh.SetData(theS1, theS2, BOPAlgo_FUSE, Standard_False); 
35     --    aCh.Perform(); 
36     --    Standard_Boolean bV=aCh.IsValid();     
37  
38 uses 
39     Shape from TopoDS, 
40     Operation from BOPAlgo, 
41     PArgumentAnalyzer from BOPAlgo, 
42     ListOfCheckResult from BOPAlgo
43  
44 is
45     Create  
46     returns Check from BRepAlgoAPI; 
47     ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Check();"  
48     ---Purpose:  Empty constructor. 
49      
50     Create( 
51         theS   : Shape   from TopoDS; 
52         bTestSE : Boolean from Standard = Standard_True; 
53         bTestSI : Boolean from Standard = Standard_True) 
54     returns Check from BRepAlgoAPI;  
55     ---Purpose:  Constructor for checking single shape. 
56     -- It calls methods  
57     -- Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI) 
58     -- and Perform().
59     -- Params:   
60     --  theS   - the shape that should be checked; 
61     --  bTestSE - flag that specifies whether check on small edges  
62     --            should be performed; by default it is set to TRUE;
63     --  bTestSI - flag that specifies whether check on self-interference 
64     --            should be performed; by default it is set to TRUE;
65      
66     Create( 
67         theS1   : Shape     from TopoDS; 
68         theS2   : Shape     from TopoDS; 
69         theOp   : Operation from BOPAlgo = BOPAlgo_UNKNOWN;
70         bTestSE : Boolean   from Standard = Standard_True; 
71         bTestSI : Boolean   from Standard = Standard_True) 
72     returns Check from BRepAlgoAPI; 
73     ---Purpose: Constructor for couple of shapes.  
74     -- It calls methods  
75     -- Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform().
76     -- Params: 
77     --  theS1, theS2 - the initial shapes. 
78     --  theOp - the type of Boolean Operation; 
79     --          if it is not defined (set to UNKNOWN) for each shape
80     --          performed check as for single shape. 
81     --  bTestSE - flag that specifies whether check on small edges  
82     --            should be performed; by default it is set to TRUE;
83     --  bTestSI - flag that specifies whether check on self-interference 
84     --            should be performed; by default it is set to TRUE; 
85       
86     Init(me:out; 
87         theS1   : Shape     from TopoDS; 
88         theS2   : Shape     from TopoDS; 
89         theOp   : Operation from BOPAlgo;
90         bTestSE : Boolean   from Standard; 
91         bTestSI : Boolean   from Standard)
92       is protected;  
93     ---Purpose: Initialyzes data.
94  
95     SetData(me:out; 
96         theS   : Shape   from TopoDS; 
97         bTestSE : Boolean from Standard = Standard_True; 
98         bTestSI : Boolean from Standard = Standard_True);
99     ---Purpose: Sets data for check by Init method.
100     -- The method provides alternative way for checking single shape. 
101      
102     SetData(me:out; 
103         theS1   : Shape     from TopoDS; 
104         theS2   : Shape     from TopoDS; 
105         theOp   : Operation from BOPAlgo = BOPAlgo_UNKNOWN;
106         bTestSE : Boolean   from Standard = Standard_True; 
107         bTestSI : Boolean   from Standard = Standard_True);
108     ---Purpose: Sets data for check by Init method.
109     -- The method provides alternative way for checking couple of shapes.
110     
111     Perform(me:out);
112     ---Purpose: Performs the check. 
113      
114     IsValid(me:out) 
115       returns Boolean from Standard; 
116     ---Purpose: Shows whether shape(s) valid or not. 
117      
118     Result(me:out) 
119       returns ListOfCheckResult from BOPAlgo;  
120     ---C++: return const&
121     ---Purpose: Returns faulty shapes.
122     
123 fields  
124   myS1, myS2 : Shape from TopoDS is protected;  
125   myAnalyzer : PArgumentAnalyzer from BOPAlgo is protected;
126   myResult   : ListOfCheckResult from BOPAlgo is protected;
127    
128 end BooleanOperation;
129