summaryrefslogtreecommitdiff
path: root/inc/IntRes2d_Domain.hxx
blob: bfd2c1a2afcaafd5ce465446c70b55290400f162 (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
// 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 _IntRes2d_Domain_HeaderFile
#define _IntRes2d_Domain_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _gp_Pnt2d_HeaderFile
#include <gp_Pnt2d.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class Standard_DomainError;
class gp_Pnt2d;


//! Definition of the domain of parameter on a 2d-curve. <br>
//!          Most of the time, a domain is defined by two extremities. <br>
//!          An extremity is made of : <br>
//!           - a point in 2d-space (Pnt2d from gp), <br>
//!           - a parameter on the curve, <br>
//!           - a tolerance in the 2d-space. <br>
//!          Sometimes, it can be made of 0 or 1 point ( for an infinite <br>
//!          or semi-infinite line for example). <br>
//! <br>
//!          For Intersection algorithms, Ellipses and Circles <br>
//!          Domains must be closed. <br>
//!          So, SetEquivalentParameters(.,.) method must be called <br>
//!          after initializing the first and the last bounds. <br>
class IntRes2d_Domain  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Creates an infinite Domain (HasFirstPoint = False <br>
//!          and HasLastPoint = False). <br>
  Standard_EXPORT   IntRes2d_Domain();
  //! Creates a bounded Domain. <br>
  Standard_EXPORT   IntRes2d_Domain(const gp_Pnt2d& Pnt1,const Standard_Real Par1,const Standard_Real Tol1,const gp_Pnt2d& Pnt2,const Standard_Real Par2,const Standard_Real Tol2);
  //! Creates a semi-infinite Domain. If First is set to <br>
//!          True, the given point is the first point of the domain, <br>
//!          otherwise it is the last point. <br>
  Standard_EXPORT   IntRes2d_Domain(const gp_Pnt2d& Pnt,const Standard_Real Par,const Standard_Real Tol,const Standard_Boolean First);
  //! Sets the values for a bounded domain. <br>
  Standard_EXPORT     void SetValues(const gp_Pnt2d& Pnt1,const Standard_Real Par1,const Standard_Real Tol1,const gp_Pnt2d& Pnt2,const Standard_Real Par2,const Standard_Real Tol2) ;
  //! Sets the values for an infinite domain. <br>
  Standard_EXPORT     void SetValues() ;
  //! Sets the values for a semi-infinite domain. <br>
  Standard_EXPORT     void SetValues(const gp_Pnt2d& Pnt,const Standard_Real Par,const Standard_Real Tol,const Standard_Boolean First) ;
  //! Defines a closed domain. <br>
        void SetEquivalentParameters(const Standard_Real zero,const Standard_Real period) ;
  //! Returns True if the domain has a first point, i-e <br>
//!          a point defining the lowest admitted parameter on the <br>
//!          curve. <br>
        Standard_Boolean HasFirstPoint() const;
  //! Returns the parameter of the first point of the domain <br>
//!          The exception DomainError is raised if HasFirstPoint <br>
//!          returns False. <br>
        Standard_Real FirstParameter() const;
  //! Returns the first point of the domain. <br>
//!          The exception DomainError is raised if HasFirstPoint <br>
//!          returns False. <br>
       const gp_Pnt2d& FirstPoint() const;
  //! Returns the tolerance of the first (left) bound. <br>
//!          The exception DomainError is raised if HasFirstPoint <br>
//!          returns False. <br>
        Standard_Real FirstTolerance() const;
  //! Returns True if the domain has a last point, i-e <br>
//!          a point defining the highest admitted parameter on the <br>
//!          curve. <br>
        Standard_Boolean HasLastPoint() const;
  //! Returns the parameter of the last point of the domain. <br>
//!          The exception DomainError is raised if HasLastPoint <br>
//!          returns False. <br>
        Standard_Real LastParameter() const;
  //! Returns the last point of the domain. <br>
//!          The exception DomainError is raised if HasLastPoint <br>
//!          returns False. <br>
       const gp_Pnt2d& LastPoint() const;
  //! Returns the tolerance of the last (right) bound. <br>
//!          The exception DomainError is raised if HasLastPoint <br>
//!          returns False. <br>
        Standard_Real LastTolerance() const;
  //! Returns True if the domain is closed. <br>
        Standard_Boolean IsClosed() const;
  //! Returns Equivalent parameters if the domain is closed. <br>
//!          Otherwise, the exception DomainError is raised. <br>
        void EquivalentParameters(Standard_Real& zero,Standard_Real& zeroplusperiod) const;





protected:





private:



Standard_Integer status;
Standard_Real first_param;
Standard_Real last_param;
Standard_Real first_tol;
Standard_Real last_tol;
gp_Pnt2d first_point;
gp_Pnt2d last_point;
Standard_Real periodfirst;
Standard_Real periodlast;


};


#include <IntRes2d_Domain.lxx>



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


#endif