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 <Standard_DomainError.hxx> |
16 | #include <gp_Vec2d.hxx> |
17 | |
af99433e |
18 | inline void Blend_Point::SetParameter(const Standard_Real Param) |
19 | { |
20 | prm = Param; |
21 | } |
22 | |
7fd59977 |
23 | inline const gp_Pnt& Blend_Point::PointOnS1 () const |
24 | { |
25 | return pt1; |
26 | } |
27 | |
28 | inline const gp_Pnt& Blend_Point::PointOnS2 () const |
29 | { |
30 | return pt2; |
31 | } |
32 | |
33 | inline Standard_Real Blend_Point::Parameter () const |
34 | { |
35 | return prm; |
36 | } |
37 | |
38 | inline void Blend_Point::ParametersOnS1 (Standard_Real& U1, |
39 | Standard_Real& V1) const |
40 | { |
9775fa61 |
41 | if (!hass1) {throw Standard_DomainError();} |
7fd59977 |
42 | U1 = u1; |
43 | V1 = v1; |
44 | } |
45 | |
46 | inline void Blend_Point::ParametersOnS2 (Standard_Real& U2, |
47 | Standard_Real& V2) const |
48 | { |
9775fa61 |
49 | if (!hass2) {throw Standard_DomainError();} |
7fd59977 |
50 | U2 = u2; |
51 | V2 = v2; |
52 | } |
53 | |
54 | inline Standard_Boolean Blend_Point::IsTangencyPoint () const |
55 | { |
56 | return istgt; |
57 | } |
58 | |
59 | |
60 | inline const gp_Vec& Blend_Point::TangentOnS1 () const |
61 | { |
9775fa61 |
62 | if (istgt) {throw Standard_DomainError();} |
7fd59977 |
63 | return tg1; |
64 | } |
65 | |
66 | inline const gp_Vec& Blend_Point::TangentOnS2 () const |
67 | { |
9775fa61 |
68 | if (istgt) {throw Standard_DomainError();} |
7fd59977 |
69 | return tg2; |
70 | } |
71 | |
72 | inline gp_Vec2d Blend_Point::Tangent2dOnS1 () const |
73 | { |
9775fa61 |
74 | if (istgt || !hass1) {throw Standard_DomainError();} |
7fd59977 |
75 | return gp_Vec2d(utg12d,vtg12d); |
76 | } |
77 | |
78 | inline gp_Vec2d Blend_Point::Tangent2dOnS2 () const |
79 | { |
9775fa61 |
80 | if (istgt || !hass2) {throw Standard_DomainError();} |
7fd59977 |
81 | return gp_Vec2d(utg22d,vtg22d); |
82 | } |
83 | |
84 | inline const gp_Pnt& Blend_Point::PointOnS () const |
85 | { |
86 | return pt1; |
87 | } |
88 | |
89 | inline const gp_Pnt& Blend_Point::PointOnC () const |
90 | { |
91 | return pt2; |
92 | } |
93 | |
94 | inline void Blend_Point::ParametersOnS (Standard_Real& U1, |
95 | Standard_Real& V1) const |
96 | { |
9775fa61 |
97 | if (!hass1) {throw Standard_DomainError();} |
7fd59977 |
98 | U1 = u1; |
99 | V1 = v1; |
100 | } |
101 | |
102 | inline Standard_Real Blend_Point::ParameterOnC () const |
103 | { |
9775fa61 |
104 | if (!hasc2) {throw Standard_DomainError();} |
7fd59977 |
105 | return pc2; |
106 | } |
107 | |
108 | inline const gp_Vec& Blend_Point::TangentOnS () const |
109 | { |
9775fa61 |
110 | if (istgt || !hass1) {throw Standard_DomainError();} |
7fd59977 |
111 | return tg1; |
112 | } |
113 | |
114 | inline const gp_Vec& Blend_Point::TangentOnC () const |
115 | { |
9775fa61 |
116 | if (istgt) {throw Standard_DomainError();} |
7fd59977 |
117 | return tg2; |
118 | } |
119 | |
120 | inline gp_Vec2d Blend_Point::Tangent2d () const |
121 | { |
9775fa61 |
122 | if (istgt || !hass1) {throw Standard_DomainError();} |
7fd59977 |
123 | return gp_Vec2d(utg12d,vtg12d); |
124 | } |
125 | |
126 | |
127 | inline const gp_Pnt& Blend_Point::PointOnC1 () const |
128 | { |
129 | return pt1; |
130 | } |
131 | |
132 | inline const gp_Pnt& Blend_Point::PointOnC2 () const |
133 | { |
134 | return pt2; |
135 | } |
136 | |
137 | inline Standard_Real Blend_Point::ParameterOnC1 () const |
138 | { |
9775fa61 |
139 | if (!hasc1) {throw Standard_DomainError();} |
7fd59977 |
140 | return pc1; |
141 | } |
142 | |
143 | inline Standard_Real Blend_Point::ParameterOnC2 () const |
144 | { |
9775fa61 |
145 | if (!hasc2) {throw Standard_DomainError();} |
7fd59977 |
146 | return pc2; |
147 | } |
148 | |
149 | inline const gp_Vec& Blend_Point::TangentOnC1 () const |
150 | { |
9775fa61 |
151 | if (istgt || !hass1) {throw Standard_DomainError();} |
7fd59977 |
152 | return tg1; |
153 | } |
154 | |
155 | inline const gp_Vec& Blend_Point::TangentOnC2 () const |
156 | { |
9775fa61 |
157 | if (istgt) {throw Standard_DomainError();} |
7fd59977 |
158 | return tg2; |
159 | } |