b311480e |
1 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
b311480e |
14 | |
7fd59977 |
15 | #include <Blend_SequenceOfPoint.hxx> |
16 | #include <Standard_DomainError.hxx> |
17 | |
18 | |
04f7bd75 |
19 | inline void BRepBlend_Line::Append(const Blend_Point& P) |
7fd59977 |
20 | { |
21 | seqpt.Append(P); |
22 | } |
23 | |
04f7bd75 |
24 | inline void BRepBlend_Line::Prepend(const Blend_Point& P) |
7fd59977 |
25 | { |
26 | seqpt.Prepend(P); |
27 | } |
28 | |
04f7bd75 |
29 | inline void BRepBlend_Line::InsertBefore(const Standard_Integer Index, |
7fd59977 |
30 | const Blend_Point& P) |
31 | { |
32 | seqpt.InsertBefore(Index, P); |
33 | } |
34 | |
04f7bd75 |
35 | inline void BRepBlend_Line::Remove(const Standard_Integer FromIndex, |
7fd59977 |
36 | const Standard_Integer ToIndex) |
37 | { |
38 | seqpt.Remove(FromIndex,ToIndex); |
39 | } |
40 | |
04f7bd75 |
41 | inline void BRepBlend_Line::SetStartPoints(const BRepBlend_Extremity& StartPtOnS1, |
42 | const BRepBlend_Extremity& StartPtOnS2) |
7fd59977 |
43 | |
44 | { |
45 | stp1 = StartPtOnS1; |
46 | stp2 = StartPtOnS2; |
47 | } |
48 | |
04f7bd75 |
49 | inline void BRepBlend_Line::SetEndPoints(const BRepBlend_Extremity& EndPtOnS1, |
50 | const BRepBlend_Extremity& EndPtOnS2) |
7fd59977 |
51 | |
52 | { |
53 | endp1 = EndPtOnS1; |
54 | endp2 = EndPtOnS2; |
55 | } |
56 | |
04f7bd75 |
57 | inline Standard_Integer BRepBlend_Line::NbPoints () const |
7fd59977 |
58 | { |
59 | return seqpt.Length(); |
60 | } |
61 | |
04f7bd75 |
62 | inline const Blend_Point& BRepBlend_Line::Point(const Standard_Integer Index) const |
7fd59977 |
63 | { |
64 | return seqpt(Index); |
65 | } |
66 | |
04f7bd75 |
67 | inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS1 () const |
7fd59977 |
68 | { |
9775fa61 |
69 | if (!hass1) {throw Standard_DomainError();} |
7fd59977 |
70 | return tras1; |
71 | } |
72 | |
04f7bd75 |
73 | inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS2 () const |
7fd59977 |
74 | { |
9775fa61 |
75 | if (!hass2) {throw Standard_DomainError();} |
7fd59977 |
76 | return tras2; |
77 | } |
78 | |
04f7bd75 |
79 | inline const BRepBlend_Extremity& BRepBlend_Line::StartPointOnFirst() const |
7fd59977 |
80 | { |
81 | return stp1; |
82 | } |
83 | |
04f7bd75 |
84 | inline const BRepBlend_Extremity& BRepBlend_Line::StartPointOnSecond() const |
7fd59977 |
85 | { |
86 | return stp2; |
87 | } |
88 | |
04f7bd75 |
89 | inline const BRepBlend_Extremity& BRepBlend_Line::EndPointOnFirst() const |
7fd59977 |
90 | { |
91 | return endp1; |
92 | } |
93 | |
04f7bd75 |
94 | inline const BRepBlend_Extremity& BRepBlend_Line::EndPointOnSecond() const |
7fd59977 |
95 | { |
96 | return endp2; |
97 | } |
98 | |
04f7bd75 |
99 | inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS () const |
7fd59977 |
100 | { |
9775fa61 |
101 | if (!hass1) {throw Standard_DomainError();} |
7fd59977 |
102 | return tras1; |
103 | } |
104 | |
105 | |