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 //! Sets the value of <pt> member
59 void SetValue (const IntSurf_PntOn2S& thePOn2S);
62 void SetTolerance (const Standard_Real Tol);
64 //! Sets the values of the parameters of the point
66 void SetParameters (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
68 //! Set the value of the parameter on the intersection line.
69 void SetParameter (const Standard_Real Para);
71 //! Sets the values of a point which is a vertex on
72 //! the initial facet of restriction of one
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
77 Standard_EXPORT void SetVertex (const Standard_Boolean OnFirst, const Handle(Adaptor3d_HVertex)& V);
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
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);
86 //! Sets (or unsets) the point as a point on several
87 //! intersection line.
88 void SetMultiple (const Standard_Boolean IsMult);
90 //! Returns the intersection point (geometric information).
91 const gp_Pnt& Value() const;
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;
99 //! This method returns the fuzziness on the point.
100 Standard_Real Tolerance() const;
102 //! Returns True if the Point is a tangency point between
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;
108 //! Returns the parameters on the first surface of the point.
109 void ParametersOnS1 (Standard_Real& U1, Standard_Real& V1) const;
111 //! Returns the parameters on the second surface of the point.
112 void ParametersOnS2 (Standard_Real& U2, Standard_Real& V2) const;
114 //! Returns True if the point belongs to several intersection
116 Standard_Boolean IsMultiple() const;
118 //! Returns TRUE if the point is on a boundary of the domain
119 //! of the first patch.
120 Standard_Boolean IsOnDomS1() const;
122 //! Returns TRUE if the point is a vertex on the initial
123 //! restriction facet of the first surface.
124 Standard_Boolean IsVertexOnS1() const;
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;
132 //! Returns the arc of restriction containing the
134 //! The exception DomainError is raised if
135 //! IsOnDomS1 returns False.
136 const Handle(Adaptor2d_HCurve2d)& ArcOnS1() const;
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
142 const IntSurf_Transition& TransitionLineArc1() const;
144 //! Returns the transition between the intersection line
145 //! returned by the method Line and the arc on S1 returned
147 //! The exception DomainError is raised if
148 //! IsOnDomS1 returns False.
149 const IntSurf_Transition& TransitionOnS1() const;
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;
157 //! Returns TRUE if the point is on a boundary of the domain
158 //! of the second patch.
159 Standard_Boolean IsOnDomS2() const;
161 //! Returns TRUE if the point is a vertex on the initial
162 //! restriction facet of the first surface.
163 Standard_Boolean IsVertexOnS2() const;
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;
171 //! Returns the arc of restriction containing the
173 //! The exception DomainError is raised if
174 //! IsOnDomS2 returns False.
175 const Handle(Adaptor2d_HCurve2d)& ArcOnS2() const;
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
181 const IntSurf_Transition& TransitionLineArc2() const;
183 //! Returns the transition between the intersection line
184 //! returned by the method Line and the arc on S2 returned
186 //! The exception DomainError is raised if
187 //! IsOnDomS2 returns False.
188 const IntSurf_Transition& TransitionOnS2() const;
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;
196 //! Returns the PntOn2S
197 //! (geometric Point and the parameters)
198 const IntSurf_PntOn2S& PntOn2S() const;
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;
204 Standard_EXPORT void ReverseTransition();
206 Standard_EXPORT void Dump() const;
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;
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;
245 #include <IntPatch_Point.lxx>
251 #endif // _IntPatch_Point_HeaderFile