0031939: Coding - correction of spelling errors in comments [part 4]
[occt.git] / src / IntCurvesFace / IntCurvesFace_ShapeIntersector.hxx
1 // Created on: 1998-01-27
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1998-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 _IntCurvesFace_ShapeIntersector_HeaderFile
18 #define _IntCurvesFace_ShapeIntersector_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_Integer.hxx>
26 #include <Standard_Address.hxx>
27 #include <BRepTopAdaptor_SeqOfPtr.hxx>
28 #include <TColStd_SequenceOfInteger.hxx>
29 #include <TColStd_SequenceOfReal.hxx>
30 #include <Standard_Real.hxx>
31 #include <IntCurveSurface_TransitionOnCurve.hxx>
32 #include <TopAbs_State.hxx>
33
34 class Adaptor3d_Curve;
35 class TopoDS_Shape;
36 class gp_Lin;
37 class gp_Pnt;
38 class TopoDS_Face;
39
40 class IntCurvesFace_ShapeIntersector 
41 {
42 public:
43
44   DEFINE_STANDARD_ALLOC
45
46   
47   Standard_EXPORT IntCurvesFace_ShapeIntersector();
48   
49   Standard_EXPORT void Load (const TopoDS_Shape& Sh, const Standard_Real Tol);
50   
51   //! Perform the intersection between the
52   //! segment L and the loaded shape.
53   //!
54   //! PInf is the smallest parameter on the line
55   //! PSup is the highest  parammter on the line
56   //!
57   //! For an infinite line PInf and PSup can be
58   //! +/- RealLast.
59   Standard_EXPORT void Perform (const gp_Lin& L, const Standard_Real PInf, const Standard_Real PSup);
60   
61   //! Perform the intersection between the
62   //! segment L and the loaded shape.
63   //!
64   //! PInf is the smallest parameter on the line
65   //! PSup is the highest  parammter on the line
66   //!
67   //! For an infinite line PInf and PSup can be
68   //! +/- RealLast.
69   Standard_EXPORT void PerformNearest (const gp_Lin& L, const Standard_Real PInf, const Standard_Real PSup);
70   
71   //! same method for a HCurve from Adaptor3d.
72   //! PInf an PSup can also be - and + INF.
73   Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& HCu, const Standard_Real PInf, const Standard_Real PSup);
74   
75   //! True is returned when the intersection have been computed.
76     Standard_Boolean IsDone() const;
77   
78     Standard_Integer NbPnt() const;
79   
80   //! Returns the U parameter of the ith intersection point
81   //! on the surface.
82     Standard_Real UParameter (const Standard_Integer I) const;
83   
84   //! Returns the V parameter of the ith intersection point
85   //! on the surface.
86     Standard_Real VParameter (const Standard_Integer I) const;
87   
88   //! Returns the parameter of the ith intersection point
89   //! on the line.
90     Standard_Real WParameter (const Standard_Integer I) const;
91   
92   //! Returns the geometric point of the ith intersection
93   //! between the line and the surface.
94     const gp_Pnt& Pnt (const Standard_Integer I) const;
95   
96   //! Returns the ith transition of the line on the surface.
97     IntCurveSurface_TransitionOnCurve Transition (const Standard_Integer I) const;
98   
99   //! Returns the ith state of the point on the face.
100   //! The values can be either TopAbs_IN
101   //! ( the point is in the face)
102   //! or TopAbs_ON
103   //! ( the point is on a boundary of the face).
104     TopAbs_State State (const Standard_Integer I) const;
105   
106   //! Returns the significant face used to determine
107   //! the intersection.
108     const TopoDS_Face& Face (const Standard_Integer I) const;
109   
110   //! Internal method. Sort the result on the Curve
111   //! parameter.
112   Standard_EXPORT void SortResult();
113   
114   Standard_EXPORT void Destroy();
115 ~IntCurvesFace_ShapeIntersector()
116 {
117   Destroy();
118 }
119
120
121
122
123 protected:
124
125
126
127
128
129 private:
130
131
132
133   Standard_Boolean done;
134   Standard_Integer nbfaces;
135   Standard_Address PtrJetons;
136   Standard_Address PtrJetonsIndex;
137   BRepTopAdaptor_SeqOfPtr PtrIntersector;
138   TColStd_SequenceOfInteger IndexPt;
139   TColStd_SequenceOfInteger IndexFace;
140   TColStd_SequenceOfInteger IndexIntPnt;
141   TColStd_SequenceOfReal IndexPar;
142
143
144 };
145
146
147 #include <IntCurvesFace_ShapeIntersector.lxx>
148
149
150
151
152
153 #endif // _IntCurvesFace_ShapeIntersector_HeaderFile