1 // Created on: 1994-03-30
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TopClass_Intersection3d_HeaderFile
18 #define _TopClass_Intersection3d_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <TopAbs_State.hxx>
29 class IntCurveSurface_IntersectionPoint;
32 //! Template class for the intersection algorithm required
33 //! by the 3D classifications.
35 //! (a intersection point near the origin of the line, ie.
36 //! at a distance less or equal than <tolerance>, will be
37 //! returned even if it has a negative parameter.)
38 class TopClass_Intersection3d
45 //! Perform the intersection between the
46 //! segment L(0) ... L(Prm) and the Face <Face>.
48 //! Only the point with the smallest parameter on the
51 //! The Tolerance <Tol> is used to determine if the
52 //! first point of the segment is near the face. In
53 //! that case, the parameter of the intersection point
54 //! on the line can be a negative value (greater than -Tol).
55 Standard_EXPORT virtual void Perform (const gp_Lin& L, const Standard_Real Prm, const Standard_Real Tol, const TopoDS_Face& Face) = 0;
57 //! True is returned when the intersection have been computed.
58 Standard_EXPORT virtual Standard_Boolean IsDone() const = 0;
60 //! True is returned if a point has been found.
61 Standard_EXPORT virtual Standard_Boolean HasAPoint() const = 0;
63 //! Returns the Intersection Point.
64 Standard_EXPORT virtual const IntCurveSurface_IntersectionPoint& Point() const = 0;
66 //! Returns the state of the point on the face.
67 //! The values can be either TopAbs_IN
68 //! ( the point is in the face)
70 //! ( the point is on a boudary of the face).
71 Standard_EXPORT virtual TopAbs_State State() const = 0;
79 //! Empty constructor.
80 Standard_EXPORT TopClass_Intersection3d();
99 #endif // _TopClass_Intersection3d_HeaderFile