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 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);
110 //! For elementary curves (lines, circles and conics) from the
111 //! gp package, computes:
112 //! - the point P of parameter U, and
113 //! - the first derivative vector V1 at this point.
114 //! The results P and V1 are either:
115 //! - a gp_Pnt point and a gp_Vec vector, for a curve in 3D space, or
116 //! - a gp_Pnt2d point and a gp_Vec2d vector, for a curve in 2D space.
117 static void D1 (const Standard_Real U, const gp_Lin& L, gp_Pnt& P, gp_Vec& V1);
119 static void D1 (const Standard_Real U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1);
121 static void D1 (const Standard_Real U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1);
123 static void D1 (const Standard_Real U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1);
125 static void D1 (const Standard_Real U, const gp_Parab& Prb, gp_Pnt& P, gp_Vec& V1);
127 //! For elementary curves (circles and conics) from the gp
128 //! package, computes:
129 //! - the point P of parameter U, and
130 //! - the first and second derivative vectors V1 and V2 at this point.
131 //! The results, P, V1 and V2, are either:
132 //! - a gp_Pnt point and two gp_Vec vectors, for a curve in 3D space, or
133 //! - a gp_Pnt2d point and two gp_Vec2d vectors, for a curve in 2D space.
134 static void D2 (const Standard_Real U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
136 static void D2 (const Standard_Real U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
138 static void D2 (const Standard_Real U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
140 static void D2 (const Standard_Real U, const gp_Parab& Prb, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
142 //! For elementary curves (circles, ellipses and hyperbolae)
143 //! from the gp package, computes:
144 //! - the point P of parameter U, and
145 //! - the first, second and third derivative vectors V1, V2
146 //! and V3 at this point.
147 //! The results, P, V1, V2 and V3, are either:
148 //! - a gp_Pnt point and three gp_Vec vectors, for a curve in 3D space, or
149 //! - a gp_Pnt2d point and three gp_Vec2d vectors, for a curve in 2D space.
150 static void D3 (const Standard_Real U, const gp_Circ& C, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
152 static void D3 (const Standard_Real U, const gp_Elips& E, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
154 static void D3 (const Standard_Real U, const gp_Hypr& H, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
156 //! For elementary curves (lines, circles and conics) from
157 //! the gp package, computes the vector corresponding to
158 //! the Nth derivative at the point of parameter U. The result is either:
159 //! - a gp_Vec vector for a curve in 3D space, or
160 //! - a gp_Vec2d vector for a curve in 2D space.
161 //! In the following functions N is the order of derivation
162 //! and should be greater than 0
163 static gp_Vec DN (const Standard_Real U, const gp_Lin& L, const Standard_Integer N);
165 static gp_Vec DN (const Standard_Real U, const gp_Circ& C, const Standard_Integer N);
167 static gp_Vec DN (const Standard_Real U, const gp_Elips& E, const Standard_Integer N);
169 static gp_Vec DN (const Standard_Real U, const gp_Hypr& H, const Standard_Integer N);
171 static gp_Vec DN (const Standard_Real U, const gp_Parab& Prb, const Standard_Integer N);
173 static gp_Pnt2d Value (const Standard_Real U, const gp_Lin2d& L);
175 static gp_Pnt2d Value (const Standard_Real U, const gp_Circ2d& C);
177 static gp_Pnt2d Value (const Standard_Real U, const gp_Elips2d& E);
179 static gp_Pnt2d Value (const Standard_Real U, const gp_Hypr2d& H);
181 static gp_Pnt2d Value (const Standard_Real U, const gp_Parab2d& Prb);
183 static void D1 (const Standard_Real U, const gp_Lin2d& L, gp_Pnt2d& P, gp_Vec2d& V1);
185 static void D1 (const Standard_Real U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1);
187 static void D1 (const Standard_Real U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1);
189 static void D1 (const Standard_Real U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1);
191 static void D1 (const Standard_Real U, const gp_Parab2d& Prb, gp_Pnt2d& P, gp_Vec2d& V1);
193 static void D2 (const Standard_Real U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
195 static void D2 (const Standard_Real U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
197 static void D2 (const Standard_Real U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
199 static void D2 (const Standard_Real U, const gp_Parab2d& Prb, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
201 static void D3 (const Standard_Real U, const gp_Circ2d& C, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
203 static void D3 (const Standard_Real U, const gp_Elips2d& E, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
205 //! In the following functions N is the order of derivation
206 //! and should be greater than 0
207 static void D3 (const Standard_Real U, const gp_Hypr2d& H, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
209 static gp_Vec2d DN (const Standard_Real U, const gp_Lin2d& L, const Standard_Integer N);
211 static gp_Vec2d DN (const Standard_Real U, const gp_Circ2d& C, const Standard_Integer N);
213 static gp_Vec2d DN (const Standard_Real U, const gp_Elips2d& E, const Standard_Integer N);
215 static gp_Vec2d DN (const Standard_Real U, const gp_Hypr2d& H, const Standard_Integer N);
217 static gp_Vec2d DN (const Standard_Real U, const gp_Parab2d& Prb, const Standard_Integer N);
220 //! The following basis functions compute the derivatives on
221 //! elementary curves defined by their geometric characteristics.
222 //! These functions can be called without constructing a conic
223 //! from package gp. They are called by the previous functions.
225 //! A circle is defined by its position and its radius.
226 Standard_EXPORT static gp_Pnt LineValue (const Standard_Real U, const gp_Ax1& Pos);
228 Standard_EXPORT static gp_Pnt CircleValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius);
230 Standard_EXPORT static gp_Pnt EllipseValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
232 Standard_EXPORT static gp_Pnt HyperbolaValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
234 Standard_EXPORT static gp_Pnt ParabolaValue (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Focal);
236 Standard_EXPORT static void LineD1 (const Standard_Real U, const gp_Ax1& Pos, gp_Pnt& P, gp_Vec& V1);
238 Standard_EXPORT static void CircleD1 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius, gp_Pnt& P, gp_Vec& V1);
240 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);
242 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);
244 Standard_EXPORT static void ParabolaD1 (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Focal, gp_Pnt& P, gp_Vec& V1);
246 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);
248 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);
250 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);
252 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);
254 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);
256 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);
258 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);
261 //! In the following functions N is the order of derivation
262 //! and should be greater than 0
263 Standard_EXPORT static gp_Vec LineDN (const Standard_Real U, const gp_Ax1& Pos, const Standard_Integer N);
265 Standard_EXPORT static gp_Vec CircleDN (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Radius, const Standard_Integer N);
267 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);
269 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);
271 Standard_EXPORT static gp_Vec ParabolaDN (const Standard_Real U, const gp_Ax2& Pos, const Standard_Real Focal, const Standard_Integer N);
273 Standard_EXPORT static gp_Pnt2d LineValue (const Standard_Real U, const gp_Ax2d& Pos);
275 Standard_EXPORT static gp_Pnt2d CircleValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius);
277 Standard_EXPORT static gp_Pnt2d EllipseValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
279 Standard_EXPORT static gp_Pnt2d HyperbolaValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius);
281 Standard_EXPORT static gp_Pnt2d ParabolaValue (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Focal);
283 Standard_EXPORT static void LineD1 (const Standard_Real U, const gp_Ax2d& Pos, gp_Pnt2d& P, gp_Vec2d& V1);
285 Standard_EXPORT static void CircleD1 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius, gp_Pnt2d& P, gp_Vec2d& V1);
287 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);
289 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);
291 Standard_EXPORT static void ParabolaD1 (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Focal, gp_Pnt2d& P, gp_Vec2d& V1);
293 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);
295 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);
297 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);
299 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);
301 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);
303 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);
306 //! In the following functions N is the order of derivation
307 //! and should be greater than 0
308 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);
310 Standard_EXPORT static gp_Vec2d LineDN (const Standard_Real U, const gp_Ax2d& Pos, const Standard_Integer N);
312 Standard_EXPORT static gp_Vec2d CircleDN (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Radius, const Standard_Integer N);
314 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);
316 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);
319 //! The following functions compute the parametric value corresponding
320 //! to a given point on a elementary curve. The point should be on the
322 Standard_EXPORT static gp_Vec2d ParabolaDN (const Standard_Real U, const gp_Ax22d& Pos, const Standard_Real Focal, const Standard_Integer N);
325 //! Computes the parameter value of the point P on the given curve.
326 //! Note: In its local coordinate system, the parametric
327 //! equation of the curve is given by the following:
328 //! - for the line L: P(U) = Po + U*Vo
329 //! where Po is the origin and Vo the unit vector of its positioning axis.
330 //! - for the circle C: X(U) = Radius*Cos(U), Y(U) = Radius*Sin(U)
331 //! - for the ellipse E: X(U) = MajorRadius*Cos(U). Y(U) = MinorRadius*Sin(U)
332 //! - for the hyperbola H: X(U) = MajorRadius*Ch(U), Y(U) = MinorRadius*Sh(U)
333 //! - for the parabola Prb:
334 //! X(U) = U**2 / (2*p)
336 //! where p is the distance between the focus and the directrix.
338 //! The point P must be on the curve. These functions are
339 //! not protected, however, and if point P is not on the
340 //! curve, an exception may be raised.
341 static Standard_Real Parameter (const gp_Lin& L, const gp_Pnt& P);
344 //! P (U) = L.Location() + U * L.Direction()
345 static Standard_Real Parameter (const gp_Lin2d& L, const gp_Pnt2d& P);
347 static Standard_Real Parameter (const gp_Circ& C, const gp_Pnt& P);
350 //! In the local coordinate system of the circle
351 //! X (U) = Radius * Cos (U)
352 //! Y (U) = Radius * Sin (U)
353 static Standard_Real Parameter (const gp_Circ2d& C, const gp_Pnt2d& P);
355 static Standard_Real Parameter (const gp_Elips& E, const gp_Pnt& P);
358 //! In the local coordinate system of the Ellipse
359 //! X (U) = MajorRadius * Cos (U)
360 //! Y (U) = MinorRadius * Sin (U)
361 static Standard_Real Parameter (const gp_Elips2d& E, const gp_Pnt2d& P);
363 static Standard_Real Parameter (const gp_Hypr& H, const gp_Pnt& P);
366 //! In the local coordinate system of the Hyperbola
367 //! X (U) = MajorRadius * Ch (U)
368 //! Y (U) = MinorRadius * Sh (U)
369 static Standard_Real Parameter (const gp_Hypr2d& H, const gp_Pnt2d& P);
371 static Standard_Real Parameter (const gp_Parab& Prb, const gp_Pnt& P);
374 //! In the local coordinate system of the parabola
375 //! Y**2 = (2*P) * X where P is the distance between the focus
376 //! and the directrix.
377 static Standard_Real Parameter (const gp_Parab2d& Prb, const gp_Pnt2d& P);
379 Standard_EXPORT static Standard_Real LineParameter (const gp_Ax1& Pos, const gp_Pnt& P);
382 //! P (U) = L.Location() + U * L.Direction()
383 Standard_EXPORT static Standard_Real LineParameter (const gp_Ax2d& Pos, const gp_Pnt2d& P);
385 Standard_EXPORT static Standard_Real CircleParameter (const gp_Ax2& Pos, const gp_Pnt& P);
387 //! Pos is the Axis of the Circle
389 //! In the local coordinate system of the circle
390 //! X (U) = Radius * Cos (U)
391 //! Y (U) = Radius * Sin (U)
392 Standard_EXPORT static Standard_Real CircleParameter (const gp_Ax22d& Pos, const gp_Pnt2d& P);
394 Standard_EXPORT static Standard_Real EllipseParameter (const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt& P);
396 //! Pos is the Axis of the Ellipse
398 //! In the local coordinate system of the Ellipse
399 //! X (U) = MajorRadius * Cos (U)
400 //! Y (U) = MinorRadius * Sin (U)
401 Standard_EXPORT static Standard_Real EllipseParameter (const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt2d& P);
403 Standard_EXPORT static Standard_Real HyperbolaParameter (const gp_Ax2& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt& P);
405 //! Pos is the Axis of the Hyperbola
407 //! In the local coordinate system of the Hyperbola
408 //! X (U) = MajorRadius * Ch (U)
409 //! Y (U) = MinorRadius * Sh (U)
410 Standard_EXPORT static Standard_Real HyperbolaParameter (const gp_Ax22d& Pos, const Standard_Real MajorRadius, const Standard_Real MinorRadius, const gp_Pnt2d& P);
412 Standard_EXPORT static Standard_Real ParabolaParameter (const gp_Ax2& Pos, const gp_Pnt& P);
414 //! Pos is the mirror axis of the parabola
416 //! In the local coordinate system of the parabola
417 //! Y**2 = (2*P) * X where P is the distance between the focus
418 //! and the directrix.
419 //! The following functions build a 3d curve from a
420 //! 2d curve at a given position defined with an Ax2.
421 Standard_EXPORT static Standard_Real ParabolaParameter (const gp_Ax22d& Pos, const gp_Pnt2d& P);
423 Standard_EXPORT static gp_Pnt To3d (const gp_Ax2& Pos, const gp_Pnt2d& P);
425 Standard_EXPORT static gp_Vec To3d (const gp_Ax2& Pos, const gp_Vec2d& V);
427 Standard_EXPORT static gp_Dir To3d (const gp_Ax2& Pos, const gp_Dir2d& V);
429 Standard_EXPORT static gp_Ax1 To3d (const gp_Ax2& Pos, const gp_Ax2d& A);
431 Standard_EXPORT static gp_Ax2 To3d (const gp_Ax2& Pos, const gp_Ax22d& A);
433 Standard_EXPORT static gp_Lin To3d (const gp_Ax2& Pos, const gp_Lin2d& L);
435 Standard_EXPORT static gp_Circ To3d (const gp_Ax2& Pos, const gp_Circ2d& C);
437 Standard_EXPORT static gp_Elips To3d (const gp_Ax2& Pos, const gp_Elips2d& E);
439 Standard_EXPORT static gp_Hypr To3d (const gp_Ax2& Pos, const gp_Hypr2d& H);
442 //! These functions build a 3D geometric entity from a 2D geometric entity.
443 //! The "X Axis" and the "Y Axis" of the global coordinate
444 //! system (i.e. 2D space) are lined up respectively with the
445 //! "X Axis" and "Y Axis" of the 3D coordinate system, Pos.
446 Standard_EXPORT static gp_Parab To3d (const gp_Ax2& Pos, const gp_Parab2d& Prb);
466 #include <ElCLib.lxx>
472 #endif // _ElCLib_HeaderFile