42cf5bc1 |
1 | // Created on: 1994-04-18 |
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 _BRepClass3d_SolidPassiveClassifier_HeaderFile |
18 | #define _BRepClass3d_SolidPassiveClassifier_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <TopoDS_Face.hxx> |
26 | #include <gp_Lin.hxx> |
27 | #include <Standard_Real.hxx> |
28 | #include <TopAbs_State.hxx> |
29 | #include <BRepClass3d_Intersector3d.hxx> |
30 | #include <TopAbs_Orientation.hxx> |
31 | class Standard_DomainError; |
32 | class BRepClass3d_Intersector3d; |
33 | class gp_Lin; |
34 | class TopoDS_Face; |
35 | |
36 | |
37 | |
38 | class BRepClass3d_SolidPassiveClassifier |
39 | { |
40 | public: |
41 | |
42 | DEFINE_STANDARD_ALLOC |
43 | |
44 | |
36b9ff75 |
45 | //! Creates an undefined classifier. |
42cf5bc1 |
46 | Standard_EXPORT BRepClass3d_SolidPassiveClassifier(); |
47 | |
36b9ff75 |
48 | //! Starts a classification process. The point to |
49 | //! classify is the origin of the line <L>. <P> is |
50 | //! the original length of the segment on <L> used to |
51 | //! compute intersections. <Tol> is the tolerance |
52 | //! attached to the intersections. |
42cf5bc1 |
53 | Standard_EXPORT void Reset (const gp_Lin& L, const Standard_Real P, const Standard_Real Tol); |
54 | |
36b9ff75 |
55 | //! Updates the classification process with the face |
56 | //! <F> from the boundary. |
42cf5bc1 |
57 | Standard_EXPORT void Compare (const TopoDS_Face& F, const TopAbs_Orientation Or); |
58 | |
36b9ff75 |
59 | //! Returns the current value of the parameter. |
42cf5bc1 |
60 | Standard_Real Parameter() const; |
61 | |
36b9ff75 |
62 | //! Returns True if an intersection is computed. |
42cf5bc1 |
63 | Standard_EXPORT Standard_Boolean HasIntersection() const; |
64 | |
36b9ff75 |
65 | //! Returns the intersecting algorithm. |
42cf5bc1 |
66 | BRepClass3d_Intersector3d& Intersector(); |
67 | |
36b9ff75 |
68 | //! Returns the current state of the point. |
42cf5bc1 |
69 | TopAbs_State State() const; |
70 | |
71 | |
72 | |
73 | |
74 | protected: |
75 | |
76 | |
77 | |
78 | |
79 | |
80 | private: |
81 | |
82 | |
83 | |
84 | Standard_Boolean isSet; |
85 | TopoDS_Face myFace; |
86 | gp_Lin myLin; |
87 | Standard_Real myParam; |
88 | Standard_Real myTolerance; |
89 | TopAbs_State myState; |
90 | Standard_Boolean hasIntersect; |
91 | BRepClass3d_Intersector3d myIntersector; |
92 | |
93 | |
94 | }; |
95 | |
96 | #define TheIntersector BRepClass3d_Intersector3d |
97 | #define TheIntersector_hxx <BRepClass3d_Intersector3d.hxx> |
98 | #define TopClass_Classifier3d BRepClass3d_SolidPassiveClassifier |
99 | #define TopClass_Classifier3d_hxx <BRepClass3d_SolidPassiveClassifier.hxx> |
100 | |
101 | #include <TopClass_Classifier3d.lxx> |
102 | |
103 | #undef TheIntersector |
104 | #undef TheIntersector_hxx |
105 | #undef TopClass_Classifier3d |
106 | #undef TopClass_Classifier3d_hxx |
107 | |
108 | |
109 | |
110 | |
111 | #endif // _BRepClass3d_SolidPassiveClassifier_HeaderFile |