Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-08-11
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 _ProjLib_HeaderFile
0018 #define _ProjLib_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <Geom2d_Curve.hxx>
0022 
0023 class gp_Pnt2d;
0024 class gp_Pln;
0025 class gp_Pnt;
0026 class gp_Lin2d;
0027 class gp_Lin;
0028 class gp_Circ2d;
0029 class gp_Circ;
0030 class gp_Elips2d;
0031 class gp_Elips;
0032 class gp_Parab2d;
0033 class gp_Parab;
0034 class gp_Hypr2d;
0035 class gp_Hypr;
0036 class gp_Cylinder;
0037 class gp_Cone;
0038 class gp_Sphere;
0039 class gp_Torus;
0040 class ProjLib_ProjectedCurve;
0041 
0042 //! The ProjLib package first provides projection of curves on a plane along a given Direction.
0043 //! The result will be a 3D curve.
0044 //!
0045 //! The ProjLib package provides projection of curves on surfaces to compute the curve in the parametric space.
0046 //! It is assumed that the curve is on the surface.
0047 //!
0048 //! It provides:
0049 //!
0050 //! * Package methods to handle the easiest cases:
0051 //!  - Line, Circle, Ellipse, Parabola, Hyperbola on plane.
0052 //!  - Line, Circle on cylinder.
0053 //!  - Line, Circle on cone.
0054 //!
0055 //! * Classes to handle the general cases:
0056 //!  - Plane.
0057 //!  - Cylinder.
0058 //!  - Cone.
0059 //!  - Sphere.
0060 //!  - Torus.
0061 //!
0062 //! * A generic class to handle a Adaptor3d_Curve on a Adaptor3d_Surface.
0063 class ProjLib 
0064 {
0065 public:
0066 
0067   DEFINE_STANDARD_ALLOC
0068   
0069   Standard_EXPORT static gp_Pnt2d Project (const gp_Pln& Pl, const gp_Pnt& P);
0070 
0071   Standard_EXPORT static gp_Lin2d Project (const gp_Pln& Pl, const gp_Lin& L);
0072 
0073   Standard_EXPORT static gp_Circ2d Project (const gp_Pln& Pl, const gp_Circ& C);
0074 
0075   Standard_EXPORT static gp_Elips2d Project (const gp_Pln& Pl, const gp_Elips& E);
0076 
0077   Standard_EXPORT static gp_Parab2d Project (const gp_Pln& Pl, const gp_Parab& P);
0078 
0079   Standard_EXPORT static gp_Hypr2d Project (const gp_Pln& Pl, const gp_Hypr& H);
0080 
0081   Standard_EXPORT static gp_Pnt2d Project (const gp_Cylinder& Cy, const gp_Pnt& P);
0082 
0083   Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Lin& L);
0084 
0085   Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Circ& Ci);
0086 
0087   Standard_EXPORT static gp_Pnt2d Project (const gp_Cone& Co, const gp_Pnt& P);
0088 
0089   Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Lin& L);
0090 
0091   Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Circ& Ci);
0092 
0093   Standard_EXPORT static gp_Pnt2d Project (const gp_Sphere& Sp, const gp_Pnt& P);
0094 
0095   Standard_EXPORT static gp_Lin2d Project (const gp_Sphere& Sp, const gp_Circ& Ci);
0096 
0097   Standard_EXPORT static gp_Pnt2d Project (const gp_Torus& To, const gp_Pnt& P);
0098 
0099   Standard_EXPORT static gp_Lin2d Project (const gp_Torus& To, const gp_Circ& Ci);
0100 
0101   //! Make empty  P-Curve <aC> of relevant to <PC> type
0102   Standard_EXPORT static void MakePCurveOfType (const ProjLib_ProjectedCurve& PC,
0103                                                 Handle(Geom2d_Curve)& aC);
0104 
0105   //! Returns "true" if surface is analytical, that is it can be
0106   //! Plane, Cylinder, Cone, Sphere, Torus.
0107   //! For all other types of surface method returns "false".
0108   Standard_EXPORT static Standard_Boolean IsAnaSurf
0109                                            (const Handle(Adaptor3d_Surface)& theAS);
0110 
0111 };
0112 
0113 #endif // _ProjLib_HeaderFile