Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:03:12

0001 // Created on: 1994-03-17
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 _GeomAPI_HeaderFile
0018 #define _GeomAPI_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Geom2d_Curve.hxx>
0025 #include <Geom_Curve.hxx>
0026 
0027 class gp_Pln;
0028 
0029 //! The GeomAPI package provides an Application
0030 //! Programming Interface for the Geometry.
0031 //!
0032 //! The API is a set of classes and methods aiming to
0033 //! provide :
0034 //!
0035 //! * High level and simple calls for the most common
0036 //! operations.
0037 //!
0038 //! * Keeping an access on the low-level
0039 //! implementation of high-level calls.
0040 //!
0041 //! The API provides classes to call the algorithms
0042 //! of the Geometry
0043 //!
0044 //! * The constructors of the classes provides the
0045 //! different constructions methods.
0046 //!
0047 //! * The class keeps as fields the different tools
0048 //! used by the algorithms
0049 //!
0050 //! * The class provides a casting method to get
0051 //! automatically the result with a function-like
0052 //! call.
0053 //!
0054 //! For example to evaluate the distance <D> between a
0055 //! point <P> and a curve <C>, one can writes :
0056 //!
0057 //! D = GeomAPI_ProjectPointOnCurve(P,C);
0058 //!
0059 //! or
0060 //!
0061 //! GeomAPI_ProjectPointOnCurve PonC(P,C);
0062 //! D = PonC.LowerDistance();
0063 class GeomAPI
0064 {
0065 public:
0066   DEFINE_STANDARD_ALLOC
0067 
0068   //! This function builds (in the
0069   //! parametric space of the plane P) a 2D curve equivalent to the 3D curve
0070   //! C. The 3D curve C is considered to be located in the plane P.
0071   //! Warning
0072   //! The 3D curve C must be of one of the following types:
0073   //! -      a line
0074   //! -      a circle
0075   //! -      an ellipse
0076   //! -      a hyperbola
0077   //! -      a parabola
0078   //! -      a Bezier curve
0079   //! -      a BSpline curve
0080   //! Exceptions Standard_NoSuchObject if C is not a defined type curve.
0081   Standard_EXPORT static occ::handle<Geom2d_Curve> To2d(const occ::handle<Geom_Curve>& C,
0082                                                         const gp_Pln&                  P);
0083 
0084   //! Builds a 3D curve equivalent to the 2D curve C
0085   //! described in the parametric space defined by the local
0086   //! coordinate system of plane P.
0087   //! The resulting 3D curve is of the same nature as that of the curve C.
0088   Standard_EXPORT static occ::handle<Geom_Curve> To3d(const occ::handle<Geom2d_Curve>& C,
0089                                                       const gp_Pln&                    P);
0090 };
0091 
0092 #endif // _GeomAPI_HeaderFile