|
||||
File indexing completed on 2024-11-15 09:46:52
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 0033 //! Projection of a curve on a surface. 0034 class GeomProjLib 0035 { 0036 public: 0037 0038 DEFINE_STANDARD_ALLOC 0039 0040 0041 //! gives the 2d-curve of a 3d-curve lying on a 0042 //! surface ( uses GeomProjLib_ProjectedCurve ) 0043 //! The 3dCurve is taken between the parametrization 0044 //! range [First, Last] 0045 //! <Tolerance> is used as input if the projection needs 0046 //! an approximation. In this case, the reached 0047 //! tolerance is set in <Tolerance> as output. 0048 //! WARNING : if the projection has failed, this 0049 //! method returns a null Handle. 0050 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); 0051 0052 //! gives the 2d-curve of a 3d-curve lying on a 0053 //! surface ( uses GeomProjLib_ProjectedCurve ) 0054 //! The 3dCurve is taken between the parametrization 0055 //! range [First, Last] 0056 //! <Tolerance> is used as input if the projection needs 0057 //! an approximation. In this case, the reached 0058 //! tolerance is set in <Tolerance> as output. 0059 //! WARNING : if the projection has failed, this 0060 //! method returns a null Handle. 0061 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); 0062 0063 //! gives the 2d-curve of a 3d-curve lying on a 0064 //! surface ( uses GeomProjLib_ProjectedCurve ) 0065 //! The 3dCurve is taken between the parametrization 0066 //! range [First, Last] 0067 //! If the projection needs an approximation, 0068 //! Precision::PApproximation() is used. 0069 //! WARNING : if the projection has failed, this 0070 //! method returns a null Handle. 0071 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); 0072 0073 //! gives the 2d-curve of a 3d-curve lying on a 0074 //! surface ( uses GeomProjLib_ProjectedCurve ). 0075 //! If the projection needs an approximation, 0076 //! Precision::PApproximation() is used. 0077 //! WARNING : if the projection has failed, this 0078 //! method returns a null Handle. 0079 Standard_EXPORT static Handle(Geom2d_Curve) Curve2d (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S); 0080 0081 //! gives the 2d-curve of a 3d-curve lying on a 0082 //! surface ( uses GeomProjLib_ProjectedCurve ). 0083 //! If the projection needs an approximation, 0084 //! Precision::PApproximation() is used. 0085 //! WARNING : if the projection has failed, this 0086 //! method returns a null Handle. 0087 //! can expand a little the bounds of surface 0088 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); 0089 0090 //! gives the 2d-curve of a 3d-curve lying on a 0091 //! surface ( uses GeomProjLib_ProjectedCurve ). 0092 //! If the projection needs an approximation, 0093 //! Precision::PApproximation() is used. 0094 //! WARNING : if the projection has failed, this 0095 //! method returns a null Handle. 0096 //! can expand a little the bounds of surface 0097 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); 0098 0099 //! Constructs the 3d-curve from the normal 0100 //! projection of the Curve <C> on the surface <S>. 0101 //! WARNING : if the projection has failed, returns a 0102 //! null Handle. 0103 Standard_EXPORT static Handle(Geom_Curve) Project (const Handle(Geom_Curve)& C, const Handle(Geom_Surface)& S); 0104 0105 //! Constructs the 3d-curves from the projection 0106 //! of the curve <Curve> on the plane <Plane> along 0107 //! the direction <Dir>. 0108 //! If <KeepParametrization> is true, the parametrization 0109 //! of the Projected Curve <PC> will be the same as the 0110 //! parametrization of the initial curve <C>. 0111 //! It means: proj(C(u)) = PC(u) for each u. 0112 //! Otherwise, the parametrization may change. 0113 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); 0114 0115 0116 0117 0118 protected: 0119 0120 0121 0122 0123 0124 private: 0125 0126 0127 0128 0129 0130 }; 0131 0132 0133 0134 0135 0136 0137 0138 #endif // _GeomProjLib_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |