01a6e62b |
1 | // Created on: 2014-06-18 |
2 | // Created by: Oleg AGASHIN |
3 | // Copyright (c) 2011-2014 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
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. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _BRepMesh_WireInterferenceChecker_HeaderFile |
17 | #define _BRepMesh_WireInterferenceChecker_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_Mutex.hxx> |
21 | #include <BRepMesh_WireChecker.hxx> |
22 | #include <BRepMesh_Status.hxx> |
23 | |
01a6e62b |
24 | //! Auxilary class implementing functionality for |
25 | //! checking interference between two discretized wires. |
26 | class BRepMesh_WireInterferenceChecker |
27 | { |
28 | public: |
29 | |
30 | //! Enumerates states of segments intersection check. |
31 | enum IntFlag |
32 | { |
33 | NoIntersection, |
34 | Cross, |
35 | EndPointTouch, |
36 | PointOnSegment, |
37 | Glued, |
38 | Same |
39 | }; |
40 | |
01a6e62b |
41 | //! Constructor |
848fa7e3 |
42 | //! @param theWires wires that should be checked. |
43 | //! @param theStatus shared flag to set status of the check. |
44 | //! @param theMutex shared mutex for parallel processing. |
01a6e62b |
45 | BRepMesh_WireInterferenceChecker( |
848fa7e3 |
46 | const BRepMesh::Array1OfSegmentsTree& theWires, |
47 | BRepMesh_Status* theStatus, |
c7b59798 |
48 | Standard_Mutex* theMutex = NULL); |
01a6e62b |
49 | |
50 | //! Checker's body. |
848fa7e3 |
51 | //! @param theWireId Id of discretized wire to be checked. |
01a6e62b |
52 | void operator ()(const Standard_Integer& theWireId) const; |
53 | |
01a6e62b |
54 | private: |
55 | |
848fa7e3 |
56 | //! Assignment operator. |
57 | void operator =(const BRepMesh_WireInterferenceChecker& /*theOther*/) |
58 | { |
59 | } |
60 | |
01a6e62b |
61 | private: |
848fa7e3 |
62 | const BRepMesh::Array1OfSegmentsTree& myWires; |
63 | BRepMesh_Status* myStatus; |
848fa7e3 |
64 | Standard_Mutex* myMutex; |
01a6e62b |
65 | }; |
66 | |
67 | #endif |