Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:39

0001 // Created on: 1994-09-15
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1994-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 _ProjLib_ProjectOnSurface_HeaderFile
0018 #define _ProjLib_ProjectOnSurface_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 
0022 class Geom_BSplineCurve;
0023 
0024 //! Project a curve on a  surface.  The result ( a  3D
0025 //! Curve)  will be an approximation
0026 class ProjLib_ProjectOnSurface 
0027 {
0028 public:
0029 
0030   DEFINE_STANDARD_ALLOC
0031 
0032   //! Create an empty projector.
0033   Standard_EXPORT ProjLib_ProjectOnSurface();
0034 
0035   //! Create a projector normally to the surface <S>.
0036   Standard_EXPORT ProjLib_ProjectOnSurface(const Handle(Adaptor3d_Surface)& S);
0037 
0038   Standard_EXPORT virtual ~ProjLib_ProjectOnSurface();
0039 
0040   //! Set the Surface to <S>.
0041   //! To compute the projection, you have to Load the Curve.
0042   Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S);
0043 
0044   //! Compute the projection of the curve <C> on the Surface.
0045   Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C, const Standard_Real Tolerance);
0046 
0047   Standard_Boolean IsDone() const { return myIsDone; }
0048 
0049   Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const;
0050 
0051 private:
0052 
0053   Handle(Adaptor3d_Curve) myCurve;
0054   Handle(Adaptor3d_Surface) mySurface;
0055   Standard_Real myTolerance;
0056   Standard_Boolean myIsDone;
0057   Handle(Geom_BSplineCurve) myResult;
0058 
0059 };
0060 
0061 #endif // _ProjLib_ProjectOnSurface_HeaderFile