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
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 _BRepBlend_Extremity_HeaderFile
18 #define _BRepBlend_Extremity_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepBlend_SequenceOfPointOnRst.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;
36 class BRepBlend_Extremity
43 Standard_EXPORT BRepBlend_Extremity();
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);
48 //! Creates an extremity on a surface. This extremity matches
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);
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);
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);
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);
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);
65 //! This method returns the value of the point in 3d space.
66 const gp_Pnt& Value() const;
68 //! Set the tangent vector for an extremity on a
70 void SetTangent (const gp_Vec& Tangent);
72 //! Returns TRUE if the Tangent is stored.
73 Standard_Boolean HasTangent() const;
75 //! This method returns the value of tangent in 3d
77 const gp_Vec& Tangent() const;
79 //! This method returns the fuzziness on the point
81 Standard_Real Tolerance() const;
83 //! Set the values for an extremity on a curve.
84 Standard_EXPORT void SetVertex (const Handle(Adaptor3d_HVertex)& V);
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);
90 //! This method returns the parameters of the point
91 //! on the concerned surface.
92 void Parameters (Standard_Real& U, Standard_Real& V) const;
94 //! Returns Standard_True when the point coincide with
95 //! an existing vertex.
96 Standard_Boolean IsVertex() const;
98 //! Returns the vertex when IsVertex returns Standard_True.
99 const Handle(Adaptor3d_HVertex)& Vertex() const;
101 //! Returns the number of arc containing the extremity.
102 //! If the method returns 0, the point is inside the
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;
110 const BRepBlend_PointOnRst& PointOnRst (const Standard_Integer Index) const;
112 Standard_Real Parameter() const;
114 Standard_Real ParameterOnGuide() const;
129 Handle(Adaptor3d_HVertex) vtx;
130 BRepBlend_SequenceOfPointOnRst seqpt;
137 Standard_Boolean isvtx;
138 Standard_Boolean hastang;
144 #include <BRepBlend_Extremity.lxx>
150 #endif // _BRepBlend_Extremity_HeaderFile