1 // Created on: 1993-08-25
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1993-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 _GeomProjLib_HeaderFile
18 #define _GeomProjLib_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Boolean.hxx>
33 //! Projection of a curve on a surface.
41 //! gives the 2d-curve of a 3d-curve lying on a
42 //! surface ( uses GeomProjLib_ProjectedCurve )
43 //! The 3dCurve is taken between the parametrization
44 //! range [First, Last]
45 //! <Tolerance> is used as input if the projection needs
46 //! an approximation. In this case, the reached
47 //! tolerance is set in <Tolerance> as output.
48 //! WARNING : if the projection has failed, this
49 //! method returns a null Handle.
50 Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Standard_Real First, const Standard_Real Last, const Handle(Geom_Surface)& S, const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real VFirst, const Standard_Real VLast, Standard_Real& Tolerance);
52 //! gives the 2d-curve of a 3d-curve lying on a
53 //! surface ( uses GeomProjLib_ProjectedCurve )
54 //! The 3dCurve is taken between the parametrization
55 //! range [First, Last]
56 //! <Tolerance> is used as input if the projection needs
57 //! an approximation. In this case, the reached
58 //! tolerance is set in <Tolerance> as output.
59 //! WARNING : if the projection has failed, this
60 //! method returns a null Handle.
61 Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Standard_Real First, const Standard_Real Last, const Handle(Geom_Surface)& S, Standard_Real& Tolerance);
63 //! gives the 2d-curve of a 3d-curve lying on a
64 //! surface ( uses GeomProjLib_ProjectedCurve )
65 //! The 3dCurve is taken between the parametrization
66 //! range [First, Last]
67 //! If the projection needs an approximation,
68 //! Precision::PApproximation() is used.
69 //! WARNING : if the projection has failed, this
70 //! method returns a null Handle.
71 Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Standard_Real First, const Standard_Real Last, const Handle(Geom_Surface)& S);
73 //! gives the 2d-curve of a 3d-curve lying on a
74 //! surface ( uses GeomProjLib_ProjectedCurve ).
75 //! If the projection needs an approximation,
76 //! Precision::PApproximation() is used.
77 //! WARNING : if the projection has failed, this
78 //! method returns a null Handle.
79 Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S);
81 //! gives the 2d-curve of a 3d-curve lying on a
82 //! surface ( uses GeomProjLib_ProjectedCurve ).
83 //! If the projection needs an approximation,
84 //! Precision::PApproximation() is used.
85 //! WARNING : if the projection has failed, this
86 //! method returns a null Handle.
87 //! can expand a little the bounds of surface
88 Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S, const Standard_Real UDeb, const Standard_Real UFin, const Standard_Real VDeb, const Standard_Real VFin);
90 //! gives the 2d-curve of a 3d-curve lying on a
91 //! surface ( uses GeomProjLib_ProjectedCurve ).
92 //! If the projection needs an approximation,
93 //! Precision::PApproximation() is used.
94 //! WARNING : if the projection has failed, this
95 //! method returns a null Handle.
96 //! can expand a little the bounds of surface
97 Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S, const Standard_Real UDeb, const Standard_Real UFin, const Standard_Real VDeb, const Standard_Real VFin, Standard_Real& Tolerance);
99 //! Constructs the 3d-curve from the normal
100 //! projection of the Curve <C> on the surface <S>.
101 //! WARNING : if the projection has failes returns a
103 Standard_EXPORT static Handle(Geom_Curve) Project (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S);
105 //! Constructs the 3d-curves from the projection
106 //! of the curve <Curve> on the plane <Plane> along
107 //! the direction <Dir>.
108 //! If <KeepParametrization> is true, the parametrization
109 //! of the Projected Curve <PC> will be the same as the
110 //! parametrization of the initial curve <C>.
111 //! It meens: proj(C(u)) = PC(u) for each u.
112 //! Otherwize, the parametrization may change.
113 Standard_EXPORT static Handle(Geom_Curve) ProjectOnPlane (const Handle(Geom_Curve)& Curve, const Handle(Geom_Plane)& Plane, const gp_Dir& Dir, const Standard_Boolean KeepParametrization);
138 #endif // _GeomProjLib_HeaderFile