Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1991-02-20
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1991-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 _IntAna2d_IntPoint_HeaderFile
0018 #define _IntAna2d_IntPoint_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Pnt2d.hxx>
0025 #include <Standard_Boolean.hxx>
0026 
0027 
0028 //! Geometrical intersection between two 2d elements.
0029 class IntAna2d_IntPoint 
0030 {
0031 public:
0032 
0033   DEFINE_STANDARD_ALLOC
0034 
0035   
0036   //! Create an intersection point between 2 parametric 2d lines.
0037   //! X,Y are the coordinate of the point. U1 is the parameter
0038   //! on the first element, U2 the parameter on the second one.
0039   Standard_EXPORT IntAna2d_IntPoint(const Standard_Real X, const Standard_Real Y, const Standard_Real U1, const Standard_Real U2);
0040   
0041   //! Create an intersection point between a parametric 2d line,
0042   //! and a line given by an implicit equation (ImplicitCurve).
0043   //! X,Y are the coordinate of the point. U1 is the parameter
0044   //! on the parametric element.
0045   //! Empty constructor. It's necessary to use one of
0046   //! the SetValue method after this one.
0047   Standard_EXPORT IntAna2d_IntPoint(const Standard_Real X, const Standard_Real Y, const Standard_Real U1);
0048   
0049   Standard_EXPORT IntAna2d_IntPoint();
0050   
0051   //! Set the values for a "non-implicit" point.
0052   Standard_EXPORT virtual void SetValue (const Standard_Real X, const Standard_Real Y, const Standard_Real U1, const Standard_Real U2);
0053   
0054   //! Set the values for an "implicit" point.
0055   Standard_EXPORT virtual void SetValue (const Standard_Real X, const Standard_Real Y, const Standard_Real U1);
0056   
0057   //! Returns the geometric point.
0058     const gp_Pnt2d& Value() const;
0059   
0060   //! Returns True if the second curve is implicit.
0061     Standard_Boolean SecondIsImplicit() const;
0062   
0063   //! Returns the parameter on the first element.
0064     Standard_Real ParamOnFirst() const;
0065   
0066   //! Returns the parameter on the second element.
0067   //! If the second element is an implicit curve, an exception
0068   //! is raised.
0069     Standard_Real ParamOnSecond() const;
0070 
0071 
0072 
0073 
0074 protected:
0075 
0076 
0077 
0078 
0079 
0080 private:
0081 
0082 
0083 
0084   Standard_Real myu1;
0085   Standard_Real myu2;
0086   gp_Pnt2d myp;
0087   Standard_Boolean myimplicit;
0088 
0089 
0090 };
0091 
0092 
0093 #include <IntAna2d_IntPoint.lxx>
0094 
0095 
0096 
0097 
0098 
0099 #endif // _IntAna2d_IntPoint_HeaderFile