0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSu...
[occt.git] / src / IntPatch / IntPatch_PointLine.hxx
1 // Created on: 2015-02-18
2 // Created by: Nikolai BUKHALOV
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2015 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 _IntPatch_PointLine_HeaderFile
18 #define _IntPatch_PointLine_HeaderFile
19
20 #include <Adaptor3d_Surface.hxx>
21 #include <IntPatch_Line.hxx>
22
23 class gp_Pnt;
24 class gp_Pnt2d;
25 class IntSurf_PntOn2S;
26 class IntSurf_LineOn2S;
27 class IntPatch_Point;
28
29 DEFINE_STANDARD_HANDLE(IntPatch_PointLine, IntPatch_Line)
30
31 //! Definition of an intersection line between two
32 //! surfaces.
33 //! A line defined by a set of points
34 //! (e.g. coming from a walking algorithm) as
35 //! defined in the class WLine or RLine (Restriction line).
36 class IntPatch_PointLine : public IntPatch_Line
37 {
38 public:
39
40   //! Adds a vertex in the list. If theIsPrepend == TRUE the new
41   //! vertex will be added before the first element of vertices sequence.
42   //! Otherwise, to the end of the sequence
43   Standard_EXPORT virtual
44             void AddVertex (const IntPatch_Point& Pnt,
45                             const Standard_Boolean theIsPrepend = Standard_False) = 0;
46
47   //! Returns the number of intersection points.
48   Standard_EXPORT virtual Standard_Integer NbPnts() const = 0;
49
50   //! Returns number of vertices (IntPatch_Point) of the line
51   Standard_EXPORT virtual Standard_Integer NbVertex() const = 0;
52
53   //! Returns the intersection point of range Index.
54   Standard_EXPORT virtual const IntSurf_PntOn2S& Point (const Standard_Integer Index) const = 0;
55
56   //! Returns the vertex of range Index on the line.
57   Standard_EXPORT virtual const IntPatch_Point& Vertex (const Standard_Integer Index) const = 0;
58
59   //! Returns the vertex of range Index on the line.
60   virtual IntPatch_Point& ChangeVertex (const Standard_Integer Index) = 0;
61
62   //! Removes vertices from the line
63   Standard_EXPORT virtual void ClearVertexes() = 0;
64
65   //! Removes single vertex from the line
66   Standard_EXPORT virtual void RemoveVertex (const Standard_Integer theIndex) = 0;
67
68   //! Returns set of intersection points
69   Standard_EXPORT virtual Handle(IntSurf_LineOn2S) Curve() const = 0;
70
71   //! Returns TRUE if P1 is out of the box built from
72   //! the points on 1st surface
73   Standard_EXPORT virtual Standard_Boolean IsOutSurf1Box(const gp_Pnt2d& P1) const = 0;
74
75   //! Returns TRUE if P2 is out of the box built from
76   //! the points on 2nd surface
77   Standard_EXPORT virtual Standard_Boolean IsOutSurf2Box(const gp_Pnt2d& P2) const = 0;
78
79   //! Returns TRUE if P is out of the box built from 3D-points.
80   Standard_EXPORT virtual Standard_Boolean IsOutBox(const gp_Pnt& P) const = 0;
81
82   //! Returns the radius of curvature of
83   //! the intersection line in given point.
84   //! Returns negative value if computation is not possible.
85   Standard_EXPORT static Standard_Real
86             CurvatureRadiusOfIntersLine(const Handle(Adaptor3d_Surface)& theS1,
87                                         const Handle(Adaptor3d_Surface)& theS2,
88                                         const IntSurf_PntOn2S& theUVPoint);
89
90   DEFINE_STANDARD_RTTIEXT(IntPatch_PointLine,IntPatch_Line)
91
92 protected:
93
94   
95   //! To initialize the fields, when the transitions
96   //! are In or Out.
97   Standard_EXPORT IntPatch_PointLine(const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
98   
99   //! To initialize the fields, when the transitions
100   //! are Touch.
101   Standard_EXPORT IntPatch_PointLine(const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
102   
103   //! To initialize the fields, when the transitions
104   //! are Undecided.
105   Standard_EXPORT IntPatch_PointLine(const Standard_Boolean Tang);
106
107
108
109 private:
110
111
112
113
114 };
115
116
117
118
119
120
121
122 #endif // _IntPatch_PointLine_HeaderFile