42cf5bc1 |
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 |
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_Line_HeaderFile |
18 | #define _BRepBlend_Line_HeaderFile |
19 | |
42cf5bc1 |
20 | #include <Blend_SequenceOfPoint.hxx> |
42cf5bc1 |
21 | #include <BRepBlend_Extremity.hxx> |
25e59720 |
22 | #include <Standard_Transient.hxx> |
42cf5bc1 |
23 | #include <Standard_Integer.hxx> |
9ff36dac |
24 | |
42cf5bc1 |
25 | class Blend_Point; |
42cf5bc1 |
26 | |
27 | |
28 | class BRepBlend_Line; |
25e59720 |
29 | DEFINE_STANDARD_HANDLE(BRepBlend_Line, Standard_Transient) |
42cf5bc1 |
30 | |
31 | |
25e59720 |
32 | class BRepBlend_Line : public Standard_Transient |
42cf5bc1 |
33 | { |
34 | |
35 | public: |
36 | |
37 | |
38 | Standard_EXPORT BRepBlend_Line(); |
39 | |
40 | //! Clears the content of the line. |
41 | Standard_EXPORT void Clear(); |
42 | |
43 | //! Adds a point in the line. |
44 | void Append (const Blend_Point& P); |
45 | |
46 | //! Adds a point in the line at the first place. |
47 | void Prepend (const Blend_Point& P); |
48 | |
49 | //! Adds a point in the line at the first place. |
50 | void InsertBefore (const Standard_Integer Index, const Blend_Point& P); |
51 | |
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); |
56 | |
57 | //! Sets the value of the transition of the line on S1 and |
58 | //! the line on S2. |
59 | Standard_EXPORT void Set (const IntSurf_TypeTrans TranS1, const IntSurf_TypeTrans TranS2); |
60 | |
61 | //! Sets the value of the transition of the line on a surface |
62 | Standard_EXPORT void Set (const IntSurf_TypeTrans Trans); |
63 | |
64 | //! Sets the values of the start points for the line. |
65 | void SetStartPoints (const BRepBlend_Extremity& StartPt1, const BRepBlend_Extremity& StartPt2); |
66 | |
67 | //! Sets tne values of the end points for the line. |
68 | void SetEndPoints (const BRepBlend_Extremity& EndPt1, const BRepBlend_Extremity& EndPt2); |
69 | |
70 | //! Returns the number of points in the line. |
71 | Standard_Integer NbPoints() const; |
72 | |
73 | //! Returns the point of range Index. |
74 | const Blend_Point& Point (const Standard_Integer Index) const; |
75 | |
76 | //! Returns the type of the transition of the line defined |
77 | //! on the first surface. The transition is "constant" |
78 | //! along the line. |
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 |
87 | //! left-handed. |
88 | IntSurf_TypeTrans TransitionOnS1() const; |
89 | |
90 | //! Returns the type of the transition of the line defined |
91 | //! on the second surface. The transition is "constant" |
92 | //! along the line. |
93 | IntSurf_TypeTrans TransitionOnS2() const; |
94 | |
95 | //! Returns the start point on S1. |
96 | const BRepBlend_Extremity& StartPointOnFirst() const; |
97 | |
98 | //! Returns the start point on S2 |
99 | const BRepBlend_Extremity& StartPointOnSecond() const; |
100 | |
101 | //! Returns the end point on S1. |
102 | const BRepBlend_Extremity& EndPointOnFirst() const; |
103 | |
104 | //! Returns the point on S2. |
105 | const BRepBlend_Extremity& EndPointOnSecond() const; |
106 | |
107 | //! Returns the type of the transition of the line defined |
108 | //! on the surface. |
109 | IntSurf_TypeTrans TransitionOnS() const; |
110 | |
111 | |
112 | |
113 | |
25e59720 |
114 | DEFINE_STANDARD_RTTIEXT(BRepBlend_Line,Standard_Transient) |
42cf5bc1 |
115 | |
116 | protected: |
117 | |
118 | |
119 | |
120 | |
121 | private: |
122 | |
123 | |
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; |
133 | |
134 | |
135 | }; |
136 | |
137 | |
138 | #include <BRepBlend_Line.lxx> |
139 | |
140 | |
141 | |
142 | |
143 | |
144 | #endif // _BRepBlend_Line_HeaderFile |