0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation
[occt.git] / src / IntPatch / IntPatch_Point.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 _IntPatch_Point_HeaderFile
18 #define _IntPatch_Point_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <IntSurf_PntOn2S.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <IntSurf_Transition.hxx>
28 #include <Adaptor2d_HCurve2d.hxx>
29
30 class Adaptor3d_HVertex;
31 class Standard_DomainError;
32 class gp_Pnt;
33 class IntSurf_Transition;
34 class IntSurf_PntOn2S;
35
36
37 //! Definition of an intersection point between two surfaces.
38 //! Such a point is contains geometrical informations (see
39 //! the Value method) and logical informations.
40 class IntPatch_Point 
41 {
42 public:
43
44   DEFINE_STANDARD_ALLOC
45
46   
47   //! Empty constructor.
48   Standard_EXPORT IntPatch_Point();
49   
50   //! Sets the values of a point which is on no domain,
51   //! when both surfaces are implicit ones.
52   //! If Tangent is True, the point is a point of tangency
53   //! between the surfaces.
54   Standard_EXPORT void SetValue (const gp_Pnt& Pt, const Standard_Real Tol, const Standard_Boolean Tangent);
55   
56     void SetValue (const gp_Pnt& Pt);
57
58   //! Sets the value of <pt> member
59   void SetValue (const IntSurf_PntOn2S& thePOn2S);
60
61   
62     void SetTolerance (const Standard_Real Tol);
63   
64   //! Sets the values of the parameters of the point
65   //! on each surface.
66     void SetParameters (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
67   
68   //! Set the value of the parameter on the intersection line.
69     void SetParameter (const Standard_Real Para);
70   
71   //! Sets the values of a point which is a vertex on
72   //! the initial facet of restriction of one
73   //! of the surface.
74   //! If OnFirst is True, the point is on the domain of the
75   //! first patch, otherwise the point is on the domain of the
76   //! second surface.
77   Standard_EXPORT void SetVertex (const Standard_Boolean OnFirst, const Handle(Adaptor3d_HVertex)& V);
78   
79   //! Sets the values of a point which is on one of the domain,
80   //! when both surfaces are implicit ones.
81   //! If OnFirst is True, the point is on the domain of the
82   //! first patch, otherwise the point is on the domain of the
83   //! second surface.
84   Standard_EXPORT void SetArc (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc);
85   
86   //! Sets (or unsets) the point as a point on several
87   //! intersection line.
88     void SetMultiple (const Standard_Boolean IsMult);
89   
90   //! Returns the intersection point (geometric information).
91     const gp_Pnt& Value() const;
92   
93   //! This method returns the parameter of the point
94   //! on the intersection line.
95   //! If the points does not belong to an intersection line,
96   //! the value returned does not have any sens.
97     Standard_Real ParameterOnLine() const;
98   
99   //! This method returns the fuzziness on the point.
100     Standard_Real Tolerance() const;
101   
102   //! Returns True if the Point is a tangency point between
103   //! the surfaces.
104   //! If the Point is on one of the domain (IsOnDomS1 returns
105   //! True or IsOnDomS2 returns True), an exception is raised.
106     Standard_Boolean IsTangencyPoint() const;
107   
108   //! Returns the parameters on the first surface of the point.
109     void ParametersOnS1 (Standard_Real& U1, Standard_Real& V1) const;
110   
111   //! Returns the parameters on the second surface of the point.
112     void ParametersOnS2 (Standard_Real& U2, Standard_Real& V2) const;
113   
114   //! Returns True if the point belongs to several intersection
115   //! lines.
116     Standard_Boolean IsMultiple() const;
117   
118   //! Returns TRUE if the point is on a boundary of the domain
119   //! of the first patch.
120     Standard_Boolean IsOnDomS1() const;
121   
122   //! Returns TRUE if the point is a vertex on the initial
123   //! restriction facet of the first surface.
124     Standard_Boolean IsVertexOnS1() const;
125   
126   //! Returns the information about the point when it is
127   //! on the domain of the first patch, i-e when the function
128   //! IsVertexOnS1 returns True.
129   //! Otherwise, an exception is raised.
130     const Handle(Adaptor3d_HVertex)& VertexOnS1() const;
131   
132   //! Returns the arc of restriction containing the
133   //! vertex.
134   //! The exception DomainError is raised if
135   //! IsOnDomS1 returns False.
136     const Handle(Adaptor2d_HCurve2d)& ArcOnS1() const;
137   
138   //! Returns the transition of the point on the
139   //! intersection line with the arc on S1.
140   //! The exception DomainError is raised if IsOnDomS1
141   //! returns False.
142     const IntSurf_Transition& TransitionLineArc1() const;
143   
144   //! Returns the transition between the intersection line
145   //! returned by the method Line and the arc on S1 returned
146   //! by ArcOnS1().
147   //! The exception DomainError is raised if
148   //! IsOnDomS1 returns False.
149     const IntSurf_Transition& TransitionOnS1() const;
150   
151   //! Returns the parameter of the point on the
152   //! arc returned by the method ArcOnS2.
153   //! The exception DomainError is raised if
154   //! IsOnDomS1 returns False.
155     Standard_Real ParameterOnArc1() const;
156   
157   //! Returns TRUE if the point is on a boundary of the domain
158   //! of the second patch.
159     Standard_Boolean IsOnDomS2() const;
160   
161   //! Returns TRUE if the point is a vertex on the initial
162   //! restriction facet of the first surface.
163     Standard_Boolean IsVertexOnS2() const;
164   
165   //! Returns the information about the point when it is
166   //! on the domain of the second patch, i-e when the function
167   //! IsVertexOnS2 returns True.
168   //! Otherwise, an exception is raised.
169     const Handle(Adaptor3d_HVertex)& VertexOnS2() const;
170   
171   //! Returns the arc of restriction containing the
172   //! vertex.
173   //! The exception DomainError is raised if
174   //! IsOnDomS2 returns False.
175     const Handle(Adaptor2d_HCurve2d)& ArcOnS2() const;
176   
177   //! Returns the transition of the point on the
178   //! intersection line with the arc on S2.
179   //! The exception DomainError is raised if IsOnDomS2
180   //! returns False.
181     const IntSurf_Transition& TransitionLineArc2() const;
182   
183   //! Returns the transition between the intersection line
184   //! returned by the method Line and the arc on S2 returned
185   //! by ArcOnS2.
186   //! The exception DomainError is raised if
187   //! IsOnDomS2 returns False.
188     const IntSurf_Transition& TransitionOnS2() const;
189   
190   //! Returns the parameter of the point on the
191   //! arc returned by the method ArcOnS2.
192   //! The exception DomainError is raised if
193   //! IsOnDomS2 returns False.
194     Standard_Real ParameterOnArc2() const;
195   
196   //! Returns the PntOn2S
197   //! (geometric Point and the parameters)
198     const IntSurf_PntOn2S& PntOn2S() const;
199   
200   //! Returns the parameters on the first and on the
201   //! second surface of the point.
202     void Parameters (Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2) const;
203   
204   Standard_EXPORT void ReverseTransition();
205   
206   Standard_EXPORT void Dump() const;
207
208
209
210
211 protected:
212
213
214
215
216
217 private:
218
219
220
221   IntSurf_PntOn2S pt;
222   Standard_Real para;
223   Standard_Real tol;
224   Standard_Boolean tgt;
225   Standard_Boolean mult;
226   Standard_Boolean onS1;
227   Standard_Boolean vtxonS1;
228   Handle(Adaptor3d_HVertex) vS1;
229   Handle(Adaptor2d_HCurve2d) arcS1;
230   IntSurf_Transition traline1;
231   IntSurf_Transition tra1;
232   Standard_Real prm1;
233   Standard_Boolean onS2;
234   Standard_Boolean vtxonS2;
235   Handle(Adaptor3d_HVertex) vS2;
236   Handle(Adaptor2d_HCurve2d) arcS2;
237   IntSurf_Transition traline2;
238   IntSurf_Transition tra2;
239   Standard_Real prm2;
240
241
242 };
243
244
245 #include <IntPatch_Point.lxx>
246
247
248
249
250
251 #endif // _IntPatch_Point_HeaderFile