1 -- Created on: 2012-12-17
2 -- Created by: Eugeny MALTCHIKOV
3 -- Copyright (c) 2012-2012 OPEN CASCADE SAS
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.
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.
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.
20 class Check from BRepAlgoAPI
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.
28 -- The class provides two ways of checking shape(-s)
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);
36 -- Standard_Boolean bV=aCh.IsValid();
40 Operation from BOPAlgo,
41 PArgumentAnalyzer from BOPAlgo,
42 ListOfCheckResult from BOPAlgo
46 returns Check from BRepAlgoAPI;
47 ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Check();"
48 ---Purpose: Empty constructor.
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.
57 -- Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI)
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;
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.
75 -- Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform().
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;
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)
93 ---Purpose: Initialyzes data.
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.
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.
112 ---Purpose: Performs the check.
115 returns Boolean from Standard;
116 ---Purpose: Shows whether shape(s) valid or not.
119 returns ListOfCheckResult from BOPAlgo;
120 ---C++: return const&
121 ---Purpose: Returns faulty shapes.
124 myS1, myS2 : Shape from TopoDS is protected;
125 myAnalyzer : PArgumentAnalyzer from BOPAlgo is protected;
126 myResult : ListOfCheckResult from BOPAlgo is protected;
128 end BooleanOperation;