6aca4d39 |
1 | -- Created on: 2012-12-17 |
4e57c75e |
2 | -- Created by: Eugeny MALTCHIKOV |
6aca4d39 |
3 | -- Copyright (c) 2012-2014 OPEN CASCADE SAS |
4e57c75e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
4e57c75e |
6 | -- |
973c2be1 |
7 | -- This library is free software; you can redistribute it and / or modify it |
8 | -- under the terms of the GNU Lesser General Public 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. |
4e57c75e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
4e57c75e |
15 | |
16 | class Check from BRepAlgoAPI |
17 | ---Purpose: |
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. |
23 | -- |
24 | -- The class provides two ways of checking shape(-s) |
25 | -- 1. Constructors |
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); |
31 | -- aCh.Perform(); |
32 | -- Standard_Boolean bV=aCh.IsValid(); |
33 | |
34 | uses |
35 | Shape from TopoDS, |
36 | Operation from BOPAlgo, |
37 | PArgumentAnalyzer from BOPAlgo, |
38 | ListOfCheckResult from BOPAlgo |
39 | |
40 | is |
41 | Create |
42 | returns Check from BRepAlgoAPI; |
43 | ---C++: alias "Standard_EXPORT virtual ~BRepAlgoAPI_Check();" |
44 | ---Purpose: Empty constructor. |
45 | |
46 | Create( |
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. |
52 | -- It calls methods |
53 | -- Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI) |
54 | -- and Perform(). |
55 | -- Params: |
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; |
61 | |
62 | Create( |
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. |
70 | -- It calls methods |
71 | -- Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform(). |
72 | -- Params: |
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; |
81 | |
82 | Init(me:out; |
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) |
88 | is protected; |
89 | ---Purpose: Initialyzes data. |
90 | |
91 | SetData(me:out; |
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. |
97 | |
98 | SetData(me:out; |
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. |
106 | |
107 | Perform(me:out); |
108 | ---Purpose: Performs the check. |
109 | |
110 | IsValid(me:out) |
111 | returns Boolean from Standard; |
112 | ---Purpose: Shows whether shape(s) valid or not. |
113 | |
114 | Result(me:out) |
115 | returns ListOfCheckResult from BOPAlgo; |
116 | ---C++: return const& |
117 | ---Purpose: Returns faulty shapes. |
118 | |
119 | fields |
120 | myS1, myS2 : Shape from TopoDS is protected; |
121 | myAnalyzer : PArgumentAnalyzer from BOPAlgo is protected; |
122 | myResult : ListOfCheckResult from BOPAlgo is protected; |
123 | |
124 | end BooleanOperation; |
125 | |