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
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_SolidExplorer_HeaderFile
18 #define _TopClass_SolidExplorer_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
31 //! Provide an exploration of a BRep Shape for the
32 //! classification. Defines the description of a solid for the
34 class TopClass_SolidExplorer
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;
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;
50 //! Returns in <L>, <Par> a segment having at least
51 //! one intersection with the shape boundary to
52 //! compute intersections.
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
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
62 Standard_EXPORT virtual void OtherSegment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par) = 0;
64 //! Starts an exploration of the shells.
65 Standard_EXPORT virtual void InitShell() = 0;
67 //! Returns True if there is a current shell.
68 Standard_EXPORT virtual Standard_Boolean MoreShells() const = 0;
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;
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;
78 //! Starts an exploration of the faces.
79 Standard_EXPORT virtual void InitFace() = 0;
81 //! Returns True if there is a current face.
82 Standard_EXPORT virtual Standard_Boolean MoreFaces() const = 0;
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;
88 //! Returns the current face.
89 Standard_EXPORT virtual TopoDS_Face CurrentFace() const = 0;
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;
118 #endif // _TopClass_SolidExplorer_HeaderFile