1 // Created on: 1991-09-10
2 // Created by: Michel Chauvat
3 // Copyright (c) 1991-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 _ElCLib_HeaderFile
18 #define _ElCLib_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
26 #include <Standard_Integer.hxx>
28 #include <gp_Pnt2d.hxx>
29 #include <gp_Vec2d.hxx>
52 //! Provides functions for basic geometric computations on
53 //! elementary curves such as conics and lines in 2D and 3D space.
55 //! - calculation of a point or derived vector on a 2D or
57 //! - the curve is provided by the gp package, or
58 //! defined in reference form (as in the gp package),
60 //! - the point is defined by a parameter,
61 //! - evaluation of the parameter corresponding to a point
62 //! on a 2D or 3D curve from gp,
63 //! - various elementary computations which allow you to
64 //! position parameterized values within the period of a curve.
66 //! - ElCLib stands for Elementary Curves Library.
67 //! - If the curves provided by the gp package are not
68 //! explicitly parameterized, they still have an implicit
69 //! parameterization, analogous to that which they infer
70 //! for the equivalent Geom or Geom2d curves.
78 //! Return a value in the range <UFirst, ULast> by
79 //! adding or removing the period <ULast - UFirst> to
82 //! It is expected but not checked that (ULast > UFirst)
83 Standard_EXPORT static Standard_Real InPeriod (const Standard_Real U, const Standard_Real UFirst, const Standard_Real ULast);
85 //! Adjust U1 and U2 in the parametric range UFirst
86 //! Ulast of a periodic curve, where ULast -
87 //! UFirst is its period. To do this, this function:
88 //! - sets U1 in the range [ UFirst, ULast ] by
89 //! adding/removing the period to/from the value U1, then
90 //! - sets U2 in the range [ U1, U1 + period ] by
91 //! adding/removing the period to/from the value U2.
92 //! Precision is used to test the equalities.
93 Standard_EXPORT static void AdjustPeriodic (const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real Precision, Standard_Real& U1, Standard_Real& U2);
95 //! For elementary curves (lines, circles and conics) from
96 //! the gp package, computes the point of parameter U.
97 //! The result is either:
98 //! - a gp_Pnt point for a curve in 3D space, or
99 //! - a gp_Pnt2d point for a curve in 2D space.
100 Standard_EXPORT static gp_Pnt Value (const Standard_Real U, const gp_Lin& L);
102 static gp_Pnt Value (const Standard_Real U, const gp_Circ& C);
104 static gp_Pnt Value (const Standard_Real U, const gp_Elips& E);
106 static gp_Pnt Value (const Standard_Real U, const gp_Hypr& H);
108 static gp_Pnt Value (const Standard_Real U, const gp_Parab& Prb);
111 //! For elementary curves (lines, circles and conics) from the
112 //! gp package, computes:
113 //! - the point P of parameter U, and
114 //! - the first derivative vector V1 at this point.
115 //! The results P and V1 are either:
116 //! - a gp_Pnt point and a gp_Vec vector, for a curve in 3D space, or
117 //! - a gp_Pnt2d point and a gp_Vec2d vector, for a curve in 2D space.
118 Standard_EXPORT static void D1 (const Standard_Real U, const gp_Lin& L, gp_Pnt& P, gp_Vec& V1);
120 static void D1 (const Standard_Real U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1);
122 static void D1 (const Standard_Real U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1);
124 static void D1 (const Standard_Real U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1);
126 static void D1 (const Standard_Real U, const gp_Parab& Prb, gp_Pnt& P, gp_Vec& V1);
128 //! For elementary curves (circles and conics) from the gp
129 //! package, computes:
130 //! - the point P of parameter U, and
131 //! - the first and second derivative vectors V1 and V2 at this point.
132 //! The results, P, V1 and V2, are either:
133 //! - a gp_Pnt point and two gp_Vec vectors, for a curve in 3D space, or
134 //! - a gp_Pnt2d point and two gp_Vec2d vectors, for a curve in 2D space.
135 Standard_EXPORT static void D2 (const Standard_Real U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
137 static void D2 (const Standard_Real U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
139 static void D2 (const Standard_Real U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
141 static void D2 (const Standard_Real U, const gp_Parab& Prb, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
143 //! For elementary curves (circles, ellipses and hyperbolae)
144 //! from the gp package, computes:
145 //! - the point P of parameter U, and
146 //! - the first, second and third derivative vectors V1, V2
147 //! and V3 at this point.
148 //! The results, P, V1, V2 and V3, are either:
149 //! - a gp_Pnt point and three gp_Vec vectors, for a curve in 3D space, or
150 //! - a gp_Pnt2d point and three gp_Vec2d vectors, for a curve in 2D space.
151 Standard_EXPORT static void D3 (const Standard_Real U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
153 static void D3 (const Standard_Real U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
155 Standard_EXPORT static void D3 (const Standard_Real U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
158 //! For elementary curves (lines, circles and conics) from
159 //! the gp package, computes the vector corresponding to
160 //! the Nth derivative at the point of parameter U. The result is either:
161 //! - a gp_Vec vector for a curve in 3D space, or
162 //! - a gp_Vec2d vector for a curve in 2D space.
163 //! In the following functions N is the order of derivation
164 //! and should be greater than 0
165 Standard_EXPORT static gp_Vec DN (const Standard_Real U, const gp_Lin& L, const Standard_Integer N);
167 static gp_Vec DN (const Standard_Real U, const gp_Circ& C, const Standard_Integer N);
169 static gp_Vec DN (const Standard_Real U, const gp_Elips& E, const Standard_Integer N);
171 static gp_Vec DN (const Standard_Real U, const gp_Hypr& H, const Standard_Integer N);
173 static gp_Vec DN (const Standard_Real U, const gp_Parab& Prb, const Standard_Integer N);
175 static gp_Pnt2d Value (const Standard_Real U, const gp_Lin2d& L);
177 static gp_Pnt2d Value (const Standard_Real U, const gp_Circ2d& C);
179 static gp_Pnt2d Value (const Standard_Real U, const gp_Elips2d& E);
181 static gp_Pnt2d Value (const Standard_Real U, const gp_Hypr2d& H);
183 static gp_Pnt2d Value (const Standard_Real U, const gp_Parab2d& Prb);
185 static void D1 (const Standard_Real U, const gp_Lin2d& L, gp_Pnt2d& P, gp_Vec2d& V1);
187 static void D1 (const Standard_Real U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1);
189 static void D1 (const Standard_Real U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1);
191 static void D1 (const Standard_Real U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1);
193 static void D1 (const Standard_Real U, const gp_Parab2d& Prb, gp_Pnt2d& P, gp_Vec2d& V1);
195 static void D2 (const Standard_Real U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
197 static void D2 (const Standard_Real U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
199 static void D2 (const Standard_Real U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
201 static void D2 (const Standard_Real U, const gp_Parab2d& Prb, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
203 static void D3 (const Standard_Real U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
205 static void D3 (const Standard_Real U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
208 //! In the following functions N is the order of derivation
209 //! and should be greater than 0
210 static void D3 (const Standard_Real U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
212 static gp_Vec2d DN (const Standard_Real U, const gp_Lin2d& L, const Standard_Integer N);
214 static gp_Vec2d DN (const Standard_Real U, const gp_Circ2d& C, const Standard_Integer N);
216 static gp_Vec2d DN (const Standard_Real U, const gp_Elips2d& E, const Standard_Integer N);
218 static gp_Vec2d DN (const Standard_Real U, const gp_Hypr2d& H, const Standard_Integer N);
220 static gp_Vec2d DN (const Standard_Real U, const gp_Parab2d& Prb, const Standard_Integer N);
223 //! The following basis functions compute the derivatives on
224 //! elementary curves defined by their geometric characteristics.
225 //! These functions can be called without constructing a conic
226 //! from package gp. They are called by the previous functions.
228 //! A circle is defined by its position and its radius.
229 Standard_EXPORT static gp_Pnt LineValue (const Standard_Real U, const gp_Ax1& Pos);
231 Standard_EXPORT static gp_Pnt CircleValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius);
233 Standard_EXPORT static gp_Pnt EllipseValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
235 Standard_EXPORT static gp_Pnt HyperbolaValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
237 Standard_EXPORT static gp_Pnt ParabolaValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Focal);
239 Standard_EXPORT static void LineD1 (const Standard_Real U, const gp_Ax1& Pos, gp_Pnt& P, gp_Vec& V1);
241 Standard_EXPORT static void CircleD1 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius, gp_Pnt& P, gp_Vec& V1);
243 Standard_EXPORT static void EllipseD1 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt& P, gp_Vec& V1);
245 Standard_EXPORT static void HyperbolaD1 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt& P, gp_Vec& V1);
247 Standard_EXPORT static void ParabolaD1 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Focal, gp_Pnt& P, gp_Vec& V1);
249 Standard_EXPORT static void CircleD2 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
251 Standard_EXPORT static void EllipseD2 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
253 Standard_EXPORT static void HyperbolaD2 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
255 Standard_EXPORT static void ParabolaD2 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Focal, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
257 Standard_EXPORT static void CircleD3 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
259 Standard_EXPORT static void EllipseD3 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
261 Standard_EXPORT static void HyperbolaD3 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
264 //! In the following functions N is the order of derivation
265 //! and should be greater than 0
266 Standard_EXPORT static gp_Vec LineDN (const Standard_Real U, const gp_Ax1& Pos, const Standard_Integer N);
268 Standard_EXPORT static gp_Vec CircleDN (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius, const Standard_Integer N);
270 Standard_EXPORT static gp_Vec EllipseDN (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Integer N);
272 Standard_EXPORT static gp_Vec HyperbolaDN (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Integer N);
274 Standard_EXPORT static gp_Vec ParabolaDN (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Focal, const Standard_Integer N);
276 Standard_EXPORT static gp_Pnt2d LineValue (const Standard_Real U, const gp_Ax2d& Pos);
278 Standard_EXPORT static gp_Pnt2d CircleValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius);
280 Standard_EXPORT static gp_Pnt2d EllipseValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
282 Standard_EXPORT static gp_Pnt2d HyperbolaValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
284 Standard_EXPORT static gp_Pnt2d ParabolaValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Focal);
286 Standard_EXPORT static void LineD1 (const Standard_Real U, const gp_Ax2d& Pos, gp_Pnt2d& P, gp_Vec2d& V1);
288 Standard_EXPORT static void CircleD1 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius, gp_Pnt2d& P, gp_Vec2d& V1);
290 Standard_EXPORT static void EllipseD1 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt2d& P, gp_Vec2d& V1);
292 Standard_EXPORT static void HyperbolaD1 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt2d& P, gp_Vec2d& V1);
294 Standard_EXPORT static void ParabolaD1 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Focal, gp_Pnt2d& P, gp_Vec2d& V1);
296 Standard_EXPORT static void CircleD2 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
298 Standard_EXPORT static void EllipseD2 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
300 Standard_EXPORT static void HyperbolaD2 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
302 Standard_EXPORT static void ParabolaD2 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Focal, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
304 Standard_EXPORT static void CircleD3 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
306 Standard_EXPORT static void EllipseD3 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
309 //! In the following functions N is the order of derivation
310 //! and should be greater than 0
311 Standard_EXPORT static void HyperbolaD3 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
313 Standard_EXPORT static gp_Vec2d LineDN (const Standard_Real U, const gp_Ax2d& Pos, const Standard_Integer N);
315 Standard_EXPORT static gp_Vec2d CircleDN (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius, const Standard_Integer N);
317 Standard_EXPORT static gp_Vec2d EllipseDN (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Integer N);
319 Standard_EXPORT static gp_Vec2d HyperbolaDN (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const Standard_Integer N);
322 //! The following functions compute the parametric value corresponding
323 //! to a given point on a elementary curve. The point should be on the
325 Standard_EXPORT static gp_Vec2d ParabolaDN (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Focal, const Standard_Integer N);
328 //! Computes the parameter value of the point P on the given curve.
329 //! Note: In its local coordinate system, the parametric
330 //! equation of the curve is given by the following:
331 //! - for the line L: P(U) = Po + U*Vo
332 //! where Po is the origin and Vo the unit vector of its positioning axis.
333 //! - for the circle C: X(U) = Radius*Cos(U), Y(U) = Radius*Sin(U)
334 //! - for the ellipse E: X(U) = MajorRadius*Cos(U). Y(U) = MinorRadius*Sin(U)
335 //! - for the hyperbola H: X(U) = MajorRadius*Ch(U), Y(U) = MinorRadius*Sh(U)
336 //! - for the parabola Prb:
337 //! X(U) = U**2 / (2*p)
339 //! where p is the distance between the focus and the directrix.
341 //! The point P must be on the curve. These functions are
342 //! not protected, however, and if point P is not on the
343 //! curve, an exception may be raised.
344 static Standard_Real Parameter (const gp_Lin& L, const gp_Pnt& P);
347 //! P (U) = L.Location() + U * L.Direction()
348 static Standard_Real Parameter (const gp_Lin2d& L, const gp_Pnt2d& P);
350 static Standard_Real Parameter (const gp_Circ& C, const gp_Pnt& P);
353 //! In the local coordinate system of the circle
354 //! X (U) = Radius * Cos (U)
355 //! Y (U) = Radius * Sin (U)
356 static Standard_Real Parameter (const gp_Circ2d& C, const gp_Pnt2d& P);
358 static Standard_Real Parameter (const gp_Elips& E, const gp_Pnt& P);
361 //! In the local coordinate system of the Ellipse
362 //! X (U) = MajorRadius * Cos (U)
363 //! Y (U) = MinorRadius * Sin (U)
364 static Standard_Real Parameter (const gp_Elips2d& E, const gp_Pnt2d& P);
366 static Standard_Real Parameter (const gp_Hypr& H, const gp_Pnt& P);
369 //! In the local coordinate system of the Hyperbola
370 //! X (U) = MajorRadius * Ch (U)
371 //! Y (U) = MinorRadius * Sh (U)
372 static Standard_Real Parameter (const gp_Hypr2d& H, const gp_Pnt2d& P);
374 static Standard_Real Parameter (const gp_Parab& Prb, const gp_Pnt& P);
377 //! In the local coordinate system of the parabola
378 //! Y**2 = (2*P) * X where P is the distance between the focus
379 //! and the directrix.
380 static Standard_Real Parameter (const gp_Parab2d& Prb, const gp_Pnt2d& P);
382 Standard_EXPORT static Standard_Real LineParameter (const gp_Ax1& Pos, const gp_Pnt& P);
385 //! P (U) = L.Location() + U * L.Direction()
386 Standard_EXPORT static Standard_Real LineParameter (const gp_Ax2d& Pos, const gp_Pnt2d& P);
388 Standard_EXPORT static Standard_Real CircleParameter (const gp_Ax2& Pos, const gp_Pnt& P);
390 //! Pos is the Axis of the Circle
392 //! In the local coordinate system of the circle
393 //! X (U) = Radius * Cos (U)
394 //! Y (U) = Radius * Sin (U)
395 Standard_EXPORT static Standard_Real CircleParameter (const gp_Ax22d& Pos, const gp_Pnt2d& P);
397 Standard_EXPORT static Standard_Real EllipseParameter (const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt& P);
399 //! Pos is the Axis of the Ellipse
401 //! In the local coordinate system of the Ellipse
402 //! X (U) = MajorRadius * Cos (U)
403 //! Y (U) = MinorRadius * Sin (U)
404 Standard_EXPORT static Standard_Real EllipseParameter (const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt2d& P);
406 Standard_EXPORT static Standard_Real HyperbolaParameter (const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt& P);
408 //! Pos is the Axis of the Hyperbola
410 //! In the local coordinate system of the Hyperbola
411 //! X (U) = MajorRadius * Ch (U)
412 //! Y (U) = MinorRadius * Sh (U)
413 Standard_EXPORT static Standard_Real HyperbolaParameter (const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt2d& P);
415 Standard_EXPORT static Standard_Real ParabolaParameter (const gp_Ax2& Pos, const gp_Pnt& P);
417 //! Pos is the mirror axis of the parabola
419 //! In the local coordinate system of the parabola
420 //! Y**2 = (2*P) * X where P is the distance between the focus
421 //! and the directrix.
422 //! The following functions build a 3d curve from a
423 //! 2d curve at a given position defined with an Ax2.
424 Standard_EXPORT static Standard_Real ParabolaParameter (const gp_Ax22d& Pos, const gp_Pnt2d& P);
426 Standard_EXPORT static gp_Pnt To3d (const gp_Ax2& Pos, const gp_Pnt2d& P);
428 Standard_EXPORT static gp_Vec To3d (const gp_Ax2& Pos, const gp_Vec2d& V);
430 Standard_EXPORT static gp_Dir To3d (const gp_Ax2& Pos, const gp_Dir2d& V);
432 Standard_EXPORT static gp_Ax1 To3d (const gp_Ax2& Pos, const gp_Ax2d& A);
434 Standard_EXPORT static gp_Ax2 To3d (const gp_Ax2& Pos, const gp_Ax22d& A);
436 Standard_EXPORT static gp_Lin To3d (const gp_Ax2& Pos, const gp_Lin2d& L);
438 Standard_EXPORT static gp_Circ To3d (const gp_Ax2& Pos, const gp_Circ2d& C);
440 Standard_EXPORT static gp_Elips To3d (const gp_Ax2& Pos, const gp_Elips2d& E);
442 Standard_EXPORT static gp_Hypr To3d (const gp_Ax2& Pos, const gp_Hypr2d& H);
445 //! These functions build a 3D geometric entity from a 2D geometric entity.
446 //! The "X Axis" and the "Y Axis" of the global coordinate
447 //! system (i.e. 2D space) are lined up respectively with the
448 //! "X Axis" and "Y Axis" of the 3D coordinate system, Pos.
449 Standard_EXPORT static gp_Parab To3d (const gp_Ax2& Pos, const gp_Parab2d& Prb);
469 #include <ElCLib.lxx>
475 #endif // _ElCLib_HeaderFile