0026609: Wrong result obtained by solid classifier algorithm.
[occt.git] / src / BRepClass3d / BRepClass3d_Intersector3d.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-04-01
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_Intersector3d_HeaderFile
18#define _BRepClass3d_Intersector3d_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <gp_Pnt.hxx>
25#include <Standard_Real.hxx>
26#include <IntCurveSurface_TransitionOnCurve.hxx>
27#include <Standard_Boolean.hxx>
28#include <TopAbs_State.hxx>
29#include <TopoDS_Face.hxx>
30class gp_Lin;
31class TopoDS_Face;
32class gp_Pnt;
33
34
35
36class BRepClass3d_Intersector3d
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
42
43 //! Empty constructor.
44 Standard_EXPORT BRepClass3d_Intersector3d();
45
46 //! Perform the intersection between the
47 //! segment L(0) ... L(Prm) and the Shape <Sh>.
48 //!
49 //! Only the point with the smallest parameter on the
50 //! line is returned.
51 //!
52 //! The Tolerance <Tol> is used to determine if the
53 //! first point of the segment is near the face. In
54 //! that case, the parameter of the intersection point
55 //! on the line can be a negative value (greater than -Tol).
56 Standard_EXPORT void Perform (const gp_Lin& L, const Standard_Real Prm, const Standard_Real Tol, const TopoDS_Face& F);
57
58 //! True is returned when the intersection have been computed.
59 Standard_Boolean IsDone() const;
60
61 //! True is returned if a point has been found.
62 Standard_Boolean HasAPoint() const;
63
64 //! Returns the U parameter of the intersection point
65 //! on the surface.
66 Standard_Real UParameter() const;
67
68 //! Returns the V parameter of the intersection point
69 //! on the surface.
70 Standard_Real VParameter() const;
71
72 //! Returns the parameter of the intersection point
73 //! on the line.
74 Standard_Real WParameter() const;
75
76 //! Returns the geometric point of the intersection
77 //! between the line and the surface.
78 const gp_Pnt& Pnt() const;
79
80 //! Returns the transition of the line on the surface.
81 IntCurveSurface_TransitionOnCurve Transition() const;
82
83 //! Returns the state of the point on the face.
84 //! The values can be either TopAbs_IN
85 //! ( the point is in the face)
86 //! or TopAbs_ON
87 //! ( the point is on a boudary of the face).
88 TopAbs_State State() const;
89
90 //! Returns the significant face used to determine
91 //! the intersection.
92 const TopoDS_Face& Face() const;
93
94
95
96
97protected:
98
99
100
101
102
103private:
104
105
106
107 gp_Pnt pnt;
108 Standard_Real U;
109 Standard_Real V;
110 Standard_Real W;
111 IntCurveSurface_TransitionOnCurve transition;
112 Standard_Boolean done;
113 Standard_Boolean hasapoint;
114 TopAbs_State state;
115 TopoDS_Face face;
116
117
118};
119
120
121#include <BRepClass3d_Intersector3d.lxx>
122
123
124
125
126
127#endif // _BRepClass3d_Intersector3d_HeaderFile