Warnings on vc14 were eliminated
[occt.git] / src / IntSurf / IntSurf_Transition.hxx
1 // Created on: 1992-05-06
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1992-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 _IntSurf_Transition_HeaderFile
18 #define _IntSurf_Transition_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <IntSurf_TypeTrans.hxx>
26 #include <IntSurf_Situation.hxx>
27 class Standard_DomainError;
28
29
30 //! Definition of the transition at the intersection
31 //! between an intersection line and a restriction curve
32 //! on a surface.
33 class IntSurf_Transition 
34 {
35 public:
36
37   DEFINE_STANDARD_ALLOC
38
39   
40   //! Empty constructor. Creates an UNDECIDED transition.
41   Standard_EXPORT IntSurf_Transition();
42   
43   //! Create a IN or OUT transition
44   Standard_EXPORT IntSurf_Transition(const Standard_Boolean Tangent, const IntSurf_TypeTrans Type);
45   
46   //! Create a TOUCH transition.
47   Standard_EXPORT IntSurf_Transition(const Standard_Boolean Tangent, const IntSurf_Situation Situ, const Standard_Boolean Oppos);
48   
49   //! Set the values of an IN or OUT transition.
50     void SetValue (const Standard_Boolean Tangent, const IntSurf_TypeTrans Type);
51   
52   //! Set the values of a TOUCH transition.
53     void SetValue (const Standard_Boolean Tangent, const IntSurf_Situation Situ, const Standard_Boolean Oppos);
54   
55   //! Set the values of an UNDECIDED transition.
56     void SetValue();
57   
58   //! Returns the type of Transition (in/out/touch/undecided)
59   //! for the arc given by value. This the transition of
60   //! the intersection line compared to the Arc of restriction,
61   //! i-e when the function returns INSIDE for example, it
62   //! means that the intersection line goes inside the
63   //! part of plane limited by the arc of restriction.
64     IntSurf_TypeTrans TransitionType() const;
65   
66   //! Returns TRUE if the point is tangent to the arc
67   //! given by Value.
68   //! An exception is raised if TransitionType returns UNDECIDED.
69     Standard_Boolean IsTangent() const;
70   
71   //! Returns a significant value if TransitionType returns
72   //! TOUCH. In this case, the function returns :
73   //! INSIDE when the intersection line remains inside the Arc,
74   //! OUTSIDE when it remains outside the Arc,
75   //! UNKNOWN when the calsulus cannot give results.
76   //! If TransitionType returns IN, or OUT, or UNDECIDED, a
77   //! exception is raised.
78     IntSurf_Situation Situation() const;
79   
80   //! returns a significant value if TransitionType returns
81   //! TOUCH.
82   //! In this case, the function returns true when
83   //! the 2 curves locally define two different parts of the
84   //! space.
85   //! If TransitionType returns IN or OUT or UNDECIDED, an
86   //! exception is raised.
87     Standard_Boolean IsOpposite() const;
88
89
90
91
92 protected:
93
94
95
96
97
98 private:
99
100
101
102   Standard_Boolean tangent;
103   IntSurf_TypeTrans typetra;
104   IntSurf_Situation situat;
105   Standard_Boolean oppos;
106
107
108 };
109
110
111 #include <IntSurf_Transition.lxx>
112
113
114
115
116
117 #endif // _IntSurf_Transition_HeaderFile