1 // Created on: 1993-12-02
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-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_Line_HeaderFile
18 #define _BRepBlend_Line_HeaderFile
20 #include <Blend_SequenceOfPoint.hxx>
21 #include <BRepBlend_Extremity.hxx>
22 #include <Standard_Transient.hxx>
23 #include <Standard_Integer.hxx>
29 DEFINE_STANDARD_HANDLE(BRepBlend_Line, Standard_Transient)
32 class BRepBlend_Line : public Standard_Transient
38 Standard_EXPORT BRepBlend_Line();
40 //! Clears the content of the line.
41 Standard_EXPORT void Clear();
43 //! Adds a point in the line.
44 void Append (const Blend_Point& P);
46 //! Adds a point in the line at the first place.
47 void Prepend (const Blend_Point& P);
49 //! Adds a point in the line at the first place.
50 void InsertBefore (const Standard_Integer Index, const Blend_Point& P);
52 //! Removes from <me> all the items of
53 //! positions between <FromIndex> and <ToIndex>.
54 //! Raises an exception if the indices are out of bounds.
55 void Remove (const Standard_Integer FromIndex, const Standard_Integer ToIndex);
57 //! Sets the value of the transition of the line on S1 and
59 Standard_EXPORT void Set (const IntSurf_TypeTrans TranS1, const IntSurf_TypeTrans TranS2);
61 //! Sets the value of the transition of the line on a surface
62 Standard_EXPORT void Set (const IntSurf_TypeTrans Trans);
64 //! Sets the values of the start points for the line.
65 void SetStartPoints (const BRepBlend_Extremity& StartPt1, const BRepBlend_Extremity& StartPt2);
67 //! Sets tne values of the end points for the line.
68 void SetEndPoints (const BRepBlend_Extremity& EndPt1, const BRepBlend_Extremity& EndPt2);
70 //! Returns the number of points in the line.
71 Standard_Integer NbPoints() const;
73 //! Returns the point of range Index.
74 const Blend_Point& Point (const Standard_Integer Index) const;
76 //! Returns the type of the transition of the line defined
77 //! on the first surface. The transition is "constant"
79 //! The transition is IN if the line is oriented in such
80 //! a way that the system of vectors (N,DRac,T) is
81 //! right-handed, where
82 //! N is the normal to the first surface at a point P,
83 //! DRac is a vector tangent to the blending patch,
84 //! oriented towards the valid part of this patch,
85 //! T is the tangent to the line on S1 at P.
86 //! The transitioon is OUT when the system of vectors is
88 IntSurf_TypeTrans TransitionOnS1() const;
90 //! Returns the type of the transition of the line defined
91 //! on the second surface. The transition is "constant"
93 IntSurf_TypeTrans TransitionOnS2() const;
95 //! Returns the start point on S1.
96 const BRepBlend_Extremity& StartPointOnFirst() const;
98 //! Returns the start point on S2
99 const BRepBlend_Extremity& StartPointOnSecond() const;
101 //! Returns the end point on S1.
102 const BRepBlend_Extremity& EndPointOnFirst() const;
104 //! Returns the point on S2.
105 const BRepBlend_Extremity& EndPointOnSecond() const;
107 //! Returns the type of the transition of the line defined
109 IntSurf_TypeTrans TransitionOnS() const;
114 DEFINE_STANDARD_RTTIEXT(BRepBlend_Line,Standard_Transient)
124 Blend_SequenceOfPoint seqpt;
125 IntSurf_TypeTrans tras1;
126 IntSurf_TypeTrans tras2;
127 BRepBlend_Extremity stp1;
128 BRepBlend_Extremity stp2;
129 BRepBlend_Extremity endp1;
130 BRepBlend_Extremity endp2;
131 Standard_Boolean hass1;
132 Standard_Boolean hass2;
138 #include <BRepBlend_Line.lxx>
144 #endif // _BRepBlend_Line_HeaderFile