42cf5bc1 |
1 | // Created on: 1994-03-10 |
2 | // Created by: Laurent BUCHARD |
3 | // Copyright (c) 1994-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _TopClass_SolidExplorer_HeaderFile |
18 | #define _TopClass_SolidExplorer_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <Standard_Real.hxx> |
26 | class gp_Pnt; |
27 | class gp_Lin; |
28 | class TopoDS_Face; |
29 | |
30 | |
31 | //! Provide an exploration of a BRep Shape for the |
32 | //! classification. Defines the description of a solid for the |
33 | //! SolidClassifier. |
34 | class TopClass_SolidExplorer |
35 | { |
36 | public: |
37 | |
38 | DEFINE_STANDARD_ALLOC |
39 | |
40 | |
41 | //! Should return True if the point is outside a |
42 | //! bounding volume of the shape. |
43 | Standard_EXPORT virtual Standard_Boolean Reject (const gp_Pnt& P) const = 0; |
44 | |
45 | //! Returns in <L>, <Par> a segment having at least |
46 | //! one intersection with the shape boundary to |
47 | //! compute intersections. |
48 | Standard_EXPORT virtual void Segment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par) = 0; |
49 | |
50 | //! Returns in <L>, <Par> a segment having at least |
51 | //! one intersection with the shape boundary to |
52 | //! compute intersections. |
53 | //! |
54 | //! The First Call to this method returns a line which |
55 | //! point to a point of the first face of the shape. |
56 | //! The Second Call provide a line to the second face |
57 | //! and so on. |
58 | //! |
59 | //! if the method is called N times on a shape with F |
60 | //! faces (N>F) the line point to other points on the |
61 | //! face 1,2,3 ... N |
62 | Standard_EXPORT virtual void OtherSegment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par) = 0; |
63 | |
64 | //! Starts an exploration of the shells. |
65 | Standard_EXPORT virtual void InitShell() = 0; |
66 | |
67 | //! Returns True if there is a current shell. |
68 | Standard_EXPORT virtual Standard_Boolean MoreShells() const = 0; |
69 | |
70 | //! Sets the explorer to the next shell and returns |
71 | //! False if there are no more wires. |
72 | Standard_EXPORT virtual void NextShell() = 0; |
73 | |
74 | //! Returns True if the shell bounding volume does not |
75 | //! intersect the segment. |
76 | Standard_EXPORT virtual Standard_Boolean RejectShell (const gp_Lin& L, const Standard_Real Par) const = 0; |
77 | |
78 | //! Starts an exploration of the faces. |
79 | Standard_EXPORT virtual void InitFace() = 0; |
80 | |
81 | //! Returns True if there is a current face. |
82 | Standard_EXPORT virtual Standard_Boolean MoreFaces() const = 0; |
83 | |
84 | //! Sets the explorer to the next face and returns |
85 | //! False if there are no more wires. |
86 | Standard_EXPORT virtual void NextFace() = 0; |
87 | |
88 | //! Returns the current face. |
89 | Standard_EXPORT virtual TopoDS_Face CurrentFace() const = 0; |
90 | |
91 | //! Returns True if the face bounding volume does not |
92 | //! intersect the segment. |
93 | Standard_EXPORT virtual Standard_Boolean RejectFace (const gp_Lin& L, const Standard_Real Par) const = 0; |
94 | |
95 | |
96 | |
97 | |
98 | protected: |
99 | |
100 | |
101 | |
102 | |
103 | |
104 | private: |
105 | |
106 | |
107 | |
108 | |
109 | |
110 | }; |
111 | |
112 | |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | #endif // _TopClass_SolidExplorer_HeaderFile |