0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / IntAna2d / IntAna2d_IntPoint.hxx
CommitLineData
42cf5bc1 1// Created on: 1991-02-20
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1991-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IntAna2d_IntPoint_HeaderFile
18#define _IntAna2d_IntPoint_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <gp_Pnt2d.hxx>
26#include <Standard_Boolean.hxx>
27class Standard_DomainError;
28class gp_Pnt2d;
29
30
31//! Geometrical intersection between two 2d elements.
32class IntAna2d_IntPoint
33{
34public:
35
36 DEFINE_STANDARD_ALLOC
37
38
39 //! Create an intersection point between 2 parametric 2d lines.
40 //! X,Y are the coordinate of the point. U1 is the parameter
41 //! on the first element, U2 the parameter on the second one.
42 Standard_EXPORT IntAna2d_IntPoint(const Standard_Real X, const Standard_Real Y, const Standard_Real U1, const Standard_Real U2);
43
44 //! Create an intersection point between a parametric 2d line,
45 //! and a line given by an implicit equation (ImplicitCurve).
46 //! X,Y are the coordinate of the point. U1 is the parameter
47 //! on the parametric element.
48 //! Empty constructor. It's necessary to use one of
49 //! the SetValue method after this one.
50 Standard_EXPORT IntAna2d_IntPoint(const Standard_Real X, const Standard_Real Y, const Standard_Real U1);
51
52 Standard_EXPORT IntAna2d_IntPoint();
53
54 //! Set the values for a "non-implicit" point.
55 Standard_EXPORT virtual void SetValue (const Standard_Real X, const Standard_Real Y, const Standard_Real U1, const Standard_Real U2);
56
57 //! Set the values for an "implicit" point.
58 Standard_EXPORT virtual void SetValue (const Standard_Real X, const Standard_Real Y, const Standard_Real U1);
59
60 //! Returns the geometric point.
61 const gp_Pnt2d& Value() const;
62
63 //! Returns True if the second curve is implicit.
64 Standard_Boolean SecondIsImplicit() const;
65
66 //! Returns the parameter on the first element.
67 Standard_Real ParamOnFirst() const;
68
69 //! Returns the parameter on the second element.
70 //! If the second element is an implicit curve, an exception
71 //! is raised.
72 Standard_Real ParamOnSecond() const;
73
74
75
76
77protected:
78
79
80
81
82
83private:
84
85
86
87 Standard_Real myu1;
88 Standard_Real myu2;
89 gp_Pnt2d myp;
90 Standard_Boolean myimplicit;
91
92
93};
94
95
96#include <IntAna2d_IntPoint.lxx>
97
98
99
100
101
102#endif // _IntAna2d_IntPoint_HeaderFile