Warnings on vc14 were eliminated
[occt.git] / src / BRepBlend / BRepBlend_Extremity.hxx
1 // Created on: 1994-01-25
2 // Created by: Jacques GOUSSARD
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 _BRepBlend_Extremity_HeaderFile
18 #define _BRepBlend_Extremity_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <BRepBlend_SequenceOfPointOnRst.hxx>
25 #include <gp_Pnt.hxx>
26 #include <gp_Vec.hxx>
27 #include <Standard_Real.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <Standard_Integer.hxx>
30 class Adaptor3d_HVertex;
31 class Standard_DomainError;
32 class Standard_OutOfRange;
33 class gp_Pnt;
34 class gp_Vec;
35 class Adaptor2d_HCurve2d;
36 class IntSurf_Transition;
37 class BRepBlend_PointOnRst;
38
39
40
41 class BRepBlend_Extremity 
42 {
43 public:
44
45   DEFINE_STANDARD_ALLOC
46
47   
48   Standard_EXPORT BRepBlend_Extremity();
49   
50   //! Creates an extremity on a surface
51   Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol);
52   
53   //! Creates an extremity on a surface. This extremity matches
54   //! the vertex <Vtx>.
55   Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& Vtx);
56   
57   //! Creates an extremity on a curve
58   Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P, const Standard_Real W, const Standard_Real Param, const Standard_Real Tol);
59   
60   //! Set the values for an extremity on a surface.
61   Standard_EXPORT void SetValue (const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol);
62   
63   //! Set the values for an extremity on a surface.This
64   //! extremity matches the vertex <Vtx>.
65   Standard_EXPORT void SetValue (const gp_Pnt& P, const Standard_Real U, const Standard_Real V, const Standard_Real Param, const Standard_Real Tol, const Handle(Adaptor3d_HVertex)& Vtx);
66   
67   //! Set the values for an extremity on curve.
68   Standard_EXPORT void SetValue (const gp_Pnt& P, const Standard_Real W, const Standard_Real Param, const Standard_Real Tol);
69   
70   //! This method returns the value of the point in 3d space.
71     const gp_Pnt& Value() const;
72   
73   //! Set the tangent   vector  for an extremity on  a
74   //! surface.
75     void SetTangent (const gp_Vec& Tangent);
76   
77   //! Returns TRUE if the Tangent is  stored.
78     Standard_Boolean HasTangent() const;
79   
80   //! This  method returns the   value of tangent  in 3d
81   //! space.
82     const gp_Vec& Tangent() const;
83   
84   //! This method returns the fuzziness on the point
85   //! in 3d space.
86     Standard_Real Tolerance() const;
87   
88   //! Set the values for an extremity on a curve.
89   Standard_EXPORT void SetVertex (const Handle(Adaptor3d_HVertex)& V);
90   
91   //! Sets the values of a point which is on the arc
92   //! A, at parameter Param.
93   Standard_EXPORT void AddArc (const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc);
94   
95   //! This method returns the parameters of the point
96   //! on the concerned surface.
97     void Parameters (Standard_Real& U, Standard_Real& V) const;
98   
99   //! Returns Standard_True when the point coincide with
100   //! an existing vertex.
101     Standard_Boolean IsVertex() const;
102   
103   //! Returns the vertex when IsVertex returns Standard_True.
104     const Handle(Adaptor3d_HVertex)& Vertex() const;
105   
106   //! Returns the number of arc containing the extremity.
107   //! If the method returns 0, the point is inside the
108   //! surface.
109   //! Otherwise, the extremity lies on at least 1 arc,
110   //! and all the information (arc, parameter, transitions)
111   //! are given by the point on restriction (PointOnRst)
112   //! returned by the next method.
113     Standard_Integer NbPointOnRst() const;
114   
115     const BRepBlend_PointOnRst& PointOnRst (const Standard_Integer Index) const;
116   
117     Standard_Real Parameter() const;
118   
119     Standard_Real ParameterOnGuide() const;
120
121
122
123
124 protected:
125
126
127
128
129
130 private:
131
132
133
134   Handle(Adaptor3d_HVertex) vtx;
135   BRepBlend_SequenceOfPointOnRst seqpt;
136   gp_Pnt pt;
137   gp_Vec tang;
138   Standard_Real param;
139   Standard_Real u;
140   Standard_Real v;
141   Standard_Real tol;
142   Standard_Boolean isvtx;
143   Standard_Boolean hastang;
144
145
146 };
147
148
149 #include <BRepBlend_Extremity.lxx>
150
151
152
153
154
155 #endif // _BRepBlend_Extremity_HeaderFile