summaryrefslogtreecommitdiff
path: root/inc/IntPatch_ALine.hxx
blob: c310e142f54f4f61a8adc712d2d086cf63bab47c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _IntPatch_ALine_HeaderFile
#define _IntPatch_ALine_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_IntPatch_ALine_HeaderFile
#include <Handle_IntPatch_ALine.hxx>
#endif

#ifndef _IntAna_Curve_HeaderFile
#include <IntAna_Curve.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _IntPatch_SequenceOfPoint_HeaderFile
#include <IntPatch_SequenceOfPoint.hxx>
#endif
#ifndef _IntPatch_Line_HeaderFile
#include <IntPatch_Line.hxx>
#endif
#ifndef _IntSurf_TypeTrans_HeaderFile
#include <IntSurf_TypeTrans.hxx>
#endif
#ifndef _IntSurf_Situation_HeaderFile
#include <IntSurf_Situation.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
#endif
class Standard_DomainError;
class Standard_OutOfRange;
class IntAna_Curve;
class IntPatch_Point;
class gp_Pnt;
class gp_Vec;


//! Implementation of an intersection line described by a <br>
//!          parametrised curve. <br>
class IntPatch_ALine : public IntPatch_Line {

public:

  //! Creates an analytic intersection line <br>
//!          when the transitions are In or Out. <br>
  Standard_EXPORT   IntPatch_ALine(const IntAna_Curve& C,const Standard_Boolean Tang,const IntSurf_TypeTrans Trans1,const IntSurf_TypeTrans Trans2);
  //! Creates an analytic intersection line <br>
//!          when the transitions are Touch. <br>
  Standard_EXPORT   IntPatch_ALine(const IntAna_Curve& C,const Standard_Boolean Tang,const IntSurf_Situation Situ1,const IntSurf_Situation Situ2);
  //! Creates an analytic intersection line <br>
//!          when the transitions are Undecided. <br>
  Standard_EXPORT   IntPatch_ALine(const IntAna_Curve& C,const Standard_Boolean Tang);
  //! To add a vertex in the list. <br>
  Standard_EXPORT     void AddVertex(const IntPatch_Point& Pnt) ;
  //! Replaces the element of range Index in the list <br>
//!          of points. <br>
        void Replace(const Standard_Integer Index,const IntPatch_Point& Pnt) ;
  
        void SetFirstPoint(const Standard_Integer IndFirst) ;
  
        void SetLastPoint(const Standard_Integer IndLast) ;
  //! Returns the first parameter on the intersection line. <br>
//!          If IsIncluded returns True, Value and D1 methods can <br>
//!          be call with a parameter equal to FirstParamater. <br>
//!          Otherwise, the parameter must be greater than <br>
//!          FirstParameter. <br>
        Standard_Real FirstParameter(Standard_Boolean& IsIncluded) const;
  //! Returns the last parameter on the intersection line. <br>
//!          If IsIncluded returns True, Value and D1 methods can <br>
//!          be call with a parameter equal to LastParamater. <br>
//!          Otherwise, the parameter must be less than LastParameter. <br>
        Standard_Real LastParameter(Standard_Boolean& IsIncluded) const;
  //! Returns the point of parameter U on the analytic <br>
//!          intersection line. <br>
        gp_Pnt Value(const Standard_Real U) ;
  //! Returns Standard_True when the derivative at parameter U <br>
//!          is defined on the analytic intersection line. <br>
//!          In that case, Du is the derivative. <br>
//!          Returns Standard_False when it is not possible to <br>
//!          evaluate the derivative. <br>
//!          In both cases, P is the point at parameter U on the <br>
//!          intersection. <br>
        Standard_Boolean D1(const Standard_Real U,gp_Pnt& P,gp_Vec& Du) ;
  //! Tries to find the parameter of the point P on the curve. <br>
//!          If the method returns False, the "projection" is <br>
//!          impossible, and the value of Para is not significant. <br>
//!          If the method returns True, Para is the parameter of the <br>
//!          nearest intersection between the curve and the iso-theta <br>
//!          containing P. <br>
        Standard_Boolean FindParameter(const gp_Pnt& P,Standard_Real& Para) const;
  //! Returns True if the line has a known First point. <br>
//!          This point is given by the method FirstPoint(). <br>
        Standard_Boolean HasFirstPoint() const;
  //! Returns True if the line has a known Last point. <br>
//!          This point is given by the method LastPoint(). <br>
        Standard_Boolean HasLastPoint() const;
  //! Returns the IntPoint corresponding to the FirstPoint. <br>
//!          An exception is raised when HasFirstPoint returns False. <br>
       const IntPatch_Point& FirstPoint() const;
  //! Returns the IntPoint corresponding to the LastPoint. <br>
//!          An exception is raised when HasLastPoint returns False. <br>
       const IntPatch_Point& LastPoint() const;
  
        Standard_Integer NbVertex() const;
  //! Returns the vertex of range Index on the line. <br>
       const IntPatch_Point& Vertex(const Standard_Integer Index) const;
  //! Set the parameters of all the vertex on the line. <br>
//!          if a vertex is already in the line, <br>
//!             its parameter is modified <br>
//!          else a new point in the line is inserted. <br>
  Standard_EXPORT     void ComputeVertexParameters(const Standard_Real Tol) ;
  
  Standard_EXPORT    const IntAna_Curve& Curve() const;




  DEFINE_STANDARD_RTTI(IntPatch_ALine)

protected:




private: 


IntAna_Curve curv;
Standard_Boolean fipt;
Standard_Boolean lapt;
Standard_Integer indf;
Standard_Integer indl;
IntPatch_SequenceOfPoint svtx;


};


#include <IntPatch_ALine.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif