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