1 -- Created on: 2012-12-17
2 -- Created by: Eugeny MALTCHIKOV
3 -- Copyright (c) 2012-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
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.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class Check from BRepAlgoAPI
18 -- The class Check provides a diagnostic tool for checking
19 -- single shape or couple of shapes.
20 -- Single shape is checking on topological validity, small edges
21 -- and self-interference. For couple of shapes added check
22 -- on validity for boolean operation of given type.
24 -- The class provides two ways of checking shape(-s)
26 -- BRepAlgoAPI_Check aCh(theS);
27 -- Standard_Boolean bV=aCh.IsValid();
28 -- 2. Methods SetData and Perform
29 -- BRepAlgoAPI_Check aCh;
30 -- aCh.SetData(theS1, theS2, BOPAlgo_FUSE, Standard_False);
32 -- Standard_Boolean bV=aCh.IsValid();
36 Operation from BOPAlgo,
37 PArgumentAnalyzer from BOPAlgo,
38 ListOfCheckResult from BOPAlgo
42 returns Check from BRepAlgoAPI;
43 ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Check();"
44 ---Purpose: Empty constructor.
47 theS : Shape from TopoDS;
48 bTestSE : Boolean from Standard = Standard_True;
49 bTestSI : Boolean from Standard = Standard_True)
50 returns Check from BRepAlgoAPI;
51 ---Purpose: Constructor for checking single shape.
53 -- Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI)
56 -- theS - the shape that should be checked;
57 -- bTestSE - flag that specifies whether check on small edges
58 -- should be performed; by default it is set to TRUE;
59 -- bTestSI - flag that specifies whether check on self-interference
60 -- should be performed; by default it is set to TRUE;
63 theS1 : Shape from TopoDS;
64 theS2 : Shape from TopoDS;
65 theOp : Operation from BOPAlgo = BOPAlgo_UNKNOWN;
66 bTestSE : Boolean from Standard = Standard_True;
67 bTestSI : Boolean from Standard = Standard_True)
68 returns Check from BRepAlgoAPI;
69 ---Purpose: Constructor for couple of shapes.
71 -- Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform().
73 -- theS1, theS2 - the initial shapes.
74 -- theOp - the type of Boolean Operation;
75 -- if it is not defined (set to UNKNOWN) for each shape
76 -- performed check as for single shape.
77 -- bTestSE - flag that specifies whether check on small edges
78 -- should be performed; by default it is set to TRUE;
79 -- bTestSI - flag that specifies whether check on self-interference
80 -- should be performed; by default it is set to TRUE;
83 theS1 : Shape from TopoDS;
84 theS2 : Shape from TopoDS;
85 theOp : Operation from BOPAlgo;
86 bTestSE : Boolean from Standard;
87 bTestSI : Boolean from Standard)
89 ---Purpose: Initialyzes data.
92 theS : Shape from TopoDS;
93 bTestSE : Boolean from Standard = Standard_True;
94 bTestSI : Boolean from Standard = Standard_True);
95 ---Purpose: Sets data for check by Init method.
96 -- The method provides alternative way for checking single shape.
99 theS1 : Shape from TopoDS;
100 theS2 : Shape from TopoDS;
101 theOp : Operation from BOPAlgo = BOPAlgo_UNKNOWN;
102 bTestSE : Boolean from Standard = Standard_True;
103 bTestSI : Boolean from Standard = Standard_True);
104 ---Purpose: Sets data for check by Init method.
105 -- The method provides alternative way for checking couple of shapes.
108 ---Purpose: Performs the check.
111 returns Boolean from Standard;
112 ---Purpose: Shows whether shape(s) valid or not.
115 returns ListOfCheckResult from BOPAlgo;
116 ---C++: return const&
117 ---Purpose: Returns faulty shapes.
120 myS1, myS2 : Shape from TopoDS is protected;
121 myAnalyzer : PArgumentAnalyzer from BOPAlgo is protected;
122 myResult : ListOfCheckResult from BOPAlgo is protected;
124 end BooleanOperation;