42cf5bc1 |
1 | // Created by: Peter Kurnev |
2 | // Copyright (c) 2010-2014 OPEN CASCADE SAS |
3 | // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE |
4 | // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, |
5 | // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS |
6 | // |
7 | // This file is part of Open CASCADE Technology software library. |
8 | // |
9 | // This library is free software; you can redistribute it and/or modify it under |
10 | // the terms of the GNU Lesser General Public License version 2.1 as published |
11 | // by the Free Software Foundation, with special exception defined in the file |
12 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
13 | // distribution for complete text of the license and disclaimer of any warranty. |
14 | // |
15 | // Alternatively, this file may be used under the terms of Open CASCADE |
16 | // commercial license or contractual agreement. |
17 | |
18 | #ifndef _BOPAlgo_CheckerSI_HeaderFile |
19 | #define _BOPAlgo_CheckerSI_HeaderFile |
20 | |
21 | #include <Standard.hxx> |
22 | #include <Standard_DefineAlloc.hxx> |
23 | #include <Standard_Handle.hxx> |
24 | |
25 | #include <Standard_Integer.hxx> |
26 | #include <Standard_Boolean.hxx> |
42cf5bc1 |
27 | #include <BOPAlgo_PaveFiller.hxx> |
28 | |
29 | |
33ba8565 |
30 | //! Checks the shape on self-interference. |
31 | //! |
32 | //! The algorithm can set the following errors: |
33 | //! - *BOPAlgo_AlertMultipleArguments* - The number of the input arguments is not one; |
34 | //! - *BOPALgo_ErrorIntersectionFailed* - The check has been aborted during intersection of sub-shapes. |
25dfc507 |
35 | //! In case the error has occurred during intersection of sub-shapes, i.e. |
33ba8565 |
36 | //! in BOPAlgo_PaveFiller::PerformInternal() method, the errors from this method |
25dfc507 |
37 | //! directly will be returned. |
38 | |
42cf5bc1 |
39 | class BOPAlgo_CheckerSI : public BOPAlgo_PaveFiller |
40 | { |
41 | public: |
42 | |
43 | DEFINE_STANDARD_ALLOC |
44 | |
25dfc507 |
45 | |
42cf5bc1 |
46 | Standard_EXPORT BOPAlgo_CheckerSI(); |
25dfc507 |
47 | Standard_EXPORT virtual ~BOPAlgo_CheckerSI(); |
42cf5bc1 |
48 | |
49 | Standard_EXPORT virtual void Perform() Standard_OVERRIDE; |
50 | |
25dfc507 |
51 | //! Sets the level of checking shape on self-interference.<br> |
52 | //! It defines which interferences will be checked:<br> |
53 | //! 0 - only V/V;<br> |
54 | //! 1 - V/V and V/E;<br> |
55 | //! 2 - V/V, V/E and E/E;<br> |
56 | //! 3 - V/V, V/E, E/E and V/F;<br> |
57 | //! 4 - V/V, V/E, E/E, V/F and E/F;<br> |
58 | //! 5 - V/V, V/E, E/E, V/F, E/F and F/F;<br> |
59 | //! 6 - V/V, V/E, E/E, V/F, E/F, F/F and V/S;<br> |
60 | //! 7 - V/V, V/E, E/E, V/F, E/F, F/F, V/S and E/S;<br> |
61 | //! 8 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S and F/S;<br> |
62 | //! 9 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S, F/S and S/S - all interferences (Default value) |
42cf5bc1 |
63 | Standard_EXPORT void SetLevelOfCheck (const Standard_Integer theLevel); |
42cf5bc1 |
64 | |
65 | protected: |
66 | |
42cf5bc1 |
67 | Standard_EXPORT virtual void Init() Standard_OVERRIDE; |
25dfc507 |
68 | |
69 | //! Treats the intersection results |
42cf5bc1 |
70 | Standard_EXPORT void PostTreat(); |
42cf5bc1 |
71 | |
f48cb55d |
72 | Standard_EXPORT void CheckFaceSelfIntersection(); |
73 | |
25dfc507 |
74 | //! Methods for intersection with solids |
42cf5bc1 |
75 | |
25dfc507 |
76 | //! Vertex/Solid intersection |
77 | Standard_EXPORT virtual void PerformVZ(); |
42cf5bc1 |
78 | |
25dfc507 |
79 | //! Edge/Solid intersection |
80 | Standard_EXPORT virtual void PerformEZ(); |
42cf5bc1 |
81 | |
25dfc507 |
82 | //! Face/Solid intersection |
83 | Standard_EXPORT virtual void PerformFZ(); |
42cf5bc1 |
84 | |
25dfc507 |
85 | //! Solid/Solid intersection |
86 | Standard_EXPORT virtual void PerformZZ(); |
42cf5bc1 |
87 | |
25dfc507 |
88 | //! Used for intersection of edges and faces with solids |
89 | Standard_EXPORT virtual void PerformSZ(const TopAbs_ShapeEnum aTS); |
42cf5bc1 |
90 | |
25dfc507 |
91 | Standard_Integer myLevelOfCheck; |
42cf5bc1 |
92 | |
25dfc507 |
93 | private: |
42cf5bc1 |
94 | |
95 | }; |
96 | |
42cf5bc1 |
97 | #endif // _BOPAlgo_CheckerSI_HeaderFile |