0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / ChFiDS / ChFiDS_CommonPoint.hxx
1 // Created on: 1993-11-29
2 // Created by: Isabelle GRIGNON
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 _ChFiDS_CommonPoint_HeaderFile
18 #define _ChFiDS_CommonPoint_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TopoDS_Edge.hxx>
25 #include <TopoDS_Vertex.hxx>
26 #include <gp_Pnt.hxx>
27 #include <gp_Vec.hxx>
28 #include <Standard_Real.hxx>
29 #include <Standard_Boolean.hxx>
30 #include <TopAbs_Orientation.hxx>
31 class Standard_DomainError;
32 class Standard_TypeMismatch;
33 class TopoDS_Vertex;
34 class TopoDS_Edge;
35 class gp_Pnt;
36 class gp_Vec;
37
38
39 //! point    start/end of  fillet common  to  2 adjacent  filets
40 //! and  to an edge on  one of 2 faces participating
41 //! in  the construction of  the  fillet
42 class ChFiDS_CommonPoint 
43 {
44 public:
45
46   DEFINE_STANDARD_ALLOC
47
48   
49   //! Empty constructor.
50   Standard_EXPORT ChFiDS_CommonPoint();
51   
52   //! default value for all fields
53   Standard_EXPORT void Reset();
54   
55   //! Sets the values of a point which is a vertex on
56   //! the initial facet of restriction of one
57   //! of the surface.
58     void SetVertex (const TopoDS_Vertex& V);
59   
60   //! Sets the values of a point which is on the arc
61   //! A, at parameter Param.
62   Standard_EXPORT void SetArc (const Standard_Real Tol, const TopoDS_Edge& A, const Standard_Real Param, const TopAbs_Orientation TArc);
63   
64   //! Sets the value of the parameter on the spine
65   Standard_EXPORT void SetParameter (const Standard_Real Param);
66   
67   //! Set the 3d point for a commonpoint that is not
68   //! a vertex or on an arc.
69     void SetPoint (const gp_Pnt& Point);
70   
71   //! Set the output 3d  vector
72     void SetVector (const gp_Vec& Vector);
73   
74   //! This method set the fuzziness on the point.
75     void SetTolerance (const Standard_Real Tol);
76   
77   //! This method returns the fuzziness on the point.
78     Standard_Real Tolerance() const;
79   
80   //! Returns TRUE if the point is a vertex on the initial
81   //! restriction facet of the surface.
82     Standard_Boolean IsVertex() const;
83   
84   //! Returns the information about the point when it is
85   //! on the domain of the first patch, i-e when the function
86   //! IsVertex returns True.
87   //! Otherwise, an exception is raised.
88     const TopoDS_Vertex& Vertex() const;
89   
90   //! Returns TRUE if the point is a on an edge of the initial
91   //! restriction facet of the surface.
92     Standard_Boolean IsOnArc() const;
93   
94   //! Returns the arc of restriction containing the
95   //! vertex.
96   Standard_EXPORT const TopoDS_Edge& Arc() const;
97   
98   //! Returns the transition of the point on the arc
99   //! returned by Arc().
100   Standard_EXPORT TopAbs_Orientation TransitionOnArc() const;
101   
102   //! Returns the parameter of the point on the
103   //! arc returned by the method Arc().
104   Standard_EXPORT Standard_Real ParameterOnArc() const;
105   
106   //! Returns  the parameter the  paramter on the  spine
107   Standard_EXPORT Standard_Real Parameter() const;
108   
109   //! Returns the 3d point
110     const gp_Pnt& Point() const;
111   
112   //! Returns TRUE if the output vector is  stored.
113     Standard_Boolean HasVector() const;
114   
115   //! Returns the output  3d vector
116     const gp_Vec& Vector() const;
117
118
119
120
121 protected:
122
123
124
125
126
127 private:
128
129
130
131   TopoDS_Edge arc;
132   TopoDS_Vertex vtx;
133   gp_Pnt point;
134   gp_Vec vector;
135   Standard_Real tol;
136   Standard_Real prmarc;
137   Standard_Real prmtg;
138   Standard_Boolean isonarc;
139   TopAbs_Orientation traarc;
140   Standard_Boolean isvtx;
141   Standard_Boolean hasvector;
142
143
144 };
145
146
147 #include <ChFiDS_CommonPoint.lxx>
148
149
150
151
152
153 #endif // _ChFiDS_CommonPoint_HeaderFile