Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/GeomProjLib.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1993-08-25
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _GeomProjLib_HeaderFile
0018 #define _GeomProjLib_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Real.hxx>
0025 #include <Standard_Boolean.hxx>
0026 class Geom2d_Curve;
0027 class Geom_Curve;
0028 class Geom_Surface;
0029 class Geom_Plane;
0030 class gp_Dir;
0031 
0032 //! Projection of a curve on a surface.
0033 class GeomProjLib
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! gives the 2d-curve of a 3d-curve lying on a
0039   //! surface (uses GeomProjLib_ProjectedCurve)
0040   //! The 3dCurve is taken between the parametrization
0041   //! range [First, Last]
0042   //! <Tolerance> is used as input if the projection needs
0043   //! an approximation. In this case, the reached
0044   //! tolerance is set in <Tolerance> as output.
0045   //! WARNING: if the projection has failed, this
0046   //! method returns a null Handle.
0047   Standard_EXPORT static occ::handle<Geom2d_Curve> Curve2d(const occ::handle<Geom_Curve>&   C,
0048                                                            const double                     First,
0049                                                            const double                     Last,
0050                                                            const occ::handle<Geom_Surface>& S,
0051                                                            const double                     UFirst,
0052                                                            const double                     ULast,
0053                                                            const double                     VFirst,
0054                                                            const double                     VLast,
0055                                                            double& Tolerance);
0056 
0057   //! gives the 2d-curve of a 3d-curve lying on a
0058   //! surface (uses GeomProjLib_ProjectedCurve)
0059   //! The 3dCurve is taken between the parametrization
0060   //! range [First, Last]
0061   //! <Tolerance> is used as input if the projection needs
0062   //! an approximation. In this case, the reached
0063   //! tolerance is set in <Tolerance> as output.
0064   //! WARNING: if the projection has failed, this
0065   //! method returns a null Handle.
0066   Standard_EXPORT static occ::handle<Geom2d_Curve> Curve2d(const occ::handle<Geom_Curve>&   C,
0067                                                            const double                     First,
0068                                                            const double                     Last,
0069                                                            const occ::handle<Geom_Surface>& S,
0070                                                            double& Tolerance);
0071 
0072   //! gives the 2d-curve of a 3d-curve lying on a
0073   //! surface (uses GeomProjLib_ProjectedCurve)
0074   //! The 3dCurve is taken between the parametrization
0075   //! range [First, Last]
0076   //! If the projection needs an approximation,
0077   //! Precision::PApproximation() is used.
0078   //! WARNING: if the projection has failed, this
0079   //! method returns a null Handle.
0080   Standard_EXPORT static occ::handle<Geom2d_Curve> Curve2d(const occ::handle<Geom_Curve>&   C,
0081                                                            const double                     First,
0082                                                            const double                     Last,
0083                                                            const occ::handle<Geom_Surface>& S);
0084 
0085   //! gives the 2d-curve of a 3d-curve lying on a
0086   //! surface (uses GeomProjLib_ProjectedCurve)
0087   //! If the projection needs an approximation,
0088   //! Precision::PApproximation() is used.
0089   //! WARNING: if the projection has failed, this
0090   //! method returns a null Handle.
0091   Standard_EXPORT static occ::handle<Geom2d_Curve> Curve2d(const occ::handle<Geom_Curve>&   C,
0092                                                            const occ::handle<Geom_Surface>& S);
0093 
0094   //! gives the 2d-curve of a 3d-curve lying on a
0095   //! surface (uses GeomProjLib_ProjectedCurve)
0096   //! If the projection needs an approximation,
0097   //! Precision::PApproximation() is used.
0098   //! WARNING: if the projection has failed, this
0099   //! method returns a null Handle.
0100   //! can expand a little the bounds of surface
0101   Standard_EXPORT static occ::handle<Geom2d_Curve> Curve2d(const occ::handle<Geom_Curve>&   C,
0102                                                            const occ::handle<Geom_Surface>& S,
0103                                                            const double                     UDeb,
0104                                                            const double                     UFin,
0105                                                            const double                     VDeb,
0106                                                            const double                     VFin);
0107 
0108   //! gives the 2d-curve of a 3d-curve lying on a
0109   //! surface (uses GeomProjLib_ProjectedCurve)
0110   //! If the projection needs an approximation,
0111   //! Precision::PApproximation() is used.
0112   //! WARNING: if the projection has failed, this
0113   //! method returns a null Handle.
0114   //! can expand a little the bounds of surface
0115   Standard_EXPORT static occ::handle<Geom2d_Curve> Curve2d(const occ::handle<Geom_Curve>&   C,
0116                                                            const occ::handle<Geom_Surface>& S,
0117                                                            const double                     UDeb,
0118                                                            const double                     UFin,
0119                                                            const double                     VDeb,
0120                                                            const double                     VFin,
0121                                                            double& Tolerance);
0122 
0123   //! Constructs the 3d-curve from the normal
0124   //! projection of the Curve <C> on the surface <S>.
0125   //! WARNING: if the projection has failed, returns a
0126   //! null Handle.
0127   Standard_EXPORT static occ::handle<Geom_Curve> Project(const occ::handle<Geom_Curve>&   C,
0128                                                          const occ::handle<Geom_Surface>& S);
0129 
0130   //! Constructs the 3d-curves from the projection
0131   //! of the curve <Curve> on the plane <Plane> along
0132   //! the direction <Dir>.
0133   //! If <KeepParametrization> is true, the parametrization
0134   //! of the Projected Curve <PC> will be the same as the
0135   //! parametrization of the initial curve <C>.
0136   //! It means: proj(C(u)) = PC(u) for each u.
0137   //! Otherwise, the parametrization may change.
0138   Standard_EXPORT static occ::handle<Geom_Curve> ProjectOnPlane(
0139     const occ::handle<Geom_Curve>& Curve,
0140     const occ::handle<Geom_Plane>& Plane,
0141     const gp_Dir&                  Dir,
0142     const bool                     KeepParametrization);
0143 };
0144 
0145 #endif // _GeomProjLib_HeaderFile