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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IntPatch_Point_HeaderFile
18 #define _IntPatch_Point_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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>
30 class Adaptor3d_HVertex;
31 class Standard_DomainError;
33 class IntSurf_Transition;
34 class IntSurf_PntOn2S;
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.
47 //! Empty constructor.
48 Standard_EXPORT IntPatch_Point();
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);
56 void SetValue (const gp_Pnt& Pt);
58 void SetTolerance (const Standard_Real Tol);
60 //! Sets the values of the parameters of the point
62 void SetParameters (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
64 //! Set the value of the parameter on the intersection line.
65 void SetParameter (const Standard_Real Para);
67 //! Sets the values of a point which is a vertex on
68 //! the initial facet of restriction of one
70 //! If OnFirst is True, the point is on the domain of the
71 //! first patch, otherwise the point is on the domain of the
73 Standard_EXPORT void SetVertex (const Standard_Boolean OnFirst, const Handle(Adaptor3d_HVertex)& V);
75 //! Sets the values of a point which is on one of the domain,
76 //! when both surfaces are implicit ones.
77 //! If OnFirst is True, the point is on the domain of the
78 //! first patch, otherwise the point is on the domain of the
80 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);
82 //! Sets (or unsets) the point as a point on several
83 //! intersection line.
84 void SetMultiple (const Standard_Boolean IsMult);
86 //! Returns the intersection point (geometric information).
87 const gp_Pnt& Value() const;
89 //! This method returns the parameter of the point
90 //! on the intersection line.
91 //! If the points does not belong to an intersection line,
92 //! the value returned does not have any sens.
93 Standard_Real ParameterOnLine() const;
95 //! This method returns the fuzziness on the point.
96 Standard_Real Tolerance() const;
98 //! Returns True if the Point is a tangency point between
100 //! If the Point is on one of the domain (IsOnDomS1 returns
101 //! True or IsOnDomS2 returns True), an exception is raised.
102 Standard_Boolean IsTangencyPoint() const;
104 //! Returns the parameters on the first surface of the point.
105 void ParametersOnS1 (Standard_Real& U1, Standard_Real& V1) const;
107 //! Returns the parameters on the second surface of the point.
108 void ParametersOnS2 (Standard_Real& U2, Standard_Real& V2) const;
110 //! Returns True if the point belongs to several intersection
112 Standard_Boolean IsMultiple() const;
114 //! Returns TRUE if the point is on a boundary of the domain
115 //! of the first patch.
116 Standard_Boolean IsOnDomS1() const;
118 //! Returns TRUE if the point is a vertex on the initial
119 //! restriction facet of the first surface.
120 Standard_Boolean IsVertexOnS1() const;
122 //! Returns the information about the point when it is
123 //! on the domain of the first patch, i-e when the function
124 //! IsVertexOnS1 returns True.
125 //! Otherwise, an exception is raised.
126 const Handle(Adaptor3d_HVertex)& VertexOnS1() const;
128 //! Returns the arc of restriction containing the
130 //! The exception DomainError is raised if
131 //! IsOnDomS1 returns False.
132 const Handle(Adaptor2d_HCurve2d)& ArcOnS1() const;
134 //! Returns the transition of the point on the
135 //! intersection line with the arc on S1.
136 //! The exception DomainError is raised if IsOnDomS1
138 const IntSurf_Transition& TransitionLineArc1() const;
140 //! Returns the transition between the intersection line
141 //! returned by the method Line and the arc on S1 returned
143 //! The exception DomainError is raised if
144 //! IsOnDomS1 returns False.
145 const IntSurf_Transition& TransitionOnS1() const;
147 //! Returns the parameter of the point on the
148 //! arc returned by the method ArcOnS2.
149 //! The exception DomainError is raised if
150 //! IsOnDomS1 returns False.
151 Standard_Real ParameterOnArc1() const;
153 //! Returns TRUE if the point is on a boundary of the domain
154 //! of the second patch.
155 Standard_Boolean IsOnDomS2() const;
157 //! Returns TRUE if the point is a vertex on the initial
158 //! restriction facet of the first surface.
159 Standard_Boolean IsVertexOnS2() const;
161 //! Returns the information about the point when it is
162 //! on the domain of the second patch, i-e when the function
163 //! IsVertexOnS2 returns True.
164 //! Otherwise, an exception is raised.
165 const Handle(Adaptor3d_HVertex)& VertexOnS2() const;
167 //! Returns the arc of restriction containing the
169 //! The exception DomainError is raised if
170 //! IsOnDomS2 returns False.
171 const Handle(Adaptor2d_HCurve2d)& ArcOnS2() const;
173 //! Returns the transition of the point on the
174 //! intersection line with the arc on S2.
175 //! The exception DomainError is raised if IsOnDomS2
177 const IntSurf_Transition& TransitionLineArc2() const;
179 //! Returns the transition between the intersection line
180 //! returned by the method Line and the arc on S2 returned
182 //! The exception DomainError is raised if
183 //! IsOnDomS2 returns False.
184 const IntSurf_Transition& TransitionOnS2() const;
186 //! Returns the parameter of the point on the
187 //! arc returned by the method ArcOnS2.
188 //! The exception DomainError is raised if
189 //! IsOnDomS2 returns False.
190 Standard_Real ParameterOnArc2() const;
192 //! Returns the PntOn2S
193 //! (geometric Point and the parameters)
194 const IntSurf_PntOn2S& PntOn2S() const;
196 //! Returns the parameters on the first and on the
197 //! second surface of the point.
198 void Parameters (Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2) const;
200 Standard_EXPORT void ReverseTransition();
202 Standard_EXPORT void Dump() const;
220 Standard_Boolean tgt;
221 Standard_Boolean mult;
222 Standard_Boolean onS1;
223 Standard_Boolean vtxonS1;
224 Handle(Adaptor3d_HVertex) vS1;
225 Handle(Adaptor2d_HCurve2d) arcS1;
226 IntSurf_Transition traline1;
227 IntSurf_Transition tra1;
229 Standard_Boolean onS2;
230 Standard_Boolean vtxonS2;
231 Handle(Adaptor3d_HVertex) vS2;
232 Handle(Adaptor2d_HCurve2d) arcS2;
233 IntSurf_Transition traline2;
234 IntSurf_Transition tra2;
241 #include <IntPatch_Point.lxx>
247 #endif // _IntPatch_Point_HeaderFile