42cf5bc1 |
1 | // Created on: 1993-03-04 |
2 | // Created by: Jacques GOUSSARD |
3 | // Copyright (c) 1993-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 _Contap_Point_HeaderFile |
18 | #define _Contap_Point_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <gp_Pnt.hxx> |
25 | #include <Standard_Real.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <IntSurf_Transition.hxx> |
c22b52d6 |
28 | |
42cf5bc1 |
29 | class Adaptor3d_HVertex; |
42cf5bc1 |
30 | |
31 | |
32 | //! Definition of a vertex on the contour line. |
33 | //! Most of the time, such a point is an intersection |
34 | //! between the contour and a restriction of the surface. |
b81b237f |
35 | //! When it is not the method IsOnArc return False. |
21c7c457 |
36 | //! Such a point is contains geometrical information (see |
37 | //! the Value method) and logical information. |
42cf5bc1 |
38 | class Contap_Point |
39 | { |
40 | public: |
41 | |
42 | DEFINE_STANDARD_ALLOC |
43 | |
44 | |
45 | //! Empty constructor. |
46 | Standard_EXPORT Contap_Point(); |
47 | |
48 | //! Creates a point. |
49 | Standard_EXPORT Contap_Point(const gp_Pnt& Pt, const Standard_Real U, const Standard_Real V); |
50 | |
51 | //! Sets the values for a point. |
52 | void SetValue (const gp_Pnt& Pt, const Standard_Real U, const Standard_Real V); |
53 | |
54 | //! Set the value of the parameter on the intersection line. |
55 | void SetParameter (const Standard_Real Para); |
56 | |
57 | //! Sets the values of a point which is a vertex on |
58 | //! the initial facet of restriction of one |
59 | //! of the surface. |
60 | void SetVertex (const Handle(Adaptor3d_HVertex)& V); |
61 | |
62 | //! Sets the value of the arc and of the parameter on |
63 | //! this arc of the point. |
c22b52d6 |
64 | void SetArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); |
42cf5bc1 |
65 | |
66 | void SetMultiple(); |
67 | |
68 | void SetInternal(); |
69 | |
70 | //! Returns the intersection point (geometric information). |
71 | const gp_Pnt& Value() const; |
72 | |
73 | //! This method returns the parameter of the point |
74 | //! on the intersection line. |
75 | //! If the points does not belong to an intersection line, |
76 | //! the value returned does not have any sens. |
77 | Standard_Real ParameterOnLine() const; |
78 | |
79 | //! Returns the parameters on the surface of the point. |
80 | void Parameters (Standard_Real& U1, Standard_Real& V1) const; |
81 | |
82 | //! Returns True when the point is an intersection between |
83 | //! the contour and a restriction. |
84 | Standard_Boolean IsOnArc() const; |
85 | |
86 | //! Returns the arc of restriction containing the |
87 | //! vertex. |
c22b52d6 |
88 | const Handle(Adaptor2d_Curve2d)& Arc() const; |
42cf5bc1 |
89 | |
90 | //! Returns the parameter of the point on the |
91 | //! arc returned by the method Arc(). |
92 | Standard_Real ParameterOnArc() const; |
93 | |
94 | //! Returns the transition of the point on the contour. |
95 | const IntSurf_Transition& TransitionOnLine() const; |
96 | |
97 | //! Returns the transition of the point on the arc. |
98 | const IntSurf_Transition& TransitionOnArc() const; |
99 | |
100 | //! Returns TRUE if the point is a vertex on the initial |
101 | //! restriction facet of the surface. |
102 | Standard_Boolean IsVertex() const; |
103 | |
104 | //! Returns the information about the point when it is |
105 | //! on the domain of the patch, i-e when the function |
106 | //! IsVertex returns True. |
107 | //! Otherwise, an exception is raised. |
108 | const Handle(Adaptor3d_HVertex)& Vertex() const; |
109 | |
110 | //! Returns True if the point belongs to several |
111 | //! lines. |
112 | Standard_Boolean IsMultiple() const; |
113 | |
114 | //! Returns True if the point is an internal one, i.e |
115 | //! if the tangent to the line on the point and the |
116 | //! eye direction are parallel. |
117 | Standard_Boolean IsInternal() const; |
118 | |
119 | |
120 | |
121 | |
122 | protected: |
123 | |
124 | |
125 | |
126 | |
127 | |
128 | private: |
129 | |
130 | |
131 | |
132 | gp_Pnt pt; |
133 | Standard_Real uparam; |
134 | Standard_Real vparam; |
135 | Standard_Real paraline; |
136 | Standard_Boolean onarc; |
c22b52d6 |
137 | Handle(Adaptor2d_Curve2d) arc; |
42cf5bc1 |
138 | IntSurf_Transition traline; |
139 | IntSurf_Transition traarc; |
140 | Standard_Real prmarc; |
141 | Standard_Boolean isvtx; |
142 | Handle(Adaptor3d_HVertex) vtx; |
143 | Standard_Boolean ismult; |
144 | Standard_Boolean myInternal; |
145 | |
146 | |
147 | }; |
148 | |
149 | |
150 | #include <Contap_Point.lxx> |
151 | |
152 | |
153 | |
154 | |
155 | |
156 | #endif // _Contap_Point_HeaderFile |